From 53ddba83f012a1bf775b4380ee1042221811db01 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 7 Sep 2017 09:28:40 +0000 Subject: [PATCH] TestEIn : - aggiornamento. --- EgtInterface.vb | 63 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 50 insertions(+), 13 deletions(-) diff --git a/EgtInterface.vb b/EgtInterface.vb index 3fb7441..0e7fcbb 100644 --- a/EgtInterface.vb +++ b/EgtInterface.vb @@ -1194,19 +1194,56 @@ Public Function EgtSetOutText(Callback As OutTextCallback) As Boolean End If End Function - - Private Function EgtSetMainWindowHandle_32(hMainWnd As IntPtr) As Boolean - End Function - - Private Function EgtSetMainWindowHandle_64(hMainWnd As IntPtr) As Boolean - End Function - Public Function EgtSetMainWindowHandle(hMainWnd As IntPtr) As Boolean - If IntPtr.Size = 4 Then - Return EgtSetMainWindowHandle_32(hMainWnd) - Else - Return EgtSetMainWindowHandle_64(hMainWnd) - End If - End Function + +Private Function EgtSetTempDir_32(sTempDir As String) As Boolean +End Function + +Private Function EgtSetTempDir_64(sTempDir As String) As Boolean +End Function +Public Function EgtSetTempDir(sTempDir As String) As Boolean + If IntPtr.Size = 4 Then + Return EgtSetTempDir_32(sTempDir) + Else + Return EgtSetTempDir_64(sTempDir) + End If +End Function + + +Private Function EgtGetTempDir_32(ByRef psTempDir As IntPtr) As Boolean +End Function + +Private Function EgtGetTempDir_64(ByRef psTempDir As IntPtr) As Boolean +End Function +Public Function EgtGetTempDir(ByRef sTempDir As String) As Boolean + Dim psTempDir As IntPtr + Dim bOk As Boolean + If IntPtr.Size = 4 Then + bOk = EgtGetTempDir_32(psTempDir) + Else + bOk = EgtGetTempDir_64(psTempDir) + End If + If bOk Then + sTempDir = Marshal.PtrToStringUni(psTempDir) + EgtFreeMemory(psTempDir) + Else + sTempDir = String.Empty + End If + Return bOk +End Function + + +Private Function EgtSetMainWindowHandle_32(hMainWnd As IntPtr) As Boolean +End Function + +Private Function EgtSetMainWindowHandle_64(hMainWnd As IntPtr) As Boolean +End Function +Public Function EgtSetMainWindowHandle(hMainWnd As IntPtr) As Boolean + If IntPtr.Size = 4 Then + Return EgtSetMainWindowHandle_32(hMainWnd) + Else + Return EgtSetMainWindowHandle_64(hMainWnd) + End If +End Function '---------- UiUnits ------------------------------------------------------------