Link to home
Start Free TrialLog in
Avatar of lxfdirs
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
Avatar of mccarl
mccarl
Flag of Australia image

Are you looking for a solution in code? Or otherwise?

The example C++ code here...

http://msdn.microsoft.com/en-us/library/ms682621%28VS.85%29.aspx

.. 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.
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
Avatar of lxfdirs
lxfdirs

ASKER

Guys:

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
Avatar of mccarl
mccarl
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial