mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:52:56 +00:00
fixed CreateEvent() with NULL name
svn path=/trunk/; revision=879
This commit is contained in:
parent
ca6a107ee2
commit
96aed594a2
1 changed files with 8 additions and 6 deletions
|
@ -76,12 +76,13 @@ HANDLE STDCALL CreateEventW(LPSECURITY_ATTRIBUTES lpEventAttributes,
|
||||||
PtrObjectAttributes = NULL;
|
PtrObjectAttributes = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dprintf( "Calling NtCreateEvent\n" );
|
||||||
errCode = NtCreateEvent(&hEvent,
|
errCode = NtCreateEvent(&hEvent,
|
||||||
STANDARD_RIGHTS_ALL|EVENT_READ_ACCESS|EVENT_WRITE_ACCESS,
|
STANDARD_RIGHTS_ALL|EVENT_READ_ACCESS|EVENT_WRITE_ACCESS,
|
||||||
PtrObjectAttributes,
|
PtrObjectAttributes,
|
||||||
bManualReset,
|
bManualReset,
|
||||||
bInitialState);
|
bInitialState);
|
||||||
|
dprintf( "Called\n" );
|
||||||
if (!NT_SUCCESS(errCode))
|
if (!NT_SUCCESS(errCode))
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastError(RtlNtStatusToDosError(errCode));
|
||||||
|
@ -143,15 +144,16 @@ CreateEventA(
|
||||||
int i;
|
int i;
|
||||||
WCHAR EventNameW[MAX_PATH];
|
WCHAR EventNameW[MAX_PATH];
|
||||||
i = 0;
|
i = 0;
|
||||||
while ((*lpName)!=0 && i < MAX_PATH)
|
if( lpName )
|
||||||
|
while ((*lpName)!=0 && i < MAX_PATH)
|
||||||
{
|
{
|
||||||
EventNameW[i] = *lpName;
|
EventNameW[i] = *lpName;
|
||||||
lpName++;
|
lpName++;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
EventNameW[i] = 0;
|
EventNameW[i] = 0;
|
||||||
|
|
||||||
return CreateEventW(lpEventAttributes,bManualReset,bInitialState,EventNameW);
|
return CreateEventW( lpEventAttributes, bManualReset, bInitialState, lpName ? EventNameW : 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue