Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is DLL.Ocx Registered or Not
Message
From
13/12/2006 00:09:08
Rahul Murarka
Sys-Con Engineering
Kolkata, India
 
 
To
All
General information
Forum:
Visual Basic
Category:
ActiveX controls
Title:
Is DLL.Ocx Registered or Not
Miscellaneous
Thread ID:
01177068
Message ID:
01177068
Views:
59
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
Next
Reply
Map
View

Click here to load this message in the networking platform