Hans Leidekker : msi/tests: Add tests for 64-bit properties.
Alexandre Julliard
julliard at winehq.org
Thu Sep 2 12:01:26 CDT 2010
Module: wine
Branch: master
Commit: 2fb648c04f706f7318ca27a66885b47b527b5c0d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2fb648c04f706f7318ca27a66885b47b527b5c0d
Author: Hans Leidekker <hans at codeweavers.com>
Date: Thu Sep 2 13:21:29 2010 +0200
msi/tests: Add tests for 64-bit properties.
---
dlls/msi/tests/package.c | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c
index f9d6a63..225a0e3 100644
--- a/dlls/msi/tests/package.c
+++ b/dlls/msi/tests/package.c
@@ -41,6 +41,7 @@ static BOOL (WINAPI *pOpenProcessToken)( HANDLE, DWORD, PHANDLE );
static LONG (WINAPI *pRegDeleteKeyExA)(HKEY, LPCSTR, REGSAM, DWORD);
static LONG (WINAPI *pRegDeleteKeyExW)(HKEY, LPCWSTR, REGSAM, DWORD);
static BOOL (WINAPI *pIsWow64Process)(HANDLE, PBOOL);
+static void (WINAPI *pGetSystemInfo)(LPSYSTEM_INFO);
static BOOL (WINAPI *pSRRemoveRestorePoint)(DWORD);
static BOOL (WINAPI *pSRSetRestorePointA)(RESTOREPOINTINFOA*, STATEMGRSTATUS*);
@@ -63,6 +64,7 @@ static void init_functionpointers(void)
GET_PROC(hadvapi32, RegDeleteKeyExA)
GET_PROC(hadvapi32, RegDeleteKeyExW)
GET_PROC(hkernel32, IsWow64Process)
+ GET_PROC(hkernel32, GetSystemInfo)
hsrclient = LoadLibraryA("srclient.dll");
GET_PROC(hsrclient, SRRemoveRestorePoint);
@@ -9550,6 +9552,7 @@ static void test_installprops(void)
UINT r;
REGSAM access = KEY_ALL_ACCESS;
BOOL wow64;
+ SYSTEM_INFO si;
if (pIsWow64Process && pIsWow64Process(GetCurrentProcess(), &wow64) && wow64)
access |= KEY_WOW64_64KEY;
@@ -9660,6 +9663,31 @@ static void test_installprops(void)
r = MsiGetProperty(hpkg, "ScreenY", buf, &size);
ok(atol(buf) == res, "Expected %d, got %ld\n", res, atol(buf));
+ if (pGetSystemInfo)
+ {
+ pGetSystemInfo(&si);
+ if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
+ {
+ buf[0] = 0;
+ size = MAX_PATH;
+ r = MsiGetProperty(hpkg, "MsiAMD64", buf, &size);
+ ok(r == ERROR_SUCCESS, "failed to get property: %d\n", r);
+ ok(buf[0], "property not set\n");
+
+ buf[0] = 0;
+ size = MAX_PATH;
+ r = MsiGetProperty(hpkg, "Msix64", buf, &size);
+ ok(r == ERROR_SUCCESS, "failed to get property: %d\n", r);
+ ok(buf[0], "property not set\n");
+
+ buf[0] = 0;
+ size = MAX_PATH;
+ r = MsiGetProperty(hpkg, "System64Folder", buf, &size);
+ ok(r == ERROR_SUCCESS, "failed to get property: %d\n", r);
+ ok(buf[0], "property not set\n");
+ }
+ }
+
CloseHandle(hkey1);
CloseHandle(hkey2);
MsiCloseHandle(hpkg);
More information about the wine-cvs
mailing list