ReactOS 0.4.16-dev-197-g92996da
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{
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:739
VOID WSAAPI WSASetLastError(IN INT iError)
Definition: dllmain.c:123
@ Success
Definition: eventcreate.c:712
unsigned int BOOL
Definition: ntddk_ex.h:94
static HANDLE hEvent
Definition: comm.c:54
#define WSA_INVALID_HANDLE
Definition: winsock2.h:618

Referenced by CServerSocket::Close(), detectChange(), dispatch(), event_client(), START_TEST(), Test_Overread(), 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 NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:651

Referenced by detectChange(), dispatch(), event_client(), CSocket::SetEvents(), START_TEST(), test_events(), Test_Overread(), 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;
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 ERROR_SUCCESS
Definition: deptool.c:10
#define SetLastError(x)
Definition: compat.h:752
Status
Definition: gdiplustypes.h:25
GLdouble s
Definition: gl.h:2039
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4436
#define DPRINT
Definition: sndvol32.h:73
WSPPROC_TABLE Service
Definition: ws2_32p.h:80
LPWSPENUMNETWORKEVENTS lpWSPEnumNetworkEvents
Definition: ws2spi.h:470
PTPROVIDER Provider
Definition: ws2_32p.h:199
int32_t INT
Definition: typedefs.h:58
#define WSAENOTSOCK
Definition: winerror.h:1951
#define SOCKET_ERROR
Definition: winsock.h:333
FORCEINLINE DWORD WsQuickProlog(VOID)
Definition: ws2_32p.h:892
VOID WSAAPI WsSockDereference(IN PWSSOCKET Socket)
Definition: dsocket.c:205
PWSSOCKET WSAAPI WsSockGetSocket(IN SOCKET Handle)
Definition: dsocket.c:140

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

◆ WSAResetEvent()

BOOL WSAAPI WSAResetEvent ( IN WSAEVENT  hEvent)

Definition at line 53 of file event.c.

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

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:733

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,
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().