Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
Signed-off-by: Igor Levicki <[email protected]>
  • Loading branch information
levicki committed Jul 16, 2024
0 parents commit fd6c9ba
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.dll
25 changes: 25 additions & 0 deletions LICENSE.md
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.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
### SLC

TL;DR &mdash; 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 &mdash; 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.
35 changes: 35 additions & 0 deletions slc.c
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;
}
3 changes: 3 additions & 0 deletions slc.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
LIBRARY SLC
EXPORTS
SLGetWindowsInformationDWORD

0 comments on commit fd6c9ba

Please sign in to comment.