2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Shim Engine
4 * FILE: dll/appcompat/shims/shimlib/shimlib.h
5 * PURPOSE: ReactOS Shim Engine
6 * PROGRAMMER: Mark Jansen
11 typedef struct tagHOOKAPI
{
14 PVOID ReplacementFunction
;
15 PVOID OriginalFunction
;
20 extern HINSTANCE g_hinstDll
;
22 void ShimLib_Init(HINSTANCE
);
23 void ShimLib_Deinit(void);
24 PVOID
ShimLib_ShimMalloc(SIZE_T
);
25 void ShimLib_ShimFree(PVOID
);
26 PCSTR
ShimLib_StringDuplicateA(PCSTR
);
27 PHOOKAPI WINAPI
ShimLib_GetHookAPIs(LPCSTR
,LPCWSTR
,PDWORD
);
30 #define SHIM_REASON_ATTACH 1
31 #define SHIM_REASON_DETACH 2
32 #define SHIM_REASON_DLL_LOAD 3 /* Arg: PLDR_DATA_TABLE_ENTRY */
33 #define SHIM_REASON_DLL_UNLOAD 4 /* Arg: Module Handle */
36 typedef PVOID (__cdecl
*_PVSHIM
)(PCWSTR
);
39 #define _SHMALLOC(x) __declspec(allocate(x))
40 #elif defined(__GNUC__)
41 #define _SHMALLOC(x) __attribute__ ((section (x) ))
43 #error Your compiler is not supported.