I've found this : http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/392572

But maybe those APIs are available in pywin32 ?


Marcus Low wrote :

Hi,

Yup ip helpers the way, but alternatively if u want a simple routine, u can launch the netstat -a -b after u createprocess with the appropriate flags and pipe the information to ur buffer, then just parse the buffer and get the information, all these can be done without seeing an ugly cmd console popping out. I have the whole code in win32 C++ though, maybe there is an equivalent python code around.

Marcus.

Tim Golden wrote:
le dahut wrote:
Hello,

I'm looking for an API that can do netstat calls to return a list of listenign ports and maybe a process attached to it.

You need the IP Helpers API

http://msdn.microsoft.com/en-us/library/ms886687.aspx

I'm afraid I've never used it, though, so you'll have
to scout around for examples.

TJG

_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to