Hello everyone, got another question concerning DLLs.
First, I found a code to check if an activeX object is registered or not, Im not sure if its the best method to check or not. But this is the code:
VB Code:
Public Function IsRegistered(ByVal class As String) As Boolean On Error GoTo NotRegistered Dim obj As Object Set obj = CreateObject(class) IsRegistered = True Set obj = Nothing Exit Function NotRegistered: IsRegistered = False End Function
This works fine. But I wanted to know with a function like CreateObject, are you able to find out where the object your trying to load is located on the computer?
Meaning I have my dll at C:\Folder1\test\MyLibrary.dll
I use that to check it by doing:
IsRegistered(MyLibrary.Check)
Check being a class file within the DLL. That would return true if it has been registered before.
Im wonder if, with CreateObject, you can find the path of where the file is located, as well as get the version of the file.
Thanks :)
- Wiccaan
