ReactOS 0.4.16-dev-122-g325d74c
ioevent.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Kernel
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: ntoskrnl/io/iomgr/ioevent.c
5 * PURPOSE: I/O Wrappers for the Executive Event Functions
6 * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
7 * Eric Kohl
8 */
9
10/* INCLUDES *****************************************************************/
11
12#include <ntoskrnl.h>
13#include <debug.h>
14
15/* PRIVATE FUNCTIONS *********************************************************/
16
22{
27 PAGED_CODE();
28
29 /* Initialize the object attributes */
31 EventName,
33 NULL,
34 NULL);
35
36 /* Create the event */
37 Status = ZwCreateEvent(&Handle,
40 Type,
41 TRUE);
42 if (!NT_SUCCESS(Status)) return NULL;
43
44 /* Get a handle to it */
46 0,
49 (PVOID*)&Event,
50 NULL);
51 if (!NT_SUCCESS(Status))
52 {
54 return NULL;
55 }
56
57 /* Dereference the extra count, and return the handle */
60 return Event;
61}
62
63/* PUBLIC FUNCTIONS **********************************************************/
64
65/*
66 * @implemented
67 */
72{
73 /* Call the internal API */
75}
76
77/*
78 * @implemented
79 */
84{
85 /* Call the internal API */
87}
88
89/* EOF */
#define PAGED_CODE()
Type
Definition: Type.h:7
LONG NTSTATUS
Definition: precomp.h:26
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
ULONG Handle
Definition: gdb_input.c:15
Status
Definition: gdiplustypes.h:25
#define OBJ_KERNEL_HANDLE
Definition: winternl.h:231
#define OBJ_OPENIF
Definition: winternl.h:229
#define EVENT_ALL_ACCESS
Definition: isotest.c:82
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
#define KernelMode
Definition: asm.h:34
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
@ NotificationEvent
@ SynchronizationEvent
enum _EVENT_TYPE EVENT_TYPE
POBJECT_TYPE ExEventObjectType
Definition: event.c:18
PKEVENT NTAPI IoCreateSynchronizationEvent(IN PUNICODE_STRING EventName, IN PHANDLE EventHandle)
Definition: ioevent.c:82
PKEVENT NTAPI IopCreateEvent(IN PUNICODE_STRING EventName, IN PHANDLE EventHandle, IN EVENT_TYPE Type)
Definition: ioevent.c:19
PKEVENT NTAPI IoCreateNotificationEvent(IN PUNICODE_STRING EventName, IN PHANDLE EventHandle)
Definition: ioevent.c:70
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:455
NTSTATUS NTAPI ObReferenceObjectByHandle(IN HANDLE Handle, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PVOID *Object, OUT POBJECT_HANDLE_INFORMATION HandleInformation OPTIONAL)
Definition: obref.c:494
#define NTAPI
Definition: typedefs.h:36
#define IN
Definition: typedefs.h:39
_Out_ PHANDLE EventHandle
Definition: iofuncs.h:857
#define ObDereferenceObject
Definition: obfuncs.h:203