Hello!
I've tried that, but I get always an Error. I think I make a mistake at the
dll declaration.
Public Class CKernel32
Declare Auto Function LoadLibrary Lib "Kernel32.dll" _
(ByVal lpLibFileName As String) As Integer
Declare Auto Function FreeLibrary Lib "Kernel32.dll" _
(ByVal hLibModule As Integer) As Integer
Declare Auto Function GetProcAddress Lib "Kernel32.dll" _
(ByVal hModule As Integer, ByVal lpProcName As String) As
Integer
Declare Auto Function GetLastError Lib "Kernel32.dll" _
() As Integer
End Class
Now I call:
....
intHdl = objKernel32.LoadLibrary(strOcxFilePath) '// OK
If intHdl > 0
intAdr = objKernel32.GetProcAddress(intHdl, strFunctionName) '// always
0
intErr = objKernel32.GetLastError() '// always 127 = The specified
procedure could not be foundThe specified procedure could not be found
...
End If
Albert Krüger