>I have tried to use the EnumProcesses function from the PSAPI.dll to
>retreive
> the running processes. However, out of the 69 running processes I had
> going
> it only seemed to find 58. Especially, it didn't return my applications
> process information. What is wrong?
The absolute best thing you can do is find out why (as mentioned in your
previous post) "There might be situations when my application doesn't close
down properly and leaves one or a few com modules running". There must be a
reason. Since there are so many things you can do that'll cause this and
besides questions about trying to yank the plug on those components, you
haven't given enough information for anyone to help solve the real issue.
The most common things that can go wrong:
Circular References <-- probably the number one cause of components that
won't die
Other things that'll keep a component alive
Any references to that object. An object will die when the reference count =
0
Timers that do any significant work.
All forms must be unloaded.
All automation objects must be closed and set = Nothing
Database objects, closed and set = Nothing
All kinds of things.

Signature
Ken Halter - MS-MVP-VB - http://www.vbsight.com
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Please keep all discussions in the groups..