a few small things, ZERO errors when compiling, feeling gangster about it, here it is

This commit is contained in:
freedom
2023-07-19 13:05:43 -06:00
parent d2c8b2ba53
commit 2b21acce36
9 changed files with 159 additions and 31 deletions

View File

@@ -13,7 +13,6 @@
#include <Windows.h>
/* Functions */
/* * * *\
InitializeRegistryKeys -
Takes the relevant Registry Keys and turns them
@@ -38,29 +37,22 @@ BOOL InitializeRegistryKeys()
RETURNS -
True if successful, false if unsuccessful.
\* * * */
#if 0
BOOL IsProgMgrDefaultShell()
{
HKEY hkeyWinlogon;
DWORD dwType;
DWORD cbBuffer;
//DWORD szShell;
//DWORD cbBuffer = 0;
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, SHELL_KEY, 0, KEY_READ, &hkeyWinlogon) == ERROR_SUCCESS) {
cbBuffer = sizeof(szBuffer);
if (RegQueryValueEx(hkeyWinlogon, L"Shell", 0, NULL, (LPBYTE)szBuffer, &cbBuffer) == ERROR_SUCCESS) {
CharLower(szBuffer);
lpt = szBuffer;
while (lpt = wcsstr(lpt, szProgmgr)) {
//if (RegQueryValueEx(hkeyWinlogon, L"Shell", 0, NULL, szShell, &cbBuffer) == ERROR_SUCCESS) {
// we probably found progman
lpt += lstrlen(szProgmgr);
if (*lpt == TEXT(' ') || *lpt == TEXT('.') || *lpt == TEXT(',') || !*lpt)
bExitWindows = TRUE;
}
}
else {
//}
}
else {
// assume that progman is the shell.
bExitWindows = TRUE;
}
}
RegCloseKey(hkeyWinlogon);
return FALSE;
}
#endif
}