|
-
Dec 23rd, 2004, 03:40 PM
#1
Thread Starter
Addicted Member
OCX registeration[Solved]
I want to register "MSINET.OCX" and "MSWINSCK.OCX"(not on my computer)...... I've tried the following codes (in a friend's computer) but they all gave the same error, "system error &h8007007e (-2147024770). The specified module could not be fonund." . The codes are:
VB Code:
Public Function RegisterServer(hWnd As Long, DllServerPath As String, bRegister As Boolean)
On Error Resume Next
'KPD-Team 2000
'URL: [url]http://www.allapi.net/[/url]
'We're going to call an API-function, without declaring it!
' Modified by G. Kleijer
' going to call the DllRegisterServer/DllUnRegisterServer API of the specified library.
' there's no need to use the Regsvr32.exe anymore.
' Make sure the path is correct and that the file exists, otherwise VB will crash.
Dim lb As Long, pa As Long
lb = LoadLibrary(DllServerPath)
If bRegister Then
pa = GetProcAddress(lb, "DllRegisterServer")
Else
pa = GetProcAddress(lb, "DllUnregisterServer")
End If
If CallWindowProc(pa, hWnd, ByVal 0&, ByVal 0&, ByVal 0&) = ERROR_SUCCESS Then
MsgBox IIf(bRegister = True, "Registration", "Unregistration") + " Successful"
Else
MsgBox IIf(bRegister = True, "Registration", "Unregistration") + " Unsuccessful"
End If
'unmap the library's address
FreeLibrary lb
End Function
VB Code:
Public Sub RegComponent(ByVal ComName As String, ByVal sRegister As String)
Shell ("Regsvr32 " & ComName & sRegister)
End Sub
VB Code:
Dim rc As Double
rc = Shell("regsvr32 " & App.Path & "\MSINET.ocx", vbNormalFocus)
rc = Shell("regsvr32 " & App.Path & "\MSWINSCK.ocx", vbNormalFocus)
VB Code:
Shell (regsvr32 & "c:\windows\MSINET.OCX /s")
Shell (regsvr32 & "c:\windows\MSWINSCK.OCX /s")
I called those functions.... But they all gave the same error....
Any help will be appreciated....
Last edited by kill_bill_gates; Dec 31st, 2004 at 01:52 PM.
"Quis custodiet ipsos custodes?"
Juvenal
Mete the Hun wanted to live in peace with the Chinese. So he gave the Chinese Emperor his favorite horse, best swords in his armory, and lots of other cool stuff. But then the Chinese Emperor asked for one thing. A useless land through the north. It was a small, useless, unproductive, uninhabited piece of land. But Mete the Hun's answer was certain:
I gave you horses, weapons and much more which belonged to me. But the lands are not mine, it's my nation's and I'm ready to fight, kill and die for just an inch my country
-=Joey Jordison R0CKS!! =-
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
|