Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Registering a DLL or OCX from VB
Message
From
06/06/2001 16:44:32
 
 
To
All
General information
Forum:
Visual Basic
Category:
Other
Title:
Registering a DLL or OCX from VB
Miscellaneous
Thread ID:
00516044
Message ID:
00516044
Views:
73
Can anyone tell me what is wrong with this? Or is there a better way?

Private Sub Command2_Click()
Dim ret As Long
Dim myfile, myexe, fullpath As String
myexe = "regsvr32.exe /s "
myfile = """" & App.Path & "\ScrRun.Dll" & """"
fullpath = myexe & myfile
ret = ShellExecute(App.hInstance, "Open", fullpath, "", "", 1)
MsgBox ret
End Sub

My ret value is a '2' which, I think, means 'ERROR_PATH_NOT_FOUND', but when I cut and paste my "fullpath" value into the Start->Run it works fine and registers my dll.

Help please.
Thanking you in advance for your help.
~brad
Next
Reply
Map
View

Click here to load this message in the networking platform