G
Gec
Unregistered / Unconfirmed
GUEST, unregistred user!
type
TSocketArmorData = record
hSocketArmorWnd: HWND;
uMsg: Cardinal;
uMsgAccept: Cardinal;
szProcessName: array[0..511] of Char;
nFlags: Integer;
addr: TSockAddrIn;
buff: array[0..63 * 1024] of Char;
len: Integer;
end;
//类声明,包含addr
var
pSocketArmorData: ^TSocketArmorData;
end;
richedit1.lines.add('Remote Ip: ' + inet_ntoa(pinaddr(psocketarmordata.addr.sin_addr)^));
richedit1.lines.add('Remote Ip: ' + inet_ntoa(pinaddr(psocketarmordata^.addr.sin_addr)));
richedit1.lines.add('Remote Ip: ' + inet_ntoa(psocketarmordata.addr.sin_addr)^));
richedit1.lines.add('Remote Ip: ' + inet_ntoa(psocketarmordata^.addr.sin_addr));
以上做法均得到错误ip地址,好象把错误数据传递给了inet_ntoa
TSocketArmorData = record
hSocketArmorWnd: HWND;
uMsg: Cardinal;
uMsgAccept: Cardinal;
szProcessName: array[0..511] of Char;
nFlags: Integer;
addr: TSockAddrIn;
buff: array[0..63 * 1024] of Char;
len: Integer;
end;
//类声明,包含addr
var
pSocketArmorData: ^TSocketArmorData;
end;
richedit1.lines.add('Remote Ip: ' + inet_ntoa(pinaddr(psocketarmordata.addr.sin_addr)^));
richedit1.lines.add('Remote Ip: ' + inet_ntoa(pinaddr(psocketarmordata^.addr.sin_addr)));
richedit1.lines.add('Remote Ip: ' + inet_ntoa(psocketarmordata.addr.sin_addr)^));
richedit1.lines.add('Remote Ip: ' + inet_ntoa(psocketarmordata^.addr.sin_addr));
以上做法均得到错误ip地址,好象把错误数据传递给了inet_ntoa