-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathslc.c
35 lines (29 loc) · 859 Bytes
/
slc.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
// slc.c
// © 2024 by Igor Levicki. All Rights Reserved.
//
// Compile:
// cl /nologo /c /O2 /Ob1 slc.c
//
// Link:
// link /nologo /DLL /ENTRY:DllMain /DEF:slc.def /MACHINE:X64 /SUBSYSTEM:WINDOWS /NODEFAULTLIB /NOEXP /NOIMPLIB /DEBUG:NONE /EMITPOGOPHASEINFO /MERGE:.rdata=.text slc.obj kernel32.lib
//
#include <windows.h>
HRESULT __stdcall SLGetWindowsInformationDWORD(LPCWSTR ValueName, LPDWORD Value)
{
if (lstrcmpiW(L"Shell-InBoxGames-FreeCell-EnableGame", ValueName) == 0) {
*Value = 1;
} else if (lstrcmpiW(L"Shell-InBoxGames-Minesweeper-EnableGame", ValueName) == 0) {
*Value = 1;
} else {
*Value = 0;
}
return S_OK;
}
DWORD __stdcall DllMain(HINSTANCE hModule, DWORD dwReason, DWORD dwReserved)
{
if (dwReason == DLL_PROCESS_ATTACH) {
DisableThreadLibraryCalls(hModule);
}
return TRUE;
}