msi: Fix automation.c compile for MSVC

James Hawkins truiken at gmail.com
Thu Jul 12 22:04:19 CDT 2007


Hi,

INSTALLPROPERTY_X is defined in Windows as

#define INSTALLPROPERTY_X   __TEXT("X")

where X is the property name.  The problem is that automation.c uses
INSTALLPROPERTY_XW which doesn't exist in Windows whether you use
Unicode or not.  I could have written a patch to use __TEXT, but then
I'd have to define UNICODE in automation.c, and I wasn't sure if that
was legit.  I'm also not sure if using __TEXT is legit in our header
files.

Changelog:
* Fix automation.c compile for MSVC.

 dlls/msi/tests/automation.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

-- 
James Hawkins
-------------- next part --------------
diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c
index 0189062..e7d1847 100644
--- a/dlls/msi/tests/automation.c
+++ b/dlls/msi/tests/automation.c
@@ -37,6 +37,8 @@ static const WCHAR szMSITEST[] = { 'M','
 static const WCHAR szProductCode[] = { '{','F','1','C','3','A','F','5','0','-','8','B','5','6','-','4','A','6','9','-','A','0','0','C','-','0','0','7','7','3','F','E','4','2','F','3','0','}',0 };
 static const WCHAR szUpgradeCode[] = { '{','C','E','0','6','7','E','8','D','-','2','E','1','A','-','4','3','6','7','-','B','7','3','4','-','4','E','B','2','B','D','A','D','6','5','6','5','}',0 };
 static const WCHAR szProductInfoException[] = { 'P','r','o','d','u','c','t','I','n','f','o',',','P','r','o','d','u','c','t',',','A','t','t','r','i','b','u','t','e',0 };
+static const WCHAR WINE_INSTALLPROPERTY_PACKAGENAMEW[] = {'P','a','c','k','a','g','e','N','a','m','e',0};
+static const WCHAR WINE_INSTALLPROPERTY_PRODUCTNAMEW[] = {'P','r','o','d','u','c','t','N','a','m','e',0};
 static FILETIME systemtime;
 static CHAR CURR_DIR[MAX_PATH];
 static EXCEPINFO excepinfo;
@@ -2128,13 +2130,13 @@ static void test_Installer_InstallProduc
 
     /* Package name */
     memset(szString, 0, sizeof(szString));
-    hr = Installer_ProductInfo(szProductCode, INSTALLPROPERTY_PACKAGENAMEW, szString);
+    hr = Installer_ProductInfo(szProductCode, WINE_INSTALLPROPERTY_PACKAGENAMEW, szString);
     todo_wine ok(hr == S_OK, "Installer_ProductInfo failed, hresult 0x%08x\n", hr);
     todo_wine ok_w2("Installer_ProductInfo returned %s but expected %s\n", szString, szMsifile);
 
     /* Product name */
     memset(szString, 0, sizeof(szString));
-    hr = Installer_ProductInfo(szProductCode, INSTALLPROPERTY_PRODUCTNAMEW, szString);
+    hr = Installer_ProductInfo(szProductCode, WINE_INSTALLPROPERTY_PRODUCTNAMEW, szString);
     ok(hr == S_OK, "Installer_ProductInfo failed, hresult 0x%08x\n", hr);
     ok_w2("Installer_ProductInfo returned %s but expected %s\n", szString, szMSITEST);
 
@@ -2341,7 +2343,7 @@ static void test_Installer(void)
 
     /* Package name */
     memset(szPath, 0, sizeof(szPath));
-    hr = Installer_ProductInfo(szProductCode, INSTALLPROPERTY_PACKAGENAMEW, szPath);
+    hr = Installer_ProductInfo(szProductCode, WINE_INSTALLPROPERTY_PACKAGENAMEW, szPath);
     ok(hr == DISP_E_EXCEPTION, "Installer_ProductInfo failed, hresult 0x%08x\n", hr);
     ok_exception(hr, szProductInfoException);
 
-- 
1.4.1


More information about the wine-patches mailing list