In C I see this:
connect (sockfd, (struct sockaddr *) servaddr, sizeof(struct sockaddr_in))

for example. What's up with ( struct sockaddr * )? As an ASM programmer, I just outright pass a plain old 32-bit pointer. What's up with this type casting stuff? My appologies if this is the wrong forum, but as an asm programmer, a reference to a variable or struct is simply a pointer.
Posted on 2004-08-31 20:15:48 by Al_Leitch
invoke connect, hSocket, addr sin, sizeof sin

(where sin=sockaddr_in structure)
Don't be too worried about typecasting - most data types turn out to be DWORDS more often than not, and if they are not, they are usually obvious enough, naming conventions should be observed.
Posted on 2004-08-31 22:20:43 by Homer
Thanks for the help.

invoke connect, hSocket, addr sin, sizeof sin

(where sin=sockaddr_in structure)
Don't be too worried about typecasting - most data types turn out to be DWORDS more often than not, and if they are not, they are usually obvious enough, naming conventions should be observed.
Posted on 2004-09-01 13:31:03 by Al_Leitch