|
-
Nov 28th, 2000, 04:13 AM
#1
Thread Starter
Fanatic Member
Hi all,
since I'm having problems with the packet deployment wizard of VB, and since I believe it's not customizeable enough, I'm using a freeware setup program that greatly does the job.
At the end of the setup I launch a little program to register ocx on the computers that have the "component comdlg32.ocx: file missing or incorreclty registered" error.
I'm using this code but it does not seem to work, please HELP!!!! I need a code that really DOES register an OCX (like regsrv32.exe does!).
I need this last step to release my program.
Code:
Public Declare Function RegComCtl32 Lib "ComCtl32.OCX" _
Alias "DllRegisterServer" () As Long
Public Declare Function UnRegComCtl32 Lib "ComCtl32.OCX" _
Alias "DllUnregisterServer" () As Long
Public Const S_OK = &H0
Sub RegisterComCtl32()
On Error GoTo Err_Registration_Failed
If RegComCtl32 = S_OK Then
MsgBox "Registered Successfully"
Else
MsgBox "Not Registered"
End If
Exit Sub
Err_Registration_Failed:
MsgBox "Error: " & Err.Number & " " & Err.Description
End Sub
Sub UnRegisterComCtl32()
On Error GoTo Err_Unregistration_Failed
If UnRegComCtl32 = S_OK Then
MsgBox "Unregistered Successfully"
Else
MsgBox "Not Unregistered"
End If
Exit Sub
Err_Unregistration_Failed:
MsgBox "Error: " & Err.Number & " " & Err.Description
End Sub
Thank you in advance,
W.
When your car breaks down,
close all windows and retry 
=> please rate all users posts! <=
-
Nov 30th, 2000, 09:57 PM
#2
New Member
Are you trying to register the ComCtl32.OCX or
the Comdlg32.Ocx? Your code (I am not sure the way
it is correct or not) referencing the Comctl32.Ocx,
but your error message concern ComDlg32.Ocx. Please
clerify if this is only a miss spelling.
Originally posted by wildcat_2000
Hi all,
since I'm having problems with the packet deployment wizard of VB, and since I believe it's not customizeable enough, I'm using a freeware setup program that greatly does the job.
At the end of the setup I launch a little program to register ocx on the computers that have the "component comdlg32.ocx: file missing or incorreclty registered" error.
I'm using this code but it does not seem to work, please HELP!!!! I need a code that really DOES register an OCX (like regsrv32.exe does!).
I need this last step to release my program.
Code:
Public Declare Function RegComCtl32 Lib "ComCtl32.OCX" _
Alias "DllRegisterServer" () As Long
Public Declare Function UnRegComCtl32 Lib "ComCtl32.OCX" _
Alias "DllUnregisterServer" () As Long
Public Const S_OK = &H0
Sub RegisterComCtl32()
On Error GoTo Err_Registration_Failed
If RegComCtl32 = S_OK Then
MsgBox "Registered Successfully"
Else
MsgBox "Not Registered"
End If
Exit Sub
Err_Registration_Failed:
MsgBox "Error: " & Err.Number & " " & Err.Description
End Sub
Sub UnRegisterComCtl32()
On Error GoTo Err_Unregistration_Failed
If UnRegComCtl32 = S_OK Then
MsgBox "Unregistered Successfully"
Else
MsgBox "Not Unregistered"
End If
Exit Sub
Err_Unregistration_Failed:
MsgBox "Error: " & Err.Number & " " & Err.Description
End Sub
Thank you in advance,
W.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|