Dll or ActiveX

  • Thread starter Thread starter Albert Krüger
  • Start date Start date
A

Albert Krüger

Hello!

I have folder with dll-files. Some of this files are "normal" dll and some
are ActiveX-dll. How can I differ which are the dll and which are the
ActiveX?

Thanks
Albert Krüger
 
Well, you can check for COM-specific functions exported from DLL
DllRegisterServer
DllUnregisterServer
DllGetClassObject

If the Dll is COM (ActiveX) it will export such functions.

Best regards
Rafal Gwizdala
 
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
 
Back
Top