Information générale
Titre:
Registering a DLL or OCX from VB
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement