* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
-#include <regedit.h>
+#include "regedit.h"
#define RSF_WHOLESTRING 0x00000001
#define RSF_LOOKATKEYS 0x00000002
if (s_dwFlags & RSF_MATCHCASE)
return wcscmp(pszName1, pszName2) == 0;
else
- return wcsicmp(pszName1, pszName2) == 0;
+ return _wcsicmp(pszName1, pszName2) == 0;
}
else
{
{
const LPCWSTR *a = (const LPCWSTR *)x;
const LPCWSTR *b = (const LPCWSTR *)y;
- return wcsicmp(*a, *b);
+ return _wcsicmp(*a, *b);
}
BOOL RegFindRecurse(
if (DoEvents())
return FALSE;
+ if(wcslen(pszSubKey) >= _countof(szSubKey))
+ return FALSE;
+
wcscpy(szSubKey, pszSubKey);
hSubKey = NULL;
if (DoEvents())
goto err;
- if (!fPast && wcsicmp(ppszNames[i], pszValueName) == 0)
+ if (!fPast && _wcsicmp(ppszNames[i], pszValueName) == 0)
{
fPast = TRUE;
continue;
}
else
{
- wcsncpy(szKeyName, pch + 1, MAX_PATH);
+ lstrcpynW(szKeyName, pch + 1, MAX_PATH);
*pch = 0;
lResult = RegOpenKeyExW(hBaseKey, szSubKey, 0, KEY_ALL_ACCESS,
&hSubKey);
if (DoEvents())
goto err;
- if (!fPast && wcsicmp(ppszNames[i], szKeyName) == 0)
+ if (!fPast && _wcsicmp(ppszNames[i], szKeyName) == 0)
{
fPast = TRUE;
continue;
DWORD dwDisposition;
DWORD dwData;
- if (RegCreateKeyExW(HKEY_CURRENT_USER, g_szGeneralRegKey, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hKey, &dwDisposition) == ERROR_SUCCESS)
+ if (RegCreateKeyExW(HKEY_CURRENT_USER, g_szGeneralRegKey, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, &dwDisposition) == ERROR_SUCCESS)
{
dwData = (dwFlags >> 0) & 0x0000FFFF;
RegSetValueExW(hKey, s_szFindFlags, 0, REG_DWORD, (const BYTE *) &dwData, sizeof(dwData));
}
}
}
-