Accept function

Well... First of all Hello !!
I am hooking the function Accept (from WinSock). I have as parameter the (Socket: Integer; sockAddr: PSockAddr; len: integer).
With this informations, how can i get the Remote IP, and the port ? If possible, more informations ...? Thank you !
LVL 1
nildoAsked:
Who is Participating?
 
GhostModConnect With a Mentor Commented:
PAQed, with points refunded (40)

GhostMod
Community Support Moderator
0
 
SimesACommented:
var
  sockAddr: PSockAddr;
  Port: u_short;
  Address: TInAddr;
begin
  Port := sockAddr.sin_port;
  Address := sockAddr.sin_addr;
end;
0
 
nildoAuthor Commented:
Didnt work. When i put IntToStr(port), it returns 68 (was to be 1234). And when i put PChar(Address) it returns nothing (was to be 192.168.1.105). Why ?
0
 
CleanupPingCommented:
nildo:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
All Courses

From novice to tech pro — start learning today.