Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Registering a DLL or OCX from VB
Message
De
06/06/2001 16:44:32
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Titre:
Registering a DLL or OCX from VB
Divers
Thread ID:
00516044
Message ID:
00516044
Vues:
75
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
Fil
Voir

Click here to load this message in the networking platform