Click here to Skip to main content
16,007,858 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralSlow Loading Designer Window Pin
W Balboos, GHB27-Mar-08 4:41
W Balboos, GHB27-Mar-08 4:41 
GeneralRe: Slow Loading Designer Window Pin
led mike27-Mar-08 5:43
led mike27-Mar-08 5:43 
GeneralRe: Slow Loading Designer Window Pin
W Balboos, GHB27-Mar-08 7:02
W Balboos, GHB27-Mar-08 7:02 
GeneralRe: Slow Loading Designer Window Pin
led mike27-Mar-08 7:13
led mike27-Mar-08 7:13 
GeneralRe: Slow Loading Designer Window Pin
W Balboos, GHB27-Mar-08 7:28
W Balboos, GHB27-Mar-08 7:28 
GeneralRe: Slow Loading Designer Window Pin
led mike27-Mar-08 7:58
led mike27-Mar-08 7:58 
GeneralRe: Slow Loading Designer Window Pin
W Balboos, GHB28-Mar-08 2:43
W Balboos, GHB28-Mar-08 2:43 
QuestionFinding Processes on Ports.. Pin
ptr2void25-Mar-08 22:53
ptr2void25-Mar-08 22:53 
Can anyone tell me how to find which specific processes are running on opened TCP ports??

As far as I sacnned the MSDN documentation, the information is found in GetExtendedTcpTable

and we have to import iphlpapi.dll for this..

Here is the snippet of my code:

class ProcessClass<br />
{<br />
public:<br />
[DllImport("iphlpapi.dll")]<br />
DWORD GetExtendedTcpTable(PVOID tcpTable, PDWORD tcpTableLength, BOOL sort, ULONG ipVersion, TCP_TABLE_CLASS tcpTableType, ULONG reserved);<br />
MIB_TCPROW_OWNER_PID tcpTable[2000];<br />
<br />
void GetProcesses();<br />
};<br />
<br />
void ProcessClass ::GetProcesses()<br />
{<br />
DWORD size = 2000;<br />
GetExtendedTcpTable(&tcpTable, &size, FALSE, AF_INET, TCP_TABLE_OWNER_PID_ALL, 0); <br />
}






But the problem is that I get an empty 'tcpTable'..

How to get the process ID's??

Som

GeneralRe: Finding Processes on Ports.. Pin
led mike26-Mar-08 4:29
led mike26-Mar-08 4:29 
GeneralRe: Finding Processes on Ports.. Pin
Mark Salsbery26-Mar-08 5:40
Mark Salsbery26-Mar-08 5:40 
GeneralC++ function to retrieve the address of stack Pin
dharani24-Mar-08 22:57
dharani24-Mar-08 22:57 
GeneralRe: C++ function to retrieve the address of stack Pin
led mike25-Mar-08 5:53
led mike25-Mar-08 5:53 
GeneralSocket File Transfer Pin
javad_200524-Mar-08 20:03
javad_200524-Mar-08 20:03 
GeneralRe: Socket File Transfer Pin
led mike25-Mar-08 5:37
led mike25-Mar-08 5:37 
GeneralRe: Socket File Transfer Pin
Mark Salsbery25-Mar-08 6:11
Mark Salsbery25-Mar-08 6:11 
GeneralRe: Socket File Transfer Pin
led mike25-Mar-08 9:27
led mike25-Mar-08 9:27 
GeneralRe: Socket File Transfer Pin
javad_200526-Mar-08 5:05
javad_200526-Mar-08 5:05 
QuestionCollapsible PropertyGrid in bold. Pin
TheBerk24-Mar-08 11:27
TheBerk24-Mar-08 11:27 
GeneralRe: Collapsible PropertyGrid in bold. Pin
led mike25-Mar-08 9:41
led mike25-Mar-08 9:41 
GeneralRe: Collapsible PropertyGrid in bold. Pin
TheBerk25-Mar-08 10:51
TheBerk25-Mar-08 10:51 
GeneralRe: Collapsible PropertyGrid in bold. Pin
led mike25-Mar-08 11:50
led mike25-Mar-08 11:50 
GeneralRe: Collapsible PropertyGrid in bold. Pin
TheBerk26-Mar-08 4:14
TheBerk26-Mar-08 4:14 
GeneralRe: Collapsible PropertyGrid in bold. Pin
TheBerk26-Mar-08 11:40
TheBerk26-Mar-08 11:40 
GeneralHelp with task in Microsoft Visual C++ express edition Pin
jackey_chan24-Mar-08 7:53
jackey_chan24-Mar-08 7:53 
GeneralRe: Help with task in Microsoft Visual C++ express edition Pin
Christian Graus24-Mar-08 11:21
protectorChristian Graus24-Mar-08 11:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.