lxfdirs
asked on
Determine Activex dll already running
Hi,
Is there a way to determine if an activex dll is already instanced. I have a couple of client applications calling the same dll.
Regards
Is there a way to determine if an activex dll is already instanced. I have a couple of client applications calling the same dll.
Regards
COM libraries are registered in the Running Object Table (ROT), and you can query the table. Sometimes tricks are needed, like when working with current versions of Excel and Word, as they don't register themselves in the ROT in a very friendly manner.
Example:
Iterating through the contents of the ROT (running objects table)
http://www.vbusers.com/codecsharp/codeget.asp?ThreadID=69&PostID=1
Example:
Iterating through the contents of the ROT (running objects table)
http://www.vbusers.com/codecsharp/codeget.asp?ThreadID=69&PostID=1
ASKER
Guys:
Appreciate you comments. Actually, my code is in vb6. Can you suggest a solution from within vb6?
Regards
Appreciate you comments. Actually, my code is in vb6. Can you suggest a solution from within vb6?
Regards
I haven't done VB6 since 2002, so I hope that you find a solution.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The example C++ code here...
http://msdn.microsoft.com/
.. should get you on the right track. You would just need to add code to filter for the particular dll that you are interested in.
If you are looking for a non-code solution, have a look at the windows console tasklist command. In particular the /m option can be used to list all modules loaded, or to filter the list for a particular dll (or dll that matches a pattern). tasklist /? gives more info.