I am trying to build a diagnostic utility for an application that I have
written in C++ (Win32). The application uses a COM port but on occasion, the
COM port may be locked by another application.
I can successfully retrieve all currently running PIDs (and their associated
image names) but is there any way to retrieve any open handles to COM ports
that they may have? The sysinternals program "handle" does not retrieve
handles to COM ports.
Thanks,
Sam
try "Process Explorer",...
Press Ctrl+H for handles in lower pane
and Ctrl+D for loaded libaries,...
You can also search for handles by
pressing Ctrl+F
Regards
Kerem
--
--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Microsoft Live Space: http://kerem-g.spaces.live.com/
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."
"SamCPP" <Sam...@discussions.microsoft.com> schrieb im Newsbeitrag
news:81901330-6456-4E6F...@microsoft.com...
Thanks for your reply. I see that I can locate the file through process
explorer but how can I obtain that information programmatically (in my Win32
application)?
Thanks,
Sam
there are some "partially" undocumented apis for this:
http://www.woodmann.com/forum/showthread.php?t=6318
http://forum.sysinternals.com/forum_posts.asp?TID=14546&KW=open+handles
http://forum.sysinternals.com/forum_posts.asp?TID=14268&KW=open+handles
I see you are a member of sysinternals forum. You will
find a lot of information about this topic there, you also can
ask individuals there how they did something,...
But these examples are good enough,...
Hope this Helps,...
Regards
Kerem
--
--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Microsoft Live Space: http://kerem-g.spaces.live.com/
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."
"SamCPP" <Sam...@discussions.microsoft.com> schrieb im Newsbeitrag
news:C432B69C-8B68-41AC...@microsoft.com...
Cheers,
You are welcome Sam,...sometimes we know what we want, but
sometimes we dont know how to ask,...maybe you did not search
for your solution with the right words,...now you know,...and tell others
if they want to know the same stuff,...;-)
Regards
Kerem
--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Latest Project: http://www.codeplex.com/restarts
--
Volodymyr, blog: http://www.shcherbyna.com/
(This posting is provided "AS IS" with no warranties, and confers no
rights)
"SamCPP" <Sam...@discussions.microsoft.com> wrote in message
news:60281A79-D4E2-483D...@microsoft.com...