mirror of
https://github.com/reactos/reactos.git
synced 2024-09-11 05:12:43 +00:00
Implemented NtPulseEvent() and NtQueryEvent()
svn path=/trunk/; revision=1384
This commit is contained in:
parent
4a5bc9edc8
commit
15b935ba7c
|
@ -235,7 +235,24 @@ enum
|
||||||
#define IRP_MN_VERIFY_VOLUME 0x02
|
#define IRP_MN_VERIFY_VOLUME 0x02
|
||||||
#define IRP_MN_LOAD_FILE_SYSTEM 0x03
|
#define IRP_MN_LOAD_FILE_SYSTEM 0x03
|
||||||
|
|
||||||
#define IO_DISK_INCREMENT 4
|
/*
|
||||||
|
* Priority increments
|
||||||
|
*/
|
||||||
|
#define EVENT_INCREMENT 1
|
||||||
|
#define IO_NO_INCREMENT 0
|
||||||
|
#define IO_CD_ROM_INCREMENT 1
|
||||||
|
#define IO_DISK_INCREMENT 4
|
||||||
|
#define IO_KEYBOARD_INCREMENT 6
|
||||||
|
#define IO_MAILSLOT_INCREMENT 2
|
||||||
|
#define IO_MOUSE_INCREMENT 6
|
||||||
|
#define IO_NAMED_PIPE_INCREMENT 2
|
||||||
|
#define IO_NETWORK_INCREMENT 2
|
||||||
|
#define IO_PARALLEL_INCREMENT 1
|
||||||
|
#define IO_SERIAL_INCREMENT 2
|
||||||
|
#define IO_SOUND_INCREMENT 8
|
||||||
|
#define IO_VIDEO_INCREMENT 1
|
||||||
|
#define SEMAPHORE_INCREMENT 1
|
||||||
|
|
||||||
|
|
||||||
#define FILE_WORD_ALIGNMENT 0x0001
|
#define FILE_WORD_ALIGNMENT 0x0001
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: iotypes.h,v 1.19 2000/09/12 10:12:10 jean Exp $
|
/* $Id: iotypes.h,v 1.20 2000/10/06 22:53:21 ekohl Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -705,9 +705,4 @@ VOID
|
||||||
);
|
);
|
||||||
#endif // (_WIN32_WINNT >= 0x0400)
|
#endif // (_WIN32_WINNT >= 0x0400)
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
IO_NO_INCREMENT,
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif __INCLUDE_DDK_IOTYPES_H
|
#endif __INCLUDE_DDK_IOTYPES_H
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
/* $Id: zw.h,v 1.35 2000/09/08 22:52:17 ekohl Exp $
|
/* $Id: zw.h,v 1.36 2000/10/06 22:53:22 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -2588,6 +2588,29 @@ ZwQueryAttributesFile(
|
||||||
IN PVOID Buffer
|
IN PVOID Buffer
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* FUNCTION: Queries the default locale id
|
||||||
|
* ARGUMENTS:
|
||||||
|
* UserProfile = Type of locale id
|
||||||
|
* TRUE: thread locale id
|
||||||
|
* FALSE: system locale id
|
||||||
|
* DefaultLocaleId = Caller supplies storage for the locale id
|
||||||
|
* RETURNS: Status
|
||||||
|
*/
|
||||||
|
|
||||||
|
NTSTATUS
|
||||||
|
STDCALL
|
||||||
|
NtQueryDefaultLocale(
|
||||||
|
IN BOOLEAN UserProfile,
|
||||||
|
OUT PLCID DefaultLocaleId
|
||||||
|
);
|
||||||
|
|
||||||
|
NTSTATUS
|
||||||
|
STDCALL
|
||||||
|
ZwQueryDefaultLocale(
|
||||||
|
IN BOOLEAN UserProfile,
|
||||||
|
OUT PLCID DefaultLocaleId
|
||||||
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FUNCTION: Queries a directory file.
|
* FUNCTION: Queries a directory file.
|
||||||
|
@ -2724,6 +2747,7 @@ ZwQueryEaFile(
|
||||||
IN PULONG EaIndex OPTIONAL,
|
IN PULONG EaIndex OPTIONAL,
|
||||||
IN BOOLEAN RestartScan
|
IN BOOLEAN RestartScan
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FUNCTION: Queries an event
|
* FUNCTION: Queries an event
|
||||||
* ARGUMENTS:
|
* ARGUMENTS:
|
||||||
|
@ -2737,13 +2761,20 @@ ZwQueryEaFile(
|
||||||
* ReturnLength = Data written
|
* ReturnLength = Data written
|
||||||
* RETURNS: Status
|
* RETURNS: Status
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
STDCALL
|
STDCALL
|
||||||
NtQueryEvent(
|
NtQueryEvent(
|
||||||
IN HANDLE EventHandle,
|
IN HANDLE EventHandle,
|
||||||
IN CINT EventInformationClass,
|
IN EVENT_INFORMATION_CLASS EventInformationClass,
|
||||||
|
OUT PVOID EventInformation,
|
||||||
|
IN ULONG EventInformationLength,
|
||||||
|
OUT PULONG ReturnLength
|
||||||
|
);
|
||||||
|
NTSTATUS
|
||||||
|
STDCALL
|
||||||
|
ZwQueryEvent(
|
||||||
|
IN HANDLE EventHandle,
|
||||||
|
IN EVENT_INFORMATION_CLASS EventInformationClass,
|
||||||
OUT PVOID EventInformation,
|
OUT PVOID EventInformation,
|
||||||
IN ULONG EventInformationLength,
|
IN ULONG EventInformationLength,
|
||||||
OUT PULONG ReturnLength
|
OUT PULONG ReturnLength
|
||||||
|
@ -2751,15 +2782,6 @@ NtQueryEvent(
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
STDCALL
|
STDCALL
|
||||||
ZwQueryEvent(
|
|
||||||
IN HANDLE EventHandle,
|
|
||||||
IN CINT EventInformationClass,
|
|
||||||
OUT PVOID EventInformation,
|
|
||||||
IN ULONG EventInformationLength,
|
|
||||||
OUT PULONG ReturnLength
|
|
||||||
);
|
|
||||||
NTSTATUS
|
|
||||||
STDCALL
|
|
||||||
NtQueryFullAttributesFile(
|
NtQueryFullAttributesFile(
|
||||||
IN HANDLE FileHandle,
|
IN HANDLE FileHandle,
|
||||||
IN PVOID Attributes
|
IN PVOID Attributes
|
||||||
|
@ -2774,7 +2796,7 @@ ZwQueryFullAttributesFile(
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
STDCALL
|
STDCALL
|
||||||
NtQueryInformationAtom(
|
NtQueryInformationAtom(
|
||||||
IN HANDLE AtomHandle,
|
IN RTL_ATOM Atom,
|
||||||
IN CINT AtomInformationClass,
|
IN CINT AtomInformationClass,
|
||||||
OUT PVOID AtomInformation,
|
OUT PVOID AtomInformation,
|
||||||
IN ULONG AtomInformationLength,
|
IN ULONG AtomInformationLength,
|
||||||
|
@ -2783,7 +2805,7 @@ NtQueryInformationAtom(
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
STDCALL
|
STDCALL
|
||||||
NtQueryInformationAtom(
|
NtQueryInformationAtom(
|
||||||
IN HANDLE AtomHandle,
|
IN RTL_ATOM Atom,
|
||||||
IN CINT AtomInformationClass,
|
IN CINT AtomInformationClass,
|
||||||
OUT PVOID AtomInformation,
|
OUT PVOID AtomInformation,
|
||||||
IN ULONG AtomInformationLength,
|
IN ULONG AtomInformationLength,
|
||||||
|
@ -3953,6 +3975,7 @@ ZwSaveKey(
|
||||||
IN HANDLE KeyHandle,
|
IN HANDLE KeyHandle,
|
||||||
IN HANDLE FileHandle
|
IN HANDLE FileHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FUNCTION: Sets the context of a specified thread.
|
* FUNCTION: Sets the context of a specified thread.
|
||||||
* ARGUMENTS:
|
* ARGUMENTS:
|
||||||
|
@ -3974,6 +3997,30 @@ ZwSetContextThread(
|
||||||
IN PCONTEXT Context
|
IN PCONTEXT Context
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* FUNCTION: Sets the default locale id
|
||||||
|
* ARGUMENTS:
|
||||||
|
* UserProfile = Type of locale id
|
||||||
|
* TRUE: thread locale id
|
||||||
|
* FALSE: system locale id
|
||||||
|
* DefaultLocaleId = Locale id
|
||||||
|
* RETURNS: Status
|
||||||
|
*/
|
||||||
|
|
||||||
|
NTSTATUS
|
||||||
|
STDCALL
|
||||||
|
NtSetDefaultLocale(
|
||||||
|
IN BOOLEAN UserProfile,
|
||||||
|
IN LCID DefaultLocaleId
|
||||||
|
);
|
||||||
|
|
||||||
|
NTSTATUS
|
||||||
|
STDCALL
|
||||||
|
ZwSetDefaultLocale(
|
||||||
|
IN BOOLEAN UserProfile,
|
||||||
|
IN LCID DefaultLocaleId
|
||||||
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FUNCTION: Sets the default hard error port
|
* FUNCTION: Sets the default hard error port
|
||||||
* ARGUMENTS:
|
* ARGUMENTS:
|
||||||
|
@ -3991,6 +4038,7 @@ STDCALL
|
||||||
ZwSetDefaultHardErrorPort(
|
ZwSetDefaultHardErrorPort(
|
||||||
IN HANDLE PortHandle
|
IN HANDLE PortHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FUNCTION: Sets the extended attributes of a file.
|
* FUNCTION: Sets the extended attributes of a file.
|
||||||
* ARGUMENTS:
|
* ARGUMENTS:
|
||||||
|
@ -4508,6 +4556,7 @@ ZwSetTimer(
|
||||||
IN ULONG Period OPTIONAL,
|
IN ULONG Period OPTIONAL,
|
||||||
OUT PBOOLEAN PreviousState OPTIONAL
|
OUT PBOOLEAN PreviousState OPTIONAL
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FUNCTION: Sets the frequency of the system timer
|
* FUNCTION: Sets the frequency of the system timer
|
||||||
* ARGUMENTS:
|
* ARGUMENTS:
|
||||||
|
@ -4530,6 +4579,7 @@ ZwSetTimerResolution(
|
||||||
IN BOOL SetOrUnset,
|
IN BOOL SetOrUnset,
|
||||||
OUT PULONG ActualResolution
|
OUT PULONG ActualResolution
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FUNCTION: Sets the value of a registry key
|
* FUNCTION: Sets the value of a registry key
|
||||||
* ARGUMENTS:
|
* ARGUMENTS:
|
||||||
|
@ -4573,6 +4623,7 @@ ZwSetValueKey(
|
||||||
IN PVOID Data,
|
IN PVOID Data,
|
||||||
IN ULONG DataSize
|
IN ULONG DataSize
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FUNCTION: Sets the volume information of a file.
|
* FUNCTION: Sets the volume information of a file.
|
||||||
* ARGUMENTS:
|
* ARGUMENTS:
|
||||||
|
@ -4599,6 +4650,27 @@ ZwSetVolumeInformationFile(
|
||||||
PVOID VolumeInformation,
|
PVOID VolumeInformation,
|
||||||
ULONG Length
|
ULONG Length
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* FUNCTION: Shuts the system down
|
||||||
|
* ARGUMENTS:
|
||||||
|
* Action = Specifies the type of shutdown, it can be one of the following values:
|
||||||
|
* ShutdownNoReboot, ShutdownReboot, ShutdownPowerOff
|
||||||
|
* RETURNS: Status
|
||||||
|
*/
|
||||||
|
NTSTATUS
|
||||||
|
STDCALL
|
||||||
|
NtShutdownSystem(
|
||||||
|
IN SHUTDOWN_ACTION Action
|
||||||
|
);
|
||||||
|
|
||||||
|
NTSTATUS
|
||||||
|
STDCALL
|
||||||
|
ZwShutdownSystem(
|
||||||
|
IN SHUTDOWN_ACTION Action
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
/* --- PROFILING --- */
|
/* --- PROFILING --- */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -4608,7 +4680,6 @@ ZwSetVolumeInformationFile(
|
||||||
* RETURNS: Status
|
* RETURNS: Status
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
STDCALL
|
STDCALL
|
||||||
NtStartProfile(
|
NtStartProfile(
|
||||||
|
@ -5148,20 +5219,6 @@ NtGetPlugPlayEvent (
|
||||||
VOID
|
VOID
|
||||||
);
|
);
|
||||||
|
|
||||||
/* --- NATIONAL LANGUAGE SUPPORT (NLS) --- */
|
|
||||||
|
|
||||||
NTSTATUS
|
|
||||||
STDCALL
|
|
||||||
NtQueryDefaultLocale (
|
|
||||||
VOID
|
|
||||||
);
|
|
||||||
|
|
||||||
NTSTATUS
|
|
||||||
STDCALL
|
|
||||||
NtSetDefaultLocale (
|
|
||||||
VOID
|
|
||||||
);
|
|
||||||
|
|
||||||
/* --- POWER MANAGEMENT --- */
|
/* --- POWER MANAGEMENT --- */
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
|
@ -5244,24 +5301,6 @@ NtSetLdtEntries (
|
||||||
PULONG Entries
|
PULONG Entries
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
|
||||||
* FUNCTION: Shuts the system down
|
|
||||||
* ARGUMENTS:
|
|
||||||
* Action: Specifies the type of shutdown, it can be one of the following values:
|
|
||||||
ShutdownNoReboot, ShutdownReboot, ShutdownPowerOff
|
|
||||||
* RETURNS: Status
|
|
||||||
*/
|
|
||||||
NTSTATUS
|
|
||||||
STDCALL
|
|
||||||
NtShutdownSystem(
|
|
||||||
IN SHUTDOWN_ACTION Action
|
|
||||||
);
|
|
||||||
|
|
||||||
NTSTATUS
|
|
||||||
STDCALL
|
|
||||||
ZwShutdownSystem(
|
|
||||||
IN SHUTDOWN_ACTION Action
|
|
||||||
);
|
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
STDCALL
|
STDCALL
|
||||||
|
|
|
@ -87,7 +87,10 @@ extern ULONG IMPORTED NtBuildNumber;
|
||||||
|
|
||||||
// event information
|
// event information
|
||||||
|
|
||||||
#define EventBasicInformation 0
|
typedef enum _EVENT_INFORMATION_CLASS
|
||||||
|
{
|
||||||
|
EventBasicInformation = 0
|
||||||
|
} EVENT_INFORMATION_CLASS;
|
||||||
|
|
||||||
// system information
|
// system information
|
||||||
// {Nt|Zw}{Query|Set}SystemInformation
|
// {Nt|Zw}{Query|Set}SystemInformation
|
||||||
|
@ -1186,9 +1189,10 @@ typedef struct _SEMAPHORE_BASIC_INFORMATION
|
||||||
|
|
||||||
typedef struct _EVENT_BASIC_INFORMATION
|
typedef struct _EVENT_BASIC_INFORMATION
|
||||||
{
|
{
|
||||||
BOOL AutomaticReset;
|
EVENT_TYPE EventType;
|
||||||
BOOL Signaled;
|
LONG EventState;
|
||||||
} EVENT_BASIC_INFORMATION, *PEVENT_INFORMATION;
|
} EVENT_BASIC_INFORMATION, *PEVENT_BASIC_INFORMATION;
|
||||||
|
|
||||||
|
|
||||||
//typedef enum _TIMER_TYPE
|
//typedef enum _TIMER_TYPE
|
||||||
//{
|
//{
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#define SEMAPHORE_MODIFY_STATE (2)
|
#define SEMAPHORE_MODIFY_STATE (2)
|
||||||
#define EVENT_ALL_ACCESS (0x1f0003L)
|
#define EVENT_ALL_ACCESS (0x1f0003L)
|
||||||
#define EVENT_MODIFY_STATE (2)
|
#define EVENT_MODIFY_STATE (2)
|
||||||
|
#define EVENT_QUERY_STATE (1)
|
||||||
|
|
||||||
|
|
||||||
#endif /* __INCLUDE_PS_H */
|
#endif /* __INCLUDE_PS_H */
|
||||||
|
|
|
@ -68,6 +68,11 @@ typedef union _LARGE_INTEGER
|
||||||
DWORD LowPart;
|
DWORD LowPart;
|
||||||
LONG HighPart;
|
LONG HighPart;
|
||||||
} u;
|
} u;
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
DWORD LowPart;
|
||||||
|
LONG HighPart;
|
||||||
|
};
|
||||||
LONGLONG QuadPart;
|
LONGLONG QuadPart;
|
||||||
} LARGE_INTEGER, *PLARGE_INTEGER;
|
} LARGE_INTEGER, *PLARGE_INTEGER;
|
||||||
|
|
||||||
|
@ -78,6 +83,11 @@ typedef union _ULARGE_INTEGER
|
||||||
DWORD LowPart;
|
DWORD LowPart;
|
||||||
DWORD HighPart;
|
DWORD HighPart;
|
||||||
} u;
|
} u;
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
DWORD LowPart;
|
||||||
|
DWORD HighPart;
|
||||||
|
};
|
||||||
ULONGLONG QuadPart;
|
ULONGLONG QuadPart;
|
||||||
} ULARGE_INTEGER, *PULARGE_INTEGER;
|
} ULARGE_INTEGER, *PULARGE_INTEGER;
|
||||||
|
|
||||||
|
@ -281,6 +291,7 @@ typedef BYTE *LPBYTE;
|
||||||
typedef BYTE *PBYTE;
|
typedef BYTE *PBYTE;
|
||||||
|
|
||||||
typedef DWORD LCID;
|
typedef DWORD LCID;
|
||||||
|
typedef DWORD *PLCID;
|
||||||
|
|
||||||
typedef const char *LPCSTR;
|
typedef const char *LPCSTR;
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
#include <internal/ob.h>
|
#include <internal/ob.h>
|
||||||
#include <ntos/synch.h>
|
#include <ntos/synch.h>
|
||||||
|
#include <internal/id.h>
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <internal/debug.h>
|
#include <internal/debug.h>
|
||||||
|
@ -92,11 +93,11 @@ NTSTATUS STDCALL NtClearEvent (IN HANDLE EventHandle)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS STDCALL NtCreateEvent (OUT PHANDLE EventHandle,
|
NTSTATUS STDCALL NtCreateEvent (OUT PHANDLE EventHandle,
|
||||||
IN ACCESS_MASK DesiredAccess,
|
IN ACCESS_MASK DesiredAccess,
|
||||||
IN POBJECT_ATTRIBUTES ObjectAttributes,
|
IN POBJECT_ATTRIBUTES ObjectAttributes,
|
||||||
IN BOOLEAN ManualReset,
|
IN BOOLEAN ManualReset,
|
||||||
IN BOOLEAN InitialState)
|
IN BOOLEAN InitialState)
|
||||||
{
|
{
|
||||||
PKEVENT Event;
|
PKEVENT Event;
|
||||||
|
|
||||||
|
@ -113,7 +114,7 @@ NTSTATUS STDCALL NtCreateEvent (OUT PHANDLE EventHandle,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS STDCALL NtOpenEvent (OUT PHANDLE EventHandle,
|
NTSTATUS STDCALL NtOpenEvent (OUT PHANDLE EventHandle,
|
||||||
IN ACCESS_MASK DesiredAccess,
|
IN ACCESS_MASK DesiredAccess,
|
||||||
IN POBJECT_ATTRIBUTES ObjectAttributes)
|
IN POBJECT_ATTRIBUTES ObjectAttributes)
|
||||||
{
|
{
|
||||||
|
@ -147,17 +148,66 @@ NTSTATUS STDCALL NtOpenEvent (OUT PHANDLE EventHandle,
|
||||||
NTSTATUS STDCALL NtPulseEvent(IN HANDLE EventHandle,
|
NTSTATUS STDCALL NtPulseEvent(IN HANDLE EventHandle,
|
||||||
IN PULONG PulseCount OPTIONAL)
|
IN PULONG PulseCount OPTIONAL)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
PKEVENT Event;
|
||||||
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
DPRINT("NtPulseEvent(EventHandle %x PulseCount %x)\n",
|
||||||
|
EventHandle, PulseCount);
|
||||||
|
|
||||||
|
Status = ObReferenceObjectByHandle(EventHandle,
|
||||||
|
EVENT_MODIFY_STATE,
|
||||||
|
ExEventObjectType,
|
||||||
|
UserMode,
|
||||||
|
(PVOID*)&Event,
|
||||||
|
NULL);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
return(Status);
|
||||||
|
|
||||||
|
KePulseEvent(Event,EVENT_INCREMENT,FALSE);
|
||||||
|
|
||||||
|
ObDereferenceObject(Event);
|
||||||
|
return(STATUS_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS STDCALL NtQueryEvent (IN HANDLE EventHandle,
|
NTSTATUS STDCALL NtQueryEvent (IN HANDLE EventHandle,
|
||||||
IN CINT EventInformationClass,
|
IN EVENT_INFORMATION_CLASS EventInformationClass,
|
||||||
OUT PVOID EventInformation,
|
OUT PVOID EventInformation,
|
||||||
IN ULONG EventInformationLength,
|
IN ULONG EventInformationLength,
|
||||||
OUT PULONG ReturnLength)
|
OUT PULONG ReturnLength)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
PEVENT_BASIC_INFORMATION Info;
|
||||||
|
PKEVENT Event;
|
||||||
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
Info = (PEVENT_BASIC_INFORMATION)EventInformation;
|
||||||
|
|
||||||
|
if (EventInformationClass > EventBasicInformation)
|
||||||
|
return STATUS_INVALID_INFO_CLASS;
|
||||||
|
|
||||||
|
if (EventInformationLength < sizeof(EVENT_BASIC_INFORMATION))
|
||||||
|
return STATUS_INFO_LENGTH_MISMATCH;
|
||||||
|
|
||||||
|
Status = ObReferenceObjectByHandle(EventHandle,
|
||||||
|
EVENT_QUERY_STATE,
|
||||||
|
ExEventObjectType,
|
||||||
|
UserMode,
|
||||||
|
(PVOID*)&Event,
|
||||||
|
NULL);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
return Status;
|
||||||
|
|
||||||
|
if (Event->Header.Type == InternalNotificationEvent)
|
||||||
|
Info->EventType = NotificationEvent;
|
||||||
|
else
|
||||||
|
Info->EventType = SynchronizationEvent;
|
||||||
|
Info->EventState = KeReadStateEvent(Event);
|
||||||
|
|
||||||
|
*ReturnLength = sizeof(EVENT_BASIC_INFORMATION);
|
||||||
|
|
||||||
|
ObDereferenceObject(Event);
|
||||||
|
|
||||||
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -186,7 +236,7 @@ NTSTATUS STDCALL NtResetEvent(HANDLE EventHandle,
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS STDCALL NtSetEvent(IN HANDLE EventHandle,
|
NTSTATUS STDCALL NtSetEvent(IN HANDLE EventHandle,
|
||||||
PULONG NumberOfThreadsReleased)
|
OUT PULONG NumberOfThreadsReleased)
|
||||||
{
|
{
|
||||||
PKEVENT Event;
|
PKEVENT Event;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
@ -203,7 +253,7 @@ NTSTATUS STDCALL NtSetEvent(IN HANDLE EventHandle,
|
||||||
{
|
{
|
||||||
return(Status);
|
return(Status);
|
||||||
}
|
}
|
||||||
KeSetEvent(Event,IO_NO_INCREMENT,FALSE);
|
KeSetEvent(Event,EVENT_INCREMENT,FALSE);
|
||||||
|
|
||||||
|
|
||||||
ObDereferenceObject(Event);
|
ObDereferenceObject(Event);
|
||||||
|
|
Loading…
Reference in a new issue