diff --git a/reactos/lib/ntdll/ldr/utils.c b/reactos/lib/ntdll/ldr/utils.c index fa47be1ca7c..fd7f05970dc 100644 --- a/reactos/lib/ntdll/ldr/utils.c +++ b/reactos/lib/ntdll/ldr/utils.c @@ -1,4 +1,4 @@ -/* $Id: utils.c,v 1.74 2003/11/19 13:16:22 navaraf Exp $ +/* $Id: utils.c,v 1.75 2003/11/30 20:37:34 gdalsnes Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -389,11 +389,11 @@ LdrpMapDllImageFile(IN PWSTR SearchPath OPTIONAL, DPRINT("Opening dll \"%wZ\"\n", &FullNtFileName); Status = ZwOpenFile(&FileHandle, - FILE_ALL_ACCESS, + GENERIC_READ|SYNCHRONIZE, &FileObjectAttributes, &IoStatusBlock, 0, - 0); + FILE_SYNCHRONOUS_IO_NONALERT); if (!NT_SUCCESS(Status)) { DbgPrint("Dll open of %wZ failed: Status = 0x%08x\n", @@ -404,14 +404,14 @@ LdrpMapDllImageFile(IN PWSTR SearchPath OPTIONAL, RtlFreeUnicodeString (&FullNtFileName); Status = ZwReadFile(FileHandle, - 0, - 0, - 0, + NULL, + NULL, + NULL, &IoStatusBlock, BlockBuffer, sizeof(BlockBuffer), - 0, - 0); + NULL, + NULL); if (!NT_SUCCESS(Status)) { DPRINT("Dll header read failed: Status = 0x%08x\n", Status); diff --git a/reactos/subsys/win32k/objects/text.c b/reactos/subsys/win32k/objects/text.c index c681001176b..d00b96be325 100644 --- a/reactos/subsys/win32k/objects/text.c +++ b/reactos/subsys/win32k/objects/text.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: text.c,v 1.53 2003/10/20 17:57:42 gvg Exp $ */ +/* $Id: text.c,v 1.54 2003/11/30 20:33:45 gdalsnes Exp $ */ #undef WIN32_LEAN_AND_MEAN @@ -157,7 +157,12 @@ NtGdiAddFontResource(LPCWSTR Filename) // Open the Module InitializeObjectAttributes(&ObjectAttributes, &uFileName, 0, NULL, NULL); - Status = NtOpenFile(&FileHandle, FILE_ALL_ACCESS, &ObjectAttributes, &Iosb, 0, 0); + Status = ZwOpenFile(&FileHandle, + GENERIC_READ|SYNCHRONIZE, + &ObjectAttributes, + &Iosb, + 0, //ShareAccess + FILE_SYNCHRONOUS_IO_NONALERT); if (!NT_SUCCESS(Status)) { @@ -184,7 +189,16 @@ NtGdiAddFontResource(LPCWSTR Filename) } // Load driver into memory chunk - Status = NtReadFile(FileHandle, 0, 0, 0, &Iosb, buffer, FileStdInfo.EndOfFile.u.LowPart, 0, 0); + Status = ZwReadFile(FileHandle, + NULL, + NULL, + NULL, + &Iosb, + buffer, + FileStdInfo.EndOfFile.u.LowPart, + NULL, + NULL); + if (!NT_SUCCESS(Status)) { DPRINT1("could not read module file into memory"); @@ -192,7 +206,7 @@ NtGdiAddFontResource(LPCWSTR Filename) return 0; } - NtClose(FileHandle); + ZwClose(FileHandle); error = FT_New_Memory_Face(library, buffer, size, 0, &face); if (error == FT_Err_Unknown_File_Format)