/* Get the Socket Structure associate to this Socket*/
Socket = GetSocketStructure(Handle);
+ if (!Socket)
+ {
+ NtClose(SockEvent);
+ *lpErrno = WSAENOTSOCK;
+ return SOCKET_ERROR;
+ }
if (Socket->HelperEvents & WSH_NOTIFY_CLOSE)
{
/* Get the Socket Structure associate to this Socket*/
Socket = GetSocketStructure(Handle);
+ if (!Socket)
+ {
+ HeapFree(GlobalHeap, 0, BindData);
+ *lpErrno = WSAENOTSOCK;
+ return SOCKET_ERROR;
+ }
/* Set up Address in TDI Format */
BindData->Address.TAAddressCount = 1;
/* Get the Socket Structure associate to this Socket*/
Socket = GetSocketStructure(Handle);
+ if (!Socket)
+ {
+ *lpErrno = WSAENOTSOCK;
+ return SOCKET_ERROR;
+ }
if (Socket->SharedData.Listening)
return 0;
/* Get the Socket Structure associate to this Socket*/
Socket = GetSocketStructure(Handle);
+ if (!Socket)
+ {
+ NtClose(SockEvent);
+ *lpErrno = WSAENOTSOCK;
+ return INVALID_SOCKET;
+ }
/* If this is non-blocking, make sure there's something for us to accept */
FD_ZERO(&ReadSet);
/* Get the Socket Structure associate to this Socket*/
Socket = GetSocketStructure(Handle);
+ if (!Socket)
+ {
+ NtClose(SockEvent);
+ *lpErrno = WSAENOTSOCK;
+ return SOCKET_ERROR;
+ }
/* Bind us First */
if (Socket->SharedData.State == SocketOpen)
/* Get the Socket Structure associate to this Socket*/
Socket = GetSocketStructure(Handle);
+ if (!Socket)
+ {
+ NtClose(SockEvent);
+ *lpErrno = WSAENOTSOCK;
+ return SOCKET_ERROR;
+ }
/* Set AFD Disconnect Type */
switch (HowTo)
/* Get the Socket Structure associate to this Socket*/
Socket = GetSocketStructure(Handle);
+ if (!Socket)
+ {
+ NtClose(SockEvent);
+ *lpErrno = WSAENOTSOCK;
+ return SOCKET_ERROR;
+ }
/* Allocate a buffer for the address */
TdiAddressSize =
/* Get the Socket Structure associate to this Socket*/
Socket = GetSocketStructure(s);
+ if (!Socket)
+ {
+ NtClose(SockEvent);
+ *lpErrno = WSAENOTSOCK;
+ return SOCKET_ERROR;
+ }
/* Allocate a buffer for the address */
TdiAddressSize = sizeof(TRANSPORT_ADDRESS) + *NameLength;
/* Get the Socket Structure associate to this Socket*/
Socket = GetSocketStructure(Handle);
+ if (!Socket)
+ {
+ *lpErrno = WSAENOTSOCK;
+ return SOCKET_ERROR;
+ }
switch( dwIoControlCode )
{
/* Get the Socket Structure associate to this Socket*/
Socket = GetSocketStructure(Handle);
+ if (!Socket)
+ {
+ NtClose(SockEvent);
+ *lpErrno = WSAENOTSOCK;
+ return SOCKET_ERROR;
+ }
/* Set Socket to Non-Blocking */
BlockMode = 1;
/* Get the Socket Structure associate to this Socket*/
Socket = GetSocketStructure(Handle);
+ if (!Socket)
+ {
+ NtClose(SockEvent);
+ *lpErrno = WSAENOTSOCK;
+ return SOCKET_ERROR;
+ }
EnumReq.Event = hEventObject;
/* Get the Socket Structure associated to this Socket */
Socket = GetSocketStructure(Handle);
+ if (!Socket)
+ {
+ *lpErrno = WSAENOTSOCK;
+ return SOCKET_ERROR;
+ }
/* Allocate the Async Data Structure to pass on to the Thread later */
AsyncData = HeapAlloc(GetProcessHeap(), 0, sizeof(*AsyncData));
/* Get the Socket Structure associate to this Socket*/
Socket = GetSocketStructure(Handle);
+ if (!Socket)
+ {
+ *lpErrno = WSAENOTSOCK;
+ return SOCKET_ERROR;
+ }
Status = NtCreateEvent( &SockEvent, GENERIC_READ | GENERIC_WRITE,
NULL, 1, FALSE );
/* Get the Socket Structure associate to this Socket*/
Socket = GetSocketStructure(Handle);
+ if (!Socket)
+ {
+ *lpErrno = WSAENOTSOCK;
+ return SOCKET_ERROR;
+ }
Status = NtCreateEvent( &SockEvent, GENERIC_READ | GENERIC_WRITE,
NULL, 1, FALSE );
/* Get the Socket Structure associate to this Socket*/
Socket = GetSocketStructure(Handle);
+ if (!Socket)
+ {
+ *lpErrno = WSAENOTSOCK;
+ return SOCKET_ERROR;
+ }
Status = NtCreateEvent( &SockEvent, GENERIC_READ | GENERIC_WRITE,
NULL, 1, FALSE );
/* Get the Socket Structure associate to this Socket */
Socket = GetSocketStructure(Handle);
+ if (!Socket)
+ {
+ *lpErrno = WSAENOTSOCK;
+ return SOCKET_ERROR;
+ }
/* Bind us First */
if (Socket->SharedData.State == SocketOpen)