1: | var |
1: | DWORD GetTcpTable( |
| MSDN Library \ Plattform SDK August 2004: | ||||
| GetTcpTable
The GetTcpTable function retrieves the TCP connection table. C#-Quelltext
Parameters pTcpTable [out] Pointer to a buffer that receives the TCP connection table as a MIB_TCPTABLE structure. pdwSize [in, out] On input, specifies the size of the buffer pointed to by the pTcpTable parameter. On output, if the buffer is not large enough to hold the returned connection table, the function sets this parameter equal to the required buffer size. bOrder [in] Specifies whether the connection table should be sorted. If this parameter is TRUE, the table is sorted in the order of: 1 = Local IP address 2 = Local port 3 = Remote IP address 4 = Remote port Return Values If the function succeeds, the return value is NO_ERROR. If the function fails, the return value is one of the following error codes. Return code --> Description ERROR_INSUFFICIENT_BUFFER --> The buffer pointed to by the pTcpTable parameter is not large enough. The required size is returned in the DWORD variable pointed to by the pdwSize parameter. ERROR_INVALID_PARAMETER --> The pdwSize parameter is NULL, or GetTcpTable is unable to write to the memory pointed to by the pdwSize parameter. ERROR_NOT_SUPPORTED --> This function is not supported on the operating system in use on the local system. Other --> Use FormatMessage to obtain the message string for the returned error. Example Code The following example retrieves the TCP connection table and prints the state of each connection. C#-Quelltext
Requirements Client: Requires Windows XP, Windows 2000 Professional, Windows NT Workstation 4.0 SP4 and later, Windows Me, or Windows 98. Server: Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0 SP4 and later. Header: Declared in Iphlpapi.h. Library: Use Iphlpapi.lib. |
Entwickler-Ecke.de based on phpBB
Copyright 2002 - 2011 by Tino Teuber, Copyright 2011 - 2026 by Christian Stelzmann Alle Rechte vorbehalten.
Alle Beiträge stammen von dritten Personen und dürfen geltendes Recht nicht verletzen.
Entwickler-Ecke und die zugehörigen Webseiten distanzieren sich ausdrücklich von Fremdinhalten jeglicher Art!