Article View: borland.public.cppbuilder.nativeapi
Article #17687Re: process name corresponding to the particular TCP/UDP port
From: Remy Lebeau (TeamB)
Date: Wed, 05 Mar 2003 18:21
Date: Wed, 05 Mar 2003 18:21
20 lines
1813 bytes
1813 bytes
That only allows you to see which processes are running on the system in general. Not which TCP/UDP sockets they are associated with. You'll still have to intercept the socket requests at the lower levels in order to know which processes are making the requests to begin with. Then, assuming you can get a process ID for each request, you can use the ToolHelp API to resolve the process IDs to filenames. Gambit "Boguslaw Fries" <B.Fries@luca-online.de> wrote in message news:3e65a4b7$1@newsgroups.borland.com... > pCreateToolhelp32Snapshot = (PVOID) GetProcAddress( GetModuleHandle( > "kernel32.dll" ), > "CreateToolhelp32Snapshot" ); > > > HANDLE (WINAPI * pCreateToolhelp32Snapshot ) ( DWORD dwFlags, DWORD > th32ProcessID );
Technical Details
Message-ID:
<3e663e24@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3e64b9a4$1@newsgroups.borland.com> <3e64ec88@newsgroups.borland.com> <3e65a4b7$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,8c11b255533d110e X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-03-05 10:17:57 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3e64b9a4$1@newsgroups.borland.com> <3e64ec88@newsgroups.borland.com> <3e65a4b7$1@newsgroups.borland.com> Subject: Re: process name corresponding to the particular TCP/UDP port Date: Wed, 5 Mar 2003 10:21:19 -0800 Lines: 22 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 207.175.226.26 Message-ID: <3e663e24@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1046887972 207.175.226.26 (5 Mar 2003 10:12:52 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail