请问用什么函数可以获得本机ip地址?? 包括指定的地址或自动获取的地址 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 function LocalIP:string; typeTaPInAddr = array [0..10] of PInAddr;PaPInAddr = ^TaPInAddr;varphe : PHostEnt;pptr : PaPInAddr;Buffer : array [0..63] of char;I : Integer;GInitData : TWSADATA;beginWSAStartup($101, GInitData);Result := '';GetHostName(Buffer, SizeOf(Buffer));phe :=GetHostByName(buffer);if phe = nil then Exit;pptr := PaPInAddr(Phe^.h_addr_list);I := 0;while pptr^[I] <> nil do beginresult:=StrPas(inet_ntoa(pptr^[I]^));Inc(I);end;WSACleanup;end; to hch_45(んこん) :还要uses 什么单元?Delphi提示未定义"PInAddr""PHostEnt""TWSADATA""WSAStartup""GetHostName"等 这题怎么解决http://expert.csdn.net/Expert/topic/1756/1756538.xml?temp=.2521021 delphi 修改注册表的问题 请问一个在文件中查找日期时间的问题 用DELPHI怎样关闭一个指定的端口? 请教:急!!!调用其他语言写的dll function unsigned shot WINAPI test(int cs,unsigned char *out) 如何将excel表导入sql数据库? 如何解决mpeg-4声道切换问题? 有关Quick Report控件的使用。 请教网络中断后如何恢复 DELPHI 程序高手更好工作机会 求一个在单据套打中使用的大写金额特殊写法的函数? 小弟初学数据库,请各位多指点!!! 高分请教关于fastreport问题
typeTaPInAddr = array [0..10] of PInAddr;PaPInAddr = ^TaPInAddr;varphe : PHostEnt;pptr : PaPInAddr;Buffer : array [0..63] of char;I : Integer;GInitData : TWSADATA;beginWSAStartup($101, GInitData);Result := '';GetHostName(Buffer, SizeOf(Buffer));phe :=GetHostByName(buffer);if phe = nil then Exit;pptr := PaPInAddr(Phe^.h_addr_list);I := 0;while pptr^[I] <> nil do beginresult:=StrPas(inet_ntoa(pptr^[I]^));Inc(I);end;WSACleanup;end;
还要uses 什么单元?Delphi提示未定义"PInAddr""PHostEnt"
"TWSADATA""WSAStartup""GetHostName"等
http://expert.csdn.net/Expert/topic/1756/1756538.xml?temp=.2521021