Results 1 to 12 of 12

Thread: OCX registeration[Solved]

Threaded View

  1. #1

    Thread Starter
    Addicted Member kill_bill_gates's Avatar
    Join Date
    Oct 2004
    Posts
    222

    Thumbs up 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:
      1. Public Function RegisterServer(hWnd As Long, DllServerPath As String, bRegister As Boolean)
      2.     On Error Resume Next
      3.  
      4.     'KPD-Team 2000
      5.     'URL: [url]http://www.allapi.net/[/url]
      6.     'E-Mail: [email][email protected][/email]
      7.     'We're going to call an API-function, without declaring it!
      8.  
      9.     ' Modified by G. Kleijer
      10.     ' [email][email protected][/email]
      11.     ' going to call the DllRegisterServer/DllUnRegisterServer API of the specified library.
      12.     ' there's no need to use the Regsvr32.exe anymore.
      13.  
      14.     ' Make sure the path is correct and that the file exists, otherwise VB will crash.
      15.  
      16.     Dim lb As Long, pa As Long
      17.     lb = LoadLibrary(DllServerPath)
      18.  
      19.     If bRegister Then
      20.         pa = GetProcAddress(lb, "DllRegisterServer")
      21.     Else
      22.         pa = GetProcAddress(lb, "DllUnregisterServer")
      23.     End If
      24.  
      25.     If CallWindowProc(pa, hWnd, ByVal 0&, ByVal 0&, ByVal 0&) = ERROR_SUCCESS Then
      26.         MsgBox IIf(bRegister = True, "Registration", "Unregistration") + " Successful"
      27.    Else
      28.         MsgBox IIf(bRegister = True, "Registration", "Unregistration") + " Unsuccessful"
      29.     End If
      30.     'unmap the library's address
      31.     FreeLibrary lb
      32. End Function
    • VB Code:
      1. Public Sub RegComponent(ByVal ComName As String, ByVal sRegister As String)
      2.     Shell ("Regsvr32 " & ComName & sRegister)
      3. End Sub
    • VB Code:
      1. Dim rc As Double
      2.     rc = Shell("regsvr32 " & App.Path & "\MSINET.ocx", vbNormalFocus)
      3.         rc = Shell("regsvr32 " & App.Path & "\MSWINSCK.ocx", vbNormalFocus)
    • VB Code:
      1. Shell (regsvr32 & "c:\windows\MSINET.OCX /s")
      2. 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
  •  



Click Here to Expand Forum to Full Width