Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
特定のプロセスが特定のポートを使用しているかどうかを知りたいのですがnetstat -ban、アクティブな接続のリストを取得するためにを使用しているのに出くわしIPGlobalPropertiesましたが、これにはプロセス情報が含まれていないようです。
netstat -ban
IPGlobalProperties
プログラムでこれを実行できるクラスがC#に存在する場合は便利です。Process理想的には、cmdシェルの出力をパイプする必要はありません。
Process
この質問をご覧ください...
どのPIDがC#の特定のポートでリッスンするか
基本的に、 GetExtendedTcpTable()をPInvokeします。