相关疑难解决方法(0)

获取有关已安装的网络适配器的信息

我在Windows XP sp3上使用Delphi XE2 Update 4

我希望从已安装的网络适配器(尤其是广播ip)获得最大可能的信息。

为此,我使用了从本文获得的Jan Schulz的代码。

单元:

Unit USock;

Interface

Uses Windows, Winsock;

{ Unit to identify the network interfaces
  This code requires at least Win98/ME/2K, 95 OSR 2 or NT service pack #3
  as WinSock 2 is used (WS2_32.DLL) }


// Constants found in manual on non-officially documented M$ Winsock functions
Const SIO_GET_INTERFACE_LIST = $4004747F;
      IFF_UP                 = $00000001;
      IFF_BROADCAST          = $00000002;
      IFF_LOOPBACK           = $00000004;
      IFF_POINTTOPOINT       = $00000008;
      IFF_MULTICAST          = $00000010;


Type SockAddr_Gen          = Packed …
Run Code Online (Sandbox Code Playgroud)

delphi winsock delphi-xe2

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

delphi ×1

delphi-xe2 ×1

winsock ×1