I need to monitor the number of open TCP connections held by a single process on a 64 bit Windows 7 machine from .NET 4.0.
This article describes the undocumented Win32 API method "AllocateAndGetTcpExTableFromStack" that accomploshes this task on 32 bit windows:
http://www.codeproject.com/KB/IP/iphlpapi.aspx?display=Print
But this fails on my machine (presumably because I am on 64 bit) with:
Unable to find an entry point named 'AllocateAndGetTcpExTableFromStack' in DLL 'iphlpapi.dll'.
How can we do this on 64 bit Windows?