Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Checking for registered DLL


Message #1 by "dana johnson" <pr1smiley@m...> on Mon, 21 Jan 2002 23:15:15 -0500
thanks randy

Dana E. Johnson
Phalanxsys LLC
www.phalanxsys.com
djohnson@p...


-----Original Message-----
From: Randy Cornish [mailto:rlcornish@c...]
Sent: Friday, January 25, 2002 1:05 AM
To: professional vb
Subject: [pro_vb] Re: Checking for registered DLL


You can wrap a call to CreateObject in a separate function.  If the 
function fails, the error trap code returns False.  See below:

   Private Function IsDLLRegistered(ProgID As String) As Boolean
      Dim obj As Object
      On Error GoTo ErrHandler
         
      Set obj = CreateObject(ProgID)
      IsDLLRegistered = True
      Set obj = Nothing
      Exit Function
   ErrHandler:
      IsDLLRegistered = False
   End Function

You can also iterate the registry in code, looking for an exact mathc to 
the path & filename of the DLL.

R

> Hello All:
> 
> does anybody know how to see if a dll is registered on a local machine


  Return to Index