From 569d04cd7b1da0a3dae9367bd5d3fa1c6309a11f Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Tue, 15 Oct 2013 10:29:02 +0200 Subject: [PATCH] msi/tests: Prepare format.c for the switch to -D__WINESRC__. --- dlls/msi/tests/format.c | 1445 ++++++++++++++++++++------------------- 1 file changed, 723 insertions(+), 722 deletions(-) diff --git a/dlls/msi/tests/format.c b/dlls/msi/tests/format.c index c181037724b..975776ce585 100644 --- a/dlls/msi/tests/format.c +++ b/dlls/msi/tests/format.c @@ -28,13 +28,15 @@ #include "wine/test.h" static const char msifile[] = "winetest-format.msi"; +static const WCHAR msifileW[] = + {'w','i','n','e','t','e','s','t','-','f','o','r','m','a','t','.','m','s','i',0}; static UINT run_query( MSIHANDLE hdb, const char *query ) { MSIHANDLE hview = 0; UINT r; - r = MsiDatabaseOpenView(hdb, query, &hview); + r = MsiDatabaseOpenViewA(hdb, query, &hview); if( r != ERROR_SUCCESS ) return r; @@ -155,33 +157,33 @@ static UINT set_summary_info(MSIHANDLE hdb) MSIHANDLE suminfo; /* build summary info */ - res = MsiGetSummaryInformation(hdb, NULL, 7, &suminfo); + res = MsiGetSummaryInformationA(hdb, NULL, 7, &suminfo); ok( res == ERROR_SUCCESS , "Failed to open summaryinfo\n" ); - res = MsiSummaryInfoSetProperty(suminfo,2, VT_LPSTR, 0,NULL, + res = MsiSummaryInfoSetPropertyA(suminfo,2, VT_LPSTR, 0,NULL, "Installation Database"); ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - res = MsiSummaryInfoSetProperty(suminfo,3, VT_LPSTR, 0,NULL, + res = MsiSummaryInfoSetPropertyA(suminfo,3, VT_LPSTR, 0,NULL, "Installation Database"); ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - res = MsiSummaryInfoSetProperty(suminfo,4, VT_LPSTR, 0,NULL, + res = MsiSummaryInfoSetPropertyA(suminfo,4, VT_LPSTR, 0,NULL, "Wine Hackers"); ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - res = MsiSummaryInfoSetProperty(suminfo,7, VT_LPSTR, 0,NULL, + res = MsiSummaryInfoSetPropertyA(suminfo,7, VT_LPSTR, 0,NULL, ";1033"); ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - res = MsiSummaryInfoSetProperty(suminfo,9, VT_LPSTR, 0,NULL, + res = MsiSummaryInfoSetPropertyA(suminfo,9, VT_LPSTR, 0,NULL, "{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}"); ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - res = MsiSummaryInfoSetProperty(suminfo, 14, VT_I4, 100, NULL, NULL); + res = MsiSummaryInfoSetPropertyA(suminfo, 14, VT_I4, 100, NULL, NULL); ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - res = MsiSummaryInfoSetProperty(suminfo, 15, VT_I4, 0, NULL, NULL); + res = MsiSummaryInfoSetPropertyA(suminfo, 15, VT_I4, 0, NULL, NULL); ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); res = MsiSummaryInfoPersist(suminfo); @@ -198,10 +200,10 @@ static MSIHANDLE create_package_db(void) MSIHANDLE hdb = 0; UINT res; - DeleteFile(msifile); + DeleteFileW(msifileW); /* create an empty database */ - res = MsiOpenDatabase(msifile, MSIDBOPEN_CREATEDIRECT, &hdb ); + res = MsiOpenDatabaseA(msifile, MSIDBOPEN_CREATEDIRECT, &hdb ); ok( res == ERROR_SUCCESS , "Failed to create database %u\n", res ); if( res != ERROR_SUCCESS ) return 0; @@ -234,7 +236,7 @@ static UINT package_from_db(MSIHANDLE hdb, MSIHANDLE *handle) MSIHANDLE hPackage; sprintf(szPackage, "#%u", hdb); - res = MsiOpenPackage(szPackage, &hPackage); + res = MsiOpenPackageA(szPackage, &hPackage); if (res != ERROR_SUCCESS) return res; @@ -266,10 +268,10 @@ static UINT helper_createpackage( const char *szName, MSIHANDLE *handle ) MSIHANDLE hPackage, suminfo, hdb = 0; UINT res; - DeleteFile(szName); + DeleteFileA(szName); /* create an empty database */ - res = MsiOpenDatabase(szName, MSIDBOPEN_CREATEDIRECT, &hdb ); + res = MsiOpenDatabaseA( szName, MSIDBOPEN_CREATEDIRECT, &hdb ); ok( res == ERROR_SUCCESS , "Failed to create database %u\n", res ); if (res != ERROR_SUCCESS) return res; @@ -278,33 +280,33 @@ static UINT helper_createpackage( const char *szName, MSIHANDLE *handle ) ok( res == ERROR_SUCCESS , "Failed to commit database %u\n", res ); /* build summary info */ - res = MsiGetSummaryInformation(hdb, NULL, 7, &suminfo); + res = MsiGetSummaryInformationA(hdb, NULL, 7, &suminfo); ok( res == ERROR_SUCCESS , "Failed to open summaryinfo\n" ); - res = MsiSummaryInfoSetProperty(suminfo,2, VT_LPSTR, 0,NULL, + res = MsiSummaryInfoSetPropertyA(suminfo,2, VT_LPSTR, 0,NULL, "Installation Database"); ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - res = MsiSummaryInfoSetProperty(suminfo,3, VT_LPSTR, 0,NULL, + res = MsiSummaryInfoSetPropertyA(suminfo,3, VT_LPSTR, 0,NULL, "Installation Database"); ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - res = MsiSummaryInfoSetProperty(suminfo,4, VT_LPSTR, 0,NULL, + res = MsiSummaryInfoSetPropertyA(suminfo,4, VT_LPSTR, 0,NULL, "Wine Hackers"); ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - res = MsiSummaryInfoSetProperty(suminfo,7, VT_LPSTR, 0,NULL, + res = MsiSummaryInfoSetPropertyA(suminfo,7, VT_LPSTR, 0,NULL, ";1033"); ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - res = MsiSummaryInfoSetProperty(suminfo,9, VT_LPSTR, 0,NULL, + res = MsiSummaryInfoSetPropertyA(suminfo,9, VT_LPSTR, 0,NULL, "{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}"); ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - res = MsiSummaryInfoSetProperty(suminfo, 14, VT_I4, 100, NULL, NULL); + res = MsiSummaryInfoSetPropertyA(suminfo, 14, VT_I4, 100, NULL, NULL); ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - res = MsiSummaryInfoSetProperty(suminfo, 15, VT_I4, 0, NULL, NULL); + res = MsiSummaryInfoSetPropertyA(suminfo, 15, VT_I4, 0, NULL, NULL); ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); res = MsiSummaryInfoPersist(suminfo); @@ -340,7 +342,7 @@ static void test_createpackage(void) res = MsiCloseHandle( hPackage ); ok( res == ERROR_SUCCESS , "Failed to close package %u\n", res ); - DeleteFile( msifile ); + DeleteFileA( msifile ); } static void test_formatrecord(void) @@ -350,7 +352,7 @@ static void test_formatrecord(void) UINT r; DWORD sz; - r = MsiFormatRecord(0, 0, NULL, NULL ); + r = MsiFormatRecordA(0, 0, NULL, NULL ); ok( r == ERROR_INVALID_HANDLE, "wrong error\n"); hrec = MsiCreateRecord(0); @@ -368,16 +370,16 @@ static void test_formatrecord(void) ok( hrec, "failed to create record\n"); /* format an empty record */ - r = MsiFormatRecord(0, hrec, NULL, NULL ); + r = MsiFormatRecordA(0, hrec, NULL, NULL ); ok( r == ERROR_SUCCESS, "format failed\n"); buffer[0] = 'x'; buffer[1] = 0; sz=0; - r = MsiFormatRecord(0, hrec, buffer+1, &sz); + r = MsiFormatRecordA(0, hrec, buffer+1, &sz); ok( r == ERROR_MORE_DATA && buffer[0] == 'x', "format failed measuring with buffer\n"); ok( sz == 16, "size wrong\n"); sz=100; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed with empty buffer\n"); ok( sz == 16, "size wrong\n"); ok( 0 == strcmp(buffer,"1: 2: 3: 4: "), "wrong output\n"); @@ -391,28 +393,28 @@ static void test_formatrecord(void) sz = 100; buffer[0] = 'x'; buffer[1] = 0; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed with empty buffer\n"); ok( sz == 24, "size wrong\n"); ok( 0 == strcmp(buffer,"1: 2: 3: 4: 5: 6: "), "wrong output\n"); /* format a format string with everything else empty */ - r = MsiRecordSetString(hrec, 0, "%1"); + r = MsiRecordSetStringA(hrec, 0, "%1"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiFormatRecord(0, hrec, NULL, NULL ); + r = MsiFormatRecordA(0, hrec, NULL, NULL ); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiFormatRecord(0, hrec, buffer, NULL); + r = MsiFormatRecordA(0, hrec, buffer, NULL); ok( r == ERROR_INVALID_PARAMETER, "wrong error\n"); sz = 123; - r = MsiFormatRecord(0, hrec, NULL, &sz); + r = MsiFormatRecordA(0, hrec, NULL, &sz); ok( r == ERROR_SUCCESS, "format failed with empty buffer\n"); ok( sz == 2, "size wrong (%i)\n",sz); sz = sizeof buffer; buffer[0] = 'x'; buffer[1] = 0; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed with empty buffer\n"); ok( sz == 2, "size wrong\n"); ok( 0 == strcmp(buffer,"%1"), "wrong output\n"); @@ -421,7 +423,7 @@ static void test_formatrecord(void) sz = 0; buffer[0] = 'x'; buffer[1] = 0; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_MORE_DATA, "format failed with empty buffer\n"); ok( sz == 2, "size wrong\n"); ok( 0 == strcmp(buffer,"x"), "wrong output\n"); @@ -430,7 +432,7 @@ static void test_formatrecord(void) sz = 1; buffer[0] = 'x'; buffer[1] = 0; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_MORE_DATA, "format failed with empty buffer\n"); ok( sz == 2, "size wrong\n"); ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer); @@ -439,7 +441,7 @@ static void test_formatrecord(void) sz = 2; buffer[0] = 'x'; buffer[1] = 0; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_MORE_DATA, "format failed with empty buffer\n"); ok( sz == 2, "size wrong\n"); ok( 0 == strcmp(buffer,"%"), "wrong output\n"); @@ -448,87 +450,87 @@ static void test_formatrecord(void) sz = 3; buffer[0] = 'x'; buffer[1] = 0; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed with empty buffer\n"); ok( sz == 2, "size wrong\n"); ok( 0 == strcmp(buffer,"%1"), "wrong output\n"); /* now try a real format string */ - r = MsiRecordSetString(hrec, 0, "[1]"); + r = MsiRecordSetStringA(hrec, 0, "[1]"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 0, "size wrong\n"); ok( 0 == strcmp(buffer,""), "wrong output\n"); /* now put something in the first field */ - r = MsiRecordSetString(hrec, 1, "boo hoo"); + r = MsiRecordSetStringA(hrec, 1, "boo hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 7, "size wrong\n"); ok( 0 == strcmp(buffer,"boo hoo"), "wrong output\n"); /* now put something in the first field */ - r = MsiRecordSetString(hrec, 0, "[1] [2]"); + r = MsiRecordSetStringA(hrec, 0, "[1] [2]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "boo"); + r = MsiRecordSetStringA(hrec, 1, "boo"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hoo"); + r = MsiRecordSetStringA(hrec, 2, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 7, "size wrong\n"); ok( 0 == strcmp(buffer,"boo hoo"), "wrong output\n"); /* empty string */ - r = MsiRecordSetString(hrec, 0, ""); + r = MsiRecordSetStringA(hrec, 0, ""); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 30, "size wrong %i\n",sz); ok( 0 == strcmp(buffer,"1: boo 2: hoo 3: 4: 5: 6: "), "wrong output(%s)\n",buffer); /* play games with recursive lookups */ - r = MsiRecordSetString(hrec, 0, "[[1]] [2]"); + r = MsiRecordSetStringA(hrec, 0, "[[1]] [2]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hey"); + r = MsiRecordSetStringA(hrec, 2, "hey"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 7, "size wrong,(%i)\n",sz); ok( 0 == strcmp(buffer,"hey hey"), "wrong output (%s)\n",buffer); - r = MsiRecordSetString(hrec, 0, "[[1]] [2]"); + r = MsiRecordSetStringA(hrec, 0, "[[1]] [2]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "[2]"); + r = MsiRecordSetStringA(hrec, 1, "[2]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hey"); + r = MsiRecordSetStringA(hrec, 2, "hey"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 9, "size wrong,(%i)\n",sz); ok( 0 == strcmp(buffer,"[[2]] hey"), "wrong output (%s)\n",buffer); - r = MsiRecordSetString(hrec, 0, "[[[3]]] [2]"); + r = MsiRecordSetStringA(hrec, 0, "[[[3]]] [2]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hey"); + r = MsiRecordSetStringA(hrec, 2, "hey"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "1"); + r = MsiRecordSetStringA(hrec, 3, "1"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 7, "size wrong,(%i)\n",sz); ok( 0 == strcmp(buffer,"hey hey"), "wrong output (%s)\n",buffer); @@ -538,91 +540,91 @@ static void test_formatrecord(void) hrec = MsiCreateRecord(12); ok( hrec, "failed to create record\n"); - r = MsiRecordSetString(hrec, 0, "[[3][1]] [2]"); + r = MsiRecordSetStringA(hrec, 0, "[[3][1]] [2]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hey"); + r = MsiRecordSetStringA(hrec, 2, "hey"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "1"); + r = MsiRecordSetStringA(hrec, 3, "1"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 12, "big"); + r = MsiRecordSetStringA(hrec, 12, "big"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 7, "size wrong,(%i)\n",sz); ok( 0 == strcmp(buffer,"big hey"), "wrong output (%s)\n",buffer); - r = MsiRecordSetString(hrec, 0, "[[3][4][1]] [2]"); + r = MsiRecordSetStringA(hrec, 0, "[[3][4][1]] [2]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hey"); + r = MsiRecordSetStringA(hrec, 2, "hey"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "1"); + r = MsiRecordSetStringA(hrec, 3, "1"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 4, NULL); + r = MsiRecordSetStringA(hrec, 4, NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 12, "big"); + r = MsiRecordSetStringA(hrec, 12, "big"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 7, "size wrong,(%i)\n",sz); ok( 0 == strcmp(buffer,"big hey"), "wrong output (%s)\n",buffer); - r = MsiRecordSetString(hrec, 0, "[[3][[4]][1]] [2]"); + r = MsiRecordSetStringA(hrec, 0, "[[3][[4]][1]] [2]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hey"); + r = MsiRecordSetStringA(hrec, 2, "hey"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "1"); + r = MsiRecordSetStringA(hrec, 3, "1"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 4, NULL); + r = MsiRecordSetStringA(hrec, 4, NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 12, "big"); + r = MsiRecordSetStringA(hrec, 12, "big"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 10, "size wrong,(%i)\n",sz); ok( 0 == strcmp(buffer,"[1[]2] hey"), "wrong output (%s)\n",buffer); /* incorrect formats */ - r = MsiRecordSetString(hrec, 0, "[[[3][[4]][1]] [2]"); + r = MsiRecordSetStringA(hrec, 0, "[[[3][[4]][1]] [2]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hey"); + r = MsiRecordSetStringA(hrec, 2, "hey"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "1"); + r = MsiRecordSetStringA(hrec, 3, "1"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 4, NULL); + r = MsiRecordSetStringA(hrec, 4, NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 12, "big"); + r = MsiRecordSetStringA(hrec, 12, "big"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 18, "size wrong,(%i)\n",sz); ok( 0 == strcmp(buffer,"[[[3][[4]][1]] [2]"), "wrong output (%s)\n",buffer); - r = MsiRecordSetString(hrec, 0, "[[3][[4]][1]] [2]]"); + r = MsiRecordSetStringA(hrec, 0, "[[3][[4]][1]] [2]]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hey"); + r = MsiRecordSetStringA(hrec, 2, "hey"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "1"); + r = MsiRecordSetStringA(hrec, 3, "1"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 4, NULL); + r = MsiRecordSetStringA(hrec, 4, NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 12, "big"); + r = MsiRecordSetStringA(hrec, 12, "big"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 11, "size wrong,(%i)\n",sz); ok( 0 == strcmp(buffer,"[1[]2] hey]"), "wrong output (%s)\n",buffer); @@ -630,291 +632,291 @@ static void test_formatrecord(void) /* play games with {} */ - r = MsiRecordSetString(hrec, 0, "{[3][1]} [2]"); + r = MsiRecordSetStringA(hrec, 0, "{[3][1]} [2]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hey"); + r = MsiRecordSetStringA(hrec, 2, "hey"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "1"); + r = MsiRecordSetStringA(hrec, 3, "1"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 4, NULL); + r = MsiRecordSetStringA(hrec, 4, NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 12, "big"); + r = MsiRecordSetStringA(hrec, 12, "big"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 6, "size wrong,(%i)\n",sz); ok( 0 == strcmp(buffer,"12 hey"), "wrong output (%s)\n",buffer); - r = MsiRecordSetString(hrec, 0, "[{[3][1]}] [2]"); + r = MsiRecordSetStringA(hrec, 0, "[{[3][1]}] [2]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hey"); + r = MsiRecordSetStringA(hrec, 2, "hey"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "1"); + r = MsiRecordSetStringA(hrec, 3, "1"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 4, NULL); + r = MsiRecordSetStringA(hrec, 4, NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 12, "big"); + r = MsiRecordSetStringA(hrec, 12, "big"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 8, "size wrong,(%i)\n",sz); ok( 0 == strcmp(buffer,"[12] hey"), "wrong output (%s)\n",buffer); - r = MsiRecordSetString(hrec, 0, "{test} [2]"); + r = MsiRecordSetStringA(hrec, 0, "{test} [2]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hey"); + r = MsiRecordSetStringA(hrec, 2, "hey"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "1"); + r = MsiRecordSetStringA(hrec, 3, "1"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 4, NULL); + r = MsiRecordSetStringA(hrec, 4, NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 12, "big"); + r = MsiRecordSetStringA(hrec, 12, "big"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 10, "size wrong,(%i)\n",sz); ok( 0 == strcmp(buffer,"{test} hey"), "wrong output (%s)\n",buffer); - r = MsiRecordSetString(hrec, 0, "{[test]} [2]"); + r = MsiRecordSetStringA(hrec, 0, "{[test]} [2]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hey"); + r = MsiRecordSetStringA(hrec, 2, "hey"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "1"); + r = MsiRecordSetStringA(hrec, 3, "1"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 4, NULL); + r = MsiRecordSetStringA(hrec, 4, NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 12, "big"); + r = MsiRecordSetStringA(hrec, 12, "big"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 12, "size wrong,(%i)\n",sz); ok( 0 == strcmp(buffer,"{[test]} hey"), "wrong output (%s)\n",buffer); - r = MsiRecordSetString(hrec, 0, "{[1][2][3][4]} [2]"); + r = MsiRecordSetStringA(hrec, 0, "{[1][2][3][4]} [2]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hey"); + r = MsiRecordSetStringA(hrec, 2, "hey"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "1"); + r = MsiRecordSetStringA(hrec, 3, "1"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 4, NULL); + r = MsiRecordSetStringA(hrec, 4, NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 12, "big"); + r = MsiRecordSetStringA(hrec, 12, "big"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 4, "size wrong,(%i)\n",sz); ok( 0 == strcmp(buffer," hey"), "wrong output (%s)\n",buffer); - r = MsiRecordSetString(hrec, 0, "{[1][2][3][dummy]} [2]"); + r = MsiRecordSetStringA(hrec, 0, "{[1][2][3][dummy]} [2]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hey"); + r = MsiRecordSetStringA(hrec, 2, "hey"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "1"); + r = MsiRecordSetStringA(hrec, 3, "1"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 4, NULL); + r = MsiRecordSetStringA(hrec, 4, NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 12, "big"); + r = MsiRecordSetStringA(hrec, 12, "big"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 18, "size wrong,(%i)\n",sz); ok( 0 == strcmp(buffer,"{2hey1[dummy]} hey"), "wrong output (%s)\n",buffer); - r = MsiRecordSetString(hrec, 0, "{[1][2][3][4][dummy]} [2]"); + r = MsiRecordSetStringA(hrec, 0, "{[1][2][3][4][dummy]} [2]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hey"); + r = MsiRecordSetStringA(hrec, 2, "hey"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "1"); + r = MsiRecordSetStringA(hrec, 3, "1"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 4, NULL); + r = MsiRecordSetStringA(hrec, 4, NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 12, "big"); + r = MsiRecordSetStringA(hrec, 12, "big"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 18, "size wrong,(%i)\n",sz); ok( 0 == strcmp(buffer,"{2hey1[dummy]} hey"), "wrong output (%s)\n",buffer); - r = MsiRecordSetString(hrec, 0, "{{[1][2]}[3][4][dummy]}"); + r = MsiRecordSetStringA(hrec, 0, "{{[1][2]}[3][4][dummy]}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hey"); + r = MsiRecordSetStringA(hrec, 2, "hey"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "1"); + r = MsiRecordSetStringA(hrec, 3, "1"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 4, NULL); + r = MsiRecordSetStringA(hrec, 4, NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 12, "big"); + r = MsiRecordSetStringA(hrec, 12, "big"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 16, "size wrong,(%i)\n",sz); ok( 0 == strcmp(buffer,"{{2hey}1[dummy]}"), "wrong output (%s)\n",buffer); - r = MsiRecordSetString(hrec, 0, "{{[1][2]}[3]{[4][dummy]}}"); + r = MsiRecordSetStringA(hrec, 0, "{{[1][2]}[3]{[4][dummy]}}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hey"); + r = MsiRecordSetStringA(hrec, 2, "hey"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "1"); + r = MsiRecordSetStringA(hrec, 3, "1"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 4, NULL); + r = MsiRecordSetStringA(hrec, 4, NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 12, "big"); + r = MsiRecordSetStringA(hrec, 12, "big"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 0, "size wrong,(%i)\n",sz); ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer); - r = MsiRecordSetString(hrec, 0, "{{[1][2]}[3]} {[1][2]}"); + r = MsiRecordSetStringA(hrec, 0, "{{[1][2]}[3]} {[1][2]}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "1"); + r = MsiRecordSetStringA(hrec, 1, "1"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "2"); + r = MsiRecordSetStringA(hrec, 2, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "3"); + r = MsiRecordSetStringA(hrec, 3, "3"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 4, NULL); + r = MsiRecordSetStringA(hrec, 4, NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 12, "big"); + r = MsiRecordSetStringA(hrec, 12, "big"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 12, "size wrong,(%i)\n",sz); ok( 0 == strcmp(buffer,"{{12}3} {12}"), "wrong output (%s)\n",buffer); - r = MsiRecordSetString(hrec, 0, "{[1][2]} {{[1][2]}[3]} {[1][2]}"); + r = MsiRecordSetStringA(hrec, 0, "{[1][2]} {{[1][2]}[3]} {[1][2]}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "1"); + r = MsiRecordSetStringA(hrec, 1, "1"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "2"); + r = MsiRecordSetStringA(hrec, 2, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "3"); + r = MsiRecordSetStringA(hrec, 3, "3"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 4, NULL); + r = MsiRecordSetStringA(hrec, 4, NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 12, "big"); + r = MsiRecordSetStringA(hrec, 12, "big"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 15, "size wrong,(%i)\n",sz); ok( 0 == strcmp(buffer,"12 {{12}3} {12}"), "wrong output (%s)\n",buffer); - r = MsiRecordSetString(hrec, 0, "{[4]}{[1][2]} {{[1][2]}[3]} {[1][2]}"); + r = MsiRecordSetStringA(hrec, 0, "{[4]}{[1][2]} {{[1][2]}[3]} {[1][2]}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "1"); + r = MsiRecordSetStringA(hrec, 1, "1"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "2"); + r = MsiRecordSetStringA(hrec, 2, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "3"); + r = MsiRecordSetStringA(hrec, 3, "3"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 4, NULL); + r = MsiRecordSetStringA(hrec, 4, NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 12, "big"); + r = MsiRecordSetStringA(hrec, 12, "big"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 15, "size wrong,(%i)\n",sz); ok( 0 == strcmp(buffer,"12 {{12}3} {12}"), "wrong output (%s)\n",buffer); - r = MsiRecordSetString(hrec, 0, "{blah} {[4]}{[1][2]} {{[1][2]}[3]} {[1][2]}"); + r = MsiRecordSetStringA(hrec, 0, "{blah} {[4]}{[1][2]} {{[1][2]}[3]} {[1][2]}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "1"); + r = MsiRecordSetStringA(hrec, 1, "1"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "2"); + r = MsiRecordSetStringA(hrec, 2, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "3"); + r = MsiRecordSetStringA(hrec, 3, "3"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 4, NULL); + r = MsiRecordSetStringA(hrec, 4, NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 12, "big"); + r = MsiRecordSetStringA(hrec, 12, "big"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 22, "size wrong,(%i)\n",sz); ok( 0 == strcmp(buffer,"{blah} 12 {{12}3} {12}"), "wrong output (%s)\n",buffer); - r = MsiRecordSetString(hrec, 0, "{{[1]}[2]} {[4]}{[1][2]}"); + r = MsiRecordSetStringA(hrec, 0, "{{[1]}[2]} {[4]}{[1][2]}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "1"); + r = MsiRecordSetStringA(hrec, 1, "1"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "2"); + r = MsiRecordSetStringA(hrec, 2, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "3"); + r = MsiRecordSetStringA(hrec, 3, "3"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 4, NULL); + r = MsiRecordSetStringA(hrec, 4, NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 12, "big"); + r = MsiRecordSetStringA(hrec, 12, "big"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 13, "size wrong,(%i)\n",sz); ok( 0 == strcmp(buffer,"{{1}2} {}{12}"), "wrong output (%s)\n",buffer); - r = MsiRecordSetString(hrec, 0, "{{[1]}} {[4]}{[1][2]}"); + r = MsiRecordSetStringA(hrec, 0, "{{[1]}} {[4]}{[1][2]}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "1"); + r = MsiRecordSetStringA(hrec, 1, "1"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "2"); + r = MsiRecordSetStringA(hrec, 2, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "3"); + r = MsiRecordSetStringA(hrec, 3, "3"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 4, NULL); + r = MsiRecordSetStringA(hrec, 4, NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 12, "big"); + r = MsiRecordSetStringA(hrec, 12, "big"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 3, "size wrong,(%i)\n",sz); ok( 0 == strcmp(buffer," 12"), "wrong output (%s)\n",buffer); - r = MsiRecordSetString(hrec, 0, "{{{[1]}} {[4]}{[1][2]}"); + r = MsiRecordSetStringA(hrec, 0, "{{{[1]}} {[4]}{[1][2]}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "1"); + r = MsiRecordSetStringA(hrec, 1, "1"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "2"); + r = MsiRecordSetStringA(hrec, 2, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "3"); + r = MsiRecordSetStringA(hrec, 3, "3"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 4, NULL); + r = MsiRecordSetStringA(hrec, 4, NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 12, "big"); + r = MsiRecordSetStringA(hrec, 12, "big"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); todo_wine{ ok( sz == 3, "size wrong,(%i)\n",sz); @@ -922,201 +924,201 @@ static void test_formatrecord(void) } /* now put play games with escaping */ - r = MsiRecordSetString(hrec, 0, "[1] [2] [\\3asdf]"); + r = MsiRecordSetStringA(hrec, 0, "[1] [2] [\\3asdf]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "boo"); + r = MsiRecordSetStringA(hrec, 1, "boo"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hoo"); + r = MsiRecordSetStringA(hrec, 2, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 16, "size wrong\n"); ok( 0 == strcmp(buffer,"boo hoo [\\3asdf]"), "wrong output\n"); /* now put play games with escaping */ - r = MsiRecordSetString(hrec, 0, "[1] [2] [\\x]"); + r = MsiRecordSetStringA(hrec, 0, "[1] [2] [\\x]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "boo"); + r = MsiRecordSetStringA(hrec, 1, "boo"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hoo"); + r = MsiRecordSetStringA(hrec, 2, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 12, "size wrong\n"); ok( 0 == strcmp(buffer,"boo hoo [\\x]"), "wrong output\n"); - r = MsiRecordSetString(hrec, 0, "[\\x]"); + r = MsiRecordSetStringA(hrec, 0, "[\\x]"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 4, "size wrong: %d\n", sz); ok( 0 == strcmp(buffer,"[\\x]"), "wrong output: %s\n", buffer); - r = MsiRecordSetString(hrec, 0, "{\\x}"); + r = MsiRecordSetStringA(hrec, 0, "{\\x}"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 4, "size wrong: %d\n", sz); ok( 0 == strcmp(buffer,"{\\x}"), "wrong output: %s\n", buffer); - r = MsiRecordSetString(hrec, 0, "[abc\\x]"); + r = MsiRecordSetStringA(hrec, 0, "[abc\\x]"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 7, "size wrong: %d\n", sz); ok( 0 == strcmp(buffer,"[abc\\x]"), "wrong output: %s\n", buffer); - r = MsiRecordSetString(hrec, 0, "[\\[]Bracket Text[\\]]"); + r = MsiRecordSetStringA(hrec, 0, "[\\[]Bracket Text[\\]]"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 20, "size wrong: %d\n", sz); ok( 0 == strcmp(buffer,"[\\[]Bracket Text[\\]]"), "wrong output: %s\n", buffer); /* now try other formats without a package */ - r = MsiRecordSetString(hrec, 0, "[1] [2] [property]"); + r = MsiRecordSetStringA(hrec, 0, "[1] [2] [property]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "boo"); + r = MsiRecordSetStringA(hrec, 1, "boo"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hoo"); + r = MsiRecordSetStringA(hrec, 2, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 18, "size wrong\n"); ok( 0 == strcmp(buffer,"boo hoo [property]"), "wrong output\n"); - r = MsiRecordSetString(hrec, 0, "[1] [~] [2]"); + r = MsiRecordSetStringA(hrec, 0, "[1] [~] [2]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "boo"); + r = MsiRecordSetStringA(hrec, 1, "boo"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hoo"); + r = MsiRecordSetStringA(hrec, 2, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 11, "size wrong\n"); ok( 0 == strcmp(buffer,"boo [~] hoo"), "wrong output (%s)\n",buffer); - r = MsiRecordSetString(hrec, 0, "[1]"); + r = MsiRecordSetStringA(hrec, 0, "[1]"); ok( r == ERROR_SUCCESS, "set string failed\n"); r = MsiRecordSetInteger(hrec, 1, 123456); ok( r == ERROR_SUCCESS, "set integer failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 6, "size wrong\n"); ok( 0 == strcmp(buffer,"123456"), "wrong output (%s)\n",buffer); - r = MsiRecordSetString(hrec, 0, "[~]"); + r = MsiRecordSetStringA(hrec, 0, "[~]"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 3, "size wrong\n"); ok( 0 == strcmp(buffer,"[~]"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "[]"); + r = MsiRecordSetStringA(hrec, 0, "[]"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 2, "size wrong\n"); ok( 0 == strcmp(buffer,"[]"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - /* MsiFormatRecord doesn't seem to handle a negative too well */ - r = MsiRecordSetString(hrec, 0, "[-1]"); + /* MsiFormatRecordA doesn't seem to handle a negative too well */ + r = MsiRecordSetStringA(hrec, 0, "[-1]"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 4, "size wrong\n"); ok( 0 == strcmp(buffer,"[-1]"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{[]}"); + r = MsiRecordSetStringA(hrec, 0, "{[]}"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 4, "size wrong\n"); ok( 0 == strcmp(buffer,"{[]}"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "[0]"); + r = MsiRecordSetStringA(hrec, 0, "[0]"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 3, "size wrong\n"); ok( 0 == strcmp(buffer,"[0]"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "[100]"); + r = MsiRecordSetStringA(hrec, 0, "[100]"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 0, "size wrong\n"); ok( 0 == strcmp(buffer,""), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{[1] [2]}"); + r = MsiRecordSetStringA(hrec, 0, "{[1] [2]}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "boo"); + r = MsiRecordSetStringA(hrec, 1, "boo"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hoo"); + r = MsiRecordSetStringA(hrec, 2, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 7, "size wrong\n"); ok( 0 == strcmp(buffer,"boo hoo"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{}"); + r = MsiRecordSetStringA(hrec, 0, "{}"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 0, "size wrong\n"); ok( 0 == strcmp(buffer,""), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{foo}"); + r = MsiRecordSetStringA(hrec, 0, "{foo}"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 5, "size wrong\n"); ok( 0 == strcmp(buffer,"{foo}"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{boo [1]}"); + r = MsiRecordSetStringA(hrec, 0, "{boo [1]}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 7, "size wrong\n"); ok( 0 == strcmp(buffer,"boo hoo"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{{[1]}}"); + r = MsiRecordSetStringA(hrec, 0, "{{[1]}}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 0, "size wrong\n"); ok( 0 == strcmp(buffer,""), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{ {[1]}}"); + r = MsiRecordSetStringA(hrec, 0, "{ {[1]}}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); todo_wine { ok( 0 == strcmp(buffer," {hoo}"), "wrong output\n"); @@ -1124,259 +1126,259 @@ static void test_formatrecord(void) } ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{{[1]} }"); + r = MsiRecordSetStringA(hrec, 0, "{{[1]} }"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 8, "size wrong\n"); ok( 0 == strcmp(buffer,"{{hoo} }"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{{ [1]}}"); + r = MsiRecordSetStringA(hrec, 0, "{{ [1]}}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 0, "size wrong\n"); ok( 0 == strcmp(buffer,""), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{{[1] }}"); + r = MsiRecordSetStringA(hrec, 0, "{{[1] }}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 0, "size wrong\n"); ok( 0 == strcmp(buffer,""), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{{a}{b}{c }{ d}{any text}}"); + r = MsiRecordSetStringA(hrec, 0, "{{a}{b}{c }{ d}{any text}}"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 0, "size wrong\n"); ok( 0 == strcmp(buffer,""), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{{a} }"); + r = MsiRecordSetStringA(hrec, 0, "{{a} }"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 6, "size wrong\n"); ok( 0 == strcmp(buffer,"{{a} }"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{{a} {b}}"); + r = MsiRecordSetStringA(hrec, 0, "{{a} {b}}"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 0, "size wrong\n"); ok( 0 == strcmp(buffer,""), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{{a} b}}"); + r = MsiRecordSetStringA(hrec, 0, "{{a} b}}"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); todo_wine ok( sz == 0, "size wrong\n"); todo_wine ok( 0 == strcmp(buffer,""), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{{a b}}"); + r = MsiRecordSetStringA(hrec, 0, "{{a b}}"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 0, "size wrong\n"); ok( 0 == strcmp(buffer,""), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{ }"); + r = MsiRecordSetStringA(hrec, 0, "{ }"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 3, "size wrong\n"); ok( 0 == strcmp(buffer,"{ }"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, " {{a}}}"); + r = MsiRecordSetStringA(hrec, 0, " {{a}}}"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 2, "size wrong\n"); ok( 0 == strcmp(buffer," }"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{{ almost {{ any }} text }}"); + r = MsiRecordSetStringA(hrec, 0, "{{ almost {{ any }} text }}"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); todo_wine ok( sz == 8, "size wrong\n"); todo_wine ok( 0 == strcmp(buffer," text }}"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{{ } { hidden ][ [ }}"); + r = MsiRecordSetStringA(hrec, 0, "{{ } { hidden ][ [ }}"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); todo_wine ok( sz == 0, "size wrong\n"); todo_wine ok( 0 == strcmp(buffer,""), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "[ 1]"); + r = MsiRecordSetStringA(hrec, 0, "[ 1]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 4, "size wrong\n"); ok( 0 == strcmp(buffer,"[ 1]"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "[01]"); + r = MsiRecordSetStringA(hrec, 0, "[01]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 3, "size wrong\n"); ok( 0 == strcmp(buffer,"hoo"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{{test}} [01"); + r = MsiRecordSetStringA(hrec, 0, "{{test}} [01"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); todo_wine ok( sz == 4, "size wrong\n"); todo_wine ok( 0 == strcmp(buffer," [01"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "[\\[]"); + r = MsiRecordSetStringA(hrec, 0, "[\\[]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 4, "size wrong\n"); ok( 0 == strcmp(buffer,"[\\[]"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "[\\[]"); + r = MsiRecordSetStringA(hrec, 0, "[\\[]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof(buffer); - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 4, "Expected 4, got %d\n", sz); ok(!lstrcmpA(buffer, "[\\[]"), "Expected \"[\\[]\", got \"%s\"\n", buffer); - r = MsiRecordSetString(hrec, 0, "[foo]"); + r = MsiRecordSetStringA(hrec, 0, "[foo]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 5, "size wrong\n"); ok( 0 == strcmp(buffer,"[foo]"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "[01.]"); + r = MsiRecordSetStringA(hrec, 0, "[01.]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 5, "size wrong\n"); ok( 0 == strcmp(buffer,"[01.]"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - SetEnvironmentVariable("FOO", "BAR"); - r = MsiRecordSetString(hrec, 0, "[%FOO]"); + SetEnvironmentVariableA("FOO", "BAR"); + r = MsiRecordSetStringA(hrec, 0, "[%FOO]"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 6, "size wrong\n"); ok( 0 == strcmp(buffer,"[%FOO]"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{{[1]}"); + r = MsiRecordSetStringA(hrec, 0, "{{[1]}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 6, "size wrong\n"); ok( 0 == strcmp(buffer,"{{hoo}"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{{ {[1]}"); + r = MsiRecordSetStringA(hrec, 0, "{{ {[1]}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 8, "size wrong\n"); ok( 0 == strcmp(buffer,"{{ {hoo}"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{{ {[1]}"); + r = MsiRecordSetStringA(hrec, 0, "{{ {[1]}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 8, "size wrong\n"); ok( 0 == strcmp(buffer,"{{ {hoo}"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{{ {{[1]}"); + r = MsiRecordSetStringA(hrec, 0, "{{ {{[1]}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 9, "size wrong\n"); ok( 0 == strcmp(buffer,"{{ {{hoo}"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "[1]}"); + r = MsiRecordSetStringA(hrec, 0, "[1]}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 4, "size wrong\n"); ok( 0 == strcmp(buffer,"hoo}"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{{ {{a}"); + r = MsiRecordSetStringA(hrec, 0, "{{ {{a}"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 7, "size wrong\n"); ok( 0 == strcmp(buffer,"{{ {{a}"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{{ {{a}"); + r = MsiRecordSetStringA(hrec, 0, "{{ {{a}"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 7, "size wrong\n"); ok( 0 == strcmp(buffer,"{{ {{a}"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "0{1{2{3{4[1]5}6}7}8}9"); + r = MsiRecordSetStringA(hrec, 0, "0{1{2{3{4[1]5}6}7}8}9"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); todo_wine { ok( sz == 19, "size wrong\n"); @@ -1384,12 +1386,12 @@ static void test_formatrecord(void) } ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "0{1{2[1]3}4"); + r = MsiRecordSetStringA(hrec, 0, "0{1{2[1]3}4"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); todo_wine { ok( sz == 9, "size wrong\n"); @@ -1397,12 +1399,12 @@ static void test_formatrecord(void) } ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "0{1{2[1]3}4"); + r = MsiRecordSetStringA(hrec, 0, "0{1{2[1]3}4"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); todo_wine { ok( sz == 9, "size wrong\n"); @@ -1410,12 +1412,12 @@ static void test_formatrecord(void) } ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{[1.} [1]"); + r = MsiRecordSetStringA(hrec, 0, "{[1.} [1]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 9, "size wrong\n"); todo_wine { @@ -1423,14 +1425,14 @@ static void test_formatrecord(void) } ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{[{[1]}]}"); + r = MsiRecordSetStringA(hrec, 0, "{[{[1]}]}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "foo"); + r = MsiRecordSetStringA(hrec, 2, "foo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); todo_wine { ok( sz == 9, "size wrong\n"); @@ -1438,14 +1440,14 @@ static void test_formatrecord(void) } ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{[1][}"); + r = MsiRecordSetStringA(hrec, 0, "{[1][}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "foo"); + r = MsiRecordSetStringA(hrec, 2, "foo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); todo_wine { ok( sz == 2, "size wrong\n"); @@ -1453,24 +1455,24 @@ static void test_formatrecord(void) } ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "[1]"); + r = MsiRecordSetStringA(hrec, 0, "[1]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "[2]"); + r = MsiRecordSetStringA(hrec, 1, "[2]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "foo"); + r = MsiRecordSetStringA(hrec, 2, "foo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 3, "size wrong\n"); ok( 0 == strcmp(buffer,"[2]"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "[{{boo}}1]"); + r = MsiRecordSetStringA(hrec, 0, "[{{boo}}1]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 3, "size wrong\n"); todo_wine @@ -1478,24 +1480,24 @@ static void test_formatrecord(void) ok( 0 == strcmp(buffer,"[1]"), "wrong output: %s\n", buffer); } - r = MsiRecordSetString(hrec, 0, "[{{boo}}1]"); + r = MsiRecordSetStringA(hrec, 0, "[{{boo}}1]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 0, "[1{{boo}}]"); + r = MsiRecordSetStringA(hrec, 0, "[1{{boo}}]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 3, "size wrong\n"); ok( 0 == strcmp(buffer,"[1]"), "wrong output\n"); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{[1]{{boo} }}"); + r = MsiRecordSetStringA(hrec, 0, "{[1]{{boo} }}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); todo_wine { ok( sz == 11, "size wrong\n"); @@ -1503,12 +1505,12 @@ static void test_formatrecord(void) } ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{[1{{boo}}]}"); + r = MsiRecordSetStringA(hrec, 0, "{[1{{boo}}]}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); todo_wine { ok( sz == 12, "size wrong: got %u, expected 12\n", sz); @@ -1516,30 +1518,30 @@ static void test_formatrecord(void) } ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{{[1]}"); + r = MsiRecordSetStringA(hrec, 0, "{{[1]}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 6, "size wrong: got %u, expected 3\n", sz); ok( 0 == strcmp(buffer,"{{hoo}"), "wrong output: got %s, expected [1]\n", buffer); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{[1{{bo}o}}]}"); + r = MsiRecordSetStringA(hrec, 0, "{[1{{bo}o}}]}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 13, "size wrong\n"); ok( 0 == strcmp(buffer,"{[1{{bo}o}}]}"), "wrong output %s\n",buffer); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{[1{{b{o}o}}]}"); + r = MsiRecordSetStringA(hrec, 0, "{[1{{b{o}o}}]}"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); todo_wine { ok( sz == 14, "size wrong\n"); @@ -1547,12 +1549,12 @@ static void test_formatrecord(void) } ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{ {[1]}"); + r = MsiRecordSetStringA(hrec, 0, "{ {[1]}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "hoo"); + r = MsiRecordSetStringA(hrec, 1, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); todo_wine { ok( sz == 5, "size wrong\n"); @@ -1561,12 +1563,12 @@ static void test_formatrecord(void) ok( r == ERROR_SUCCESS, "format failed\n"); /* {} inside a substitution does strange things... */ - r = MsiRecordSetString(hrec, 0, "[[1]{}]"); + r = MsiRecordSetStringA(hrec, 0, "[[1]{}]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); todo_wine { ok( sz == 5, "size wrong\n"); @@ -1574,12 +1576,12 @@ static void test_formatrecord(void) } ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "[[1]{}[1]]"); + r = MsiRecordSetStringA(hrec, 0, "[[1]{}[1]]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); todo_wine { ok( sz == 6, "size wrong\n"); @@ -1587,12 +1589,12 @@ static void test_formatrecord(void) } ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "[a[1]b[1]c{}d[1]e]"); + r = MsiRecordSetStringA(hrec, 0, "[a[1]b[1]c{}d[1]e]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); todo_wine { ok( sz == 14, "size wrong\n"); @@ -1600,100 +1602,100 @@ static void test_formatrecord(void) } ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "[a[1]b"); + r = MsiRecordSetStringA(hrec, 0, "[a[1]b"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 6, "size wrong\n"); ok( 0 == strcmp(buffer,"[a[1]b"), "wrong output %s\n",buffer); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "a[1]b]"); + r = MsiRecordSetStringA(hrec, 0, "a[1]b]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 4, "size wrong\n"); ok( 0 == strcmp(buffer,"a2b]"), "wrong output %s\n",buffer); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "]a[1]b"); + r = MsiRecordSetStringA(hrec, 0, "]a[1]b"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 4, "size wrong\n"); ok( 0 == strcmp(buffer,"]a2b"), "wrong output %s\n",buffer); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "]a[1]b"); + r = MsiRecordSetStringA(hrec, 0, "]a[1]b"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 4, "size wrong\n"); ok( 0 == strcmp(buffer,"]a2b"), "wrong output %s\n",buffer); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "\\[1]"); + r = MsiRecordSetStringA(hrec, 0, "\\[1]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 2, "size wrong\n"); ok( 0 == strcmp(buffer,"\\2"), "wrong output %s\n",buffer); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "\\{[1]}"); + r = MsiRecordSetStringA(hrec, 0, "\\{[1]}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "2"); + r = MsiRecordSetStringA(hrec, 1, "2"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 2, "size wrong\n"); ok( 0 == strcmp(buffer,"\\2"), "wrong output %s\n",buffer); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "a{b[1]c}d"); + r = MsiRecordSetStringA(hrec, 0, "a{b[1]c}d"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, NULL); + r = MsiRecordSetStringA(hrec, 1, NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 2, "size wrong\n"); ok( 0 == strcmp(buffer,"ad"), "wrong output %s\n",buffer); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{a[0]b}"); + r = MsiRecordSetStringA(hrec, 0, "{a[0]b}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "foo"); + r = MsiRecordSetStringA(hrec, 1, "foo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 9, "size wrong\n"); ok( 0 == strcmp(buffer,"a{a[0]b}b"), "wrong output %s\n",buffer); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "[foo]"); + r = MsiRecordSetStringA(hrec, 0, "[foo]"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( sz == 5, "size wrong\n"); ok( 0 == strcmp(buffer,"[foo]"), "wrong output %s\n",buffer); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec, 0, "{[1][-1][1]}"); + r = MsiRecordSetStringA(hrec, 0, "{[1][-1][1]}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "foo"); + r = MsiRecordSetStringA(hrec, 1, "foo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); todo_wine { ok( sz == 12, "size wrong\n"); @@ -1703,81 +1705,81 @@ static void test_formatrecord(void) /* nested braces */ sz = sizeof buffer; - r = MsiRecordSetString(hrec, 0, "{abcd}"); + r = MsiRecordSetStringA(hrec, 0, "{abcd}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 6, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,"{abcd}"), "wrong output (%s)\n",buffer); sz = sizeof buffer; - r = MsiRecordSetString(hrec, 0, "{a[one]bc[two]de[one]f}"); + r = MsiRecordSetStringA(hrec, 0, "{a[one]bc[two]de[one]f}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 23, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,"{a[one]bc[two]de[one]f}"), "wrong output (%s)\n",buffer); sz = sizeof buffer; - r = MsiRecordSetString(hrec, 0, "{a[one]bc[bad]de[two]f}"); + r = MsiRecordSetStringA(hrec, 0, "{a[one]bc[bad]de[two]f}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 23, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,"{a[one]bc[bad]de[two]f}"), "wrong output (%s)\n",buffer); sz = sizeof buffer; - r = MsiRecordSetString(hrec, 0, "{[bad]}"); + r = MsiRecordSetStringA(hrec, 0, "{[bad]}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 7, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,"{[bad]}"), "wrong output (%s)\n",buffer); sz = sizeof buffer; - r = MsiRecordSetString(hrec, 0, "{abc{d[one]ef}"); /* missing final brace */ + r = MsiRecordSetStringA(hrec, 0, "{abc{d[one]ef}"); /* missing final brace */ ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 14, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,"{abc{d[one]ef}"), "wrong output (%s)\n",buffer); sz = sizeof buffer; - r = MsiRecordSetString(hrec, 0, "{abc{d[one]ef}}"); + r = MsiRecordSetStringA(hrec, 0, "{abc{d[one]ef}}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 15, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,"{abc{d[one]ef}}"), "wrong output (%s)\n",buffer); sz = sizeof buffer; - r = MsiRecordSetString(hrec, 0, "{abc}{{def}hi{j[one]k}}"); + r = MsiRecordSetStringA(hrec, 0, "{abc}{{def}hi{j[one]k}}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 5, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,"{abc}"), "wrong output (%s)\n",buffer); sz = sizeof buffer; - r = MsiRecordSetString(hrec, 0, "{{def}hi{j[one]k}}"); + r = MsiRecordSetStringA(hrec, 0, "{{def}hi{j[one]k}}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 0, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer); sz = sizeof buffer; - r = MsiRecordSetString(hrec, 0, "{{def}hi{jk}}"); + r = MsiRecordSetStringA(hrec, 0, "{{def}hi{jk}}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 0, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer); sz = sizeof buffer; - r = MsiRecordSetString(hrec, 0, "{{{def}}hi{jk}}"); + r = MsiRecordSetStringA(hrec, 0, "{{{def}}hi{jk}}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); todo_wine { @@ -1786,9 +1788,9 @@ static void test_formatrecord(void) } sz = sizeof buffer; - r = MsiRecordSetString(hrec, 0, "{{def}hi{{jk}}}"); + r = MsiRecordSetStringA(hrec, 0, "{{def}hi{{jk}}}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); todo_wine { @@ -1797,49 +1799,49 @@ static void test_formatrecord(void) } sz = sizeof buffer; - r = MsiRecordSetString(hrec, 0, "{{def}{jk}}"); + r = MsiRecordSetStringA(hrec, 0, "{{def}{jk}}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 0, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer); sz = sizeof buffer; - r = MsiRecordSetString(hrec, 0, "{{def}}"); + r = MsiRecordSetStringA(hrec, 0, "{{def}}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 0, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer); sz = sizeof buffer; - r = MsiRecordSetString(hrec, 0, "{a{b}c}"); + r = MsiRecordSetStringA(hrec, 0, "{a{b}c}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 7, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,"{a{b}c}"), "wrong output (%s)\n",buffer); sz = sizeof buffer; - r = MsiRecordSetString(hrec, 0, "{a{b}}"); + r = MsiRecordSetStringA(hrec, 0, "{a{b}}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 6, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,"{a{b}}"), "wrong output (%s)\n",buffer); sz = sizeof buffer; - r = MsiRecordSetString(hrec, 0, "{{b}c}"); + r = MsiRecordSetStringA(hrec, 0, "{{b}c}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 6, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,"{{b}c}"), "wrong output (%s)\n",buffer); sz = sizeof buffer; - r = MsiRecordSetString(hrec, 0, "{{{{}}}}"); + r = MsiRecordSetStringA(hrec, 0, "{{{{}}}}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); todo_wine { @@ -1850,41 +1852,41 @@ static void test_formatrecord(void) sz = sizeof buffer; MsiRecordSetInteger(hrec, 1, 100); MsiRecordSetInteger(hrec, 2, -100); - r = MsiRecordSetString(hrec, 0, "[1] [2]"); + r = MsiRecordSetStringA(hrec, 0, "[1] [2]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 8, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,"100 -100"), "wrong output (%s)\n",buffer); sz = sizeof(buffer); - r = MsiRecordSetString(hrec, 0, "[1] {[noprop] [twoprop]} {abcdef}"); + r = MsiRecordSetStringA(hrec, 0, "[1] {[noprop] [twoprop]} {abcdef}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "one"); + r = MsiRecordSetStringA(hrec, 1, "one"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 33, "Expected 33, got %d\n",sz); ok(!lstrcmpA(buffer, "one {[noprop] [twoprop]} {abcdef}"), "Expected \"one {[noprop] [twoprop]} {abcdef}\", got \"%s\"\n", buffer); sz = sizeof(buffer); - r = MsiRecordSetString(hrec, 0, "[1] {[noprop] [one]} {abcdef}"); + r = MsiRecordSetStringA(hrec, 0, "[1] {[noprop] [one]} {abcdef}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "one"); + r = MsiRecordSetStringA(hrec, 1, "one"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 29, "Expected 29, got %d\n",sz); ok(!lstrcmpA(buffer, "one {[noprop] [one]} {abcdef}"), "Expected \"one {[noprop] [one]} {abcdef}\", got \"%s\"\n", buffer); sz = sizeof(buffer); - r = MsiRecordSetString(hrec, 0, "[1] {[one]} {abcdef}"); + r = MsiRecordSetStringA(hrec, 0, "[1] {[one]} {abcdef}"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "one"); + r = MsiRecordSetStringA(hrec, 1, "one"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiFormatRecord(0, hrec, buffer, &sz); + r = MsiFormatRecordA(0, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 20, "Expected 20, got %d\n",sz); ok(!lstrcmpA(buffer, "one {[one]} {abcdef}"), @@ -1912,62 +1914,62 @@ static void test_formatrecord_package(void) hrec = MsiCreateRecord(12); ok( hrec, "failed to create record\n"); - r = MsiFormatRecord(package, 0, NULL, NULL ); + r = MsiFormatRecordA(package, 0, NULL, NULL ); ok( r == ERROR_INVALID_HANDLE, "wrong error\n"); - r = MsiFormatRecord(package, hrec, NULL, NULL ); + r = MsiFormatRecordA(package, hrec, NULL, NULL ); ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiRecordSetString(hrec,0,NULL); + r = MsiRecordSetStringA(hrec,0,NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec,1,NULL); + r = MsiRecordSetStringA(hrec,1,NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec,2,NULL); + r = MsiRecordSetStringA(hrec,2,NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec,3,NULL); + r = MsiRecordSetStringA(hrec,3,NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec,4,NULL); + r = MsiRecordSetStringA(hrec,4,NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec,5,NULL); + r = MsiRecordSetStringA(hrec,5,NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec,6,NULL); + r = MsiRecordSetStringA(hrec,6,NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec,7,NULL); + r = MsiRecordSetStringA(hrec,7,NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec,8,NULL); + r = MsiRecordSetStringA(hrec,8,NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec,9,NULL); + r = MsiRecordSetStringA(hrec,9,NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec,10,NULL); + r = MsiRecordSetStringA(hrec,10,NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec,11,NULL); + r = MsiRecordSetStringA(hrec,11,NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec,12,NULL); + r = MsiRecordSetStringA(hrec,12,NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed with empty buffer (%i)\n",r); ok( sz == 51, "size wrong (%i)\n",sz); ok( 0 == strcmp(buffer,"1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: "), "wrong output(%s)\n",buffer); - r = MsiSetProperty(package, "prop", "val"); + r = MsiSetPropertyA(package, "prop", "val"); ok( r == ERROR_SUCCESS, "failed to set propertY: %d\n", r); - r = MsiRecordSetString(hrec, 0, NULL); + r = MsiRecordSetStringA(hrec, 0, NULL); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "[2]"); + r = MsiRecordSetStringA(hrec, 1, "[2]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "stuff"); + r = MsiRecordSetStringA(hrec, 2, "stuff"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "prop"); + r = MsiRecordSetStringA(hrec, 3, "prop"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 4, "[prop]"); + r = MsiRecordSetStringA(hrec, 4, "[prop]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 5, "[noprop]"); + r = MsiRecordSetStringA(hrec, 5, "[noprop]"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed with empty buffer (%i)\n",r); todo_wine { @@ -1978,103 +1980,103 @@ static void test_formatrecord_package(void) } /* now put play games with escaping */ - r = MsiRecordSetString(hrec, 0, "[1] [2] [\\3asdf]"); + r = MsiRecordSetStringA(hrec, 0, "[1] [2] [\\3asdf]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "boo"); + r = MsiRecordSetStringA(hrec, 1, "boo"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hoo"); + r = MsiRecordSetStringA(hrec, 2, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 9, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,"boo hoo 3"), "wrong output (%s)\n",buffer); - r = MsiRecordSetString(hrec, 0, "[1] [2] [\\x]"); + r = MsiRecordSetStringA(hrec, 0, "[1] [2] [\\x]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "boo"); + r = MsiRecordSetStringA(hrec, 1, "boo"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hoo"); + r = MsiRecordSetStringA(hrec, 2, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 9, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,"boo hoo x"), "wrong output (%s)\n",buffer); - MsiRecordSetString(hrec, 0, "[\\x]"); + MsiRecordSetStringA(hrec, 0, "[\\x]"); sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 1, "size wrong: %d\n", sz); ok( 0 == strcmp(buffer,"x"), "wrong output: %s\n", buffer); - MsiRecordSetString(hrec, 0, "{\\x}"); + MsiRecordSetStringA(hrec, 0, "{\\x}"); sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 4, "size wrong: %d\n", sz); ok( 0 == strcmp(buffer,"{\\x}"), "wrong output: %s\n", buffer); - MsiRecordSetString(hrec, 0, "[abc\\x]"); + MsiRecordSetStringA(hrec, 0, "[abc\\x]"); sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 0, "size wrong: %d\n", sz); ok( 0 == strcmp(buffer,""), "wrong output: %s\n", buffer); - MsiRecordSetString(hrec, 0, "[abc\\xdef]"); + MsiRecordSetStringA(hrec, 0, "[abc\\xdef]"); sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 0, "size wrong: %d\n", sz); ok( 0 == strcmp(buffer,""), "wrong output: %s\n", buffer); - MsiRecordSetString(hrec, 0, "\\x"); + MsiRecordSetStringA(hrec, 0, "\\x"); sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 2, "Expected 2, got %d\n", sz); ok(!lstrcmpA(buffer, "\\x"), "Expected \"\\x\", got \"%s\"\n", buffer); - MsiRecordSetString(hrec, 0, "[\\["); + MsiRecordSetStringA(hrec, 0, "[\\["); sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 3, "Expected 3, got %d\n", sz); ok(!lstrcmpA(buffer, "[\\["), "Expected \"[\\[\", got \"%s\"\n", buffer); - MsiRecordSetString(hrec, 0, "[\\[]"); + MsiRecordSetStringA(hrec, 0, "[\\[]"); sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 1, "Expected 1, got %d\n", sz); ok(!lstrcmpA(buffer, "["), "Expected \"[\", got \"%s\"\n", buffer); - MsiRecordSetString(hrec, 0, "[[]"); + MsiRecordSetStringA(hrec, 0, "[[]"); sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 3, "Expected 3, got %d\n", sz); ok(!lstrcmpA(buffer, "[[]"), "Expected \"[]\", got \"%s\"\n", buffer); - MsiRecordSetString(hrec, 0, "[\\[]]"); + MsiRecordSetStringA(hrec, 0, "[\\[]]"); sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 2, "Expected 2, got %d\n", sz); ok(!lstrcmpA(buffer, "[]"), "Expected \"[]\", got \"%s\"\n", buffer); - MsiRecordSetString(hrec, 0, "[\\[a]"); + MsiRecordSetStringA(hrec, 0, "[\\[a]"); sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 1, "Expected 1, got %d\n", sz); ok(!lstrcmpA(buffer, "["), "Expected \"[\", got \"%s\"\n", buffer); - MsiRecordSetString(hrec, 0, "[\\a[]"); + MsiRecordSetStringA(hrec, 0, "[\\a[]"); sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); todo_wine { @@ -2082,145 +2084,145 @@ static void test_formatrecord_package(void) ok(!lstrcmpA(buffer, "a"), "Expected \"a\", got \"%s\"\n", buffer); } - MsiRecordSetString(hrec, 0, "[prop]"); + MsiRecordSetStringA(hrec, 0, "[prop]"); sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 3, "Expected 3, got %d\n", sz); ok(!lstrcmpA(buffer, "val"), "Expected \"val\", got \"%s\"\n", buffer); - MsiRecordSetString(hrec, 0, "[prop] [pro\\pblah] [prop]"); + MsiRecordSetStringA(hrec, 0, "[prop] [pro\\pblah] [prop]"); sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 8, "Expected 8, got %d\n", sz); ok(!lstrcmpA(buffer, "val val"), "Expected \"val val\", got \"%s\"\n", buffer); MsiSetPropertyA(package, "b", "ball"); - MsiRecordSetString(hrec, 0, "[\\b]"); + MsiRecordSetStringA(hrec, 0, "[\\b]"); sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 1, "Expected 1, got %d\n", sz); ok(!lstrcmpA(buffer, "b"), "Expected \"b\", got \"%s\"\n", buffer); - MsiRecordSetString(hrec, 0, "[\\c]"); + MsiRecordSetStringA(hrec, 0, "[\\c]"); sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 1, "Expected 1, got %d\n", sz); ok(!lstrcmpA(buffer, "c"), "Expected \"c\", got \"%s\"\n", buffer); - MsiRecordSetString(hrec, 0, "[\\[]prop]"); + MsiRecordSetStringA(hrec, 0, "[\\[]prop]"); sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 6, "Expected 6, got %d\n", sz); ok(!lstrcmpA(buffer, "[prop]"), "Expected \"[prop]\", got \"%s\"\n", buffer); - MsiRecordSetString(hrec, 0, "[\\a]prop]"); + MsiRecordSetStringA(hrec, 0, "[\\a]prop]"); sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 6, "Expected 6, got %d\n", sz); ok(!lstrcmpA(buffer, "aprop]"), "Expected \"aprop]\", got \"%s\"\n", buffer); - MsiRecordSetString(hrec, 0, "[\\[]Bracket Text[\\]]"); + MsiRecordSetStringA(hrec, 0, "[\\[]Bracket Text[\\]]"); sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 14, "size wrong: %d\n", sz); ok( 0 == strcmp(buffer,"[Bracket Text]"), "wrong output: %s\n", buffer); /* null characters */ - r = MsiRecordSetString(hrec, 0, "[1] [~] [2]"); + r = MsiRecordSetStringA(hrec, 0, "[1] [~] [2]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "boo"); + r = MsiRecordSetStringA(hrec, 1, "boo"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hoo"); + r = MsiRecordSetStringA(hrec, 2, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 9, "size wrong: %d\n", sz); ok( 0 == strcmp(buffer,"boo "), "wrong output: %s\n", buffer); ok(!lstrcmpA(&buffer[5], " hoo"), "Expected \" hoo\", got \"%s\"\n", &buffer[5]); - r = MsiRecordSetString(hrec, 0, "[1] [~abc] [2]"); + r = MsiRecordSetStringA(hrec, 0, "[1] [~abc] [2]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "boo"); + r = MsiRecordSetStringA(hrec, 1, "boo"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hoo"); + r = MsiRecordSetStringA(hrec, 2, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 8, "Expected 8, got %d\n", sz); ok(!lstrcmpA(buffer, "boo hoo"), "Expected \"boo hoo\", got \"%s\"\n", buffer); /* properties */ - r = MsiSetProperty(package,"dummy","Bork"); + r = MsiSetPropertyA(package,"dummy","Bork"); ok( r == ERROR_SUCCESS, "set property failed\n"); - r = MsiRecordSetString(hrec, 0, "[1] [dummy] [2]"); + r = MsiRecordSetStringA(hrec, 0, "[1] [dummy] [2]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "boo"); + r = MsiRecordSetStringA(hrec, 1, "boo"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hoo"); + r = MsiRecordSetStringA(hrec, 2, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 12, "size wrong\n"); ok( 0 == strcmp(buffer,"boo Bork hoo"), "wrong output\n"); - r = MsiRecordSetString(hrec, 0, "[1] [invalid] [2]"); + r = MsiRecordSetStringA(hrec, 0, "[1] [invalid] [2]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "boo"); + r = MsiRecordSetStringA(hrec, 1, "boo"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hoo"); + r = MsiRecordSetStringA(hrec, 2, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 8, "size wrong\n"); ok( 0 == strcmp(buffer,"boo hoo"), "wrong output\n"); /* nesting tests */ - r = MsiSetProperty(package,"dummya","foo"); + r = MsiSetPropertyA(package,"dummya","foo"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiSetProperty(package,"dummyb","baa"); + r = MsiSetPropertyA(package,"dummyb","baa"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiSetProperty(package,"adummyc","whoa"); + r = MsiSetPropertyA(package,"adummyc","whoa"); ok( r == ERROR_SUCCESS, "set property failed\n"); - r = MsiRecordSetString(hrec, 0, "[dummy[1]] [dummy[2]] [[1]dummy[3]]"); + r = MsiRecordSetStringA(hrec, 0, "[dummy[1]] [dummy[2]] [[1]dummy[3]]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "a"); + r = MsiRecordSetStringA(hrec, 1, "a"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "b"); + r = MsiRecordSetStringA(hrec, 2, "b"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "c"); + r = MsiRecordSetStringA(hrec, 3, "c"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 12, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,"foo baa whoa"), "wrong output (%s)\n",buffer); - r = MsiSetProperty(package,"dummya","1"); + r = MsiSetPropertyA(package,"dummya","1"); ok( r == ERROR_SUCCESS, "set property failed\n"); - r = MsiSetProperty(package,"dummyb","[2]"); + r = MsiSetPropertyA(package,"dummyb","[2]"); ok( r == ERROR_SUCCESS, "set property failed\n"); - r = MsiRecordSetString(hrec, 0, "[dummya] [[dummya]] [dummyb]"); + r = MsiRecordSetStringA(hrec, 0, "[dummya] [[dummya]] [dummyb]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "aaa"); + r = MsiRecordSetStringA(hrec, 1, "aaa"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "bbb"); + r = MsiRecordSetStringA(hrec, 2, "bbb"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "ccc"); + r = MsiRecordSetStringA(hrec, 3, "ccc"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); todo_wine { @@ -2228,38 +2230,38 @@ static void test_formatrecord_package(void) ok( 0 == strcmp(buffer,"1 [1] [2]"), "wrong output (%s)\n",buffer); } - r = MsiSetProperty(package,"dummya","1"); + r = MsiSetPropertyA(package,"dummya","1"); ok( r == ERROR_SUCCESS, "set property failed\n"); - r = MsiSetProperty(package,"dummyb","a"); + r = MsiSetPropertyA(package,"dummyb","a"); ok( r == ERROR_SUCCESS, "set property failed\n"); - r = MsiSetProperty(package,"dummyc","\\blath"); + r = MsiSetPropertyA(package,"dummyc","\\blath"); ok( r == ERROR_SUCCESS, "set property failed\n"); - r = MsiSetProperty(package,"dummyd","[\\blath]"); + r = MsiSetPropertyA(package,"dummyd","[\\blath]"); ok( r == ERROR_SUCCESS, "set property failed\n"); - r = MsiRecordSetString(hrec, 0, "[dummyc] [[dummyc]] [dummy[dummyb]]"); + r = MsiRecordSetStringA(hrec, 0, "[dummyc] [[dummyc]] [dummy[dummyb]]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "aaa"); + r = MsiRecordSetStringA(hrec, 1, "aaa"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "bbb"); + r = MsiRecordSetStringA(hrec, 2, "bbb"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "ccc"); + r = MsiRecordSetStringA(hrec, 3, "ccc"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 10, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,"\\blath b 1"), "wrong output (%s)\n",buffer); - r = MsiRecordSetString(hrec, 0, "[1] [2] [[\\3asdf]]"); + r = MsiRecordSetStringA(hrec, 0, "[1] [2] [[\\3asdf]]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "boo"); + r = MsiRecordSetStringA(hrec, 1, "boo"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hoo"); + r = MsiRecordSetStringA(hrec, 2, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "yeah"); + r = MsiRecordSetStringA(hrec, 3, "yeah"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); todo_wine { @@ -2267,120 +2269,120 @@ static void test_formatrecord_package(void) ok( 0 == strcmp(buffer,"boo hoo [3]"), "wrong output (%s)\n",buffer); } - r = MsiRecordSetString(hrec, 0, "[1] [2] [[3]]"); + r = MsiRecordSetStringA(hrec, 0, "[1] [2] [[3]]"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 1, "boo"); + r = MsiRecordSetStringA(hrec, 1, "boo"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 2, "hoo"); + r = MsiRecordSetStringA(hrec, 2, "hoo"); ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiRecordSetString(hrec, 3, "\\help"); + r = MsiRecordSetStringA(hrec, 3, "\\help"); ok( r == ERROR_SUCCESS, "set string failed\n"); sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 9, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,"boo hoo h"), "wrong output (%s)\n",buffer); /* nested properties */ - MsiSetProperty(package, "PropA", "surprise"); - MsiSetProperty(package, "PropB", "[PropA]"); - MsiSetProperty(package, "PropC", "[PropB]"); + MsiSetPropertyA(package, "PropA", "surprise"); + MsiSetPropertyA(package, "PropB", "[PropA]"); + MsiSetPropertyA(package, "PropC", "[PropB]"); sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "[PropC]"); - r = MsiFormatRecord(package, hrec, buffer, &sz); + MsiRecordSetStringA(hrec, 0, "[PropC]"); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 7, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,"[PropB]"), "wrong output (%s)\n",buffer); - MsiSetProperty(package, "PropA", "surprise"); - MsiSetProperty(package, "PropB", "PropA"); - MsiSetProperty(package, "PropC", "PropB"); + MsiSetPropertyA(package, "PropA", "surprise"); + MsiSetPropertyA(package, "PropB", "PropA"); + MsiSetPropertyA(package, "PropC", "PropB"); sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "[PropC]"); - r = MsiFormatRecord(package, hrec, buffer, &sz); + MsiRecordSetStringA(hrec, 0, "[PropC]"); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 5, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,"PropB"), "wrong output (%s)\n",buffer); - MsiSetProperty(package, "PropA", "surprise"); - MsiSetProperty(package, "PropB", "[PropA]"); - MsiSetProperty(package, "PropC", "[PropB]"); + MsiSetPropertyA(package, "PropA", "surprise"); + MsiSetPropertyA(package, "PropB", "[PropA]"); + MsiSetPropertyA(package, "PropC", "[PropB]"); sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "[[PropC]]"); - r = MsiFormatRecord(package, hrec, buffer, &sz); + MsiRecordSetStringA(hrec, 0, "[[PropC]]"); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 0, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer); - MsiSetProperty(package, "PropA", "surprise"); - MsiSetProperty(package, "PropB", "[PropA]"); - MsiSetProperty(package, "PropC", "PropB"); + MsiSetPropertyA(package, "PropA", "surprise"); + MsiSetPropertyA(package, "PropB", "[PropA]"); + MsiSetPropertyA(package, "PropC", "PropB"); sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "[[PropC]]"); - r = MsiFormatRecord(package, hrec, buffer, &sz); + MsiRecordSetStringA(hrec, 0, "[[PropC]]"); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 7, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,"[PropA]"), "wrong output (%s)\n",buffer); - MsiSetProperty(package, "PropA", "surprise"); - MsiSetProperty(package, "PropB", "PropA"); - MsiSetProperty(package, "PropC", "PropB"); + MsiSetPropertyA(package, "PropA", "surprise"); + MsiSetPropertyA(package, "PropB", "PropA"); + MsiSetPropertyA(package, "PropC", "PropB"); sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "[[PropC]]"); - r = MsiFormatRecord(package, hrec, buffer, &sz); + MsiRecordSetStringA(hrec, 0, "[[PropC]]"); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 5, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,"PropA"), "wrong output (%s)\n",buffer); - MsiSetProperty(package, "PropA", "surprise"); - MsiSetProperty(package, "PropB", "PropA"); - MsiSetProperty(package, "PropC", "PropB"); + MsiSetPropertyA(package, "PropA", "surprise"); + MsiSetPropertyA(package, "PropB", "PropA"); + MsiSetPropertyA(package, "PropC", "PropB"); sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "[[[PropC]]]"); - r = MsiFormatRecord(package, hrec, buffer, &sz); + MsiRecordSetStringA(hrec, 0, "[[[PropC]]]"); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 8, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,"surprise"), "wrong output (%s)\n",buffer); /* properties inside braces */ sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{abcd}"); - r = MsiFormatRecord(package, hrec, buffer, &sz); + MsiRecordSetStringA(hrec, 0, "{abcd}"); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 6, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,"{abcd}"), "wrong output (%s)\n",buffer); - MsiSetProperty(package, "one", "mercury"); - MsiSetProperty(package, "two", "venus"); + MsiSetPropertyA(package, "one", "mercury"); + MsiSetPropertyA(package, "two", "venus"); sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{a[one]bc[two]de[one]f}"); - r = MsiFormatRecord(package, hrec, buffer, &sz); + MsiRecordSetStringA(hrec, 0, "{a[one]bc[two]de[one]f}"); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed: %d\n", r); ok( sz == 25, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,"amercurybcvenusdemercuryf"), "wrong output (%s)\n",buffer); - MsiSetProperty(package, "one", "mercury"); - MsiSetProperty(package, "two", "venus"); - MsiSetProperty(package, "bad", ""); + MsiSetPropertyA(package, "one", "mercury"); + MsiSetPropertyA(package, "two", "venus"); + MsiSetPropertyA(package, "bad", ""); sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{a[one]bc[bad]de[two]f}"); - r = MsiFormatRecord(package, hrec, buffer, &sz); + MsiRecordSetStringA(hrec, 0, "{a[one]bc[bad]de[two]f}"); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 0, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer); - MsiSetProperty(package, "bad", ""); + MsiSetPropertyA(package, "bad", ""); sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{[bad]}"); - r = MsiFormatRecord(package, hrec, buffer, &sz); + MsiRecordSetStringA(hrec, 0, "{[bad]}"); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 0, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer); - MsiSetProperty(package, "one", "mercury"); + MsiSetPropertyA(package, "one", "mercury"); sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{abc{d[one]ef}"); /* missing final brace */ - r = MsiFormatRecord(package, hrec, buffer, &sz); + MsiRecordSetStringA(hrec, 0, "{abc{d[one]ef}"); /* missing final brace */ + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); todo_wine { @@ -2388,10 +2390,10 @@ static void test_formatrecord_package(void) ok( 0 == strcmp(buffer,"abc{dmercuryef"), "wrong output (%s)\n",buffer); } - MsiSetProperty(package, "one", "mercury"); + MsiSetPropertyA(package, "one", "mercury"); sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{abc{d[one]ef}}"); - r = MsiFormatRecord(package, hrec, buffer, &sz); + MsiRecordSetStringA(hrec, 0, "{abc{d[one]ef}}"); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); todo_wine { @@ -2399,45 +2401,45 @@ static void test_formatrecord_package(void) ok( 0 == strcmp(buffer,"abc{dmercuryef}"), "wrong output (%s)\n",buffer); } - MsiSetProperty(package, "one", "mercury"); + MsiSetPropertyA(package, "one", "mercury"); sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{abc}{{def}hi{j[one]k}}"); - r = MsiFormatRecord(package, hrec, buffer, &sz); + MsiRecordSetStringA(hrec, 0, "{abc}{{def}hi{j[one]k}}"); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 5, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,"{abc}"), "wrong output (%s)\n",buffer); - MsiSetProperty(package, "one", "mercury"); + MsiSetPropertyA(package, "one", "mercury"); sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{{def}hi{j[one]k}}"); - r = MsiFormatRecord(package, hrec, buffer, &sz); + MsiRecordSetStringA(hrec, 0, "{{def}hi{j[one]k}}"); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok( r == ERROR_SUCCESS, "format failed\n"); ok( sz == 0, "size wrong(%i)\n",sz); ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer); sz = sizeof(buffer); - MsiRecordSetString(hrec, 0, "[1] {[noprop] [twoprop]} {abcdef}"); - MsiRecordSetString(hrec, 1, "one"); - r = MsiFormatRecord(package, hrec, buffer, &sz); + MsiRecordSetStringA(hrec, 0, "[1] {[noprop] [twoprop]} {abcdef}"); + MsiRecordSetStringA(hrec, 1, "one"); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 13, "Expected 13, got %d\n",sz); ok(!lstrcmpA(buffer, "one {abcdef}"), "Expected \"one {abcdef}\", got \"%s\"\n", buffer); sz = sizeof(buffer); - MsiRecordSetString(hrec, 0, "[1] {[noprop] [one]} {abcdef}"); - MsiRecordSetString(hrec, 1, "one"); - r = MsiFormatRecord(package, hrec, buffer, &sz); + MsiRecordSetStringA(hrec, 0, "[1] {[noprop] [one]} {abcdef}"); + MsiRecordSetStringA(hrec, 1, "one"); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 13, "Expected 13, got %d\n",sz); ok(!lstrcmpA(buffer, "one {abcdef}"), "Expected \"one {abcdef}\", got \"%s\"\n", buffer); sz = sizeof(buffer); - MsiRecordSetString(hrec, 0, "[1] {[one]} {abcdef}"); - MsiRecordSetString(hrec, 1, "one"); - r = MsiFormatRecord(package, hrec, buffer, &sz); + MsiRecordSetStringA(hrec, 0, "[1] {[one]} {abcdef}"); + MsiRecordSetStringA(hrec, 1, "one"); + r = MsiFormatRecordA(package, hrec, buffer, &sz); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(sz == 20, "Expected 20, got %d\n",sz); ok(!lstrcmpA(buffer, "one mercury {abcdef}"), @@ -2448,7 +2450,7 @@ static void test_formatrecord_package(void) r = MsiCloseHandle(package); ok(r==ERROR_SUCCESS, "Unable to close package\n"); - DeleteFile( msifile ); + DeleteFileA( msifile ); } static void test_formatrecord_tables(void) @@ -2461,7 +2463,7 @@ static void test_formatrecord_tables(void) DWORD size; UINT r; - GetCurrentDirectory( MAX_PATH, curr_dir ); + GetCurrentDirectoryA( MAX_PATH, curr_dir ); hdb = create_package_db(); ok ( hdb, "failed to create package database\n"); @@ -2538,7 +2540,7 @@ static void test_formatrecord_tables(void) { skip("Not enough rights to perform tests\n"); MsiCloseHandle( hdb ); - DeleteFile( msifile ); + DeleteFileA( msifile ); return; } ok( r == ERROR_SUCCESS, "failed to create package %u\n", r ); @@ -2552,196 +2554,195 @@ static void test_formatrecord_tables(void) /* property doesn't exist */ size = MAX_PATH; - /*MsiRecordSetString( hrec, 0, "[1]" ); */ - MsiRecordSetString( hrec, 1, "[idontexist]" ); - r = MsiFormatRecord( hpkg, hrec, buf, &size ); + /*MsiRecordSetStringA( hrec, 0, "[1]" ); */ + MsiRecordSetStringA( hrec, 1, "[idontexist]" ); + r = MsiFormatRecordA( hpkg, hrec, buf, &size ); ok( r == ERROR_SUCCESS, "format record failed: %d\n", r); - ok( !lstrcmp( buf, "1: " ), "Expected '1: ', got %s\n", buf ); + ok( !lstrcmpA( buf, "1: " ), "Expected '1: ', got %s\n", buf ); /* property exists */ size = MAX_PATH; - MsiRecordSetString( hrec, 1, "[imaprop]" ); - r = MsiFormatRecord( hpkg, hrec, buf, &size ); + MsiRecordSetStringA( hrec, 1, "[imaprop]" ); + r = MsiFormatRecordA( hpkg, hrec, buf, &size ); ok( r == ERROR_SUCCESS, "format record failed: %d\n", r); - ok( !lstrcmp( buf, "1: ringer " ), "Expected '1: ringer ', got %s\n", buf ); + ok( !lstrcmpA( buf, "1: ringer " ), "Expected '1: ringer ', got %s\n", buf ); /* environment variable doesn't exist */ size = MAX_PATH; - MsiRecordSetString( hrec, 1, "[%idontexist]" ); - r = MsiFormatRecord( hpkg, hrec, buf, &size ); + MsiRecordSetStringA( hrec, 1, "[%idontexist]" ); + r = MsiFormatRecordA( hpkg, hrec, buf, &size ); ok( r == ERROR_SUCCESS, "format record failed: %d\n", r); - ok( !lstrcmp( buf, "1: " ), "Expected '1: ', got %s\n", buf ); + ok( !lstrcmpA( buf, "1: " ), "Expected '1: ', got %s\n", buf ); /* environment variable exists */ size = MAX_PATH; - SetEnvironmentVariable( "crazyvar", "crazyval" ); - MsiRecordSetString( hrec, 1, "[%crazyvar]" ); - r = MsiFormatRecord( hpkg, hrec, buf, &size ); + SetEnvironmentVariableA( "crazyvar", "crazyval" ); + MsiRecordSetStringA( hrec, 1, "[%crazyvar]" ); + r = MsiFormatRecordA( hpkg, hrec, buf, &size ); ok( r == ERROR_SUCCESS, "format record failed: %d\n", r); - ok( !lstrcmp( buf, "1: crazyval " ), "Expected '1: crazyval ', got %s\n", buf ); + ok( !lstrcmpA( buf, "1: crazyval " ), "Expected '1: crazyval ', got %s\n", buf ); /* file key before CostInitialize */ size = MAX_PATH; - MsiRecordSetString( hrec, 1, "[#frontal_file]" ); - r = MsiFormatRecord( hpkg, hrec, buf, &size ); + MsiRecordSetStringA( hrec, 1, "[#frontal_file]" ); + r = MsiFormatRecordA( hpkg, hrec, buf, &size ); ok( r == ERROR_SUCCESS, "format record failed: %d\n", r); - ok( !lstrcmp( buf, "1: " ), "Expected '1: ', got %s\n", buf ); + ok( !lstrcmpA( buf, "1: " ), "Expected '1: ', got %s\n", buf ); MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - r = MsiDoAction(hpkg, "CostInitialize"); + r = MsiDoActionA(hpkg, "CostInitialize"); ok( r == ERROR_SUCCESS, "CostInitialize failed: %d\n", r); - r = MsiDoAction(hpkg, "FileCost"); + r = MsiDoActionA(hpkg, "FileCost"); ok( r == ERROR_SUCCESS, "FileCost failed: %d\n", r); - r = MsiDoAction(hpkg, "CostFinalize"); + r = MsiDoActionA(hpkg, "CostFinalize"); ok( r == ERROR_SUCCESS, "CostFinalize failed: %d\n", r); size = MAX_PATH; - MsiGetProperty( hpkg, "ROOTDRIVE", root, &size ); + MsiGetPropertyA( hpkg, "ROOTDRIVE", root, &size ); sprintf( expected, "1: %sfrontal.txt ", root); /* frontal full file key */ size = MAX_PATH; - MsiRecordSetString( hrec, 1, "[#frontal_file]" ); - r = MsiFormatRecord( hpkg, hrec, buf, &size ); + MsiRecordSetStringA( hrec, 1, "[#frontal_file]" ); + r = MsiFormatRecordA( hpkg, hrec, buf, &size ); ok( r == ERROR_SUCCESS, "format record failed: %d\n", r); - ok( !lstrcmp( buf, expected ), "Expected \"%s\", got \"%s\"\n", expected, buf); + ok( !lstrcmpA( buf, expected ), "Expected \"%s\", got \"%s\"\n", expected, buf); /* frontal short file key */ size = MAX_PATH; - MsiRecordSetString( hrec, 1, "[!frontal_file]" ); - r = MsiFormatRecord( hpkg, hrec, buf, &size ); + MsiRecordSetStringA( hrec, 1, "[!frontal_file]" ); + r = MsiFormatRecordA( hpkg, hrec, buf, &size ); ok( r == ERROR_SUCCESS, "format record failed: %d\n", r); - ok( !lstrcmp( buf, expected ), "Expected \"%s\", got \"%s\"\n", expected, buf); + ok( !lstrcmpA( buf, expected ), "Expected \"%s\", got \"%s\"\n", expected, buf); sprintf( expected, "1: %sI am a really long directory\\temporal.txt ", root); /* temporal full file key */ size = MAX_PATH; - MsiRecordSetString( hrec, 1, "[#temporal_file]" ); - r = MsiFormatRecord( hpkg, hrec, buf, &size ); + MsiRecordSetStringA( hrec, 1, "[#temporal_file]" ); + r = MsiFormatRecordA( hpkg, hrec, buf, &size ); ok( r == ERROR_SUCCESS, "format record failed: %d\n", r); - ok( !lstrcmp( buf, expected ), "Expected \"%s\", got \"%s\"\n", expected, buf); + ok( !lstrcmpA( buf, expected ), "Expected \"%s\", got \"%s\"\n", expected, buf); /* temporal short file key */ size = MAX_PATH; - MsiRecordSetString( hrec, 1, "[!temporal_file]" ); - r = MsiFormatRecord( hpkg, hrec, buf, &size ); + MsiRecordSetStringA( hrec, 1, "[!temporal_file]" ); + r = MsiFormatRecordA( hpkg, hrec, buf, &size ); ok( r == ERROR_SUCCESS, "format record failed: %d\n", r); - ok( !lstrcmp( buf, expected ), "Expected \"%s\", got \"%s\"\n", expected, buf); + ok( !lstrcmpA( buf, expected ), "Expected \"%s\", got \"%s\"\n", expected, buf); /* custom action 51, files don't exist */ - r = MsiDoAction( hpkg, "MyCustom" ); + r = MsiDoActionA( hpkg, "MyCustom" ); ok( r == ERROR_SUCCESS, "MyCustom failed: %d\n", r); sprintf( expected, "%sI am a really long directory\\temporal.txt", root); size = MAX_PATH; - r = MsiGetProperty( hpkg, "prop", buf, &size ); + r = MsiGetPropertyA( hpkg, "prop", buf, &size ); ok( r == ERROR_SUCCESS, "get property failed: %d\n", r); - ok( !lstrcmp( buf, expected ), "Expected \"%s\", got \"%s\"\n", expected, buf); + ok( !lstrcmpA( buf, expected ), "Expected \"%s\", got \"%s\"\n", expected, buf); sprintf( buf, "%sI am a really long directory", root ); - CreateDirectory( buf, NULL ); + CreateDirectoryA( buf, NULL ); - lstrcat( buf, "\\temporal.txt" ); + lstrcatA( buf, "\\temporal.txt" ); create_test_file( buf ); /* custom action 51, files exist */ - r = MsiDoAction( hpkg, "MyCustom" ); + r = MsiDoActionA( hpkg, "MyCustom" ); ok( r == ERROR_SUCCESS, "MyCustom failed: %d\n", r); size = MAX_PATH; - r = MsiGetProperty( hpkg, "prop", buf, &size ); + r = MsiGetPropertyA( hpkg, "prop", buf, &size ); ok( r == ERROR_SUCCESS, "get property failed: %d\n", r); todo_wine { - ok( !lstrcmp( buf, expected ), "Expected \"%s\", got \"%s\"\n", expected, buf); + ok( !lstrcmpA( buf, expected ), "Expected \"%s\", got \"%s\"\n", expected, buf); } /* custom action 51, escaped text 1 */ - r = MsiDoAction( hpkg, "EscapeIt1" ); + r = MsiDoActionA( hpkg, "EscapeIt1" ); ok( r == ERROR_SUCCESS, "EscapeIt1 failed: %d\n", r); size = MAX_PATH; - r = MsiGetProperty( hpkg, "prop", buf, &size ); + r = MsiGetPropertyA( hpkg, "prop", buf, &size ); ok( r == ERROR_SUCCESS, "get property failed: %d\n", r); - ok( !lstrcmp( buf, "[Bracket Text]" ), "Expected '[Bracket Text]', got %s\n", buf); + ok( !lstrcmpA( buf, "[Bracket Text]" ), "Expected '[Bracket Text]', got %s\n", buf); /* custom action 51, escaped text 2 */ - r = MsiDoAction( hpkg, "EscapeIt2" ); + r = MsiDoActionA( hpkg, "EscapeIt2" ); ok( r == ERROR_SUCCESS, "EscapeIt2 failed: %d\n", r); size = MAX_PATH; - r = MsiGetProperty( hpkg, "prop", buf, &size ); + r = MsiGetPropertyA( hpkg, "prop", buf, &size ); ok( r == ERROR_SUCCESS, "get property failed: %d\n", r); - ok( !lstrcmp( buf, "x" ), "Expected 'x', got %s\n", buf); + ok( !lstrcmpA( buf, "x" ), "Expected 'x', got %s\n", buf); /* custom action 51, escaped text 3 */ - r = MsiDoAction( hpkg, "EscapeIt3" ); + r = MsiDoActionA( hpkg, "EscapeIt3" ); ok( r == ERROR_SUCCESS, "EscapeIt3 failed: %d\n", r); size = MAX_PATH; - r = MsiGetProperty( hpkg, "prop", buf, &size ); + r = MsiGetPropertyA( hpkg, "prop", buf, &size ); ok( r == ERROR_SUCCESS, "get property failed: %d\n", r); - ok( !lstrcmp( buf, "" ), "Expected '', got %s\n", buf); + ok( !lstrcmpA( buf, "" ), "Expected '', got %s\n", buf); /* custom action 51, embedded null */ - r = MsiDoAction( hpkg, "EmbedNull" ); + r = MsiDoActionA( hpkg, "EmbedNull" ); ok( r == ERROR_SUCCESS, "EmbedNull failed: %d\n", r); size = MAX_PATH; memset( buf, 'a', sizeof(buf) ); - r = MsiGetProperty( hpkg, "prop", buf, &size ); + r = MsiGetPropertyA( hpkg, "prop", buf, &size ); ok( r == ERROR_SUCCESS, "get property failed: %d\n", r); ok( !memcmp( buf, "\0np", sizeof("\0np") ), "wrong value\n"); ok( size == sizeof("\0np") - 1, "got %u\n", size ); - r = MsiSetProperty( hpkg, "prop", "[~]np" ); + r = MsiSetPropertyA( hpkg, "prop", "[~]np" ); ok( r == ERROR_SUCCESS, "cannot set property: %d\n", r); size = MAX_PATH; memset( buf, 'a', sizeof(buf) ); - r = MsiGetProperty( hpkg, "prop", buf, &size ); + r = MsiGetPropertyA( hpkg, "prop", buf, &size ); ok( r == ERROR_SUCCESS, "get property failed: %d\n", r); - ok( !lstrcmp( buf, "[~]np" ), "Expected '[~]np', got %s\n", buf); + ok( !lstrcmpA( buf, "[~]np" ), "Expected '[~]np', got %s\n", buf); sprintf( expected, "1: %sI am a really long directory\\ ", root); /* component with INSTALLSTATE_LOCAL */ size = MAX_PATH; - MsiRecordSetString( hrec, 1, "[$temporal]" ); - r = MsiFormatRecord( hpkg, hrec, buf, &size ); + MsiRecordSetStringA( hrec, 1, "[$temporal]" ); + r = MsiFormatRecordA( hpkg, hrec, buf, &size ); ok( r == ERROR_SUCCESS, "format record failed: %d\n", r); - ok( !lstrcmp( buf, expected ), "Expected \"%s\", got \"%s\"\n", expected, buf); + ok( !lstrcmpA( buf, expected ), "Expected \"%s\", got \"%s\"\n", expected, buf); - r = MsiSetComponentState( hpkg, "temporal", INSTALLSTATE_SOURCE ); + r = MsiSetComponentStateA( hpkg, "temporal", INSTALLSTATE_SOURCE ); ok( r == ERROR_SUCCESS, "failed to set install state: %d\n", r); /* component with INSTALLSTATE_SOURCE */ - lstrcpy( expected, "1: " ); - lstrcat( expected, curr_dir ); - if (strlen(curr_dir) > 3) - lstrcat( expected, "\\" ); - lstrcat( expected, " " ); + lstrcpyA( expected, "1: " ); + lstrcatA( expected, curr_dir ); + if (strlen(curr_dir) > 3) lstrcatA( expected, "\\" ); + lstrcatA( expected, " " ); size = MAX_PATH; - MsiRecordSetString( hrec, 1, "[$parietal]" ); - r = MsiFormatRecord( hpkg, hrec, buf, &size ); + MsiRecordSetStringA( hrec, 1, "[$parietal]" ); + r = MsiFormatRecordA( hpkg, hrec, buf, &size ); ok( r == ERROR_SUCCESS, "format record failed: %d\n", r); - ok( !lstrcmp( buf, expected ), "Expected '%s', got '%s'\n", expected, buf); + ok( !lstrcmpA( buf, expected ), "Expected '%s', got '%s'\n", expected, buf); sprintf( buf, "%sI am a really long directory\\temporal.txt", root ); - DeleteFile( buf ); + DeleteFileA( buf ); sprintf( buf, "%sI am a really long directory", root ); - RemoveDirectory( buf ); + RemoveDirectoryA( buf ); MsiCloseHandle( hrec ); MsiCloseHandle( hpkg ); - DeleteFile( msifile ); + DeleteFileA( msifile ); } static void test_processmessage(void) @@ -2762,7 +2763,7 @@ static void test_processmessage(void) hrec = MsiCreateRecord(3); ok( hrec, "failed to create record\n"); - r = MsiRecordSetString(hrec, 1, ""); + r = MsiRecordSetStringA(hrec, 1, ""); ok( r == ERROR_SUCCESS, "set string failed\n"); r = MsiProcessMessage(package, INSTALLMESSAGE_ACTIONSTART, hrec); @@ -2771,7 +2772,7 @@ static void test_processmessage(void) MsiCloseHandle(hrec); MsiCloseHandle(package); - DeleteFile(msifile); + DeleteFileA(msifile); } START_TEST(format)