netstat
-
How do i list connections in my program like Netstat does? Kuniva --------------------------------------------
Try this(NT only!): SysInternals OpenSource Tcpview http://www.sysinternals.com/ntw2k/source/tcpview.shtml Georg Haan (.NL)
-
How do i list connections in my program like Netstat does? Kuniva --------------------------------------------
Hello, the codegurus around the world.;) Accroding as Network Programming for Microsoft Windows, P548,
The NETSTAT.EXE utility displays the TCP connection table, the UDP listener
table, and the IPv4 ptorocol statistics on your computer. The function used
to retrieve this information work with Windows NT 4.0 (SP 4 and later),
Windows 98, and Windows Me.So, check the following functions.
DWORD GetTcpTable (
PMIB_TCPTABLE pTcpTable,
PDWORD pdwSize,
BOOL bOrder
);typedef struct _MIB_TCPTABLE
{
DWORD dwNumEntries;
MIB_TCPROW table[ANY_SIZE];
} MIB_TCPTABLE, *PMIB_TCPTABLE;typedef struct _MIB_TCPROW
{
DWORD dwState;
DWORD dwLocalAddr;
DWORD dwLocalPort;
DWORD dwRemoteAddr;
DWORD dwRemoteProt;
} MIB_TCPROW, *PMIB_TCPROW;DWORD GetUdpTable (...), typedef struct _MIB_UDPTALBE,
typedef stuct _MIB_UDPROW, DWORD GetIpStatistics(...)
typedef struct _MIB_IPSTATS...Good Luck.:rose: Please, don't send me your email about your questions directly. Have a nice day! Sonork - 100.10571:vcdeveloper ;)
-Masaaki Onishi-