diff --git a/reactos/lib/dinput/keyboard.c b/reactos/lib/dinput/keyboard.c index b2ac08e3d60..40b85ca3eac 100644 --- a/reactos/lib/dinput/keyboard.c +++ b/reactos/lib/dinput/keyboard.c @@ -88,9 +88,8 @@ static CRITICAL_SECTION_DEBUG critsect_debug = }; static CRITICAL_SECTION keyboard_crit = { &critsect_debug, -1, 0, 0, 0, 0 }; -static DWORD keyboard_users; - #ifndef __REACTOS__ +static DWORD keyboard_users; static HHOOK keyboard_hook; #endif diff --git a/reactos/lib/shell32/shellpath.c b/reactos/lib/shell32/shellpath.c index fa94e8c3540..825f7f43f25 100644 --- a/reactos/lib/shell32/shellpath.c +++ b/reactos/lib/shell32/shellpath.c @@ -1457,57 +1457,6 @@ static HRESULT _SHGetAllUsersProfilePath(DWORD dwFlags, BYTE folder, return hr; } -static HRESULT _SHOpenProfilesKey(PHKEY pKey) -{ - LONG lRet; - DWORD disp; - - lRet = RegCreateKeyExW(HKEY_LOCAL_MACHINE, ProfileListW, 0, NULL, 0, - KEY_ALL_ACCESS, NULL, pKey, &disp); - return HRESULT_FROM_WIN32(lRet); -} - -/* Reads the value named szValueName from the key profilesKey (assumed to be - * opened by _SHOpenProfilesKey) into szValue, which is assumed to be MAX_PATH - * WCHARs in length. If it doesn't exist, returns szDefault (and saves - * szDefault to the registry). - */ -static HRESULT _SHGetProfilesValue(HKEY profilesKey, LPCWSTR szValueName, - LPWSTR szValue, LPCWSTR szDefault) -{ - HRESULT hr; - DWORD type, dwPathLen = MAX_PATH * sizeof(WCHAR); - LONG lRet; - - TRACE("%p,%s,%p,%s\n", profilesKey, debugstr_w(szValueName), szValue, - debugstr_w(szDefault)); - lRet = RegQueryValueExW(profilesKey, szValueName, NULL, &type, - (LPBYTE)szValue, &dwPathLen); - if (!lRet && (type == REG_SZ || type == REG_EXPAND_SZ) && dwPathLen - && *szValue) - { - dwPathLen /= sizeof(WCHAR); - szValue[dwPathLen] = '\0'; - hr = S_OK; - } - else - { - /* Missing or invalid value, set a default */ - lstrcpynW(szValue, szDefault, MAX_PATH); - TRACE("Setting missing value %s to %s\n", debugstr_w(szValueName), - debugstr_w(szValue)); - lRet = RegSetValueExW(profilesKey, szValueName, 0, REG_EXPAND_SZ, - (LPBYTE)szValue, - (strlenW(szValue) + 1) * sizeof(WCHAR)); - if (lRet) - hr = HRESULT_FROM_WIN32(lRet); - else - hr = S_OK; - } - TRACE("returning 0x%08lx (output value is %s)\n", hr, debugstr_w(szValue)); - return hr; -} - /* From the original Wine source: * * Attempts to expand environment variables from szSrc into szDest, which is diff --git a/reactos/lib/shell32/shfldr_mycomp.c b/reactos/lib/shell32/shfldr_mycomp.c index 98b5d62fbf8..488c6079eb6 100644 --- a/reactos/lib/shell32/shfldr_mycomp.c +++ b/reactos/lib/shell32/shfldr_mycomp.c @@ -26,6 +26,7 @@ #include #include #include +#include #define COBJMACROS #define NONAMELESSUNION