Commit 0e8b5ac5 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi/tests: Prepare action.c for the switch to -D__WINESRC__.

parent 0dff81f4
...@@ -28,6 +28,9 @@ ...@@ -28,6 +28,9 @@
#include <msi.h> #include <msi.h>
#include <fci.h> #include <fci.h>
#include <srrestoreptapi.h> #include <srrestoreptapi.h>
#include <wtypes.h>
#include <shellapi.h>
#include <winsvc.h>
#include "wine/test.h" #include "wine/test.h"
...@@ -2188,7 +2191,7 @@ static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime, ...@@ -2188,7 +2191,7 @@ static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime,
DWORD attrs; DWORD attrs;
BOOL res; BOOL res;
handle = CreateFile(pszName, GENERIC_READ, FILE_SHARE_READ, NULL, handle = CreateFileA(pszName, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL); OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL);
ok(handle != INVALID_HANDLE_VALUE, "Failed to CreateFile %s\n", pszName); ok(handle != INVALID_HANDLE_VALUE, "Failed to CreateFile %s\n", pszName);
...@@ -2199,7 +2202,7 @@ static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime, ...@@ -2199,7 +2202,7 @@ static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime,
FileTimeToLocalFileTime(&finfo.ftLastWriteTime, &filetime); FileTimeToLocalFileTime(&finfo.ftLastWriteTime, &filetime);
FileTimeToDosDateTime(&filetime, pdate, ptime); FileTimeToDosDateTime(&filetime, pdate, ptime);
attrs = GetFileAttributes(pszName); attrs = GetFileAttributesA(pszName);
ok(attrs != INVALID_FILE_ATTRIBUTES, "Failed to GetFileAttributes\n"); ok(attrs != INVALID_FILE_ATTRIBUTES, "Failed to GetFileAttributes\n");
return (INT_PTR)handle; return (INT_PTR)handle;
...@@ -2254,7 +2257,7 @@ static void create_cab_file(const CHAR *name, DWORD max_size, const CHAR *files) ...@@ -2254,7 +2257,7 @@ static void create_cab_file(const CHAR *name, DWORD max_size, const CHAR *files)
{ {
res = add_file(hfci, ptr, tcompTYPE_MSZIP); res = add_file(hfci, ptr, tcompTYPE_MSZIP);
ok(res, "Failed to add file: %s\n", ptr); ok(res, "Failed to add file: %s\n", ptr);
ptr += lstrlen(ptr) + 1; ptr += lstrlenA(ptr) + 1;
} }
res = FCIFlushCabinet(hfci, FALSE, get_next_cabinet, progress); res = FCIFlushCabinet(hfci, FALSE, get_next_cabinet, progress);
...@@ -2269,7 +2272,7 @@ static BOOL get_user_dirs(void) ...@@ -2269,7 +2272,7 @@ static BOOL get_user_dirs(void)
HKEY hkey; HKEY hkey;
DWORD type, size; DWORD type, size;
if (RegOpenKey(HKEY_CURRENT_USER, if (RegOpenKeyA(HKEY_CURRENT_USER,
"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", &hkey)) "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", &hkey))
return FALSE; return FALSE;
...@@ -2289,7 +2292,7 @@ static BOOL get_system_dirs(void) ...@@ -2289,7 +2292,7 @@ static BOOL get_system_dirs(void)
HKEY hkey; HKEY hkey;
DWORD type, size; DWORD type, size;
if (RegOpenKey(HKEY_LOCAL_MACHINE, if (RegOpenKeyA(HKEY_LOCAL_MACHINE,
"Software\\Microsoft\\Windows\\CurrentVersion", &hkey)) "Software\\Microsoft\\Windows\\CurrentVersion", &hkey))
return FALSE; return FALSE;
...@@ -2392,7 +2395,7 @@ static void delete_test_files(void) ...@@ -2392,7 +2395,7 @@ static void delete_test_files(void)
static void write_file(const CHAR *filename, const char *data, int data_size) static void write_file(const CHAR *filename, const char *data, int data_size)
{ {
DWORD size; DWORD size;
HANDLE hf = CreateFile(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); HANDLE hf = CreateFileA(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
WriteFile(hf, data, data_size, &size, NULL); WriteFile(hf, data, data_size, &size, NULL);
CloseHandle(hf); CloseHandle(hf);
} }
...@@ -2496,7 +2499,7 @@ static LONG delete_key( HKEY key, LPCSTR subkey, REGSAM access ) ...@@ -2496,7 +2499,7 @@ static LONG delete_key( HKEY key, LPCSTR subkey, REGSAM access )
static BOOL file_exists(LPCSTR file) static BOOL file_exists(LPCSTR file)
{ {
return GetFileAttributes(file) != INVALID_FILE_ATTRIBUTES; return GetFileAttributesA(file) != INVALID_FILE_ATTRIBUTES;
} }
static BOOL pf_exists(LPCSTR file) static BOOL pf_exists(LPCSTR file)
...@@ -2512,7 +2515,7 @@ static BOOL pf_exists(LPCSTR file) ...@@ -2512,7 +2515,7 @@ static BOOL pf_exists(LPCSTR file)
static void delete_pfmsitest_files(void) static void delete_pfmsitest_files(void)
{ {
SHFILEOPSTRUCT shfl; SHFILEOPSTRUCTA shfl;
CHAR path[MAX_PATH+11]; CHAR path[MAX_PATH+11];
lstrcpyA(path, PROG_FILES_DIR); lstrcpyA(path, PROG_FILES_DIR);
...@@ -2525,7 +2528,7 @@ static void delete_pfmsitest_files(void) ...@@ -2525,7 +2528,7 @@ static void delete_pfmsitest_files(void)
shfl.pTo = NULL; shfl.pTo = NULL;
shfl.fFlags = FOF_FILESONLY | FOF_NOCONFIRMATION | FOF_NORECURSION | FOF_SILENT | FOF_NOERRORUI; shfl.fFlags = FOF_FILESONLY | FOF_NOCONFIRMATION | FOF_NORECURSION | FOF_SILENT | FOF_NOERRORUI;
SHFileOperation(&shfl); SHFileOperationA(&shfl);
lstrcpyA(path, PROG_FILES_DIR); lstrcpyA(path, PROG_FILES_DIR);
lstrcatA(path, "\\msitest"); lstrcatA(path, "\\msitest");
...@@ -2701,7 +2704,7 @@ static void test_register_product(void) ...@@ -2701,7 +2704,7 @@ static void test_register_product(void)
return; return;
get_date_str(date); get_date_str(date);
GetTempPath(MAX_PATH, temp); GetTempPathA(MAX_PATH, temp);
CreateDirectoryA("msitest", NULL); CreateDirectoryA("msitest", NULL);
create_file("msitest\\maximus", 500); create_file("msitest\\maximus", 500);
...@@ -2941,14 +2944,28 @@ static void test_register_product(void) ...@@ -2941,14 +2944,28 @@ static void test_register_product(void)
RegCloseKey(hkey); RegCloseKey(hkey);
error: error:
DeleteFile(msifile); DeleteFileA(msifile);
DeleteFile("msitest\\maximus"); DeleteFileA("msitest\\maximus");
RemoveDirectory("msitest"); RemoveDirectoryA("msitest");
HeapFree(GetProcessHeap(), 0, usersid); HeapFree(GetProcessHeap(), 0, usersid);
} }
static void test_publish_product(void) static void test_publish_product(void)
{ {
static const char prodpath[] =
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\%s\\Products"
"\\84A88FD7F6998CE40A22FB59F6B9C2BB";
static const char cuprodpath[] =
"Software\\Microsoft\\Installer\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB";
static const char cuupgrades[] =
"Software\\Microsoft\\Installer\\UpgradeCodes\\51AAE0C44620A5E4788506E91F249BD2";
static const char badprod[] =
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Products"
"\\84A88FD7F6998CE40A22FB59F6B9C2BB";
static const char machprod[] =
"Software\\Classes\\Installer\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB";
static const char machup[] =
"Software\\Classes\\Installer\\UpgradeCodes\\51AAE0C44620A5E4788506E91F249BD2";
UINT r; UINT r;
LONG res; LONG res;
LPSTR usersid; LPSTR usersid;
...@@ -2960,19 +2977,6 @@ static void test_publish_product(void) ...@@ -2960,19 +2977,6 @@ static void test_publish_product(void)
BOOL old_installer = FALSE; BOOL old_installer = FALSE;
REGSAM access = KEY_ALL_ACCESS; REGSAM access = KEY_ALL_ACCESS;
static const CHAR prodpath[] = "Software\\Microsoft\\Windows\\CurrentVersion"
"\\Installer\\UserData\\%s\\Products"
"\\84A88FD7F6998CE40A22FB59F6B9C2BB";
static const CHAR cuprodpath[] = "Software\\Microsoft\\Installer\\Products"
"\\84A88FD7F6998CE40A22FB59F6B9C2BB";
static const CHAR cuupgrades[] = "Software\\Microsoft\\Installer\\UpgradeCodes"
"\\51AAE0C44620A5E4788506E91F249BD2";
static const CHAR badprod[] = "Software\\Microsoft\\Windows\\CurrentVersion"
"\\Installer\\Products"
"\\84A88FD7F6998CE40A22FB59F6B9C2BB";
static const CHAR machprod[] = "Software\\Classes\\Installer\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB";
static const CHAR machup[] = "Software\\Classes\\Installer\\UpgradeCodes\\51AAE0C44620A5E4788506E91F249BD2";
if (is_process_limited()) if (is_process_limited())
{ {
skip("process is limited\n"); skip("process is limited\n");
...@@ -2982,7 +2986,7 @@ static void test_publish_product(void) ...@@ -2982,7 +2986,7 @@ static void test_publish_product(void)
if (!(usersid = get_user_sid())) if (!(usersid = get_user_sid()))
return; return;
GetTempPath(MAX_PATH, temp); GetTempPathA(MAX_PATH, temp);
CreateDirectoryA("msitest", NULL); CreateDirectoryA("msitest", NULL);
create_file("msitest\\maximus", 500); create_file("msitest\\maximus", 500);
...@@ -3181,14 +3185,26 @@ machprod: ...@@ -3181,14 +3185,26 @@ machprod:
RegCloseKey(hkey); RegCloseKey(hkey);
error: error:
DeleteFile(msifile); DeleteFileA(msifile);
DeleteFile("msitest\\maximus"); DeleteFileA("msitest\\maximus");
RemoveDirectory("msitest"); RemoveDirectoryA("msitest");
HeapFree(GetProcessHeap(), 0, usersid); HeapFree(GetProcessHeap(), 0, usersid);
} }
static void test_publish_features(void) static void test_publish_features(void)
{ {
static const char cupath[] =
"Software\\Microsoft\\Installer\\Features\\84A88FD7F6998CE40A22FB59F6B9C2BB";
static const char udfeatpath[] =
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\%s\\Products"
"\\84A88FD7F6998CE40A22FB59F6B9C2BB\\Features";
static const char udpridpath[] =
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\%s\\Products"
"\\84A88FD7F6998CE40A22FB59F6B9C2BB";
static const char featkey[] =
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Features";
static const char classfeat[] =
"Software\\Classes\\Installer\\Features\\84A88FD7F6998CE40A22FB59F6B9C2BB";
UINT r; UINT r;
LONG res; LONG res;
HKEY hkey; HKEY hkey;
...@@ -3196,19 +3212,6 @@ static void test_publish_features(void) ...@@ -3196,19 +3212,6 @@ static void test_publish_features(void)
CHAR keypath[MAX_PATH]; CHAR keypath[MAX_PATH];
REGSAM access = KEY_ALL_ACCESS; REGSAM access = KEY_ALL_ACCESS;
static const CHAR cupath[] = "Software\\Microsoft\\Installer\\Features"
"\\84A88FD7F6998CE40A22FB59F6B9C2BB";
static const CHAR udfeatpath[] = "Software\\Microsoft\\Windows\\CurrentVersion"
"\\Installer\\UserData\\%s\\Products"
"\\84A88FD7F6998CE40A22FB59F6B9C2BB\\Features";
static const CHAR udpridpath[] = "Software\\Microsoft\\Windows\\CurrentVersion"
"\\Installer\\UserData\\%s\\Products"
"\\84A88FD7F6998CE40A22FB59F6B9C2BB";
static const CHAR featkey[] = "Software\\Microsoft\\Windows\\CurrentVersion"
"\\Installer\\Features";
static const CHAR classfeat[] = "Software\\Classes\\Installer\\Features"
"\\84A88FD7F6998CE40A22FB59F6B9C2BB";
if (is_process_limited()) if (is_process_limited())
{ {
skip("process is limited\n"); skip("process is limited\n");
...@@ -3307,9 +3310,9 @@ static void test_publish_features(void) ...@@ -3307,9 +3310,9 @@ static void test_publish_features(void)
delete_key(HKEY_LOCAL_MACHINE, keypath, access); delete_key(HKEY_LOCAL_MACHINE, keypath, access);
error: error:
DeleteFile(msifile); DeleteFileA(msifile);
DeleteFile("msitest\\maximus"); DeleteFileA("msitest\\maximus");
RemoveDirectory("msitest"); RemoveDirectoryA("msitest");
HeapFree(GetProcessHeap(), 0, usersid); HeapFree(GetProcessHeap(), 0, usersid);
} }
...@@ -3467,14 +3470,18 @@ error: ...@@ -3467,14 +3470,18 @@ error:
HeapFree(GetProcessHeap(), 0, company); HeapFree(GetProcessHeap(), 0, company);
HeapFree(GetProcessHeap(), 0, owner); HeapFree(GetProcessHeap(), 0, owner);
DeleteFile(msifile); DeleteFileA(msifile);
DeleteFile("msitest\\maximus"); DeleteFileA("msitest\\maximus");
RemoveDirectory("msitest"); RemoveDirectoryA("msitest");
LocalFree(usersid); LocalFree(usersid);
} }
static void test_process_components(void) static void test_process_components(void)
{ {
static const char keyfmt[] =
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\%s\\Components\\%s";
static const char compkey[] =
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Components";
UINT r; UINT r;
LONG res; LONG res;
DWORD size; DWORD size;
...@@ -3485,12 +3492,6 @@ static void test_process_components(void) ...@@ -3485,12 +3492,6 @@ static void test_process_components(void)
CHAR program_files_maximus[MAX_PATH]; CHAR program_files_maximus[MAX_PATH];
REGSAM access = KEY_ALL_ACCESS; REGSAM access = KEY_ALL_ACCESS;
static const CHAR keyfmt[] =
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\"
"UserData\\%s\\Components\\%s";
static const CHAR compkey[] =
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Components";
if (is_process_limited()) if (is_process_limited())
{ {
skip("process is limited\n"); skip("process is limited\n");
...@@ -3604,9 +3605,9 @@ static void test_process_components(void) ...@@ -3604,9 +3605,9 @@ static void test_process_components(void)
RegCloseKey(comp); RegCloseKey(comp);
error: error:
DeleteFile(msifile); DeleteFileA(msifile);
DeleteFile("msitest\\maximus"); DeleteFileA("msitest\\maximus");
RemoveDirectory("msitest"); RemoveDirectoryA("msitest");
LocalFree(usersid); LocalFree(usersid);
} }
...@@ -3634,7 +3635,7 @@ static void test_publish(void) ...@@ -3634,7 +3635,7 @@ static void test_publish(void)
} }
get_date_str(date); get_date_str(date);
GetTempPath(MAX_PATH, temp); GetTempPathA(MAX_PATH, temp);
if (is_wow64) if (is_wow64)
access |= KEY_WOW64_64KEY; access |= KEY_WOW64_64KEY;
...@@ -3655,10 +3656,10 @@ static void test_publish(void) ...@@ -3655,10 +3656,10 @@ static void test_publish(void)
MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
state = MsiQueryProductState(prodcode); state = MsiQueryProductStateA(prodcode);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
state = MsiQueryFeatureState(prodcode, "feature"); state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
state = 0xdead; state = 0xdead;
...@@ -3685,10 +3686,10 @@ static void test_publish(void) ...@@ -3685,10 +3686,10 @@ static void test_publish(void)
ok(state == 0xdead, "got %d\n", state); ok(state == 0xdead, "got %d\n", state);
ok(error == ERROR_SUCCESS, "got %u\n", error); ok(error == ERROR_SUCCESS, "got %u\n", error);
state = MsiQueryFeatureState(prodcode, "feature"); state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
state = MsiQueryFeatureState(prodcode, "montecristo"); state = MsiQueryFeatureStateA(prodcode, "montecristo");
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
...@@ -3710,13 +3711,13 @@ static void test_publish(void) ...@@ -3710,13 +3711,13 @@ static void test_publish(void)
ok(pf_exists("msitest\\maximus"), "File not installed\n"); ok(pf_exists("msitest\\maximus"), "File not installed\n");
ok(pf_exists("msitest"), "File not installed\n"); ok(pf_exists("msitest"), "File not installed\n");
state = MsiQueryProductState(prodcode); state = MsiQueryProductStateA(prodcode);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
state = MsiQueryFeatureState(prodcode, "feature"); state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
state = MsiQueryFeatureState(prodcode, "montecristo"); state = MsiQueryFeatureStateA(prodcode, "montecristo");
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
...@@ -3733,13 +3734,13 @@ static void test_publish(void) ...@@ -3733,13 +3734,13 @@ static void test_publish(void)
ok(pf_exists("msitest\\maximus"), "File not installed\n"); ok(pf_exists("msitest\\maximus"), "File not installed\n");
ok(pf_exists("msitest"), "File not installed\n"); ok(pf_exists("msitest"), "File not installed\n");
state = MsiQueryProductState(prodcode); state = MsiQueryProductStateA(prodcode);
ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
state = MsiQueryFeatureState(prodcode, "feature"); state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
state = MsiQueryFeatureState(prodcode, "montecristo"); state = MsiQueryFeatureStateA(prodcode, "montecristo");
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
...@@ -3794,13 +3795,13 @@ static void test_publish(void) ...@@ -3794,13 +3795,13 @@ static void test_publish(void)
ok(pf_exists("msitest\\maximus"), "File deleted\n"); ok(pf_exists("msitest\\maximus"), "File deleted\n");
ok(pf_exists("msitest"), "File deleted\n"); ok(pf_exists("msitest"), "File deleted\n");
state = MsiQueryProductState(prodcode); state = MsiQueryProductStateA(prodcode);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
state = MsiQueryFeatureState(prodcode, "feature"); state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
state = MsiQueryFeatureState(prodcode, "montecristo"); state = MsiQueryFeatureStateA(prodcode, "montecristo");
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
...@@ -3817,10 +3818,10 @@ static void test_publish(void) ...@@ -3817,10 +3818,10 @@ static void test_publish(void)
ok(pf_exists("msitest\\maximus"), "File not installed\n"); ok(pf_exists("msitest\\maximus"), "File not installed\n");
ok(pf_exists("msitest"), "File not installed\n"); ok(pf_exists("msitest"), "File not installed\n");
state = MsiQueryProductState(prodcode); state = MsiQueryProductStateA(prodcode);
ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
state = MsiQueryFeatureState(prodcode, "feature"); state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
state = 0xdead; state = 0xdead;
...@@ -3847,7 +3848,7 @@ static void test_publish(void) ...@@ -3847,7 +3848,7 @@ static void test_publish(void)
ok(state == INSTALLSTATE_LOCAL, "got %d\n", state); ok(state == INSTALLSTATE_LOCAL, "got %d\n", state);
ok(error == ERROR_SUCCESS, "got %u\n", error); ok(error == ERROR_SUCCESS, "got %u\n", error);
state = MsiQueryFeatureState(prodcode, "montecristo"); state = MsiQueryFeatureStateA(prodcode, "montecristo");
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
...@@ -3901,13 +3902,13 @@ static void test_publish(void) ...@@ -3901,13 +3902,13 @@ static void test_publish(void)
ok(!pf_exists("msitest\\maximus"), "File not deleted\n"); ok(!pf_exists("msitest\\maximus"), "File not deleted\n");
ok(!pf_exists("msitest"), "Directory not deleted\n"); ok(!pf_exists("msitest"), "Directory not deleted\n");
state = MsiQueryProductState(prodcode); state = MsiQueryProductStateA(prodcode);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
state = MsiQueryFeatureState(prodcode, "feature"); state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
state = MsiQueryFeatureState(prodcode, "montecristo"); state = MsiQueryFeatureStateA(prodcode, "montecristo");
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
...@@ -3924,13 +3925,13 @@ static void test_publish(void) ...@@ -3924,13 +3925,13 @@ static void test_publish(void)
ok(pf_exists("msitest\\maximus"), "File not installed\n"); ok(pf_exists("msitest\\maximus"), "File not installed\n");
ok(pf_exists("msitest"), "File not installed\n"); ok(pf_exists("msitest"), "File not installed\n");
state = MsiQueryProductState(prodcode); state = MsiQueryProductStateA(prodcode);
ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
state = MsiQueryFeatureState(prodcode, "feature"); state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
state = MsiQueryFeatureState(prodcode, "montecristo"); state = MsiQueryFeatureStateA(prodcode, "montecristo");
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
...@@ -3984,13 +3985,13 @@ static void test_publish(void) ...@@ -3984,13 +3985,13 @@ static void test_publish(void)
ok(pf_exists("msitest\\maximus"), "File deleted\n"); ok(pf_exists("msitest\\maximus"), "File deleted\n");
ok(pf_exists("msitest"), "Directory deleted\n"); ok(pf_exists("msitest"), "Directory deleted\n");
state = MsiQueryProductState(prodcode); state = MsiQueryProductStateA(prodcode);
ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
state = MsiQueryFeatureState(prodcode, "feature"); state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
state = MsiQueryFeatureState(prodcode, "montecristo"); state = MsiQueryFeatureStateA(prodcode, "montecristo");
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
...@@ -4044,13 +4045,13 @@ static void test_publish(void) ...@@ -4044,13 +4045,13 @@ static void test_publish(void)
ok(pf_exists("msitest\\maximus"), "File not installed\n"); ok(pf_exists("msitest\\maximus"), "File not installed\n");
ok(pf_exists("msitest"), "File not installed\n"); ok(pf_exists("msitest"), "File not installed\n");
state = MsiQueryProductState(prodcode); state = MsiQueryProductStateA(prodcode);
ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
state = MsiQueryFeatureState(prodcode, "feature"); state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
state = MsiQueryFeatureState(prodcode, "montecristo"); state = MsiQueryFeatureStateA(prodcode, "montecristo");
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
...@@ -4104,13 +4105,13 @@ static void test_publish(void) ...@@ -4104,13 +4105,13 @@ static void test_publish(void)
ok(!pf_exists("msitest\\maximus"), "File not deleted\n"); ok(!pf_exists("msitest\\maximus"), "File not deleted\n");
ok(!pf_exists("msitest"), "Directory not deleted\n"); ok(!pf_exists("msitest"), "Directory not deleted\n");
state = MsiQueryProductState(prodcode); state = MsiQueryProductStateA(prodcode);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
state = MsiQueryFeatureState(prodcode, "feature"); state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
state = MsiQueryFeatureState(prodcode, "montecristo"); state = MsiQueryFeatureStateA(prodcode, "montecristo");
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
...@@ -4127,13 +4128,13 @@ static void test_publish(void) ...@@ -4127,13 +4128,13 @@ static void test_publish(void)
ok(pf_exists("msitest\\maximus"), "File not installed\n"); ok(pf_exists("msitest\\maximus"), "File not installed\n");
ok(pf_exists("msitest"), "File not installed\n"); ok(pf_exists("msitest"), "File not installed\n");
state = MsiQueryProductState(prodcode); state = MsiQueryProductStateA(prodcode);
ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
state = MsiQueryFeatureState(prodcode, "feature"); state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
state = MsiQueryFeatureState(prodcode, "montecristo"); state = MsiQueryFeatureStateA(prodcode, "montecristo");
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
...@@ -4187,13 +4188,13 @@ static void test_publish(void) ...@@ -4187,13 +4188,13 @@ static void test_publish(void)
ok(!pf_exists("msitest\\maximus"), "File not deleted\n"); ok(!pf_exists("msitest\\maximus"), "File not deleted\n");
ok(!pf_exists("msitest"), "Directory not deleted\n"); ok(!pf_exists("msitest"), "Directory not deleted\n");
state = MsiQueryProductState(prodcode); state = MsiQueryProductStateA(prodcode);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
state = MsiQueryFeatureState(prodcode, "feature"); state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
state = MsiQueryFeatureState(prodcode, "montecristo"); state = MsiQueryFeatureStateA(prodcode, "montecristo");
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
...@@ -4210,9 +4211,9 @@ static void test_publish(void) ...@@ -4210,9 +4211,9 @@ static void test_publish(void)
error: error:
RegCloseKey(uninstall); RegCloseKey(uninstall);
RegCloseKey(uninstall_32node); RegCloseKey(uninstall_32node);
DeleteFile(msifile); DeleteFileA(msifile);
DeleteFile("msitest\\maximus"); DeleteFileA("msitest\\maximus");
RemoveDirectory("msitest"); RemoveDirectoryA("msitest");
} }
static void test_publish_sourcelist(void) static void test_publish_sourcelist(void)
...@@ -4255,7 +4256,7 @@ static void test_publish_sourcelist(void) ...@@ -4255,7 +4256,7 @@ static void test_publish_sourcelist(void)
size = MAX_PATH; size = MAX_PATH;
lstrcpyA(value, "aaa"); lstrcpyA(value, "aaa");
r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, value, &size); MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAMEA, value, &size);
ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size); ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size);
ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value); ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value);
...@@ -4277,7 +4278,7 @@ static void test_publish_sourcelist(void) ...@@ -4277,7 +4278,7 @@ static void test_publish_sourcelist(void)
size = MAX_PATH; size = MAX_PATH;
lstrcpyA(value, "aaa"); lstrcpyA(value, "aaa");
r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, value, &size); MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAMEA, value, &size);
ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size); ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size);
ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value); ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value);
...@@ -4299,7 +4300,7 @@ static void test_publish_sourcelist(void) ...@@ -4299,7 +4300,7 @@ static void test_publish_sourcelist(void)
size = MAX_PATH; size = MAX_PATH;
lstrcpyA(value, "aaa"); lstrcpyA(value, "aaa");
r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, value, &size); MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAMEA, value, &size);
ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size); ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size);
ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value); ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value);
...@@ -4321,7 +4322,7 @@ static void test_publish_sourcelist(void) ...@@ -4321,7 +4322,7 @@ static void test_publish_sourcelist(void)
size = MAX_PATH; size = MAX_PATH;
lstrcpyA(value, "aaa"); lstrcpyA(value, "aaa");
r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, value, &size); MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAMEA, value, &size);
ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size); ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size);
ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value); ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value);
...@@ -4343,7 +4344,7 @@ static void test_publish_sourcelist(void) ...@@ -4343,7 +4344,7 @@ static void test_publish_sourcelist(void)
size = MAX_PATH; size = MAX_PATH;
lstrcpyA(value, "aaa"); lstrcpyA(value, "aaa");
r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, value, &size); MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAMEA, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, "msitest.msi"), "Expected 'msitest.msi', got %s\n", value); ok(!lstrcmpA(value, "msitest.msi"), "Expected 'msitest.msi', got %s\n", value);
ok(size == 11, "Expected 11, got %d\n", size); ok(size == 11, "Expected 11, got %d\n", size);
...@@ -4351,7 +4352,7 @@ static void test_publish_sourcelist(void) ...@@ -4351,7 +4352,7 @@ static void test_publish_sourcelist(void)
size = MAX_PATH; size = MAX_PATH;
lstrcpyA(value, "aaa"); lstrcpyA(value, "aaa");
r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT, INSTALLPROPERTY_MEDIAPACKAGEPATH, value, &size); MSICODE_PRODUCT, INSTALLPROPERTY_MEDIAPACKAGEPATHA, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, ""), "Expected \"\", got \"%s\"\n", value); ok(!lstrcmpA(value, ""), "Expected \"\", got \"%s\"\n", value);
ok(size == 0, "Expected 0, got %d\n", size); ok(size == 0, "Expected 0, got %d\n", size);
...@@ -4359,7 +4360,7 @@ static void test_publish_sourcelist(void) ...@@ -4359,7 +4360,7 @@ static void test_publish_sourcelist(void)
size = MAX_PATH; size = MAX_PATH;
lstrcpyA(value, "aaa"); lstrcpyA(value, "aaa");
r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT, INSTALLPROPERTY_DISKPROMPT, value, &size); MSICODE_PRODUCT, INSTALLPROPERTY_DISKPROMPTA, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, ""), "Expected \"\", got \"%s\"\n", value); ok(!lstrcmpA(value, ""), "Expected \"\", got \"%s\"\n", value);
ok(size == 0, "Expected 0, got %d\n", size); ok(size == 0, "Expected 0, got %d\n", size);
...@@ -4370,7 +4371,7 @@ static void test_publish_sourcelist(void) ...@@ -4370,7 +4371,7 @@ static void test_publish_sourcelist(void)
size = MAX_PATH; size = MAX_PATH;
lstrcpyA(value, "aaa"); lstrcpyA(value, "aaa");
r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCE, value, &size); MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCEA, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, path), "Expected \"%s\", got \"%s\"\n", path, value); ok(!lstrcmpA(value, path), "Expected \"%s\", got \"%s\"\n", path, value);
ok(size == lstrlenA(path), "Expected %d, got %d\n", lstrlenA(path), size); ok(size == lstrlenA(path), "Expected %d, got %d\n", lstrlenA(path), size);
...@@ -4378,7 +4379,7 @@ static void test_publish_sourcelist(void) ...@@ -4378,7 +4379,7 @@ static void test_publish_sourcelist(void)
size = MAX_PATH; size = MAX_PATH;
lstrcpyA(value, "aaa"); lstrcpyA(value, "aaa");
r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDTYPE, value, &size); MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDTYPEA, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, "n"), "Expected \"n\", got \"%s\"\n", value); ok(!lstrcmpA(value, "n"), "Expected \"n\", got \"%s\"\n", value);
ok(size == 1, "Expected 1, got %d\n", size); ok(size == 1, "Expected 1, got %d\n", size);
...@@ -4417,9 +4418,9 @@ static void test_publish_sourcelist(void) ...@@ -4417,9 +4418,9 @@ static void test_publish_sourcelist(void)
delete_pfmsitest_files(); delete_pfmsitest_files();
error: error:
DeleteFile(msifile); DeleteFileA(msifile);
DeleteFile("msitest\\maximus"); DeleteFileA("msitest\\maximus");
RemoveDirectory("msitest"); RemoveDirectoryA("msitest");
} }
static void create_pf_data(LPCSTR file, LPCSTR data, BOOL is_file) static void create_pf_data(LPCSTR file, LPCSTR data, BOOL is_file)
...@@ -4565,11 +4566,11 @@ static void test_remove_files(void) ...@@ -4565,11 +4566,11 @@ static void test_remove_files(void)
delete_pf("msitest", FALSE); delete_pf("msitest", FALSE);
error: error:
DeleteFile(msifile); DeleteFileA(msifile);
DeleteFile("msitest\\hydrogen"); DeleteFileA("msitest\\hydrogen");
DeleteFile("msitest\\helium"); DeleteFileA("msitest\\helium");
DeleteFile("msitest\\lithium"); DeleteFileA("msitest\\lithium");
RemoveDirectory("msitest"); RemoveDirectoryA("msitest");
} }
static void test_move_files(void) static void test_move_files(void)
...@@ -4690,33 +4691,33 @@ static void test_move_files(void) ...@@ -4690,33 +4691,33 @@ static void test_move_files(void)
ok(DeleteFileA("bird"), "File moved\n"); ok(DeleteFileA("bird"), "File moved\n");
error: error:
DeleteFile("cameroon"); DeleteFileA("cameroon");
DeleteFile("djibouti"); DeleteFileA("djibouti");
DeleteFile("egypt"); DeleteFileA("egypt");
DeleteFile("finland"); DeleteFileA("finland");
DeleteFile("gambai"); DeleteFileA("gambai");
DeleteFile("honduras"); DeleteFileA("honduras");
DeleteFile("japan"); DeleteFileA("japan");
DeleteFile("kenya"); DeleteFileA("kenya");
DeleteFile("nauru"); DeleteFileA("nauru");
DeleteFile("peru"); DeleteFileA("peru");
DeleteFile("apple"); DeleteFileA("apple");
DeleteFile("application"); DeleteFileA("application");
DeleteFile("ape"); DeleteFileA("ape");
DeleteFile("foo"); DeleteFileA("foo");
DeleteFile("fao"); DeleteFileA("fao");
DeleteFile("fbod"); DeleteFileA("fbod");
DeleteFile("budding"); DeleteFileA("budding");
DeleteFile("buddy"); DeleteFileA("buddy");
DeleteFile("bud"); DeleteFileA("bud");
DeleteFile("bar"); DeleteFileA("bar");
DeleteFile("bur"); DeleteFileA("bur");
DeleteFile("bird"); DeleteFileA("bird");
DeleteFile("msitest\\india"); DeleteFileA("msitest\\india");
DeleteFile("msitest\\augustus"); DeleteFileA("msitest\\augustus");
RemoveDirectory("latvia"); RemoveDirectoryA("latvia");
RemoveDirectory("msitest"); RemoveDirectoryA("msitest");
DeleteFile(msifile); DeleteFileA(msifile);
} }
static void test_duplicate_files(void) static void test_duplicate_files(void)
...@@ -4753,9 +4754,9 @@ static void test_duplicate_files(void) ...@@ -4753,9 +4754,9 @@ static void test_duplicate_files(void)
ok(delete_pf("msitest", FALSE), "Directory not created\n"); ok(delete_pf("msitest", FALSE), "Directory not created\n");
error: error:
DeleteFile("msitest\\maximus"); DeleteFileA("msitest\\maximus");
RemoveDirectory("msitest"); RemoveDirectoryA("msitest");
DeleteFile(msifile); DeleteFileA(msifile);
} }
static void test_write_registry_values(void) static void test_write_registry_values(void)
...@@ -4909,9 +4910,9 @@ static void test_write_registry_values(void) ...@@ -4909,9 +4910,9 @@ static void test_write_registry_values(void)
RegDeleteKeyA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest"); RegDeleteKeyA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest");
error: error:
DeleteFile(msifile); DeleteFileA(msifile);
DeleteFile("msitest\\augustus"); DeleteFileA("msitest\\augustus");
RemoveDirectory("msitest"); RemoveDirectoryA("msitest");
} }
static void test_envvar(void) static void test_envvar(void)
...@@ -4971,7 +4972,7 @@ static void test_envvar(void) ...@@ -4971,7 +4972,7 @@ static void test_envvar(void)
res = RegQueryValueExA(env, "MSITESTVAR1", NULL, &type, (LPBYTE)buffer, &size); res = RegQueryValueExA(env, "MSITESTVAR1", NULL, &type, (LPBYTE)buffer, &size);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
ok(type == REG_SZ, "Expected REG_SZ, got %u\n", type); ok(type == REG_SZ, "Expected REG_SZ, got %u\n", type);
ok(!lstrcmp(buffer, "1"), "Expected \"1\", got %s\n", buffer); ok(!lstrcmpA(buffer, "1"), "Expected \"1\", got %s\n", buffer);
res = RegDeleteValueA(env, "MSITESTVAR1"); res = RegDeleteValueA(env, "MSITESTVAR1");
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
...@@ -4982,7 +4983,7 @@ static void test_envvar(void) ...@@ -4982,7 +4983,7 @@ static void test_envvar(void)
res = RegQueryValueExA(env, "MSITESTVAR2", NULL, &type, (LPBYTE)buffer, &size); res = RegQueryValueExA(env, "MSITESTVAR2", NULL, &type, (LPBYTE)buffer, &size);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
ok(type == REG_SZ, "Expected REG_SZ, got %u\n", type); ok(type == REG_SZ, "Expected REG_SZ, got %u\n", type);
ok(!lstrcmp(buffer, "1"), "Expected \"1\", got %s\n", buffer); ok(!lstrcmpA(buffer, "1"), "Expected \"1\", got %s\n", buffer);
res = RegDeleteValueA(env, "MSITESTVAR2"); res = RegDeleteValueA(env, "MSITESTVAR2");
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
...@@ -5023,7 +5024,7 @@ static void test_envvar(void) ...@@ -5023,7 +5024,7 @@ static void test_envvar(void)
res = RegQueryValueExA(env, name, NULL, &type, (LPBYTE)buffer, &size); res = RegQueryValueExA(env, name, NULL, &type, (LPBYTE)buffer, &size);
ok(res == ERROR_SUCCESS, "%d: Expected ERROR_SUCCESS, got %d\n", i, res); ok(res == ERROR_SUCCESS, "%d: Expected ERROR_SUCCESS, got %d\n", i, res);
ok(type == REG_SZ, "%d: Expected REG_SZ, got %u\n", i, type); ok(type == REG_SZ, "%d: Expected REG_SZ, got %u\n", i, type);
ok(!lstrcmp(buffer, results[i - 11]), "%d: Expected %s, got %s\n", i, results[i - 11], buffer); ok(!lstrcmpA(buffer, results[i - 11]), "%d: Expected %s, got %s\n", i, results[i - 11], buffer);
res = RegDeleteValueA(env, name); res = RegDeleteValueA(env, name);
ok(res == ERROR_SUCCESS, "%d: Expected ERROR_SUCCESS, got %d\n", i, res); ok(res == ERROR_SUCCESS, "%d: Expected ERROR_SUCCESS, got %d\n", i, res);
...@@ -5050,7 +5051,7 @@ error: ...@@ -5050,7 +5051,7 @@ error:
RegCloseKey(env); RegCloseKey(env);
delete_test_files(); delete_test_files();
DeleteFile(msifile); DeleteFileA(msifile);
} }
static void test_create_remove_folder(void) static void test_create_remove_folder(void)
...@@ -5103,7 +5104,7 @@ error: ...@@ -5103,7 +5104,7 @@ error:
RemoveDirectoryA("msitest\\first"); RemoveDirectoryA("msitest\\first");
RemoveDirectoryA("msitest\\second"); RemoveDirectoryA("msitest\\second");
RemoveDirectoryA("msitest"); RemoveDirectoryA("msitest");
DeleteFile(msifile); DeleteFileA(msifile);
} }
static void test_start_services(void) static void test_start_services(void)
...@@ -5113,7 +5114,7 @@ static void test_start_services(void) ...@@ -5113,7 +5114,7 @@ static void test_start_services(void)
BOOL ret; BOOL ret;
DWORD error = ERROR_SUCCESS; DWORD error = ERROR_SUCCESS;
scm = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); scm = OpenSCManagerA(NULL, NULL, SC_MANAGER_ALL_ACCESS);
if (!scm && GetLastError() == ERROR_ACCESS_DENIED) if (!scm && GetLastError() == ERROR_ACCESS_DENIED)
{ {
skip("Not enough rights to perform tests\n"); skip("Not enough rights to perform tests\n");
...@@ -5122,7 +5123,7 @@ static void test_start_services(void) ...@@ -5122,7 +5123,7 @@ static void test_start_services(void)
ok(scm != NULL, "Failed to open the SC Manager\n"); ok(scm != NULL, "Failed to open the SC Manager\n");
if (!scm) return; if (!scm) return;
service = OpenService(scm, "Spooler", SC_MANAGER_ALL_ACCESS); service = OpenServiceA(scm, "Spooler", SC_MANAGER_ALL_ACCESS);
if (!service && GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST) if (!service && GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST)
{ {
win_skip("The 'Spooler' service does not exist\n"); win_skip("The 'Spooler' service does not exist\n");
...@@ -5135,7 +5136,7 @@ static void test_start_services(void) ...@@ -5135,7 +5136,7 @@ static void test_start_services(void)
return; return;
} }
ret = StartService(service, 0, NULL); ret = StartServiceA(service, 0, NULL);
if (!ret && (error = GetLastError()) != ERROR_SERVICE_ALREADY_RUNNING) if (!ret && (error = GetLastError()) != ERROR_SERVICE_ALREADY_RUNNING)
{ {
skip("Spooler service not available, skipping test\n"); skip("Spooler service not available, skipping test\n");
...@@ -5170,14 +5171,14 @@ static void test_start_services(void) ...@@ -5170,14 +5171,14 @@ static void test_start_services(void)
ok(delete_pf("msitest", FALSE), "Directory not created\n"); ok(delete_pf("msitest", FALSE), "Directory not created\n");
delete_test_files(); delete_test_files();
DeleteFile(msifile); DeleteFileA(msifile);
if (error == ERROR_SUCCESS) if (error == ERROR_SUCCESS)
{ {
SERVICE_STATUS status; SERVICE_STATUS status;
scm = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); scm = OpenSCManagerA(NULL, NULL, SC_MANAGER_ALL_ACCESS);
service = OpenService(scm, "Spooler", SC_MANAGER_ALL_ACCESS); service = OpenServiceA(scm, "Spooler", SC_MANAGER_ALL_ACCESS);
ret = ControlService(service, SERVICE_CONTROL_STOP, &status); ret = ControlService(service, SERVICE_CONTROL_STOP, &status);
ok(ret, "ControlService failed %u\n", GetLastError()); ok(ret, "ControlService failed %u\n", GetLastError());
...@@ -5199,7 +5200,7 @@ static void test_delete_services(void) ...@@ -5199,7 +5200,7 @@ static void test_delete_services(void)
return; return;
} }
manager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); manager = OpenSCManagerA(NULL, NULL, SC_MANAGER_ALL_ACCESS);
ok(manager != NULL, "can't open service manager %u\n", GetLastError()); ok(manager != NULL, "can't open service manager %u\n", GetLastError());
if (!manager) return; if (!manager) return;
...@@ -5224,7 +5225,7 @@ static void test_delete_services(void) ...@@ -5224,7 +5225,7 @@ static void test_delete_services(void)
} }
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
manager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); manager = OpenSCManagerA(NULL, NULL, SC_MANAGER_ALL_ACCESS);
ok(manager != NULL, "can't open service manager\n"); ok(manager != NULL, "can't open service manager\n");
if (!manager) goto error; if (!manager) goto error;
...@@ -5253,7 +5254,7 @@ static void test_delete_services(void) ...@@ -5253,7 +5254,7 @@ static void test_delete_services(void)
error: error:
delete_test_files(); delete_test_files();
DeleteFile(msifile); DeleteFileA(msifile);
} }
static void test_self_registration(void) static void test_self_registration(void)
...@@ -5295,7 +5296,7 @@ static void test_self_registration(void) ...@@ -5295,7 +5296,7 @@ static void test_self_registration(void)
error: error:
delete_test_files(); delete_test_files();
DeleteFile(msifile); DeleteFileA(msifile);
} }
static void test_register_font(void) static void test_register_font(void)
...@@ -5351,7 +5352,7 @@ static void test_register_font(void) ...@@ -5351,7 +5352,7 @@ static void test_register_font(void)
error: error:
DeleteFileA("msitest\\font.ttf"); DeleteFileA("msitest\\font.ttf");
delete_test_files(); delete_test_files();
DeleteFile(msifile); DeleteFileA(msifile);
} }
static void test_validate_product_id(void) static void test_validate_product_id(void)
...@@ -5402,7 +5403,7 @@ static void test_validate_product_id(void) ...@@ -5402,7 +5403,7 @@ static void test_validate_product_id(void)
error: error:
delete_test_files(); delete_test_files();
DeleteFile(msifile); DeleteFileA(msifile);
} }
static void test_install_remove_odbc(void) static void test_install_remove_odbc(void)
...@@ -5456,7 +5457,7 @@ error: ...@@ -5456,7 +5457,7 @@ error:
DeleteFileA("msitest\\ODBCtranslator2.dll"); DeleteFileA("msitest\\ODBCtranslator2.dll");
DeleteFileA("msitest\\ODBCsetup.dll"); DeleteFileA("msitest\\ODBCsetup.dll");
delete_test_files(); delete_test_files();
DeleteFile(msifile); DeleteFileA(msifile);
} }
static void test_register_typelib(void) static void test_register_typelib(void)
...@@ -5495,7 +5496,7 @@ static void test_register_typelib(void) ...@@ -5495,7 +5496,7 @@ static void test_register_typelib(void)
error: error:
DeleteFileA("msitest\\typelib.dll"); DeleteFileA("msitest\\typelib.dll");
delete_test_files(); delete_test_files();
DeleteFile(msifile); DeleteFileA(msifile);
} }
static void test_create_remove_shortcut(void) static void test_create_remove_shortcut(void)
...@@ -5535,7 +5536,7 @@ static void test_create_remove_shortcut(void) ...@@ -5535,7 +5536,7 @@ static void test_create_remove_shortcut(void)
error: error:
DeleteFileA("msitest\\target.txt"); DeleteFileA("msitest\\target.txt");
delete_test_files(); delete_test_files();
DeleteFile(msifile); DeleteFileA(msifile);
} }
static void test_publish_components(void) static void test_publish_components(void)
...@@ -5586,7 +5587,7 @@ static void test_publish_components(void) ...@@ -5586,7 +5587,7 @@ static void test_publish_components(void)
error: error:
DeleteFileA("msitest\\english.txt"); DeleteFileA("msitest\\english.txt");
delete_test_files(); delete_test_files();
DeleteFile(msifile); DeleteFileA(msifile);
} }
static void test_remove_duplicate_files(void) static void test_remove_duplicate_files(void)
...@@ -5636,7 +5637,7 @@ error: ...@@ -5636,7 +5637,7 @@ error:
DeleteFileA("msitest\\original2.txt"); DeleteFileA("msitest\\original2.txt");
DeleteFileA("msitest\\original3.txt"); DeleteFileA("msitest\\original3.txt");
delete_test_files(); delete_test_files();
DeleteFile(msifile); DeleteFileA(msifile);
} }
static void test_remove_registry_values(void) static void test_remove_registry_values(void)
...@@ -5755,7 +5756,7 @@ error: ...@@ -5755,7 +5756,7 @@ error:
DeleteFileA("msitest\\registry.txt"); DeleteFileA("msitest\\registry.txt");
delete_test_files(); delete_test_files();
DeleteFile(msifile); DeleteFileA(msifile);
} }
static void test_find_related_products(void) static void test_find_related_products(void)
...@@ -5795,7 +5796,7 @@ static void test_find_related_products(void) ...@@ -5795,7 +5796,7 @@ static void test_find_related_products(void)
error: error:
DeleteFileA("msitest\\product.txt"); DeleteFileA("msitest\\product.txt");
delete_test_files(); delete_test_files();
DeleteFile(msifile); DeleteFileA(msifile);
} }
static void test_remove_ini_values(void) static void test_remove_ini_values(void)
...@@ -5861,7 +5862,7 @@ static void test_remove_ini_values(void) ...@@ -5861,7 +5862,7 @@ static void test_remove_ini_values(void)
error: error:
DeleteFileA("msitest\\inifile.txt"); DeleteFileA("msitest\\inifile.txt");
delete_test_files(); delete_test_files();
DeleteFile(msifile); DeleteFileA(msifile);
} }
static void test_remove_env_strings(void) static void test_remove_env_strings(void)
...@@ -5912,7 +5913,7 @@ static void test_remove_env_strings(void) ...@@ -5912,7 +5913,7 @@ static void test_remove_env_strings(void)
res = RegQueryValueExA(key, "MSITESTVAR1", NULL, &type, (LPBYTE)buffer, &size); res = RegQueryValueExA(key, "MSITESTVAR1", NULL, &type, (LPBYTE)buffer, &size);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
ok(type == REG_SZ, "expected REG_SZ, got %u\n", type); ok(type == REG_SZ, "expected REG_SZ, got %u\n", type);
ok(!lstrcmp(buffer, "1"), "expected \"1\", got \"%s\"\n", buffer); ok(!lstrcmpA(buffer, "1"), "expected \"1\", got \"%s\"\n", buffer);
type = REG_NONE; type = REG_NONE;
buffer[0] = 0; buffer[0] = 0;
...@@ -5920,7 +5921,7 @@ static void test_remove_env_strings(void) ...@@ -5920,7 +5921,7 @@ static void test_remove_env_strings(void)
res = RegQueryValueExA(key, "MSITESTVAR2", NULL, &type, (LPBYTE)buffer, &size); res = RegQueryValueExA(key, "MSITESTVAR2", NULL, &type, (LPBYTE)buffer, &size);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
ok(type == REG_SZ, "expected REG_SZ, got %u\n", type); ok(type == REG_SZ, "expected REG_SZ, got %u\n", type);
ok(!lstrcmp(buffer, "1"), "expected \"1\", got \"%s\"\n", buffer); ok(!lstrcmpA(buffer, "1"), "expected \"1\", got \"%s\"\n", buffer);
type = REG_NONE; type = REG_NONE;
buffer[0] = 0; buffer[0] = 0;
...@@ -5928,7 +5929,7 @@ static void test_remove_env_strings(void) ...@@ -5928,7 +5929,7 @@ static void test_remove_env_strings(void)
res = RegQueryValueExA(key, "MSITESTVAR3", NULL, &type, (LPBYTE)buffer, &size); res = RegQueryValueExA(key, "MSITESTVAR3", NULL, &type, (LPBYTE)buffer, &size);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
ok(type == REG_SZ, "expected REG_SZ, got %u\n", type); ok(type == REG_SZ, "expected REG_SZ, got %u\n", type);
ok(!lstrcmp(buffer, "1"), "expected \"1\", got \"%s\"\n", buffer); ok(!lstrcmpA(buffer, "1"), "expected \"1\", got \"%s\"\n", buffer);
type = REG_NONE; type = REG_NONE;
buffer[0] = 0; buffer[0] = 0;
...@@ -5936,7 +5937,7 @@ static void test_remove_env_strings(void) ...@@ -5936,7 +5937,7 @@ static void test_remove_env_strings(void)
res = RegQueryValueExA(key, "MSITESTVAR4", NULL, &type, (LPBYTE)buffer, &size); res = RegQueryValueExA(key, "MSITESTVAR4", NULL, &type, (LPBYTE)buffer, &size);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
ok(type == REG_SZ, "expected REG_SZ, got %u\n", type); ok(type == REG_SZ, "expected REG_SZ, got %u\n", type);
ok(!lstrcmp(buffer, "1"), "expected \"1\", got \"%s\"\n", buffer); ok(!lstrcmpA(buffer, "1"), "expected \"1\", got \"%s\"\n", buffer);
type = REG_NONE; type = REG_NONE;
buffer[0] = 0; buffer[0] = 0;
...@@ -5944,7 +5945,7 @@ static void test_remove_env_strings(void) ...@@ -5944,7 +5945,7 @@ static void test_remove_env_strings(void)
res = RegQueryValueExA(key, "MSITESTVAR5", NULL, &type, (LPBYTE)buffer, &size); res = RegQueryValueExA(key, "MSITESTVAR5", NULL, &type, (LPBYTE)buffer, &size);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
ok(type == REG_SZ, "expected REG_SZ, got %u\n", type); ok(type == REG_SZ, "expected REG_SZ, got %u\n", type);
ok(!lstrcmp(buffer, "1"), "expected \"1\", got \"%s\"\n", buffer); ok(!lstrcmpA(buffer, "1"), "expected \"1\", got \"%s\"\n", buffer);
RegCloseKey(key); RegCloseKey(key);
...@@ -5966,7 +5967,7 @@ static void test_remove_env_strings(void) ...@@ -5966,7 +5967,7 @@ static void test_remove_env_strings(void)
res = RegQueryValueExA(key, "MSITESTVAR3", NULL, &type, (LPBYTE)buffer, &size); res = RegQueryValueExA(key, "MSITESTVAR3", NULL, &type, (LPBYTE)buffer, &size);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
ok(type == REG_SZ, "expected REG_SZ, got %u\n", type); ok(type == REG_SZ, "expected REG_SZ, got %u\n", type);
ok(!lstrcmp(buffer, "1"), "expected \"1\", got \"%s\"\n", buffer); ok(!lstrcmpA(buffer, "1"), "expected \"1\", got \"%s\"\n", buffer);
RegDeleteValueA(key, "MSITESTVAR3"); RegDeleteValueA(key, "MSITESTVAR3");
res = RegQueryValueExA(key, "MSITESTVAR4", NULL, NULL, NULL, NULL); res = RegQueryValueExA(key, "MSITESTVAR4", NULL, NULL, NULL, NULL);
...@@ -5978,7 +5979,7 @@ static void test_remove_env_strings(void) ...@@ -5978,7 +5979,7 @@ static void test_remove_env_strings(void)
res = RegQueryValueExA(key, "MSITESTVAR5", NULL, &type, (LPBYTE)buffer, &size); res = RegQueryValueExA(key, "MSITESTVAR5", NULL, &type, (LPBYTE)buffer, &size);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
ok(type == REG_SZ, "expected REG_SZ, got %u\n", type); ok(type == REG_SZ, "expected REG_SZ, got %u\n", type);
ok(!lstrcmp(buffer, "1"), "expected \"1\", got \"%s\"\n", buffer); ok(!lstrcmpA(buffer, "1"), "expected \"1\", got \"%s\"\n", buffer);
RegDeleteValueA(key, "MSITESTVAR5"); RegDeleteValueA(key, "MSITESTVAR5");
ok(!delete_pf("msitest\\envvar.txt", TRUE), "file not removed\n"); ok(!delete_pf("msitest\\envvar.txt", TRUE), "file not removed\n");
...@@ -5994,7 +5995,7 @@ error: ...@@ -5994,7 +5995,7 @@ error:
DeleteFileA("msitest\\envvar.txt"); DeleteFileA("msitest\\envvar.txt");
delete_test_files(); delete_test_files();
DeleteFile(msifile); DeleteFileA(msifile);
} }
static void test_register_class_info(void) static void test_register_class_info(void)
...@@ -6059,7 +6060,7 @@ static void test_register_class_info(void) ...@@ -6059,7 +6060,7 @@ static void test_register_class_info(void)
error: error:
DeleteFileA("msitest\\class.txt"); DeleteFileA("msitest\\class.txt");
delete_test_files(); delete_test_files();
DeleteFile(msifile); DeleteFileA(msifile);
} }
static void test_register_extension_info(void) static void test_register_extension_info(void)
...@@ -6111,7 +6112,7 @@ static void test_register_extension_info(void) ...@@ -6111,7 +6112,7 @@ static void test_register_extension_info(void)
error: error:
DeleteFileA("msitest\\extension.txt"); DeleteFileA("msitest\\extension.txt");
delete_test_files(); delete_test_files();
DeleteFile(msifile); DeleteFileA(msifile);
} }
static void test_register_mime_info(void) static void test_register_mime_info(void)
...@@ -6156,7 +6157,7 @@ static void test_register_mime_info(void) ...@@ -6156,7 +6157,7 @@ static void test_register_mime_info(void)
error: error:
DeleteFileA("msitest\\mime.txt"); DeleteFileA("msitest\\mime.txt");
delete_test_files(); delete_test_files();
DeleteFile(msifile); DeleteFileA(msifile);
} }
static void test_publish_assemblies(void) static void test_publish_assemblies(void)
...@@ -6369,7 +6370,7 @@ done: ...@@ -6369,7 +6370,7 @@ done:
DeleteFileA("msitest\\application_win32.txt"); DeleteFileA("msitest\\application_win32.txt");
DeleteFileA("msitest\\application_dotnet.txt"); DeleteFileA("msitest\\application_dotnet.txt");
delete_test_files(); delete_test_files();
DeleteFile(msifile); DeleteFileA(msifile);
} }
static void test_remove_existing_products(void) static void test_remove_existing_products(void)
...@@ -6405,7 +6406,7 @@ static void test_remove_existing_products(void) ...@@ -6405,7 +6406,7 @@ static void test_remove_existing_products(void)
error: error:
DeleteFileA("msitest\\rep.txt"); DeleteFileA("msitest\\rep.txt");
delete_test_files(); delete_test_files();
DeleteFile(msifile); DeleteFileA(msifile);
} }
START_TEST(action) START_TEST(action)
...@@ -6421,7 +6422,7 @@ START_TEST(action) ...@@ -6421,7 +6422,7 @@ START_TEST(action)
pIsWow64Process(GetCurrentProcess(), &is_wow64); pIsWow64Process(GetCurrentProcess(), &is_wow64);
GetCurrentDirectoryA(MAX_PATH, prev_path); GetCurrentDirectoryA(MAX_PATH, prev_path);
GetTempPath(MAX_PATH, temp_path); GetTempPathA(MAX_PATH, temp_path);
SetCurrentDirectoryA(temp_path); SetCurrentDirectoryA(temp_path);
lstrcpyA(CURR_DIR, temp_path); lstrcpyA(CURR_DIR, temp_path);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment