Paul Vriens : crypt32/tests: Use A-version for registry functions.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Apr 24 07:23:58 CDT 2007
Module: wine
Branch: master
Commit: 4c90bbd6f74dc41a99ff7115b592db0123ce9a84
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4c90bbd6f74dc41a99ff7115b592db0123ce9a84
Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date: Tue Apr 24 09:11:44 2007 +0200
crypt32/tests: Use A-version for registry functions.
---
dlls/crypt32/tests/oid.c | 27 ++++++++++++++-------------
1 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/dlls/crypt32/tests/oid.c b/dlls/crypt32/tests/oid.c
index 37c4643..c1cde67 100644
--- a/dlls/crypt32/tests/oid.c
+++ b/dlls/crypt32/tests/oid.c
@@ -84,6 +84,9 @@ static const struct OIDToAlgID algIDToOID[] = {
{ szOID_OIWSEC_sha1, CALG_SHA },
};
+static const WCHAR bogusDll[] = { 'b','o','g','u','s','.','d','l','l',0 };
+static const WCHAR bogus2Dll[] = { 'b','o','g','u','s','2','.','d','l','l',0 };
+
static void testOIDToAlgID(void)
{
int i;
@@ -264,7 +267,6 @@ static void test_installOIDFunctionAddress(void)
static void test_registerOIDFunction(void)
{
- static const WCHAR bogusDll[] = { 'b','o','g','u','s','.','d','l','l',0 };
BOOL ret;
/* oddly, this succeeds under WinXP; the function name key is merely
@@ -315,9 +317,6 @@ static void test_registerOIDFunction(void)
ok(ret, "CryptUnregisterOIDFunction failed: %d\n", GetLastError());
}
-static const WCHAR bogusDll[] = { 'b','o','g','u','s','.','d','l','l',0 };
-static const WCHAR bogus2Dll[] = { 'b','o','g','u','s','2','.','d','l','l',0 };
-
static void test_registerDefaultOIDFunction(void)
{
static const char fmt[] =
@@ -354,24 +353,26 @@ static void test_registerDefaultOIDFunction(void)
ok(ret, "CryptRegisterDefaultOIDFunction failed: %08x\n", GetLastError());
sprintf(buf, fmt, 0, func);
rc = RegOpenKeyA(HKEY_LOCAL_MACHINE, buf, &key);
- ok(rc == 0, "Expected key to exist, RegOpenKeyW failed: %ld\n", rc);
+ ok(rc == 0, "Expected key to exist, RegOpenKeyA failed: %ld\n", rc);
if (rc == 0)
{
- static const WCHAR dllW[] = { 'D','l','l',0 };
- WCHAR dllBuf[MAX_PATH];
+ static const CHAR dllA[] = "Dll";
+ static const CHAR bogusDll_A[] = "bogus.dll";
+ static const CHAR bogus2Dll_A[] = "bogus2.dll";
+ CHAR dllBuf[MAX_PATH];
DWORD type, size;
- LPWSTR ptr;
+ LPSTR ptr;
size = sizeof(dllBuf) / sizeof(dllBuf[0]);
- rc = RegQueryValueExW(key, dllW, NULL, &type, (LPBYTE)dllBuf, &size);
+ rc = RegQueryValueExA(key, dllA, NULL, &type, (LPBYTE)dllBuf, &size);
ok(rc == 0,
- "Expected Dll value to exist, RegQueryValueExW failed: %ld\n", rc);
+ "Expected Dll value to exist, RegQueryValueExA failed: %ld\n", rc);
ok(type == REG_MULTI_SZ, "Expected type REG_MULTI_SZ, got %d\n", type);
/* bogusDll was registered first, so that should be first */
ptr = dllBuf;
- ok(!lstrcmpiW(ptr, bogusDll), "Unexpected dll\n");
- ptr += lstrlenW(ptr) + 1;
- ok(!lstrcmpiW(ptr, bogus2Dll), "Unexpected dll\n");
+ ok(!lstrcmpiA(ptr, bogusDll_A), "Unexpected dll\n");
+ ptr += lstrlenA(ptr) + 1;
+ ok(!lstrcmpiA(ptr, bogus2Dll_A), "Unexpected dll\n");
RegCloseKey(key);
}
/* Unregister both of them */
More information about the wine-cvs
mailing list