-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
5 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.dll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
MIT NO-AI License | ||
|
||
Copyright © 2024 by Igor Levicki | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
Permission is not granted to use this software or any of the associated files | ||
as sample data for the purposes of building machine learning models. | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
### SLC | ||
|
||
TL;DR — Code in this repository emulates [SLGetWindowsInformationDWORD](https://learn.microsoft.com/en-us/windows/win32/api/slpublic/nf-slpublic-slgetwindowsinformationdword) API from `SLC.DLL` with a singular purpose — to enable playing original [Microsoft FreeCell](https://en.wikipedia.org/wiki/Microsoft_FreeCell) and [Microsoft Minesweeper](https://en.wikipedia.org/wiki/Microsoft_Minesweeper) games from Microsoft Windows 7 on a modern Microsoft Windows operating systems such as Microsoft Windows 10 and Microsoft Windows 11. | ||
|
||
**DISCLAIIMER:** | ||
|
||
This code was written for educational purposes only, with a sole goal of gaming history preservation. | ||
|
||
It can only be used to bypass the enablement check for those two specific games which must be acquired legally (i.e. you must own a valid Microsoft Windows 7 product key and installation media). | ||
|
||
It is provided as a way to avoid having to run fully virtualized Microsoft Windows 7 operating system in order to run those games today. | ||
|
||
The author does not condone licensing circumvention nor piracy and cannot be held responsbile for your eventual misuse of their code. | ||
|
||
By obtaining and compiling this code or by downloading prebuilt DLLs from the Releases page you are taking full responsibility for your own actions. | ||
|
||
Microsoft Windows is a trademark of Microsoft Corporation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
LIBRARY SLC | ||
EXPORTS | ||
SLGetWindowsInformationDWORD |