Results 1 to 9 of 9

Thread: how do I registar dll's (very easy)

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    I goto RUN then I type what????? I forgot please help


    thanks in adavnace
    NXSupport - Your one-stop source for computer help

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Code:
    regsvr32 mydll.dll
    ...to register.

    Code:
    regsvr32 /u mydll.dll
    ...to unregister.
    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

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    thanks
    NXSupport - Your one-stop source for computer help

  4. #4
    Fanatic Member steve65's Avatar
    Join Date
    Jun 2000
    Posts
    610
    Can you register OCX's the same way?
    This space for rent...

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    yea, and once megatron suggested using:

    regsvr32 "c:\my ocxs\a.ocx"

    becuase then you can have spaces in it
    NXSupport - Your one-stop source for computer help

  6. #6
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    You can also do it from inside your program, by calling the DllRegisterServer and DllUnregisterServer functions which are exported from all OCX files. (An OCX is a DLL with a different extension).
    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

  7. #7
    Guest
    An example of what parksie is talking about is this:

    Code:
    'This will register or unregister a dll/ocx
    Option Explicit
    Private Declare Function DllRegisterServer Lib "MyDll.Dll" () As Long
    Private Declare Function DllUnregisterServer Lib "MyDll.Dll" () As Long
    
    Const ERROR_SUCCESS = &H0
    
    If DllRegisterServer = ERROR_SUCCESS Then
        MsgBox "Registration Successful"
    Else
        MsgBox "Registration Unsuccessful"
    End If
    
    If DllUnregisterServer = ERROR_SUCCESS Then
        MsgBox "UnRegistration Successful"
    Else
        MsgBox "UnRegistration Unsuccessful"
    End If

  8. #8
    Guest
    Or use the Shell method.
    Code:
    Shell "Regsvr32.exe mydll.dll"

  9. #9
    Fanatic Member steve65's Avatar
    Join Date
    Jun 2000
    Posts
    610
    Is there a way to verify that the OCX was or was not registered before you run the code below?

    Originally posted by Matthew Gates
    Code:
    'This will register or unregister a dll/ocx
    Option Explicit
    Private Declare Function DllRegisterServer Lib "MyDll.Dll" () As Long
    Private Declare Function DllUnregisterServer Lib "MyDll.Dll" () As Long
    
    Const ERROR_SUCCESS = &H0
    
    If DllRegisterServer = ERROR_SUCCESS Then
        MsgBox "Registration Successful"
    Else
        MsgBox "Registration Unsuccessful"
    End If
    
    If DllUnregisterServer = ERROR_SUCCESS Then
        MsgBox "UnRegistration Successful"
    Else
        MsgBox "UnRegistration Unsuccessful"
    End If
    This space for rent...

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