mirror of
https://github.com/reactos/reactos.git
synced 2024-07-31 00:28:56 +00:00
Both GetModuleHandleA and GetModuleHandleW need to handle NULL module name
svn path=/trunk/; revision=1560
This commit is contained in:
parent
42d7089e72
commit
207393f045
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: ldr.c,v 1.9 2000/09/01 17:09:19 ekohl Exp $
|
/* $Id: ldr.c,v 1.10 2001/01/24 04:41:58 phreak Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT : ReactOS user mode libraries
|
* PROJECT : ReactOS user mode libraries
|
||||||
|
@ -303,6 +303,8 @@ GetModuleHandleA ( LPCSTR lpModuleName )
|
||||||
PVOID BaseAddress;
|
PVOID BaseAddress;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
if (lpModuleName == NULL)
|
||||||
|
return ((HMODULE)NtCurrentPeb()->ImageBaseAddress);
|
||||||
RtlInitAnsiString (&ModuleName,
|
RtlInitAnsiString (&ModuleName,
|
||||||
(LPSTR)lpModuleName);
|
(LPSTR)lpModuleName);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue