|
-
Nov 29th, 2000, 02:24 PM
#1
I have some workstations that will register and some that dont. It seems that there is somthing missing from the workststion like a dll.
I used the following code..
Option Explicit
Private Declare Function DllRegisterServer Lib "nwdir.ocx" () As Long
Private Declare Function DllUnregisterServer Lib "nwdir.ocx" () As Long
Const ERROR_SUCCESS = &H0
Private Sub Command1_Click()
If DllRegisterServer = ERROR_SUCCESS Then
MsgBox "Registration Successful"
Else
MsgBox "Registration Unsuccessful"
End If
End Sub
Private Sub Command2_Click()
If DllUnregisterServer = ERROR_SUCCESS Then
MsgBox "UnRegistration Successful"
Else
MsgBox "UnRegistration Unsuccessful"
End If
End Sub
On the machines that will not register I get a runtime error 48 but on other machines it works fine. The ocx is in the system dir. Mix of win95 and win98
-
Nov 29th, 2000, 03:16 PM
#2
In order for the DllRegisterServer and DllUnregisterServer api function to work, you have to have regsvr32.exe on your computer, hopefully in the C:\Windows\System directory.
Perhaps some of the workstations are missing that file?
-
Nov 30th, 2000, 08:19 PM
#3
Bingo! I found the problem...
Out of date mfc42.dll. Thanks for the help though.
-
Dec 1st, 2000, 03:22 PM
#4
Monday Morning Lunatic
Matthew - you don't need to have regsvr32.exe...the functions are both stored in the .ocx file.
All that regsvr32.exe does is to call either of those functions.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
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
|