Results 1 to 4 of 4

Thread: ow do i register a .dll file????

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2000
    Posts
    103

    Wink

    please can anyone tell me how to register a dll file???

  2. #2
    Fanatic Member Dim's Avatar
    Join Date
    Jul 2000
    Posts
    620
    Select Run from the start menu and type this in:
    regsvr mydll.dll
    or if you need it from VB
    Code:
    Shell("regsvr32 mydll.dll")
    Gl,
    D!m

    [Edited by Dim on 11-12-2000 at 08:26 PM]
    Dim

  3. #3
    Lively Member
    Join Date
    Mar 2000
    Posts
    87
    So you dont get the dialog box popping up

    Code:
    Shell("regsvr32 /s mydll.dll")

  4. #4
    Guest
    You could also use the DllRegisterServer and DllUnregisterServer api functions to register and unregister the dlls/ocxs.

    Code:
    Option Explicit
    
    'MyDll.Dll is the dll/ocx that you want to register
    
    Private Declare Function DllRegisterServer Lib "MyDll.Dll" () As Long
    
    Private Declare Function DllUnregisterServer Lib "MyDll.Dll" () As Long
    
    Const ERROR_SUCCESS = &H0
    
    
    Private Sub Command1_Click()
    
         'Register
         If DllRegisterServer = ERROR_SUCCESS Then
              MsgBox "Registration Successful"
         Else
              MsgBox "Registration Unsuccessful"
         End If
    
    End Sub
    
    
    Private Sub Command2_Click()
    
         'UnRegister
         If DllUnregisterServer = ERROR_SUCCESS Then
              MsgBox "UnRegistration Successful"
         Else
              MsgBox "UnRegistration Unsuccessful"
         End If
    
    End Sub

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