Code:
'From WSock32.inc: union in_addr S_un_b as S_un_b_type S_un_w as S_un_w_type s_addr as dword s as string * 4 end union type sockaddr_in sin_family as integer sin_port as word sin_addr as in_addr '<---is a union inside a type sin_zero as string * 8 end type declare function inet_addr lib "wsock32.dll" alias "inet_addr" (cp as asciiz) as dword '- - - - - - - - - - - - - - - - - - - - - - 'Your code with union member in bold DIM service AS SOCKADDR_IN service.sin_family = %AF_INET service.sin_addr[b].s_addr[/b] = inet_addr("127.0.0.1") service.sin_port = htons(9876)
Cheers,
Leave a comment: