#include <debug.h>
SIZE_T RtlpAllocDeallocQueryBufferSize = PAGE_SIZE;
+PTEB LdrpTopLevelDllBeingLoadedTeb = NULL;
#define IMAGE_DOS_MAGIC 0x5a4d
#define IMAGE_PE_MAGIC 0x00004550
/* FUNCTIONS ***************************************************************/
+#ifndef _M_AMD64
+// FIXME: Why "Not implemented"???
/*
* @implemented
*/
/* Not implemented for user-mode */
return 0;
}
+#endif
BOOLEAN
NTAPI
-RtlpCheckForActiveDebugger(BOOLEAN Type)
+RtlpCheckForActiveDebugger(VOID)
{
- return (NtCurrentPeb()->BeingDebugged);
+ /* Return the flag in the PEB */
+ return NtCurrentPeb()->BeingDebugged;
}
BOOLEAN
}
-#ifdef DBG
+#if DBG
VOID FASTCALL
CHECK_PAGED_CODE_RTL(char *file, int line)
{
}
#endif
+BOOLEAN
+NTAPI
+RtlIsThreadWithinLoaderCallout(VOID)
+{
+ return LdrpTopLevelDllBeingLoadedTeb == NtCurrentTeb();
+}
+
/* RTL Atom Tables ************************************************************/
typedef struct _RTL_ATOM_HANDLE