libwinpr-registry: fix case sensivity

This commit is contained in:
Marc-André Moreau 2012-07-28 15:49:16 -04:00
parent 66809ba269
commit 0b7b6ca2ec
3 changed files with 9 additions and 1 deletions

View File

@ -47,6 +47,8 @@
WINPR_API char* _strdup(const char* strSource);
WINPR_API WCHAR* _wcsdup(const WCHAR* strSource);
WINPR_API int _stricmp(const char* string1, const char* string2);
WINPR_API LPSTR CharUpperA(LPSTR lpsz);
WINPR_API LPWSTR CharUpperW(LPWSTR lpsz);

View File

@ -65,6 +65,11 @@ WCHAR* _wcsdup(const WCHAR* strSource)
return strDestination;
}
int _stricmp(const char* string1, const char* string2)
{
return strcasecmp(string1, string2);
}
/* Windows API Sets - api-ms-win-core-string-l2-1-0.dll
* http://msdn.microsoft.com/en-us/library/hh802935/
*/

View File

@ -30,6 +30,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winpr/crt.h>
#include "registry_reg.h"
@ -217,7 +218,7 @@ LONG RegOpenKeyExA(HKEY hKey, LPCSTR lpSubKey, DWORD ulOptions, REGSAM samDesire
while (pKey != NULL)
{
if (strcmp(pKey->subname, lpSubKey) == 0)
if (_stricmp(pKey->subname, lpSubKey) == 0)
{
*phkResult = pKey;
return ERROR_SUCCESS;