2016-05-28 17:55:56 +00:00
|
|
|
/*
|
2017-09-08 20:29:16 +00:00
|
|
|
* PROJECT: ReactOS 'Layers' Shim library
|
|
|
|
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
|
|
|
* PURPOSE: Shim entrypoint
|
|
|
|
* COPYRIGHT: Copyright 2016,2017 Mark Jansen (mark.jansen@reactos.org)
|
2016-05-28 17:55:56 +00:00
|
|
|
*/
|
|
|
|
|
2017-09-08 20:29:16 +00:00
|
|
|
#define WIN32_NO_STATUS
|
|
|
|
#include <windef.h>
|
|
|
|
#include <winbase.h>
|
2016-05-28 17:55:56 +00:00
|
|
|
#include <strsafe.h>
|
|
|
|
#include <shimlib.h>
|
|
|
|
|
|
|
|
/* Forward to the generic implementation */
|
|
|
|
PHOOKAPI WINAPI GetHookAPIs(IN LPCSTR szCommandLine, IN LPCWSTR wszShimName, OUT PDWORD pdwHookCount)
|
|
|
|
{
|
|
|
|
return ShimLib_GetHookAPIs(szCommandLine, wszShimName, pdwHookCount);
|
|
|
|
}
|
|
|
|
|
2016-12-16 19:18:26 +00:00
|
|
|
/* Forward to the generic implementation */
|
|
|
|
BOOL WINAPI NotifyShims(DWORD fdwReason, PVOID ptr)
|
2016-05-28 17:55:56 +00:00
|
|
|
{
|
2016-12-16 19:18:26 +00:00
|
|
|
return ShimLib_NotifyShims(fdwReason, ptr);
|
2016-05-28 17:55:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
|
|
|
|
{
|
|
|
|
switch(dwReason)
|
|
|
|
{
|
|
|
|
case DLL_PROCESS_ATTACH:
|
|
|
|
ShimLib_Init(hInstance);
|
|
|
|
break;
|
|
|
|
case DLL_PROCESS_DETACH:
|
|
|
|
ShimLib_Deinit();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|