mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
-made an inadvertent asynch. read into a synch. read
svn path=/trunk/; revision=6835
This commit is contained in:
parent
7603377ffd
commit
0901ecbf1a
2 changed files with 26 additions and 12 deletions
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue