* autoload.cc (EnumProcessModules): Remove.

* dlfcn.cc (dlopen): Make sure errno is set if an error occurs.
	(dlsym): Rewrite using RtlQueryProcessDebugInformation instead of
	EnumProcessModules.
	* ntdll.h (struct _DEBUG_MODULE_ARRAY): Define.
	(RtlCreateQueryDebugBuffer): Declare.
	(RtlDestroyQueryDebugBuffer): Declare.
	(RtlQueryProcessDebugInformation): Declare.
This commit is contained in:
Corinna Vinschen
2011-05-11 13:25:27 +00:00
parent b27800ad45
commit 31ddf45dd8
4 changed files with 57 additions and 17 deletions

View File

@ -538,6 +538,12 @@ typedef struct _DEBUG_MODULE_INFORMATION
CHAR ImageName[256];
} DEBUG_MODULE_INFORMATION, *PDEBUG_MODULE_INFORMATION;
typedef struct _DEBUG_MODULE_ARRAY
{
ULONG Count;
DEBUG_MODULE_INFORMATION Modules[1];
} DEBUG_MODULE_ARRAY, *PDEBUG_MODULE_ARRAY;
typedef struct _KERNEL_USER_TIMES
{
LARGE_INTEGER CreateTime;
@ -1143,10 +1149,12 @@ extern "C"
NTSTATUS NTAPI RtlCopySid (ULONG, PSID, PSID);
VOID NTAPI RtlCopyUnicodeString (PUNICODE_STRING, PUNICODE_STRING);
NTSTATUS NTAPI RtlCreateAcl (PACL, ULONG, ULONG);
PDEBUG_BUFFER NTAPI RtlCreateQueryDebugBuffer (ULONG, BOOLEAN);
NTSTATUS NTAPI RtlCreateRegistryKey (ULONG, PCWSTR);
NTSTATUS NTAPI RtlCreateSecurityDescriptor (PSECURITY_DESCRIPTOR, ULONG);
BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz (PUNICODE_STRING, PCSTR);
NTSTATUS NTAPI RtlDeleteSecurityObject (PSECURITY_DESCRIPTOR *);
NTSTATUS NTAPI RtlDestroyQueryDebugBuffer (PDEBUG_BUFFER);
NTSTATUS NTAPI RtlDowncaseUnicodeString (PUNICODE_STRING, PUNICODE_STRING,
BOOLEAN);
NTSTATUS NTAPI RtlEnterCriticalSection (PRTL_CRITICAL_SECTION);
@ -1184,6 +1192,7 @@ extern "C"
BOOLEAN);
BOOLEAN NTAPI RtlPrefixUnicodeString (PUNICODE_STRING, PUNICODE_STRING,
BOOLEAN);
NTSTATUS NTAPI RtlQueryProcessDebugInformation (ULONG, ULONG, PDEBUG_BUFFER);
NTSTATUS NTAPI RtlQueryRegistryValues (ULONG, PCWSTR,
PRTL_QUERY_REGISTRY_TABLE, PVOID,
PVOID);