I goto RUN then I type what????? I forgot please help
thanks in adavnace
Printable View
I goto RUN then I type what????? I forgot please help
thanks in adavnace
...to register.Code:regsvr32 mydll.dll
...to unregister.Code:regsvr32 /u mydll.dll
thanks
Can you register OCX's the same way?
yea, and once megatron suggested using:
regsvr32 "c:\my ocxs\a.ocx"
becuase then you can have spaces in it
You can also do it from inside your program, by calling the DllRegisterServer and DllUnregisterServer functions which are exported from all OCX files. (An OCX is a DLL with a different extension).
An example of what parksie is talking about is this:
Code:'This will register or unregister a dll/ocx
Option Explicit
Private Declare Function DllRegisterServer Lib "MyDll.Dll" () As Long
Private Declare Function DllUnregisterServer Lib "MyDll.Dll" () As Long
Const ERROR_SUCCESS = &H0
If DllRegisterServer = ERROR_SUCCESS Then
MsgBox "Registration Successful"
Else
MsgBox "Registration Unsuccessful"
End If
If DllUnregisterServer = ERROR_SUCCESS Then
MsgBox "UnRegistration Successful"
Else
MsgBox "UnRegistration Unsuccessful"
End If
Or use the Shell method.
Code:Shell "Regsvr32.exe mydll.dll"
Is there a way to verify that the OCX was or was not registered before you run the code below?
Quote:
Originally posted by Matthew Gates
Code:'This will register or unregister a dll/ocx
Option Explicit
Private Declare Function DllRegisterServer Lib "MyDll.Dll" () As Long
Private Declare Function DllUnregisterServer Lib "MyDll.Dll" () As Long
Const ERROR_SUCCESS = &H0
If DllRegisterServer = ERROR_SUCCESS Then
MsgBox "Registration Successful"
Else
MsgBox "Registration Unsuccessful"
End If
If DllUnregisterServer = ERROR_SUCCESS Then
MsgBox "UnRegistration Successful"
Else
MsgBox "UnRegistration Unsuccessful"
End If