CONNAITRE LE PROCESS CONNECTÉ À VOS SOCKET

TeBeCo Messages postés 467 Date d'inscription lundi 24 juin 2002 Statut Membre Dernière intervention 9 mars 2011 - 1 avril 2011 à 15:40
cs_coq Messages postés 6349 Date d'inscription samedi 1 juin 2002 Statut Membre Dernière intervention 2 août 2014 - 1 avril 2011 à 23:56
Cette discussion concerne un article du site. Pour la consulter dans son contexte d'origine, cliquez sur le lien ci-dessous.

https://codes-sources.commentcamarche.net/source/53023-connaitre-le-process-connecte-a-vos-socket

cs_coq Messages postés 6349 Date d'inscription samedi 1 juin 2002 Statut Membre Dernière intervention 2 août 2014 101
1 avril 2011 à 23:56
Tiens justement j'ai lu un truc sur le même sujet il y a peu : http://blogs.msdn.com/b/fiddler/archive/2011/03/09/mapping-socket-or-port-to-owner-process-in-c-sharp-dotnet.aspx

Pour la partie fermeture c'était probablement en utilisant SetTcpEntry (http://msdn.microsoft.com/en-us/library/aa366378.aspx).
Renfield Messages postés 17287 Date d'inscription mercredi 2 janvier 2002 Statut Modérateur Dernière intervention 27 septembre 2021 74
1 avril 2011 à 15:56
Merci pour l'info, ca n'augure rien de bon pour le passage prochain de nos postes sous Windows 7, au boulot.

faudra regarder des sources d'applis faisant un netstat sous Windows 7 ^^
TeBeCo Messages postés 467 Date d'inscription lundi 24 juin 2002 Statut Membre Dernière intervention 9 mars 2011
1 avril 2011 à 15:40
pour répondre a ta question sur la compatibilité ascendante :
Première API :

http://msdn.microsoft.com/en-us/library/aa365804(v=vs.85).aspx
End of client support : Windows XP
End of server support : Windows Server 2003

Note:
The AllocateAndGetTcpExTableFromStack function is deprecated and not supported on Windows Vista and later. On the Microsoft Windows Software Development Kit (SDK) released for Windows Vista and later, the function prototype for AllocateAndGetTcpExTableFromStack is still defined in the Iphlpapi.h header file for continued support on Windows Server 2003 and Windows XP.

J'ai déjà fait tourner un équivalent sous Win7, avec une option pour aller jusqu’à clôturer le Socket à la demande (Admin / UAC ... requis), sauf que je retrouve plus ou j'ai mis ça ...
Rejoignez-nous