Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 133 of file socklife.c.
{ PWSPROCESS Process; PWSTHREAD Thread; DWORD Flags = 0; INT ErrorCode; DPRINT("socket: %lx, %lx, %lx\n", af, type, protocol); /* Enter prolog */ if ((ErrorCode = WsApiProlog(&Process, &Thread)) != ERROR_SUCCESS) { /* Fail here */ SetLastError(ErrorCode); return INVALID_SOCKET; } /* Check the current open type and use overlapped if it's default */ if (!Thread->OpenType) Flags = WSA_FLAG_OVERLAPPED; /* Make the protocol negative if this is NETBIOS */ if ((af == AF_NETBIOS) && (protocol > 0)) protocol *= -1; /* Now let WSA handle it */ return WSASocketW(af, type, protocol, NULL, 0, Flags); }