ReactOS
0.4.16-dev-122-g325d74c
main.c
Go to the documentation of this file.
1
/*
2
* PROJECT: ReactOS 'General' 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
}
dwReason
DWORD dwReason
Definition:
misc.cpp:141
hInstance
HINSTANCE hInstance
Definition:
charmap.c:19
TRUE
#define TRUE
Definition:
types.h:120
NotifyShims
BOOL WINAPI NotifyShims(DWORD fdwReason, PVOID ptr)
Definition:
main.c:21
GetHookAPIs
PHOOKAPI WINAPI GetHookAPIs(IN LPCSTR szCommandLine, IN LPCWSTR wszShimName, OUT PDWORD pdwHookCount)
Definition:
main.c:15
DllMain
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
Definition:
main.c:26
DLL_PROCESS_ATTACH
#define DLL_PROCESS_ATTACH
Definition:
compat.h:131
DLL_PROCESS_DETACH
#define DLL_PROCESS_DETACH
Definition:
compat.h:130
BOOL
unsigned int BOOL
Definition:
ntddk_ex.h:94
DWORD
unsigned long DWORD
Definition:
ntddk_ex.h:95
void
Definition:
nsiface.idl:2307
ptr
static PVOID ptr
Definition:
dispmode.c:27
PDWORD
DWORD * PDWORD
Definition:
pedump.c:68
ShimLib_Init
void ShimLib_Init(HINSTANCE hInstance)
Definition:
shimlib.c:30
ShimLib_NotifyShims
BOOL WINAPI ShimLib_NotifyShims(DWORD fdwReason, PVOID ptr)
Definition:
shimlib.c:136
ShimLib_Deinit
void ShimLib_Deinit(VOID)
Definition:
shimlib.c:39
ShimLib_GetHookAPIs
PHOOKAPI WINAPI ShimLib_GetHookAPIs(IN LPCSTR szCommandLine, IN LPCWSTR wszShimName, OUT PDWORD pdwHookCount)
Definition:
shimlib.c:111
shimlib.h
strsafe.h
tagHOOKAPI
Definition:
shimlib.h:17
IN
#define IN
Definition:
typedefs.h:39
OUT
#define OUT
Definition:
typedefs.h:40
winbase.h
windef.h
WINAPI
#define WINAPI
Definition:
msvc.h:6
LPCSTR
const char * LPCSTR
Definition:
xmlstorage.h:183
LPCWSTR
const WCHAR * LPCWSTR
Definition:
xmlstorage.h:185
dll
appcompat
shims
genral
main.c
Generated on Sun Oct 13 2024 06:14:57 for ReactOS by
1.9.6