1 /* 2 * PROJECT: ReactOS 'Layers' Shim library 3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+) 4 * PURPOSE: Shim entrypoint 5 * COPYRIGHT: Copyright 2016,2017 Mark Jansen (mark.jansen@reactos.org) 6 */ 7 8 #define WIN32_NO_STATUS 9 #include <windef.h> 10 #include <winbase.h> 11 #include <strsafe.h> 12 #include <shimlib.h> 13 14 /* Forward to the generic implementation */ 15 PHOOKAPI WINAPI GetHookAPIs(IN LPCSTR szCommandLine, IN LPCWSTR wszShimName, OUT PDWORD pdwHookCount) 16 { 17 return ShimLib_GetHookAPIs(szCommandLine, wszShimName, pdwHookCount); 18 } 19 20 /* Forward to the generic implementation */ 21 BOOL WINAPI NotifyShims(DWORD fdwReason, PVOID ptr) 22 { 23 return ShimLib_NotifyShims(fdwReason, ptr); 24 } 25 26 BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) 27 { 28 switch(dwReason) 29 { 30 case DLL_PROCESS_ATTACH: 31 ShimLib_Init(hInstance); 32 break; 33 case DLL_PROCESS_DETACH: 34 ShimLib_Deinit(); 35 break; 36 } 37 return TRUE; 38 } 39