Preparations for use of forwarded exports

svn path=/trunk/; revision=1614
This commit is contained in:
Eric Kohl 2001-02-10 22:26:26 +00:00
parent 03fd77240f
commit af68ad91d4
2 changed files with 16 additions and 16 deletions

View file

@ -1,4 +1,4 @@
/* $Id: dir.c,v 1.27 2000/06/29 23:35:23 dwelch Exp $ /* $Id: dir.c,v 1.28 2001/02/10 22:25:42 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
@ -615,7 +615,7 @@ SearchPathW (
} }
j = GetEnvironmentVariableW(L"Path",EnvironmentBufferW,0); j = GetEnvironmentVariableW(L"Path",EnvironmentBufferW,0);
EnvironmentBufferW = (WCHAR *) HeapAlloc(GetProcessHeap(),HEAP_GENERATE_EXCEPTIONS|HEAP_ZERO_MEMORY,(j+1)*sizeof(WCHAR)); EnvironmentBufferW = (WCHAR *)RtlAllocateHeap(GetProcessHeap(),HEAP_GENERATE_EXCEPTIONS|HEAP_ZERO_MEMORY,(j+1)*sizeof(WCHAR));
j = GetEnvironmentVariableW(L"Path",EnvironmentBufferW,j+1); j = GetEnvironmentVariableW(L"Path",EnvironmentBufferW,j+1);
@ -630,7 +630,7 @@ SearchPathW (
i += lstrlenW(&EnvironmentBufferW[i]) + 1; i += lstrlenW(&EnvironmentBufferW[i]) + 1;
} }
HeapFree(GetProcessHeap(),0,EnvironmentBufferW); RtlFreeHeap(GetProcessHeap(),0,EnvironmentBufferW);
return retCode; return retCode;
} }

View file

@ -1,4 +1,4 @@
/* $Id: console.c,v 1.29 2001/01/31 02:23:52 phreak Exp $ /* $Id: console.c,v 1.30 2001/02/10 22:26:26 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
@ -123,7 +123,7 @@ WINBOOL STDCALL WriteConsoleA(HANDLE hConsoleOutput,
NTSTATUS Status; NTSTATUS Status;
WORD Size; WORD Size;
Request = HeapAlloc(GetProcessHeap(), Request = RtlAllocateHeap(GetProcessHeap(),
HEAP_ZERO_MEMORY, HEAP_ZERO_MEMORY,
sizeof(CSRSS_API_REQUEST) + CSRSS_MAX_WRITE_CONSOLE_REQUEST); sizeof(CSRSS_API_REQUEST) + CSRSS_MAX_WRITE_CONSOLE_REQUEST);
if (Request == NULL) if (Request == NULL)
@ -154,14 +154,14 @@ WINBOOL STDCALL WriteConsoleA(HANDLE hConsoleOutput,
if (!NT_SUCCESS(Status) || !NT_SUCCESS( Status = Reply.Status ) ) if (!NT_SUCCESS(Status) || !NT_SUCCESS( Status = Reply.Status ) )
{ {
HeapFree( GetProcessHeap(), 0, Request ); RtlFreeHeap( GetProcessHeap(), 0, Request );
SetLastErrorByStatus (Status); SetLastErrorByStatus (Status);
return(FALSE); return(FALSE);
} }
nNumberOfCharsToWrite -= Size; nNumberOfCharsToWrite -= Size;
lpBuffer += Size; lpBuffer += Size;
} }
HeapFree( GetProcessHeap(), 0, Request ); RtlFreeHeap( GetProcessHeap(), 0, Request );
return TRUE; return TRUE;
} }
@ -180,7 +180,7 @@ WINBOOL STDCALL ReadConsoleA(HANDLE hConsoleInput,
NTSTATUS Status; NTSTATUS Status;
ULONG CharsRead = 0; ULONG CharsRead = 0;
Reply = HeapAlloc(GetProcessHeap(), Reply = RtlAllocateHeap(GetProcessHeap(),
HEAP_ZERO_MEMORY, HEAP_ZERO_MEMORY,
sizeof(CSRSS_API_REPLY) + nNumberOfCharsToRead); sizeof(CSRSS_API_REPLY) + nNumberOfCharsToRead);
if (Reply == NULL) if (Reply == NULL)
@ -201,7 +201,7 @@ WINBOOL STDCALL ReadConsoleA(HANDLE hConsoleInput,
{ {
DbgPrint( "CSR returned error in ReadConsole\n" ); DbgPrint( "CSR returned error in ReadConsole\n" );
SetLastErrorByStatus ( Status ); SetLastErrorByStatus ( Status );
HeapFree( GetProcessHeap(), 0, Reply ); RtlFreeHeap( GetProcessHeap(), 0, Reply );
return(FALSE); return(FALSE);
} }
if( Reply->Status == STATUS_NOTIFY_CLEANUP ) if( Reply->Status == STATUS_NOTIFY_CLEANUP )
@ -223,7 +223,7 @@ WINBOOL STDCALL ReadConsoleA(HANDLE hConsoleInput,
if( !NT_SUCCESS( Status ) ) if( !NT_SUCCESS( Status ) )
{ {
DbgPrint( "Wait for console input failed!\n" ); DbgPrint( "Wait for console input failed!\n" );
HeapFree( GetProcessHeap(), 0, Reply ); RtlFreeHeap( GetProcessHeap(), 0, Reply );
return FALSE; return FALSE;
} }
Request.Data.ReadConsoleRequest.nCharsCanBeDeleted = CharsRead; Request.Data.ReadConsoleRequest.nCharsCanBeDeleted = CharsRead;
@ -231,7 +231,7 @@ WINBOOL STDCALL ReadConsoleA(HANDLE hConsoleInput,
if( !NT_SUCCESS( Status ) || !NT_SUCCESS( Status = Reply->Status ) ) if( !NT_SUCCESS( Status ) || !NT_SUCCESS( Status = Reply->Status ) )
{ {
SetLastErrorByStatus ( Status ); SetLastErrorByStatus ( Status );
HeapFree( GetProcessHeap(), 0, Reply ); RtlFreeHeap( GetProcessHeap(), 0, Reply );
return FALSE; return FALSE;
} }
if( Reply->Status == STATUS_NOTIFY_CLEANUP ) if( Reply->Status == STATUS_NOTIFY_CLEANUP )
@ -250,7 +250,7 @@ WINBOOL STDCALL ReadConsoleA(HANDLE hConsoleInput,
CharsRead += Reply->Data.ReadConsoleReply.NrCharactersRead; CharsRead += Reply->Data.ReadConsoleReply.NrCharactersRead;
if (lpNumberOfCharsRead != NULL) if (lpNumberOfCharsRead != NULL)
*lpNumberOfCharsRead = CharsRead; *lpNumberOfCharsRead = CharsRead;
HeapFree(GetProcessHeap(), RtlFreeHeap(GetProcessHeap(),
0, 0,
Reply); Reply);
@ -683,7 +683,7 @@ WriteConsoleOutputCharacterA(
NTSTATUS Status; NTSTATUS Status;
WORD Size; WORD Size;
Request = HeapAlloc(GetProcessHeap(), Request = RtlAllocateHeap(GetProcessHeap(),
HEAP_ZERO_MEMORY, HEAP_ZERO_MEMORY,
sizeof(CSRSS_API_REQUEST) + CSRSS_MAX_WRITE_CONSOLE_OUTPUT_CHAR); sizeof(CSRSS_API_REQUEST) + CSRSS_MAX_WRITE_CONSOLE_OUTPUT_CHAR);
if( !Request ) if( !Request )
@ -757,7 +757,7 @@ WriteConsoleOutputAttribute(
WORD Size; WORD Size;
int c; int c;
Request = HeapAlloc(GetProcessHeap(), Request = RtlAllocateHeap(GetProcessHeap(),
HEAP_ZERO_MEMORY, HEAP_ZERO_MEMORY,
sizeof(CSRSS_API_REQUEST) + CSRSS_MAX_WRITE_CONSOLE_OUTPUT_ATTRIB); sizeof(CSRSS_API_REQUEST) + CSRSS_MAX_WRITE_CONSOLE_OUTPUT_ATTRIB);
if( !Request ) if( !Request )
@ -1314,7 +1314,7 @@ WriteConsoleW(
CSRSS_API_REPLY Reply; CSRSS_API_REPLY Reply;
NTSTATUS Status; NTSTATUS Status;
Request = HeapAlloc(GetProcessHeap(), Request = RtlAllocateHeap(GetProcessHeap(),
HEAP_ZERO_MEMORY, HEAP_ZERO_MEMORY,
sizeof(CSRSS_API_REQUEST) + nNumberOfCharsToWrite * sizeof(WCHAR)); sizeof(CSRSS_API_REQUEST) + nNumberOfCharsToWrite * sizeof(WCHAR));
if (Request == NULL) if (Request == NULL)
@ -1338,7 +1338,7 @@ WriteConsoleW(
nNumberOfCharsToWrite, nNumberOfCharsToWrite,
sizeof(CSRSS_API_REPLY)); sizeof(CSRSS_API_REPLY));
HeapFree(GetProcessHeap(), RtlFreeHeap(GetProcessHeap(),
0, 0,
Request); Request);