Imports System.Runtime.InteropServices Imports System.Security Public Module EgtInterface #If DEBUG Then Const EgtIntDll32 As String = "EgtBasisD32.dll" #Else Const EgtIntDll32 As String = "EgtBasisR32.dll" #End If Public Function EgtSetKey(sKey As String) As Boolean End Function Public Function EgtGetKeyLevel(nProd As Integer, nVer As Integer, nLev As Integer, ByRef nKLev As Integer) As Boolean End Function Public Function EgtGetKeyOptions(nProd As Integer, nVer As Integer, nLev As Integer, ByRef nOpt1 As UInteger, ByRef nOpt2 As UInteger) As Boolean End Function Public Function EgtGetKeyLeftDays(ByRef nLeftDays As Integer) As Boolean End Function Public Function EgtGetKeyAssLeftDays(ByRef nAssLeftDays As Integer) As Boolean End Function Public Function EgtGetKeyOptLeftDays(ByRef nOptLeftDays As Integer) As Boolean End Function Public Function EgtFreeMemory(sB As IntPtr) As Boolean End Function Public Function EgtLoadMessages(sMsgFilePath As String) As Boolean End Function Private Function EgtGetMsg_32(nId As Integer) As IntPtr End Function Public Function EgtMsg(nId As Integer) As String Return Marshal.PtrToStringUni(EgtGetMsg_32(nId)) ' Non è necessario liberare la memoria nativa perchè usa un buffer statico End Function Public Function EgtInitLogger(nDebug As Integer, sLogFilePath As String) As Boolean End Function Private Function EgtOutLog(sMsg As String, nDebugLevel As Integer) As Boolean End Function Private Function EgtGetStringUtf8FromIni_32(sSec As String, sKey As String, sDef As String, ByRef sVal As IntPtr, sIniFile As String) As Boolean End Function Public Function EgtGetStringUtf8FromIni(sSec As String, sKey As String, sDef As String, ByRef sVal As String, sIniFile As String) As Boolean Dim psVal As IntPtr Dim bOk As Boolean = EgtGetStringUtf8FromIni_32(sSec, sKey, sDef, psVal, sIniFile) If bOk Then sVal = Marshal.PtrToStringUni(psVal) EgtFreeMemory(psVal) Else sVal = String.Empty End If Return bOk End Function Public Function EgtWriteStringUtf8toIni(sSec As String, sKey As String, sVal As String, sIniFile As String) As Boolean End Function End Module