Results 1 to 5 of 5

Thread: DLL Question

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member wiccaan's Avatar
    Join Date
    Apr 2004
    Location
    127.0.0.1
    Posts
    475

    DLL Question

    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:
    1. Public Function IsRegistered(ByVal class As String) As Boolean
    2. On Error GoTo NotRegistered
    3. Dim obj     As Object
    4.  
    5.     Set obj = CreateObject(class)
    6.     IsRegistered = True
    7.     Set obj = Nothing
    8.     Exit Function
    9.  
    10. NotRegistered:
    11.     IsRegistered = False
    12. 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
    Last edited by wiccaan; Jul 2nd, 2006 at 08:32 AM.
    If my post was helpful please rate it

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