Or do I have to shell REGSVR32.EXE?
Printable View
Or do I have to shell REGSVR32.EXE?
I believe you can do this:
Private Declare Function DllRegisterServer() lib "MyDll.Dll" as long
then just call it like any other API...
How about the unregistering part?
I got it work with regsrvr32, by using /S flag i could remove the popup message, so i guess if all people have regsrvr32 on their computer it's ok.
To Unregister a DLL/OCX
Code:Option Explicit
Private Declare Function DllUnregisterServer Lib "MyDll.Dll" () As Long
Const ERROR_SUCCESS = &H0
Private Sub Form_Load()
If DllUnregisterServer = ERROR_SUCCESS Then
MsgBox "UnRegistration Successful"
Else
MsgBox "UnRegistration Unsuccessful"
End If
End Sub
Thanks guys