mirror of
https://github.com/reactos/reactos.git
synced 2024-10-31 03:48:17 +00:00
61192390cf
* Move RtlRunOnce functions from kernel32_vista to rtl_vista and export them from ntdll_vista * Move condvar.c and srw.c from ntdll_vista to rtl_vista * Move ntdll_vista build script to a subfolder of ntdll The RtlRunOnce functions are taken from wine, completely unmodified. The code that was in kernel32_vista had change that used a global keyed_event handle, but was never initialized, so we were still passing NULL thus using the global ExpCritSecOutOfMemoryEvent.
39 lines
633 B
C
39 lines
633 B
C
#include <stdarg.h>
|
|
|
|
#define WIN32_NO_STATUS
|
|
|
|
#include <windef.h>
|
|
#include <winbase.h>
|
|
#include <winreg.h>
|
|
#include <winuser.h>
|
|
#include <winwlx.h>
|
|
#include <ndk/rtltypes.h>
|
|
#include <ndk/umfuncs.h>
|
|
|
|
#define NDEBUG
|
|
#include <debug.h>
|
|
|
|
VOID
|
|
RtlpInitializeKeyedEvent(VOID);
|
|
|
|
VOID
|
|
RtlpCloseKeyedEvent(VOID);
|
|
|
|
BOOL
|
|
WINAPI
|
|
DllMain(HANDLE hDll,
|
|
DWORD dwReason,
|
|
LPVOID lpReserved)
|
|
{
|
|
if (dwReason == DLL_PROCESS_ATTACH)
|
|
{
|
|
LdrDisableThreadCalloutsForDll(hDll);
|
|
RtlpInitializeKeyedEvent();
|
|
}
|
|
else if (dwReason == DLL_PROCESS_DETACH)
|
|
{
|
|
RtlpCloseKeyedEvent();
|
|
}
|
|
return TRUE;
|
|
}
|