mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 21:05:43 +00:00
Fixed severe bug in CreateEventW()
Implemented use of "\BaseNamedObjects" directory svn path=/trunk/; revision=1546
This commit is contained in:
parent
86c7503953
commit
300201892a
5 changed files with 217 additions and 168 deletions
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
extern WINBOOL bIsFileApiAnsi;
|
extern WINBOOL bIsFileApiAnsi;
|
||||||
extern HANDLE hProcessHeap;
|
extern HANDLE hProcessHeap;
|
||||||
|
extern HANDLE hBaseDir;
|
||||||
|
|
||||||
/* FUNCTION PROTOTYPES ********************************************************/
|
/* FUNCTION PROTOTYPES ********************************************************/
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: dllmain.c,v 1.16 2001/01/20 12:19:57 ekohl Exp $
|
/* $Id: dllmain.c,v 1.17 2001/01/20 18:37:08 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -24,6 +24,7 @@ extern UNICODE_STRING SystemDirectory;
|
||||||
extern UNICODE_STRING WindowsDirectory;
|
extern UNICODE_STRING WindowsDirectory;
|
||||||
|
|
||||||
HANDLE hProcessHeap = NULL;
|
HANDLE hProcessHeap = NULL;
|
||||||
|
HANDLE hBaseDir = NULL;
|
||||||
|
|
||||||
static WINBOOL DllInitialized = FALSE;
|
static WINBOOL DllInitialized = FALSE;
|
||||||
|
|
||||||
|
@ -32,6 +33,41 @@ WINBOOL STDCALL DllMain (HANDLE hInst,
|
||||||
LPVOID lpReserved);
|
LPVOID lpReserved);
|
||||||
|
|
||||||
|
|
||||||
|
static NTSTATUS OpenBaseDirectory(PHANDLE DirHandle)
|
||||||
|
{
|
||||||
|
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||||
|
UNICODE_STRING Name;
|
||||||
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
RtlInitUnicodeString(&Name,
|
||||||
|
L"\\BaseNamedObjects");
|
||||||
|
|
||||||
|
InitializeObjectAttributes(&ObjectAttributes,
|
||||||
|
&Name,
|
||||||
|
OBJ_PERMANENT,
|
||||||
|
NULL,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
Status = NtOpenDirectoryObject(DirHandle,
|
||||||
|
DIRECTORY_ALL_ACCESS,
|
||||||
|
&ObjectAttributes);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
Status = NtCreateDirectoryObject(DirHandle,
|
||||||
|
DIRECTORY_ALL_ACCESS,
|
||||||
|
&ObjectAttributes);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
DbgPrint("NtCreateDirectoryObject() failed\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
return STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOL WINAPI DllMainCRTStartup(HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
|
BOOL WINAPI DllMainCRTStartup(HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
|
||||||
{
|
{
|
||||||
return(DllMain(hDll,dwReason,lpReserved));
|
return(DllMain(hDll,dwReason,lpReserved));
|
||||||
|
@ -84,6 +120,13 @@ WINBOOL STDCALL DllMain(HANDLE hInst,
|
||||||
wcscpy (SystemDirectory.Buffer, WindowsDirectory.Buffer);
|
wcscpy (SystemDirectory.Buffer, WindowsDirectory.Buffer);
|
||||||
wcscat (SystemDirectory.Buffer, L"\\System32");
|
wcscat (SystemDirectory.Buffer, L"\\System32");
|
||||||
|
|
||||||
|
/* Open object base directory */
|
||||||
|
Status = OpenBaseDirectory(&hBaseDir);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
DbgPrint("Failed to open object base directory: expect trouble\n");
|
||||||
|
}
|
||||||
|
|
||||||
/* Insert more dll attach stuff here! */
|
/* Insert more dll attach stuff here! */
|
||||||
|
|
||||||
DllInitialized = TRUE;
|
DllInitialized = TRUE;
|
||||||
|
@ -95,11 +138,13 @@ WINBOOL STDCALL DllMain(HANDLE hInst,
|
||||||
DPRINT("DLL_PROCESS_DETACH\n");
|
DPRINT("DLL_PROCESS_DETACH\n");
|
||||||
if (DllInitialized == TRUE)
|
if (DllInitialized == TRUE)
|
||||||
{
|
{
|
||||||
RtlFreeUnicodeString (&SystemDirectory);
|
|
||||||
RtlFreeUnicodeString (&WindowsDirectory);
|
|
||||||
|
|
||||||
/* Insert more dll detach stuff here! */
|
/* Insert more dll detach stuff here! */
|
||||||
|
|
||||||
|
/* Close object base directory */
|
||||||
|
NtClose(hBaseDir);
|
||||||
|
|
||||||
|
RtlFreeUnicodeString (&SystemDirectory);
|
||||||
|
RtlFreeUnicodeString (&WindowsDirectory);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: event.c,v 1.9 2000/10/08 12:56:45 ekohl Exp $
|
/* $Id: event.c,v 1.10 2001/01/20 18:37:58 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -9,6 +9,8 @@
|
||||||
* Created 01/11/98
|
* Created 01/11/98
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
@ -16,209 +18,211 @@
|
||||||
#include <kernel32/kernel32.h>
|
#include <kernel32/kernel32.h>
|
||||||
#include <kernel32/error.h>
|
#include <kernel32/error.h>
|
||||||
|
|
||||||
WINBOOL STDCALL SetEvent(HANDLE hEvent)
|
/* FUNCTIONS ****************************************************************/
|
||||||
{
|
|
||||||
NTSTATUS errCode;
|
|
||||||
ULONG Count;
|
|
||||||
|
|
||||||
errCode = NtSetEvent(hEvent,&Count);
|
|
||||||
if (!NT_SUCCESS(errCode))
|
|
||||||
{
|
|
||||||
SetLastErrorByStatus (errCode);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
WINBOOL STDCALL ResetEvent(HANDLE hEvent)
|
HANDLE STDCALL
|
||||||
|
CreateEventA(LPSECURITY_ATTRIBUTES lpEventAttributes,
|
||||||
|
WINBOOL bManualReset,
|
||||||
|
WINBOOL bInitialState,
|
||||||
|
LPCSTR lpName)
|
||||||
{
|
{
|
||||||
NTSTATUS errCode;
|
UNICODE_STRING EventNameU;
|
||||||
ULONG Count;
|
ANSI_STRING EventName;
|
||||||
|
HANDLE EventHandle;
|
||||||
errCode = NtResetEvent(hEvent, &Count);
|
|
||||||
if (!NT_SUCCESS(errCode))
|
RtlInitUnicodeString (&EventNameU, NULL);
|
||||||
|
|
||||||
|
if (lpName)
|
||||||
{
|
{
|
||||||
SetLastErrorByStatus (errCode);
|
RtlInitAnsiString(&EventName,
|
||||||
return FALSE;
|
(LPSTR)lpName);
|
||||||
|
RtlAnsiStringToUnicodeString(&EventNameU,
|
||||||
|
&EventName,
|
||||||
|
TRUE);
|
||||||
}
|
}
|
||||||
return TRUE;
|
|
||||||
|
EventHandle = CreateEventW(lpEventAttributes,
|
||||||
|
bManualReset,
|
||||||
|
bInitialState,
|
||||||
|
EventNameU.Buffer);
|
||||||
|
|
||||||
|
if (lpName)
|
||||||
|
{
|
||||||
|
RtlFreeUnicodeString(&EventNameU);
|
||||||
|
}
|
||||||
|
|
||||||
|
return EventHandle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HANDLE STDCALL
|
||||||
HANDLE
|
CreateEventW(LPSECURITY_ATTRIBUTES lpEventAttributes,
|
||||||
STDCALL
|
WINBOOL bManualReset,
|
||||||
CreateEventW (
|
WINBOOL bInitialState,
|
||||||
LPSECURITY_ATTRIBUTES lpEventAttributes,
|
LPCWSTR lpName)
|
||||||
WINBOOL bManualReset,
|
|
||||||
WINBOOL bInitialState,
|
|
||||||
LPCWSTR lpName
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
NTSTATUS errCode;
|
NTSTATUS Status;
|
||||||
HANDLE hEvent;
|
HANDLE hEvent;
|
||||||
UNICODE_STRING EventNameString;
|
UNICODE_STRING EventNameString;
|
||||||
POBJECT_ATTRIBUTES PtrObjectAttributes;
|
POBJECT_ATTRIBUTES PtrObjectAttributes;
|
||||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||||
|
|
||||||
|
ObjectAttributes.Length = sizeof(OBJECT_ATTRIBUTES);
|
||||||
|
ObjectAttributes.RootDirectory = hBaseDir;
|
||||||
|
ObjectAttributes.ObjectName = NULL;
|
||||||
|
ObjectAttributes.Attributes = 0;
|
||||||
|
ObjectAttributes.SecurityDescriptor = NULL;
|
||||||
|
ObjectAttributes.SecurityQualityOfService = NULL;
|
||||||
|
|
||||||
if (lpName != NULL)
|
if (lpName != NULL)
|
||||||
{
|
{
|
||||||
PtrObjectAttributes = &ObjectAttributes;
|
|
||||||
ObjectAttributes.Attributes = 0;
|
|
||||||
if (lpEventAttributes != NULL)
|
|
||||||
{
|
|
||||||
ObjectAttributes.SecurityDescriptor =
|
|
||||||
lpEventAttributes->lpSecurityDescriptor;
|
|
||||||
if ( lpEventAttributes->bInheritHandle == TRUE )
|
|
||||||
ObjectAttributes.Attributes |= OBJ_INHERIT;
|
|
||||||
}
|
|
||||||
|
|
||||||
RtlInitUnicodeString(&EventNameString, (LPWSTR)lpName);
|
RtlInitUnicodeString(&EventNameString, (LPWSTR)lpName);
|
||||||
ObjectAttributes.ObjectName = &EventNameString;
|
ObjectAttributes.ObjectName = &EventNameString;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
Status = NtCreateEvent(&hEvent,
|
||||||
PtrObjectAttributes = NULL;
|
STANDARD_RIGHTS_ALL|EVENT_READ_ACCESS|EVENT_WRITE_ACCESS,
|
||||||
}
|
&ObjectAttributes,
|
||||||
|
bManualReset,
|
||||||
DPRINT( "Calling NtCreateEvent\n" );
|
bInitialState);
|
||||||
errCode = NtCreateEvent(&hEvent,
|
|
||||||
STANDARD_RIGHTS_ALL|EVENT_READ_ACCESS|EVENT_WRITE_ACCESS,
|
|
||||||
PtrObjectAttributes,
|
|
||||||
bManualReset,
|
|
||||||
bInitialState);
|
|
||||||
DPRINT( "Called\n" );
|
DPRINT( "Called\n" );
|
||||||
if (!NT_SUCCESS(errCode))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
SetLastErrorByStatus (errCode);
|
SetLastErrorByStatus(Status);
|
||||||
return INVALID_HANDLE_VALUE;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return hEvent;
|
return hEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HANDLE
|
HANDLE STDCALL
|
||||||
STDCALL
|
OpenEventA(DWORD dwDesiredAccess,
|
||||||
OpenEventW (
|
WINBOOL bInheritHandle,
|
||||||
DWORD dwDesiredAccess,
|
LPCSTR lpName)
|
||||||
WINBOOL bInheritHandle,
|
|
||||||
LPCWSTR lpName
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
UNICODE_STRING EventNameU;
|
||||||
UNICODE_STRING EventNameString;
|
ANSI_STRING EventName;
|
||||||
NTSTATUS errCode;
|
HANDLE EventHandle;
|
||||||
HANDLE hEvent = NULL;
|
|
||||||
|
|
||||||
if(lpName == NULL) {
|
RtlInitUnicodeString(&EventNameU,
|
||||||
SetLastError(ERROR_INVALID_PARAMETER);
|
NULL);
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
ObjectAttributes.Attributes = 0;
|
|
||||||
ObjectAttributes.SecurityDescriptor = NULL;
|
|
||||||
RtlInitUnicodeString(&EventNameString, (LPWSTR)lpName);
|
|
||||||
ObjectAttributes.ObjectName = &EventNameString;
|
|
||||||
|
|
||||||
if (bInheritHandle == TRUE )
|
if (lpName)
|
||||||
ObjectAttributes.Attributes |= OBJ_INHERIT;
|
{
|
||||||
|
RtlInitAnsiString(&EventName,
|
||||||
|
(LPSTR)lpName);
|
||||||
|
RtlAnsiStringToUnicodeString(&EventNameU,
|
||||||
|
&EventName,
|
||||||
|
TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
errCode = NtOpenEvent(hEvent,dwDesiredAccess,&ObjectAttributes);
|
EventHandle = OpenEventW(dwDesiredAccess,
|
||||||
if ( !NT_SUCCESS(errCode) ) {
|
bInheritHandle,
|
||||||
SetLastErrorByStatus (errCode);
|
EventNameU.Buffer);
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return hEvent;
|
if (lpName)
|
||||||
|
{
|
||||||
|
RtlFreeUnicodeString(&EventNameU);
|
||||||
|
}
|
||||||
|
|
||||||
|
return EventHandle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HANDLE
|
HANDLE STDCALL
|
||||||
STDCALL
|
OpenEventW(DWORD dwDesiredAccess,
|
||||||
CreateEventA (
|
WINBOOL bInheritHandle,
|
||||||
LPSECURITY_ATTRIBUTES lpEventAttributes,
|
LPCWSTR lpName)
|
||||||
WINBOOL bManualReset,
|
|
||||||
WINBOOL bInitialState,
|
|
||||||
LPCSTR lpName
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
UNICODE_STRING EventNameU;
|
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||||
ANSI_STRING EventName;
|
UNICODE_STRING EventNameString;
|
||||||
HANDLE EventHandle;
|
NTSTATUS Status;
|
||||||
|
HANDLE hEvent = NULL;
|
||||||
|
|
||||||
RtlInitUnicodeString (&EventNameU, NULL);
|
if (lpName == NULL)
|
||||||
|
{
|
||||||
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (lpName)
|
RtlInitUnicodeString(&EventNameString, (LPWSTR)lpName);
|
||||||
{
|
|
||||||
RtlInitAnsiString (&EventName,
|
|
||||||
(LPSTR)lpName);
|
|
||||||
RtlAnsiStringToUnicodeString (&EventNameU,
|
|
||||||
&EventName,
|
|
||||||
TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
EventHandle = CreateEventW (lpEventAttributes,
|
ObjectAttributes.Length = sizeof(OBJECT_ATTRIBUTES);
|
||||||
bManualReset,
|
ObjectAttributes.RootDirectory = hBaseDir;
|
||||||
bInitialState,
|
ObjectAttributes.ObjectName = &EventNameString;
|
||||||
EventNameU.Buffer);
|
ObjectAttributes.Attributes = 0;
|
||||||
|
ObjectAttributes.SecurityDescriptor = NULL;
|
||||||
|
ObjectAttributes.SecurityQualityOfService = NULL;
|
||||||
|
if (bInheritHandle == TRUE)
|
||||||
|
{
|
||||||
|
ObjectAttributes.Attributes |= OBJ_INHERIT;
|
||||||
|
}
|
||||||
|
|
||||||
if (lpName)
|
Status = NtOpenEvent(&hEvent,
|
||||||
RtlFreeUnicodeString (&EventNameU);
|
dwDesiredAccess,
|
||||||
|
&ObjectAttributes);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
SetLastErrorByStatus(Status);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return EventHandle;
|
return hEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HANDLE
|
WINBOOL STDCALL
|
||||||
STDCALL
|
PulseEvent(HANDLE hEvent)
|
||||||
OpenEventA (
|
|
||||||
DWORD dwDesiredAccess,
|
|
||||||
WINBOOL bInheritHandle,
|
|
||||||
LPCSTR lpName
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
UNICODE_STRING EventNameU;
|
ULONG Count;
|
||||||
ANSI_STRING EventName;
|
NTSTATUS Status;
|
||||||
HANDLE EventHandle;
|
|
||||||
|
|
||||||
RtlInitUnicodeString (&EventNameU, NULL);
|
Status = NtPulseEvent(hEvent,
|
||||||
|
&Count);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
SetLastErrorByStatus (Status);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (lpName)
|
return TRUE;
|
||||||
{
|
|
||||||
RtlInitAnsiString (&EventName,
|
|
||||||
(LPSTR)lpName);
|
|
||||||
RtlAnsiStringToUnicodeString (&EventNameU,
|
|
||||||
&EventName,
|
|
||||||
TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
EventHandle = OpenEventW (dwDesiredAccess,
|
|
||||||
bInheritHandle,
|
|
||||||
EventNameU.Buffer);
|
|
||||||
|
|
||||||
if (lpName)
|
|
||||||
RtlFreeUnicodeString (&EventNameU);
|
|
||||||
|
|
||||||
return EventHandle;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
WINBOOL
|
WINBOOL STDCALL
|
||||||
STDCALL
|
ResetEvent(HANDLE hEvent)
|
||||||
PulseEvent (
|
|
||||||
HANDLE hEvent
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
ULONG Count;
|
NTSTATUS Status;
|
||||||
NTSTATUS errCode;
|
ULONG Count;
|
||||||
errCode = NtPulseEvent(hEvent,&Count);
|
|
||||||
if ( !NT_SUCCESS(errCode) ) {
|
Status = NtResetEvent(hEvent,
|
||||||
SetLastErrorByStatus (errCode);
|
&Count);
|
||||||
return FALSE;
|
if (!NT_SUCCESS(Status))
|
||||||
}
|
{
|
||||||
return TRUE;
|
SetLastErrorByStatus(Status);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
WINBOOL STDCALL
|
||||||
|
SetEvent(HANDLE hEvent)
|
||||||
|
{
|
||||||
|
NTSTATUS Status;
|
||||||
|
ULONG Count;
|
||||||
|
|
||||||
|
Status = NtSetEvent(hEvent,
|
||||||
|
&Count);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
SetLastErrorByStatus(Status);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: mutex.c,v 1.1 2001/01/20 12:20:43 ekohl Exp $
|
/* $Id: mutex.c,v 1.2 2001/01/20 18:37:58 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -59,7 +59,7 @@ CreateMutexW(LPSECURITY_ATTRIBUTES lpMutexAttributes,
|
||||||
(LPWSTR)lpName);
|
(LPWSTR)lpName);
|
||||||
|
|
||||||
ObjectAttributes.Length = sizeof(OBJECT_ATTRIBUTES);
|
ObjectAttributes.Length = sizeof(OBJECT_ATTRIBUTES);
|
||||||
ObjectAttributes.RootDirectory = NULL;
|
ObjectAttributes.RootDirectory = hBaseDir;
|
||||||
ObjectAttributes.ObjectName = &NameString;
|
ObjectAttributes.ObjectName = &NameString;
|
||||||
ObjectAttributes.Attributes = 0;
|
ObjectAttributes.Attributes = 0;
|
||||||
ObjectAttributes.SecurityDescriptor = NULL;
|
ObjectAttributes.SecurityDescriptor = NULL;
|
||||||
|
@ -112,7 +112,7 @@ OpenMutexA(DWORD dwDesiredAccess,
|
||||||
TRUE);
|
TRUE);
|
||||||
|
|
||||||
ObjectAttributes.Length = sizeof(OBJECT_ATTRIBUTES);
|
ObjectAttributes.Length = sizeof(OBJECT_ATTRIBUTES);
|
||||||
ObjectAttributes.RootDirectory = NULL;
|
ObjectAttributes.RootDirectory = hBaseDir;
|
||||||
ObjectAttributes.ObjectName = &NameU;
|
ObjectAttributes.ObjectName = &NameU;
|
||||||
ObjectAttributes.Attributes = 0;
|
ObjectAttributes.Attributes = 0;
|
||||||
ObjectAttributes.SecurityDescriptor = NULL;
|
ObjectAttributes.SecurityDescriptor = NULL;
|
||||||
|
@ -158,7 +158,7 @@ OpenMutexW(DWORD dwDesiredAccess,
|
||||||
(LPWSTR)lpName);
|
(LPWSTR)lpName);
|
||||||
|
|
||||||
ObjectAttributes.Length = sizeof(OBJECT_ATTRIBUTES);
|
ObjectAttributes.Length = sizeof(OBJECT_ATTRIBUTES);
|
||||||
ObjectAttributes.RootDirectory = NULL;
|
ObjectAttributes.RootDirectory = hBaseDir;
|
||||||
ObjectAttributes.ObjectName = &Name;
|
ObjectAttributes.ObjectName = &Name;
|
||||||
ObjectAttributes.Attributes = 0;
|
ObjectAttributes.Attributes = 0;
|
||||||
ObjectAttributes.SecurityDescriptor = NULL;
|
ObjectAttributes.SecurityDescriptor = NULL;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: sem.c,v 1.1 2001/01/20 12:20:43 ekohl Exp $
|
/* $Id: sem.c,v 1.2 2001/01/20 18:37:58 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -71,7 +71,7 @@ CreateSemaphoreW(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
|
||||||
NameString.MaximumLength = NameString.Length;
|
NameString.MaximumLength = NameString.Length;
|
||||||
|
|
||||||
ObjectAttributes.Length = sizeof(OBJECT_ATTRIBUTES);
|
ObjectAttributes.Length = sizeof(OBJECT_ATTRIBUTES);
|
||||||
ObjectAttributes.RootDirectory = NULL;
|
ObjectAttributes.RootDirectory = hBaseDir;
|
||||||
ObjectAttributes.ObjectName = &NameString;
|
ObjectAttributes.ObjectName = &NameString;
|
||||||
ObjectAttributes.Attributes = 0;
|
ObjectAttributes.Attributes = 0;
|
||||||
ObjectAttributes.SecurityDescriptor = NULL;
|
ObjectAttributes.SecurityDescriptor = NULL;
|
||||||
|
@ -123,7 +123,7 @@ OpenSemaphoreA(DWORD dwDesiredAccess,
|
||||||
TRUE);
|
TRUE);
|
||||||
|
|
||||||
ObjectAttributes.Length = sizeof(OBJECT_ATTRIBUTES);
|
ObjectAttributes.Length = sizeof(OBJECT_ATTRIBUTES);
|
||||||
ObjectAttributes.RootDirectory = NULL;
|
ObjectAttributes.RootDirectory = hBaseDir;
|
||||||
ObjectAttributes.ObjectName = &NameU;
|
ObjectAttributes.ObjectName = &NameU;
|
||||||
ObjectAttributes.Attributes = 0;
|
ObjectAttributes.Attributes = 0;
|
||||||
ObjectAttributes.SecurityDescriptor = NULL;
|
ObjectAttributes.SecurityDescriptor = NULL;
|
||||||
|
@ -169,7 +169,7 @@ OpenSemaphoreW(DWORD dwDesiredAccess,
|
||||||
(LPWSTR)lpName);
|
(LPWSTR)lpName);
|
||||||
|
|
||||||
ObjectAttributes.Length = sizeof(OBJECT_ATTRIBUTES);
|
ObjectAttributes.Length = sizeof(OBJECT_ATTRIBUTES);
|
||||||
ObjectAttributes.RootDirectory = NULL;
|
ObjectAttributes.RootDirectory = hBaseDir;
|
||||||
ObjectAttributes.ObjectName = &Name;
|
ObjectAttributes.ObjectName = &Name;
|
||||||
ObjectAttributes.Attributes = 0;
|
ObjectAttributes.Attributes = 0;
|
||||||
ObjectAttributes.SecurityDescriptor = NULL;
|
ObjectAttributes.SecurityDescriptor = NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue