setupapi/tests: There is no strncasecmp() on Windows. So use CompareString() instead.

This commit is contained in:
Francois Gouget 2007-05-28 01:12:12 +02:00 committed by Alexandre Julliard
parent 8d7ad785e3
commit b6a2102d34
1 changed files with 2 additions and 1 deletions

View File

@ -25,6 +25,7 @@
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "winuser.h"
#include "winreg.h"
#include "setupapi.h"
@ -97,7 +98,7 @@ static BOOL check_format(LPSTR path, LPSTR inf)
GetWindowsDirectory(check, MAX_PATH);
lstrcat(check, format);
res = !strncasecmp(check, path, lstrlen(check)) &&
res = CompareString(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE, check, -1, path, lstrlen(check)) == CSTR_EQUAL &&
path[lstrlen(check)] != '\\';
return (!inf) ? res : res && (inf == path + lstrlen(check) - 3);