ReactOS  0.4.13-dev-563-g0561610
event.c File Reference
#include <ws2_32.h>
#include <debug.h>
Include dependency graph for event.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

BOOL WSAAPI WSACloseEvent (IN WSAEVENT hEvent)
 
WSAEVENT WSAAPI WSACreateEvent (VOID)
 
BOOL WSAAPI WSAResetEvent (IN WSAEVENT hEvent)
 
BOOL WSAAPI WSASetEvent (IN WSAEVENT hEvent)
 
DWORD WSAAPI WSAWaitForMultipleEvents (IN DWORD cEvents, IN CONST WSAEVENT FAR *lphEvents, IN BOOL fWaitAll, IN DWORD dwTimeout, IN BOOL fAlertable)
 
INT WSAAPI WSAEnumNetworkEvents (IN SOCKET s, IN WSAEVENT hEventObject, OUT LPWSANETWORKEVENTS lpNetworkEvents)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 13 of file event.c.

Function Documentation

◆ WSACloseEvent()

BOOL WSAAPI WSACloseEvent ( IN WSAEVENT  hEvent)

Definition at line 23 of file event.c.

24 {
25  BOOL Success;
26 
27  /* Let the OS handle it */
29 
30  /* We need a special WSA return error */
32 
33  /* Return the Win32 Error */
34  return Success;
35 }
#define CloseHandle
Definition: compat.h:398
static HANDLE hEvent
Definition: comm.c:54
unsigned int BOOL
Definition: ntddk_ex.h:94
VOID WSAAPI WSASetLastError(IN INT iError)
Definition: dllmain.c:123
#define WSA_INVALID_HANDLE
Definition: winsock2.h:591

Referenced by CServerSocket::Close(), detectChange(), dispatch(), event_client(), recv_thread(), START_TEST(), test_AcceptEx(), test_ConnectEx(), test_DisconnectEx(), test_GetAddrInfoExW(), test_sioAddressListChange(), test_write_watch(), test_WSAEnumNetworkEvents(), Test_WSARecv(), and test_WSARecv().

◆ WSACreateEvent()

WSAEVENT WSAAPI WSACreateEvent ( VOID  )

Definition at line 42 of file event.c.

43 {
44  /* CreateEventW can only return the Event or 0 (WSA_INVALID_EVENT) */
45  return CreateEventW(NULL, TRUE, FALSE, NULL);
46 }
#define TRUE
Definition: types.h:120
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:597
smooth NULL
Definition: ftsmooth.c:416

Referenced by detectChange(), dispatch(), event_client(), recv_thread(), CSocket::SetEvents(), START_TEST(), test_DisconnectEx(), test_events(), test_GetAddrInfoExW(), test_sioAddressListChange(), test_WSAEnumNetworkEvents(), and Test_WSARecv().

◆ WSAEnumNetworkEvents()

INT WSAAPI WSAEnumNetworkEvents ( IN SOCKET  s,
IN WSAEVENT  hEventObject,
OUT LPWSANETWORKEVENTS  lpNetworkEvents 
)

Definition at line 94 of file event.c.

97 {
98  PWSSOCKET Socket;
99  INT Status;
100  INT ErrorCode;
101  DPRINT("WSAEnumNetworkEvents: %lx\n", s);
102 
103  /* Check for WSAStartup */
105  {
106  /* Get the Socket Context */
107  if ((Socket = WsSockGetSocket(s)))
108  {
109  /* Make the call */
111  hEventObject,
112  lpNetworkEvents,
113  &ErrorCode);
114  /* Deference the Socket Context */
115  WsSockDereference(Socket);
116 
117  /* Return Provider Value */
118  if (Status == ERROR_SUCCESS) return Status;
119  }
120  else
121  {
122  /* No Socket Context Found */
124  }
125  }
126 
127  /* Return with an Error */
129  return SOCKET_ERROR;
130 }
#define WSAENOTSOCK
Definition: winerror.h:1951
#define SOCKET_ERROR
Definition: winsock.h:333
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4436
#define ERROR_SUCCESS
Definition: deptool.c:10
PWSSOCKET WSAAPI WsSockGetSocket(IN SOCKET Handle)
Definition: dsocket.c:140
int32_t INT
Definition: typedefs.h:56
WSPPROC_TABLE Service
Definition: ws2_32p.h:80
VOID WSAAPI WsSockDereference(IN PWSSOCKET Socket)
Definition: dsocket.c:205
void DPRINT(...)
Definition: polytest.cpp:61
PTPROVIDER Provider
Definition: ws2_32p.h:199
#define SetLastError(x)
Definition: compat.h:409
GLdouble s
Definition: gl.h:2039
Status
Definition: gdiplustypes.h:24
LPWSPENUMNETWORKEVENTS lpWSPEnumNetworkEvents
Definition: ws2spi.h:470
FORCEINLINE DWORD WsQuickProlog(VOID)
Definition: ws2_32p.h:892

Referenced by event_client(), flush_events(), CServerClientSocket::MessageLoop(), CServerSocket::MessageLoop(), ok_event_sequence(), START_TEST(), and test_WSAEnumNetworkEvents().

◆ WSAResetEvent()

BOOL WSAAPI WSAResetEvent ( IN WSAEVENT  hEvent)

Definition at line 53 of file event.c.

54 {
55  /* Call Win32 */
56  return ResetEvent(hEvent);
57 }
static HANDLE hEvent
Definition: comm.c:54
BOOL WINAPI DECLSPEC_HOTPATCH ResetEvent(IN HANDLE hEvent)
Definition: synch.c:660

Referenced by dispatch(), and Test_WSARecv().

◆ WSASetEvent()

BOOL WSAAPI WSASetEvent ( IN WSAEVENT  hEvent)

Definition at line 64 of file event.c.

65 {
66  /* Call Win32 */
67  return SetEvent(hEvent);
68 }
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:679
static HANDLE hEvent
Definition: comm.c:54

Referenced by completion().

◆ WSAWaitForMultipleEvents()

DWORD WSAAPI WSAWaitForMultipleEvents ( IN DWORD  cEvents,
IN CONST WSAEVENT FAR lphEvents,
IN BOOL  fWaitAll,
IN DWORD  dwTimeout,
IN BOOL  fAlertable 
)

Definition at line 75 of file event.c.

80 {
81  /* Call Win32 */
82  return WaitForMultipleObjectsEx(cEvents,
83  lphEvents,
84  fWaitAll,
85  dwTimeout,
86  fAlertable);
87 }
DWORD WINAPI WaitForMultipleObjectsEx(IN DWORD nCount, IN CONST HANDLE *lpHandles, IN BOOL bWaitAll, IN DWORD dwMilliseconds, IN BOOL bAlertable)
Definition: synch.c:169
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD dwTimeout
Definition: wincrypt.h:6081

Referenced by CServerClientSocket::MessageLoop(), CServerSocket::MessageLoop(), and Test_WSARecv().