Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is DLL.Ocx Registered or Not
Message
De
13/12/2006 00:09:08
Rahul Murarka
Sys-Con Engineering
Kolkata, Inde
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Contrôles ActiveX
Titre:
Is DLL.Ocx Registered or Not
Divers
Thread ID:
01177068
Message ID:
01177068
Vues:
60
Dear Sir/madam


How can I find whether DLL/Ocx is Registered or Not by given its Path.

As there can be many DLL of same name in the PC.

I need Code in VB6.

I have one code with me but not working. If you want just correct it.
'-------------------------------------------------------
Public Function IsRegistered(ByVal class As String) As Boolean
   On Error Goto NotRegistered
   Dim obj As Object
   Set obj = CreateObject(class)
   IsRegistered = True
   Exit Function
NotRegistered:
End Function
'-------------------------------------------------------

Example Usage:

'-------------------------------------------------------
If Not IsRegistered("Excel.Application") Then
   MsgBox "Excel is not installed/registered."
Else
   MsgBox "Excel is installed & registered."
End If
'-------------------------------------------------------
Rahul
Thanks in Advance

Rahul
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform