Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
March 2022
- 80 participants
- 2903 messages
[PATCH 2/3] conhost: Only create the new console font once
by Hugh McMaster
Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com>
---
programs/conhost/window.c | 27 +++++++++------------------
1 file changed, 9 insertions(+), 18 deletions(-)
diff --git a/programs/conhost/window.c b/programs/conhost/window.c
index 9fc310f3111..e408a9830e1 100644
--- a/programs/conhost/window.c
+++ b/programs/conhost/window.c
@@ -1206,6 +1206,7 @@ struct dialog_info
struct console *console;
struct console_config config;
HWND dialog; /* handle to active propsheet */
+ HFONT hfont;
int font_count; /* number of fonts */
struct dialog_font_info
{
@@ -1571,7 +1572,6 @@ static int WINAPI font_enum_size( const LOGFONTW *lf, const TEXTMETRICW *tm,
static BOOL select_font( struct dialog_info *di )
{
- struct console_config config;
int font_idx, size_idx;
HFONT font, old_font;
DWORD_PTR args[2];
@@ -1588,19 +1588,20 @@ static BOOL select_font( struct dialog_info *di )
fill_logfont( &lf, di->font[size_idx].faceName,
wcslen(di->font[size_idx].faceName) * sizeof(WCHAR),
di->font[size_idx].height, di->font[size_idx].weight );
- font = select_font_config( &config, di->console->output_cp, di->console->win, &lf );
+ font = select_font_config( &di->config, di->console->output_cp, di->console->win, &lf );
if (!font) return FALSE;
- if (config.cell_height != di->font[size_idx].height)
- TRACE( "mismatched heights (%u<>%u)\n", config.cell_height, di->font[size_idx].height );
+ if (di->config.cell_height != di->font[size_idx].height)
+ TRACE( "mismatched heights (%u<>%u)\n", di->config.cell_height, di->font[size_idx].height );
old_font = (HFONT)SendDlgItemMessageW( di->dialog, IDC_FNT_PREVIEW, WM_GETFONT, 0, 0 );
SendDlgItemMessageW( di->dialog, IDC_FNT_PREVIEW, WM_SETFONT, (WPARAM)font, TRUE );
+ di->hfont = font;
if (old_font) DeleteObject( old_font );
LoadStringW( GetModuleHandleW(NULL), IDS_FNT_DISPLAY, fmt, ARRAY_SIZE(fmt) );
- args[0] = config.cell_width;
- args[1] = config.cell_height;
+ args[0] = di->config.cell_width;
+ args[1] = di->config.cell_height;
FormatMessageW( FORMAT_MESSAGE_FROM_STRING|FORMAT_MESSAGE_ARGUMENT_ARRAY,
fmt, 0, 0, buf, ARRAY_SIZE(buf), (__ms_va_list*)args );
@@ -1702,18 +1703,7 @@ static INT_PTR WINAPI font_dialog_proc( HWND dialog, UINT msg, WPARAM wparam, LP
di->dialog = dialog;
break;
case PSN_APPLY:
- val = SendDlgItemMessageW( dialog, IDC_FNT_LIST_SIZE, LB_GETCURSEL, 0, 0 );
- if (val < di->font_count)
- {
- LOGFONTW lf;
-
- fill_logfont( &lf, di->font[val].faceName,
- wcslen(di->font[val].faceName) * sizeof(WCHAR),
- di->font[val].height, di->font[val].weight );
- DeleteObject( select_font_config( &di->config, di->console->output_cp,
- di->console->win, &lf ));
- }
-
+ DeleteObject( di->hfont );
val = (GetWindowLongW( GetDlgItem( dialog, IDC_FNT_COLOR_BK ), 0 ) << 4) |
GetWindowLongW( GetDlgItem( dialog, IDC_FNT_COLOR_FG ), 0 );
di->config.attr = val;
@@ -1980,6 +1970,7 @@ static BOOL config_dialog( struct console *console, BOOL current )
prev_config = di.config;
di.font_count = 0;
di.font = NULL;
+ di.hfont = NULL;
wndclass.style = 0;
wndclass.lpfnWndProc = font_preview_proc;
--
2.35.1
March 1, 2022
[PATCH 1/3] conhost: Don't compare the console config if the user cancels the dialog
by Hugh McMaster
Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com>
---
programs/conhost/window.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/programs/conhost/window.c b/programs/conhost/window.c
index 33ffb3915ed..9fc310f3111 100644
--- a/programs/conhost/window.c
+++ b/programs/conhost/window.c
@@ -2036,7 +2036,8 @@ static BOOL config_dialog( struct console *console, BOOL current )
header.hwndParent = console->win;
header.u3.phpage = pages;
header.dwFlags = PSH_NOAPPLYNOW;
- PropertySheetW( &header );
+ if (!PropertySheetW( &header ))
+ return TRUE;
if (!memcmp( &prev_config, &di.config, sizeof(prev_config) ))
return TRUE;
--
2.35.1
March 1, 2022
[PATCH] wusa: Use CRT allocation functions.
by Hans Leidekker
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
programs/wusa/main.c | 72 ++++++++++++++++++++--------------------
programs/wusa/manifest.c | 52 ++++++++++++++---------------
programs/wusa/wusa.h | 35 +++----------------
3 files changed, 66 insertions(+), 93 deletions(-)
diff --git a/programs/wusa/main.c b/programs/wusa/main.c
index b3ab6ac523c..74dfeb68d5f 100644
--- a/programs/wusa/main.c
+++ b/programs/wusa/main.c
@@ -54,12 +54,12 @@ struct installer_state
static void * CDECL cabinet_alloc(ULONG cb)
{
- return heap_alloc(cb);
+ return malloc(cb);
}
static void CDECL cabinet_free(void *pv)
{
- heap_free(pv);
+ free(pv);
}
static INT_PTR CDECL cabinet_open(char *pszFile, int oflag, int pmode)
@@ -134,7 +134,7 @@ static WCHAR *path_combine(const WCHAR *path, const WCHAR *filename)
if (!path || !filename) return NULL;
length = lstrlenW(path) + lstrlenW(filename) + 2;
- if (!(result = heap_alloc(length * sizeof(WCHAR)))) return NULL;
+ if (!(result = malloc(length * sizeof(WCHAR)))) return NULL;
lstrcpyW(result, path);
if (result[0] && result[lstrlenW(result) - 1] != '\\') lstrcatW(result, L"\\");
@@ -146,7 +146,7 @@ static WCHAR *get_uncompressed_path(PFDINOTIFICATION pfdin)
{
WCHAR *file = strdupAtoW(pfdin->psz1);
WCHAR *path = path_combine(pfdin->pv, file);
- heap_free(file);
+ free(file);
return path;
}
@@ -187,7 +187,7 @@ static BOOL create_parent_directory(const WCHAR *filename)
ret = create_directory(path);
done:
- heap_free(path);
+ free(path);
return ret;
}
@@ -209,7 +209,7 @@ static INT_PTR cabinet_copy_file(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfd
handle = CreateFileW(file, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, attrs, NULL);
}
- heap_free(file);
+ free(file);
return (handle != INVALID_HANDLE_VALUE) ? (INT_PTR)handle : -1;
}
@@ -257,7 +257,7 @@ static BOOL extract_cabinet(const WCHAR *filename, const WCHAR *destination)
if ((filenameA = strdupWtoA(filename)))
{
ret = FDICopy(hfdi, filenameA, NULL, 0, cabinet_notify, NULL, (void *)destination);
- heap_free(filenameA);
+ free(filenameA);
}
FDIDestroy(hfdi);
@@ -271,18 +271,18 @@ static const WCHAR *create_temp_directory(struct installer_state *state)
WCHAR tmp[MAX_PATH];
if (!GetTempPathW(ARRAY_SIZE(tmp), tmp)) return NULL;
- if (!(entry = heap_alloc(sizeof(*entry)))) return NULL;
- if (!(entry->path = heap_alloc((MAX_PATH + 20) * sizeof(WCHAR))))
+ if (!(entry = malloc(sizeof(*entry)))) return NULL;
+ if (!(entry->path = malloc((MAX_PATH + 20) * sizeof(WCHAR))))
{
- heap_free(entry);
+ free(entry);
return NULL;
}
for (;;)
{
if (!GetTempFileNameW(tmp, L"msu", ++id, entry->path))
{
- heap_free(entry->path);
- heap_free(entry);
+ free(entry->path);
+ free(entry);
return NULL;
}
if (CreateDirectoryW(entry->path, NULL)) break;
@@ -300,7 +300,7 @@ static BOOL delete_directory(const WCHAR *path)
if (!(full_path = path_combine(path, L"*"))) return FALSE;
search = FindFirstFileW(full_path, &data);
- heap_free(full_path);
+ free(full_path);
if (search != INVALID_HANDLE_VALUE)
{
@@ -313,7 +313,7 @@ static BOOL delete_directory(const WCHAR *path)
delete_directory(full_path);
else
DeleteFileW(full_path);
- heap_free(full_path);
+ free(full_path);
}
while (FindNextFileW(search, &data));
FindClose(search);
@@ -332,8 +332,8 @@ static void installer_cleanup(struct installer_state *state)
{
list_remove(&tempdir->entry);
delete_directory(tempdir->path);
- heap_free(tempdir->path);
- heap_free(tempdir);
+ free(tempdir->path);
+ free(tempdir);
}
LIST_FOR_EACH_ENTRY_SAFE(assembly, assembly2, &state->assemblies, struct assembly_entry, entry)
{
@@ -377,11 +377,11 @@ static BOOL load_assemblies_from_cab(const WCHAR *filename, struct installer_sta
FIXME("Cabinet uses proprietary msdelta file compression which is not (yet) supported\n");
FIXME("Installation of msu file will most likely fail\n");
}
- heap_free(path);
+ free(path);
if (!(path = path_combine(temp_path, L"*"))) return FALSE;
search = FindFirstFileW(path, &data);
- heap_free(path);
+ free(path);
if (search != INVALID_HANDLE_VALUE)
{
@@ -393,7 +393,7 @@ static BOOL load_assemblies_from_cab(const WCHAR *filename, struct installer_sta
if (!(path = path_combine(temp_path, data.cFileName))) continue;
if ((assembly = load_manifest(path)))
list_add_tail(&state->assemblies, &assembly->entry);
- heap_free(path);
+ free(path);
}
while (FindNextFileW(search, &data));
FindClose(search);
@@ -439,13 +439,13 @@ static BOOL strbuf_init(struct strbuf *buf)
{
buf->pos = 0;
buf->len = 64;
- buf->buf = heap_alloc(buf->len * sizeof(WCHAR));
+ buf->buf = malloc(buf->len * sizeof(WCHAR));
return buf->buf != NULL;
}
static void strbuf_free(struct strbuf *buf)
{
- heap_free(buf->buf);
+ free(buf->buf);
buf->buf = NULL;
}
@@ -461,7 +461,7 @@ static BOOL strbuf_append(struct strbuf *buf, const WCHAR *str, DWORD len)
if (buf->pos + len + 1 > buf->len)
{
new_len = max(buf->pos + len + 1, buf->len * 2);
- new_buf = heap_realloc(buf->buf, new_len * sizeof(WCHAR));
+ new_buf = realloc(buf->buf, new_len * sizeof(WCHAR));
if (!new_buf)
{
strbuf_free(buf);
@@ -548,10 +548,10 @@ static WCHAR *expand_expression(struct assembly_entry *assembly, const WCHAR *ex
if (!(key = strdupWn(pos, next - pos))) goto error;
value = lookup_expression(assembly, key);
- heap_free(key);
+ free(key);
if (!value) goto error;
strbuf_append(&buf, value, ~0U);
- heap_free(value);
+ free(value);
}
strbuf_append(&buf, pos, ~0U);
@@ -597,9 +597,9 @@ static BOOL install_files_copy(struct assembly_entry *assembly, const WCHAR *sou
}
error:
- heap_free(target_path);
- heap_free(target);
- heap_free(source);
+ free(target_path);
+ free(target);
+ free(source);
return ret;
}
@@ -620,7 +620,7 @@ static BOOL install_files(struct assembly_entry *assembly, BOOL dryrun)
if (!(ret = install_files_copy(assembly, source_path, fileop, dryrun))) break;
}
- heap_free(source_path);
+ free(source_path);
return ret;
}
@@ -667,7 +667,7 @@ static BOOL install_registry_string(struct assembly_entry *assembly, HKEY key, s
ret = FALSE;
}
- heap_free(value);
+ free(value);
return ret;
}
@@ -725,7 +725,7 @@ static BOOL install_registry_multisz(struct assembly_entry *assembly, HKEY key,
ret = FALSE;
}
- heap_free(value);
+ free(value);
return ret;
}
@@ -755,7 +755,7 @@ static BYTE *parse_hex(const WCHAR *input, DWORD *size)
if (length & 1) return NULL;
length >>= 1;
- if (!(output = heap_alloc(length))) return NULL;
+ if (!(output = malloc(length))) return NULL;
for (p = output; *input; input += 2)
{
number[0] = input[0];
@@ -781,7 +781,7 @@ static BOOL install_registry_binary(struct assembly_entry *assembly, HKEY key, s
ret = FALSE;
}
- heap_free(value);
+ free(value);
return ret;
}
@@ -954,7 +954,7 @@ static BOOL install_msu(const WCHAR *filename, struct installer_state *state)
/* load all manifests from contained cabinet archives */
if (!(path = path_combine(temp_path, L"*.cab"))) goto done;
search = FindFirstFileW(path, &data);
- heap_free(path);
+ free(path);
if (search != INVALID_HANDLE_VALUE)
{
@@ -965,7 +965,7 @@ static BOOL install_msu(const WCHAR *filename, struct installer_state *state)
if (!(path = path_combine(temp_path, data.cFileName))) continue;
if (!load_assemblies_from_cab(path, state))
ERR("Failed to load all manifests from %s, ignoring\n", debugstr_w(path));
- heap_free(path);
+ free(path);
}
while (FindNextFileW(search, &data));
FindClose(search);
@@ -974,7 +974,7 @@ static BOOL install_msu(const WCHAR *filename, struct installer_state *state)
/* load all update descriptions */
if (!(path = path_combine(temp_path, L"*.xml"))) goto done;
search = FindFirstFileW(path, &data);
- heap_free(path);
+ free(path);
if (search != INVALID_HANDLE_VALUE)
{
@@ -984,7 +984,7 @@ static BOOL install_msu(const WCHAR *filename, struct installer_state *state)
if (!(path = path_combine(temp_path, data.cFileName))) continue;
if (!load_update(path, &state->updates))
ERR("Failed to load all updates from %s, ignoring\n", debugstr_w(path));
- heap_free(path);
+ free(path);
}
while (FindNextFileW(search, &data));
FindClose(search);
diff --git a/programs/wusa/manifest.c b/programs/wusa/manifest.c
index e80c11998ce..efd2845c7e2 100644
--- a/programs/wusa/manifest.c
+++ b/programs/wusa/manifest.c
@@ -32,28 +32,28 @@ WINE_DEFAULT_DEBUG_CHANNEL(wusa);
static struct dependency_entry *alloc_dependency(void)
{
- struct dependency_entry *entry = heap_alloc_zero(sizeof(*entry));
+ struct dependency_entry *entry = calloc(1, sizeof(*entry));
if (!entry) ERR("Failed to allocate memory for dependency\n");
return entry;
}
static struct fileop_entry *alloc_fileop(void)
{
- struct fileop_entry *entry = heap_alloc_zero(sizeof(*entry));
+ struct fileop_entry *entry = calloc(1, sizeof(*entry));
if (!entry) ERR("Failed to allocate memory for fileop\n");
return entry;
}
static struct registrykv_entry *alloc_registrykv(void)
{
- struct registrykv_entry *entry = heap_alloc_zero(sizeof(*entry));
+ struct registrykv_entry *entry = calloc(1, sizeof(*entry));
if (!entry) ERR("Failed to allocate memory for registrykv\n");
return entry;
}
static struct registryop_entry *alloc_registryop(void)
{
- struct registryop_entry *entry = heap_alloc_zero(sizeof(*entry));
+ struct registryop_entry *entry = calloc(1, sizeof(*entry));
if (!entry) ERR("Failed to allocate memory for registryop\n");
else
{
@@ -64,7 +64,7 @@ static struct registryop_entry *alloc_registryop(void)
static struct assembly_entry *alloc_assembly(void)
{
- struct assembly_entry *entry = heap_alloc_zero(sizeof(*entry));
+ struct assembly_entry *entry = calloc(1, sizeof(*entry));
if (!entry) ERR("Failed to allocate memory for assembly\n");
else
{
@@ -77,39 +77,39 @@ static struct assembly_entry *alloc_assembly(void)
static void clear_identity(struct assembly_identity *entry)
{
- heap_free(entry->name);
- heap_free(entry->version);
- heap_free(entry->architecture);
- heap_free(entry->language);
- heap_free(entry->pubkey_token);
+ free(entry->name);
+ free(entry->version);
+ free(entry->architecture);
+ free(entry->language);
+ free(entry->pubkey_token);
}
void free_dependency(struct dependency_entry *entry)
{
clear_identity(&entry->identity);
- heap_free(entry);
+ free(entry);
}
static void free_fileop(struct fileop_entry *entry)
{
- heap_free(entry->source);
- heap_free(entry->target);
- heap_free(entry);
+ free(entry->source);
+ free(entry->target);
+ free(entry);
}
static void free_registrykv(struct registrykv_entry *entry)
{
- heap_free(entry->name);
- heap_free(entry->value_type);
- heap_free(entry->value);
- heap_free(entry);
+ free(entry->name);
+ free(entry->value_type);
+ free(entry->value);
+ free(entry);
}
static void free_registryop(struct registryop_entry *entry)
{
struct registrykv_entry *keyvalue, *keyvalue2;
- heap_free(entry->key);
+ free(entry->key);
LIST_FOR_EACH_ENTRY_SAFE(keyvalue, keyvalue2, &entry->keyvalues, struct registrykv_entry, entry)
{
@@ -117,7 +117,7 @@ static void free_registryop(struct registryop_entry *entry)
free_registrykv(keyvalue);
}
- heap_free(entry);
+ free(entry);
}
void free_assembly(struct assembly_entry *entry)
@@ -126,8 +126,8 @@ void free_assembly(struct assembly_entry *entry)
struct fileop_entry *fileop, *fileop2;
struct registryop_entry *registryop, *registryop2;
- heap_free(entry->filename);
- heap_free(entry->displayname);
+ free(entry->filename);
+ free(entry->displayname);
clear_identity(&entry->identity);
LIST_FOR_EACH_ENTRY_SAFE(dependency, dependency2, &entry->dependencies, struct dependency_entry, entry)
@@ -146,7 +146,7 @@ void free_assembly(struct assembly_entry *entry)
free_registryop(registryop);
}
- heap_free(entry);
+ free(entry);
}
static WCHAR *get_xml_attribute(IXMLDOMElement *root, const WCHAR *name)
@@ -304,7 +304,7 @@ static BOOL read_dependent_assembly(IXMLDOMElement *root, struct assembly_identi
error:
if (child) IXMLDOMElement_Release(child);
- heap_free(dependency_type);
+ free(dependency_type);
return ret;
}
@@ -498,7 +498,7 @@ static BOOL read_registry_keys(IXMLDOMElement *child, WCHAR *tagname, void *cont
free_registryop(entry);
}
- heap_free(keyname);
+ free(keyname);
return FALSE;
}
@@ -622,7 +622,7 @@ static BOOL read_servicing(IXMLDOMElement *child, WCHAR *tagname, void *context)
else
FIXME("action %s not supported\n", debugstr_w(action));
- heap_free(action);
+ free(action);
return ret;
}
diff --git a/programs/wusa/wusa.h b/programs/wusa/wusa.h
index dcd784e7649..da679a27f07 100644
--- a/programs/wusa/wusa.h
+++ b/programs/wusa/wusa.h
@@ -78,29 +78,6 @@ void free_dependency(struct dependency_entry *entry) DECLSPEC_HIDDEN;
struct assembly_entry *load_manifest(const WCHAR *filename) DECLSPEC_HIDDEN;
BOOL load_update(const WCHAR *filename, struct list *update_list) DECLSPEC_HIDDEN;
-static void *heap_alloc(size_t len) __WINE_ALLOC_SIZE(1);
-static inline void *heap_alloc(size_t len)
-{
- return HeapAlloc(GetProcessHeap(), 0, len);
-}
-
-static void *heap_alloc_zero(size_t len) __WINE_ALLOC_SIZE(1);
-static inline void *heap_alloc_zero(size_t len)
-{
- return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
-}
-
-static void *heap_realloc(void *mem, size_t len) __WINE_ALLOC_SIZE(2);
-static inline void *heap_realloc(void *mem, size_t len)
-{
- return HeapReAlloc(GetProcessHeap(), 0, mem, len);
-}
-
-static inline BOOL heap_free(void *mem)
-{
- return HeapFree(GetProcessHeap(), 0, mem);
-}
-
static inline char *strdupWtoA(const WCHAR *str)
{
char *ret = NULL;
@@ -108,8 +85,7 @@ static inline char *strdupWtoA(const WCHAR *str)
if (!str) return ret;
len = WideCharToMultiByte(CP_ACP, 0, str, -1, NULL, 0, NULL, NULL);
- if ((ret = heap_alloc(len)))
- WideCharToMultiByte(CP_ACP, 0, str, -1, ret, len, NULL, NULL);
+ if ((ret = malloc(len))) WideCharToMultiByte(CP_ACP, 0, str, -1, ret, len, NULL, NULL);
return ret;
}
@@ -120,8 +96,7 @@ static inline WCHAR *strdupAtoW(const char *str)
if (!str) return ret;
len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
- if ((ret = heap_alloc(len * sizeof(WCHAR))))
- MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
+ if ((ret = malloc(len * sizeof(WCHAR)))) MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
return ret;
}
@@ -129,8 +104,7 @@ static inline WCHAR *strdupW(const WCHAR *str)
{
WCHAR *ret;
if (!str) return NULL;
- ret = heap_alloc((lstrlenW(str) + 1) * sizeof(WCHAR));
- if (ret) lstrcpyW(ret, str);
+ if ((ret = malloc((lstrlenW(str) + 1) * sizeof(WCHAR)))) lstrcpyW(ret, str);
return ret;
}
@@ -138,8 +112,7 @@ static inline WCHAR *strdupWn(const WCHAR *str, DWORD len)
{
WCHAR *ret;
if (!str) return NULL;
- ret = heap_alloc((len + 1) * sizeof(WCHAR));
- if (ret)
+ if ((ret = malloc((len + 1) * sizeof(WCHAR))))
{
memcpy(ret, str, len * sizeof(WCHAR));
ret[len] = 0;
--
2.30.2
March 1, 2022
Re: [PATCH 15/27] dlls/msctf/tests: enable compilation with long types
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=109501
Your paranoid android.
=== w10pro64_ar (64 bit report) ===
msctf:
inputprocessor.c:532: Test failed: Unexpected ThreadMgrEventSink_OnInitDocumentMgr sink
inputprocessor.c:583: Test failed: Unexpected ThreadMgrEventSink_OnPushContext sink
inputprocessor.c:606: Test failed: Unexpected ThreadMgrEventSink_OnPopContext sink
March 1, 2022
[PATCH] dlls/kernel32/tests/actctx.c: enable compilation with long types
by Eric Pouech
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/kernel32/tests/actctx.c | 606 +++++++++++++++++++++---------------------
1 file changed, 304 insertions(+), 302 deletions(-)
diff --git a/dlls/kernel32/tests/actctx.c b/dlls/kernel32/tests/actctx.c
index c26eb08f306..f66d01a8b16 100644
--- a/dlls/kernel32/tests/actctx.c
+++ b/dlls/kernel32/tests/actctx.c
@@ -1,3 +1,5 @@
+/* temporary for migration */
+#undef WINE_NO_LONG_TYPES
/*
* Copyright 2007 Jacek Caban for CodeWeavers
*
@@ -562,7 +564,7 @@ static BOOL create_manifest_file(const char *filename, const char *manifest, int
file = CreateFileW(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL, NULL);
- ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %u\n", GetLastError());
+ ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError());
if(file == INVALID_HANDLE_VALUE)
return FALSE;
WriteFile(file, manifest, manifest_len, &size, NULL);
@@ -574,7 +576,7 @@ static BOOL create_manifest_file(const char *filename, const char *manifest, int
GetFullPathNameW(path, ARRAY_SIZE(depmanifest_path), depmanifest_path, NULL);
file = CreateFileW(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL, NULL);
- ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %u\n", GetLastError());
+ ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError());
if(file == INVALID_HANDLE_VALUE)
return FALSE;
WriteFile(file, depmanifest, strlen(depmanifest), &size, NULL);
@@ -651,8 +653,8 @@ static void test_detailed_info(HANDLE handle, const detailed_info_t *exinfo, int
b = QueryActCtxW(0, handle, NULL, ActivationContextDetailedInformation, &detailed_info_tmp,
sizeof(detailed_info_tmp), &size);
ok_(__FILE__, line)(!b, "QueryActCtx succeeded\n");
- ok_(__FILE__, line)(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() = %u\n", GetLastError());
- ok_(__FILE__, line)(size == exsize, "size=%ld, expected %ld\n", size, exsize);
+ ok_(__FILE__, line)(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() = %lu\n", GetLastError());
+ ok_(__FILE__, line)(size == exsize, "size=%Id, expected %Id\n", size, exsize);
}else {
size = sizeof(ACTIVATION_CONTEXT_DETAILED_INFORMATION);
}
@@ -660,35 +662,35 @@ static void test_detailed_info(HANDLE handle, const detailed_info_t *exinfo, int
detailed_info = HeapAlloc(GetProcessHeap(), 0, size);
memset(detailed_info, 0xfe, size);
b = QueryActCtxW(0, handle, NULL, ActivationContextDetailedInformation, detailed_info, size, &retsize);
- ok_(__FILE__, line)(b, "QueryActCtx failed: %u\n", GetLastError());
- ok_(__FILE__, line)(retsize == exsize, "size=%ld, expected %ld\n", retsize, exsize);
+ ok_(__FILE__, line)(b, "QueryActCtx failed: %lu\n", GetLastError());
+ ok_(__FILE__, line)(retsize == exsize, "size=%Id, expected %Id\n", retsize, exsize);
- ok_(__FILE__, line)(detailed_info->dwFlags == 0, "detailed_info->dwFlags=%x\n", detailed_info->dwFlags);
+ ok_(__FILE__, line)(detailed_info->dwFlags == 0, "detailed_info->dwFlags=%lx\n", detailed_info->dwFlags);
ok_(__FILE__, line)(detailed_info->ulFormatVersion == exinfo->format_version,
- "detailed_info->ulFormatVersion=%u, expected %u\n", detailed_info->ulFormatVersion,
+ "detailed_info->ulFormatVersion=%lu, expected %lu\n", detailed_info->ulFormatVersion,
exinfo->format_version);
ok_(__FILE__, line)(exinfo->assembly_cnt_min <= detailed_info->ulAssemblyCount &&
detailed_info->ulAssemblyCount <= exinfo->assembly_cnt_max,
- "detailed_info->ulAssemblyCount=%u, expected between %u and %u\n", detailed_info->ulAssemblyCount,
+ "detailed_info->ulAssemblyCount=%lu, expected between %lu and %lu\n", detailed_info->ulAssemblyCount,
exinfo->assembly_cnt_min, exinfo->assembly_cnt_max);
ok_(__FILE__, line)(detailed_info->ulRootManifestPathType == exinfo->root_manifest_type,
- "detailed_info->ulRootManifestPathType=%u, expected %u\n",
+ "detailed_info->ulRootManifestPathType=%lu, expected %lu\n",
detailed_info->ulRootManifestPathType, exinfo->root_manifest_type);
ok_(__FILE__, line)(detailed_info->ulRootManifestPathChars ==
(exinfo->root_manifest_path ? lstrlenW(exinfo->root_manifest_path) : 0),
- "detailed_info->ulRootManifestPathChars=%u, expected %u\n",
+ "detailed_info->ulRootManifestPathChars=%lu, expected %u\n",
detailed_info->ulRootManifestPathChars,
exinfo->root_manifest_path ?lstrlenW(exinfo->root_manifest_path) : 0);
ok_(__FILE__, line)(detailed_info->ulRootConfigurationPathType == exinfo->root_config_type,
- "detailed_info->ulRootConfigurationPathType=%u, expected %u\n",
+ "detailed_info->ulRootConfigurationPathType=%lu, expected %lu\n",
detailed_info->ulRootConfigurationPathType, exinfo->root_config_type);
ok_(__FILE__, line)(detailed_info->ulRootConfigurationPathChars == 0,
- "detailed_info->ulRootConfigurationPathChars=%d\n", detailed_info->ulRootConfigurationPathChars);
+ "detailed_info->ulRootConfigurationPathChars=%ld\n", detailed_info->ulRootConfigurationPathChars);
ok_(__FILE__, line)(detailed_info->ulAppDirPathType == exinfo->app_dir_type,
- "detailed_info->ulAppDirPathType=%u, expected %u\n", detailed_info->ulAppDirPathType,
+ "detailed_info->ulAppDirPathType=%lu, expected %lu\n", detailed_info->ulAppDirPathType,
exinfo->app_dir_type);
ok_(__FILE__, line)(detailed_info->ulAppDirPathChars == (exinfo->app_dir ? lstrlenW(exinfo->app_dir) : 0),
- "detailed_info->ulAppDirPathChars=%u, expected %u\n",
+ "detailed_info->ulAppDirPathChars=%lu, expected %u\n",
detailed_info->ulAppDirPathChars, exinfo->app_dir ? lstrlenW(exinfo->app_dir) : 0);
if(exinfo->root_manifest_path) {
ok_(__FILE__, line)(detailed_info->lpRootManifestPath != NULL, "detailed_info->lpRootManifestPath == NULL\n");
@@ -789,9 +791,9 @@ static void test_info_in_assembly(HANDLE handle, DWORD id, const info_in_assembl
size = 0xdeadbeef;
b = QueryActCtxW(0, handle, &id, AssemblyDetailedInformationInActivationContext, &info_tmp, sizeof(info_tmp), &size);
ok_(__FILE__, line)(!b, "QueryActCtx succeeded\n");
- ok_(__FILE__, line)(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() = %u\n", GetLastError());
+ ok_(__FILE__, line)(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() = %lu\n", GetLastError());
- ok_(__FILE__, line)(size >= exsize, "size=%lu, expected %lu\n", size, exsize);
+ ok_(__FILE__, line)(size >= exsize, "size=%Iu, expected %Iu\n", size, exsize);
if (size == 0xdeadbeef)
{
@@ -804,52 +806,52 @@ static void test_info_in_assembly(HANDLE handle, DWORD id, const info_in_assembl
size = 0xdeadbeef;
b = QueryActCtxW(0, handle, &id, AssemblyDetailedInformationInActivationContext, info, size, &size);
- ok_(__FILE__, line)(b, "QueryActCtx failed: %u\n", GetLastError());
+ ok_(__FILE__, line)(b, "QueryActCtx failed: %lu\n", GetLastError());
if (!exinfo->manifest_path)
exsize += info->ulManifestPathLength + sizeof(WCHAR);
if (!exinfo->encoded_assembly_id)
exsize += info->ulEncodedAssemblyIdentityLength + sizeof(WCHAR);
if (exinfo->has_assembly_dir)
exsize += info->ulAssemblyDirectoryNameLength + sizeof(WCHAR);
- ok_(__FILE__, line)(size == exsize, "size=%lu, expected %lu\n", size, exsize);
+ ok_(__FILE__, line)(size == exsize, "size=%Iu, expected %Iu\n", size, exsize);
if (0) /* FIXME: flags meaning unknown */
{
- ok_(__FILE__, line)((info->ulFlags) == exinfo->flags, "info->ulFlags = %x, expected %x\n",
+ ok_(__FILE__, line)((info->ulFlags) == exinfo->flags, "info->ulFlags = %lx, expected %lx\n",
info->ulFlags, exinfo->flags);
}
if(exinfo->encoded_assembly_id) {
len = lstrlenW(exinfo->encoded_assembly_id)*sizeof(WCHAR);
ok_(__FILE__, line)(info->ulEncodedAssemblyIdentityLength == len,
- "info->ulEncodedAssemblyIdentityLength = %u, expected %u\n",
+ "info->ulEncodedAssemblyIdentityLength = %lu, expected %lu\n",
info->ulEncodedAssemblyIdentityLength, len);
} else {
ok_(__FILE__, line)(info->ulEncodedAssemblyIdentityLength != 0,
"info->ulEncodedAssemblyIdentityLength == 0\n");
}
ok_(__FILE__, line)(info->ulManifestPathType == ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE,
- "info->ulManifestPathType = %x\n", info->ulManifestPathType);
+ "info->ulManifestPathType = %lx\n", info->ulManifestPathType);
if(exinfo->manifest_path) {
len = lstrlenW(exinfo->manifest_path)*sizeof(WCHAR);
- ok_(__FILE__, line)(info->ulManifestPathLength == len, "info->ulManifestPathLength = %u, expected %u\n",
+ ok_(__FILE__, line)(info->ulManifestPathLength == len, "info->ulManifestPathLength = %lu, expected %lu\n",
info->ulManifestPathLength, len);
} else {
ok_(__FILE__, line)(info->ulManifestPathLength != 0, "info->ulManifestPathLength == 0\n");
}
ok_(__FILE__, line)(info->ulPolicyPathType == ACTIVATION_CONTEXT_PATH_TYPE_NONE,
- "info->ulPolicyPathType = %x\n", info->ulPolicyPathType);
+ "info->ulPolicyPathType = %lx\n", info->ulPolicyPathType);
ok_(__FILE__, line)(info->ulPolicyPathLength == 0,
- "info->ulPolicyPathLength = %u, expected 0\n", info->ulPolicyPathLength);
- ok_(__FILE__, line)(info->ulMetadataSatelliteRosterIndex == 0, "info->ulMetadataSatelliteRosterIndex = %x\n",
+ "info->ulPolicyPathLength = %lu, expected 0\n", info->ulPolicyPathLength);
+ ok_(__FILE__, line)(info->ulMetadataSatelliteRosterIndex == 0, "info->ulMetadataSatelliteRosterIndex = %lx\n",
info->ulMetadataSatelliteRosterIndex);
- ok_(__FILE__, line)(info->ulManifestVersionMajor == 1,"info->ulManifestVersionMajor = %x\n",
+ ok_(__FILE__, line)(info->ulManifestVersionMajor == 1,"info->ulManifestVersionMajor = %lx\n",
info->ulManifestVersionMajor);
- ok_(__FILE__, line)(info->ulManifestVersionMinor == 0, "info->ulManifestVersionMinor = %x\n",
+ ok_(__FILE__, line)(info->ulManifestVersionMinor == 0, "info->ulManifestVersionMinor = %lx\n",
info->ulManifestVersionMinor);
- ok_(__FILE__, line)(info->ulPolicyVersionMajor == 0, "info->ulPolicyVersionMajor = %x\n",
+ ok_(__FILE__, line)(info->ulPolicyVersionMajor == 0, "info->ulPolicyVersionMajor = %lx\n",
info->ulPolicyVersionMajor);
- ok_(__FILE__, line)(info->ulPolicyVersionMinor == 0, "info->ulPolicyVersionMinor = %x\n",
+ ok_(__FILE__, line)(info->ulPolicyVersionMinor == 0, "info->ulPolicyVersionMinor = %lx\n",
info->ulPolicyVersionMinor);
if(exinfo->has_assembly_dir)
ok_(__FILE__, line)(info->ulAssemblyDirectoryNameLength != 0,
@@ -899,8 +901,8 @@ static void test_file_info(HANDLE handle, ULONG assid, ULONG fileid, LPCWSTR fil
b = QueryActCtxW(0, handle, &index, FileInformationInAssemblyOfAssemblyInActivationContext, &info_tmp,
sizeof(info_tmp), &size);
ok_(__FILE__, line)(!b, "QueryActCtx succeeded\n");
- ok_(__FILE__, line)(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() = %u\n", GetLastError());
- ok_(__FILE__, line)(size == exsize, "size=%lu, expected %lu\n", size, exsize);
+ ok_(__FILE__, line)(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() = %lu\n", GetLastError());
+ ok_(__FILE__, line)(size == exsize, "size=%Iu, expected %Iu\n", size, exsize);
if(size == 0xdeadbeef)
{
@@ -912,14 +914,14 @@ static void test_file_info(HANDLE handle, ULONG assid, ULONG fileid, LPCWSTR fil
memset(info, 0xfe, size);
b = QueryActCtxW(0, handle, &index, FileInformationInAssemblyOfAssemblyInActivationContext, info, size, &size);
- ok_(__FILE__, line)(b, "QueryActCtx failed: %u\n", GetLastError());
- ok_(__FILE__, line)(!size, "size=%lu, expected 0\n", size);
+ ok_(__FILE__, line)(b, "QueryActCtx failed: %lu\n", GetLastError());
+ ok_(__FILE__, line)(!size, "size=%Iu, expected 0\n", size);
- ok_(__FILE__, line)(info->ulFlags == 2, "info->ulFlags=%x, expected 2\n", info->ulFlags);
+ ok_(__FILE__, line)(info->ulFlags == 2, "info->ulFlags=%lx, expected 2\n", info->ulFlags);
ok_(__FILE__, line)(info->ulFilenameLength == lstrlenW(filename)*sizeof(WCHAR),
- "info->ulFilenameLength=%u, expected %u*sizeof(WCHAR)\n",
+ "info->ulFilenameLength=%lu, expected %u*sizeof(WCHAR)\n",
info->ulFilenameLength, lstrlenW(filename));
- ok_(__FILE__, line)(info->ulPathLength == 0, "info->ulPathLength=%u\n", info->ulPathLength);
+ ok_(__FILE__, line)(info->ulPathLength == 0, "info->ulPathLength=%lu\n", info->ulPathLength);
ok_(__FILE__, line)(info->lpFileName != NULL, "info->lpFileName == NULL\n");
if(info->lpFileName)
ok_(__FILE__, line)(!lstrcmpiW(info->lpFileName, filename), "unexpected info->lpFileName\n");
@@ -967,14 +969,14 @@ static void test_runlevel_info(HANDLE handle, const runlevel_info_t *exinfo, int
return;
}
- ok_(__FILE__, line)(b, "QueryActCtx failed: %u\n", GetLastError());
- ok_(__FILE__, line)(retsize == size, "size=%ld, expected %ld\n", retsize, size);
+ ok_(__FILE__, line)(b, "QueryActCtx failed: %lu\n", GetLastError());
+ ok_(__FILE__, line)(retsize == size, "size=%Id, expected %Id\n", retsize, size);
- ok_(__FILE__, line)(runlevel_info.ulFlags == 0, "runlevel_info.ulFlags=%x\n", runlevel_info.ulFlags);
+ ok_(__FILE__, line)(runlevel_info.ulFlags == 0, "runlevel_info.ulFlags=%lx\n", runlevel_info.ulFlags);
ok_(__FILE__, line)(runlevel_info.RunLevel == exinfo->run_level,
"runlevel_info.RunLevel=%u, expected %u\n", runlevel_info.RunLevel, exinfo->run_level);
ok_(__FILE__, line)(runlevel_info.UiAccess == exinfo->ui_access,
- "runlevel_info.UiAccess=%u, expected %u\n", runlevel_info.UiAccess, exinfo->ui_access);
+ "runlevel_info.UiAccess=%lu, expected %lu\n", runlevel_info.UiAccess, exinfo->ui_access);
}
static HANDLE test_create(const char *file)
@@ -992,8 +994,8 @@ static HANDLE test_create(const char *file)
/* to be tested outside of this helper, including last error */
if (handle == INVALID_HANDLE_VALUE) return handle;
- ok(actctx.cbSize == sizeof(actctx), "actctx.cbSize=%d\n", actctx.cbSize);
- ok(actctx.dwFlags == 0, "actctx.dwFlags=%d\n", actctx.dwFlags);
+ ok(actctx.cbSize == sizeof(actctx), "actctx.cbSize=%ld\n", actctx.cbSize);
+ ok(actctx.dwFlags == 0, "actctx.dwFlags=%ld\n", actctx.dwFlags);
ok(actctx.lpSource == path, "actctx.lpSource=%p\n", actctx.lpSource);
ok(actctx.wProcessorArchitecture == 0,
"actctx.wProcessorArchitecture=%d\n", actctx.wProcessorArchitecture);
@@ -1030,7 +1032,7 @@ static void test_create_and_fail(const char *manifest, const char *depmanifest,
ok(handle == INVALID_HANDLE_VALUE, "Unexpected context handle %p.\n", handle);
if (handle == INVALID_HANDLE_VALUE)
- ok(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX, "Unexpected error %d.\n", GetLastError());
+ ok(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX, "Unexpected error %ld.\n", GetLastError());
}
if (handle != INVALID_HANDLE_VALUE) ReleaseActCtx( handle );
DeleteFileA("bad.manifest");
@@ -1051,7 +1053,7 @@ static void test_create_wide_and_fail(const char *manifest, BOOL fBOM)
create_wide_manifest("bad.manifest", manifest, fBOM, FALSE);
handle = CreateActCtxW(&actctx);
ok(handle == INVALID_HANDLE_VALUE, "handle != INVALID_HANDLE_VALUE\n");
- ok(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX, "GetLastError == %u\n", GetLastError());
+ ok(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX, "GetLastError == %lu\n", GetLastError());
if (handle != INVALID_HANDLE_VALUE) ReleaseActCtx( handle );
DeleteFileA("bad.manifest");
@@ -1070,7 +1072,7 @@ static void test_create_fail(void)
handle = CreateActCtxW(&actctx);
ok(handle == INVALID_HANDLE_VALUE, "handle != INVALID_HANDLE_VALUE\n");
- ok(GetLastError() == ERROR_FILE_NOT_FOUND, "GetLastError == %u\n", GetLastError());
+ ok(GetLastError() == ERROR_FILE_NOT_FOUND, "GetLastError == %lu\n", GetLastError());
trace("wrong_manifest1\n");
test_create_and_fail(wrong_manifest1, NULL, 0, FALSE);
@@ -1203,34 +1205,34 @@ static void test_find_dll_redirection(HANDLE handle, LPCWSTR libname, ULONG exid
data.cbSize = sizeof(data);
ret = FindActCtxSectionStringW(0, NULL, ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, libname, &data);
- ok_(__FILE__, line)(ret, "FindActCtxSectionStringW failed: %u\n", GetLastError());
+ ok_(__FILE__, line)(ret, "FindActCtxSectionStringW failed: %lu\n", GetLastError());
if (!ret) return;
- ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%u\n", data.cbSize);
- ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%u\n", data.ulDataFormatVersion);
+ ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%lu\n", data.cbSize);
+ ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%lu\n", data.ulDataFormatVersion);
ok_(__FILE__, line)(data.lpData != NULL, "data.lpData == NULL\n");
- ok_(__FILE__, line)(data.ulLength == offsetof( struct dllredirect_data, paths[0]), "data.ulLength=%u\n", data.ulLength);
+ ok_(__FILE__, line)(data.ulLength == offsetof( struct dllredirect_data, paths[0]), "data.ulLength=%lu\n", data.ulLength);
if (data.lpData)
{
struct dllredirect_data *dlldata = (struct dllredirect_data*)data.lpData;
ok_(__FILE__, line)(dlldata->size == offsetof( struct dllredirect_data, paths[dlldata->paths_count]),
- "got wrong size %d\n", dlldata->size);
+ "got wrong size %ld\n", dlldata->size);
ok_(__FILE__, line)(dlldata->flags == DLL_REDIRECT_PATH_OMITS_ASSEMBLY_ROOT,
- "got wrong flags value %x\n", dlldata->flags);
- ok_(__FILE__, line)(dlldata->total_len == 0, "got wrong total len value %d\n", dlldata->total_len);
- ok_(__FILE__, line)(dlldata->paths_count == 0, "got wrong paths count value %d\n", dlldata->paths_count);
- ok_(__FILE__, line)(dlldata->paths_offset == 0, "got wrong paths offset value %d\n", dlldata->paths_offset);
+ "got wrong flags value %lx\n", dlldata->flags);
+ ok_(__FILE__, line)(dlldata->total_len == 0, "got wrong total len value %ld\n", dlldata->total_len);
+ ok_(__FILE__, line)(dlldata->paths_count == 0, "got wrong paths count value %ld\n", dlldata->paths_count);
+ ok_(__FILE__, line)(dlldata->paths_offset == 0, "got wrong paths offset value %ld\n", dlldata->paths_offset);
}
ok_(__FILE__, line)(data.lpSectionGlobalData == NULL, "data.lpSectionGlobalData != NULL\n");
- ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%u\n",
+ ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%lu\n",
data.ulSectionGlobalDataLength);
ok_(__FILE__, line)(data.lpSectionBase != NULL, "data.lpSectionBase == NULL\n");
- ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%u\n",
+ ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%lu\n",
data.ulSectionTotalLength);
ok_(__FILE__, line)(data.hActCtx == NULL, "data.hActCtx=%p\n", data.hActCtx);
- ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%u, expected %u\n",
+ ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%lu, expected %lu\n",
data.ulAssemblyRosterIndex, exid);
memset(&data, 0xfe, sizeof(data));
@@ -1238,21 +1240,21 @@ static void test_find_dll_redirection(HANDLE handle, LPCWSTR libname, ULONG exid
ret = FindActCtxSectionStringW(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX, NULL,
ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, libname, &data);
- ok_(__FILE__, line)(ret, "FindActCtxSectionStringW failed: %u\n", GetLastError());
+ ok_(__FILE__, line)(ret, "FindActCtxSectionStringW failed: %lu\n", GetLastError());
if (!ret) return;
- ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%u\n", data.cbSize);
- ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%u\n", data.ulDataFormatVersion);
+ ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%lu\n", data.cbSize);
+ ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%lu\n", data.ulDataFormatVersion);
ok_(__FILE__, line)(data.lpData != NULL, "data.lpData == NULL\n");
- ok_(__FILE__, line)(data.ulLength == 20, "data.ulLength=%u\n", data.ulLength);
+ ok_(__FILE__, line)(data.ulLength == 20, "data.ulLength=%lu\n", data.ulLength);
ok_(__FILE__, line)(data.lpSectionGlobalData == NULL, "data.lpSectionGlobalData != NULL\n");
- ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%u\n",
+ ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%lu\n",
data.ulSectionGlobalDataLength);
ok_(__FILE__, line)(data.lpSectionBase != NULL, "data.lpSectionBase == NULL\n");
- ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%u\n",
+ ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%lu\n",
data.ulSectionTotalLength);
ok_(__FILE__, line)(data.hActCtx == handle, "data.hActCtx=%p\n", data.hActCtx);
- ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%u, expected %u\n",
+ ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%lu, expected %lu\n",
data.ulAssemblyRosterIndex, exid);
ReleaseActCtx(handle);
@@ -1269,19 +1271,19 @@ static void test_find_window_class(HANDLE handle, LPCWSTR clsname, ULONG exid, i
data.cbSize = sizeof(data);
ret = FindActCtxSectionStringW(0, NULL, ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, clsname, &data);
- ok_(__FILE__, line)(ret, "FindActCtxSectionStringW failed: %u, class %s\n", GetLastError(),
+ ok_(__FILE__, line)(ret, "FindActCtxSectionStringW failed: %lu, class %s\n", GetLastError(),
wine_dbgstr_w(clsname));
if (!ret) return;
header = (struct strsection_header*)data.lpSectionBase;
wnddata = (struct wndclass_redirect_data*)data.lpData;
- ok_(__FILE__, line)(header->magic == 0x64487353, "got wrong magic 0x%08x\n", header->magic);
- ok_(__FILE__, line)(header->count > 0, "got count %d\n", header->count);
- ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%u\n", data.cbSize);
- ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%u\n", data.ulDataFormatVersion);
+ ok_(__FILE__, line)(header->magic == 0x64487353, "got wrong magic 0x%08lx\n", header->magic);
+ ok_(__FILE__, line)(header->count > 0, "got count %ld\n", header->count);
+ ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%lu\n", data.cbSize);
+ ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%lu\n", data.ulDataFormatVersion);
ok_(__FILE__, line)(data.lpData != NULL, "data.lpData == NULL\n");
- ok_(__FILE__, line)(wnddata->size == sizeof(*wnddata), "got %d for header size\n", wnddata->size);
+ ok_(__FILE__, line)(wnddata->size == sizeof(*wnddata), "got %ld for header size\n", wnddata->size);
if (data.lpData && wnddata->size == sizeof(*wnddata))
{
static const WCHAR verW[] = {'6','.','5','.','4','.','3','!',0};
@@ -1289,10 +1291,10 @@ static void test_find_window_class(HANDLE handle, LPCWSTR clsname, ULONG exid, i
WCHAR *ptr;
ULONG len;
- ok_(__FILE__, line)(wnddata->res == 0, "got reserved as %d\n", wnddata->res);
+ ok_(__FILE__, line)(wnddata->res == 0, "got reserved as %ld\n", wnddata->res);
/* redirect class name (versioned or not) is stored just after header data */
- ok_(__FILE__, line)(wnddata->name_offset == wnddata->size, "got name offset as %d\n", wnddata->name_offset);
- ok_(__FILE__, line)(wnddata->module_len > 0, "got module name length as %d\n", wnddata->module_len);
+ ok_(__FILE__, line)(wnddata->name_offset == wnddata->size, "got name offset as %ld\n", wnddata->name_offset);
+ ok_(__FILE__, line)(wnddata->module_len > 0, "got module name length as %ld\n", wnddata->module_len);
/* expected versioned name */
lstrcpyW(buff, verW);
@@ -1300,11 +1302,11 @@ static void test_find_window_class(HANDLE handle, LPCWSTR clsname, ULONG exid, i
ptr = (WCHAR*)((BYTE*)wnddata + wnddata->name_offset);
ok_(__FILE__, line)(!lstrcmpW(ptr, buff), "got wrong class name %s, expected %s\n", wine_dbgstr_w(ptr), wine_dbgstr_w(buff));
ok_(__FILE__, line)(lstrlenW(ptr)*sizeof(WCHAR) == wnddata->name_len,
- "got wrong class name length %d, expected %d\n", wnddata->name_len, lstrlenW(ptr));
+ "got wrong class name length %ld, expected %d\n", wnddata->name_len, lstrlenW(ptr));
/* data length is simply header length + string data length including nulls */
len = wnddata->size + wnddata->name_len + wnddata->module_len + 2*sizeof(WCHAR);
- ok_(__FILE__, line)(data.ulLength == len, "got wrong data length %d, expected %d\n", data.ulLength, len);
+ ok_(__FILE__, line)(data.ulLength == len, "got wrong data length %ld, expected %ld\n", data.ulLength, len);
if (data.ulSectionTotalLength > wnddata->module_offset)
{
@@ -1318,13 +1320,13 @@ static void test_find_window_class(HANDLE handle, LPCWSTR clsname, ULONG exid, i
}
ok_(__FILE__, line)(data.lpSectionGlobalData == NULL, "data.lpSectionGlobalData != NULL\n");
- ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%u\n",
+ ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%lu\n",
data.ulSectionGlobalDataLength);
ok_(__FILE__, line)(data.lpSectionBase != NULL, "data.lpSectionBase == NULL\n");
- ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%u\n",
+ ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%lu\n",
data.ulSectionTotalLength);
ok_(__FILE__, line)(data.hActCtx == NULL, "data.hActCtx=%p\n", data.hActCtx);
- ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%u, expected %u\n",
+ ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%lu, expected %lu\n",
data.ulAssemblyRosterIndex, exid);
memset(&data, 0xfe, sizeof(data));
@@ -1332,21 +1334,21 @@ static void test_find_window_class(HANDLE handle, LPCWSTR clsname, ULONG exid, i
ret = FindActCtxSectionStringW(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX, NULL,
ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, clsname, &data);
- ok_(__FILE__, line)(ret, "FindActCtxSectionStringW failed: %u, class %s\n", GetLastError(),
+ ok_(__FILE__, line)(ret, "FindActCtxSectionStringW failed: %lu, class %s\n", GetLastError(),
wine_dbgstr_w(clsname));
if (!ret) return;
- ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%u\n", data.cbSize);
- ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%u\n", data.ulDataFormatVersion);
+ ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%lu\n", data.cbSize);
+ ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%lu\n", data.ulDataFormatVersion);
ok_(__FILE__, line)(data.lpData != NULL, "data.lpData == NULL\n");
- ok_(__FILE__, line)(data.ulLength > 0, "data.ulLength=%u\n", data.ulLength);
+ ok_(__FILE__, line)(data.ulLength > 0, "data.ulLength=%lu\n", data.ulLength);
ok_(__FILE__, line)(data.lpSectionGlobalData == NULL, "data.lpSectionGlobalData != NULL\n");
- ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%u\n",
+ ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%lu\n",
data.ulSectionGlobalDataLength);
ok_(__FILE__, line)(data.lpSectionBase != NULL, "data.lpSectionBase == NULL\n");
- ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%u\n", data.ulSectionTotalLength);
+ ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%lu\n", data.ulSectionTotalLength);
ok_(__FILE__, line)(data.hActCtx == handle, "data.hActCtx=%p\n", data.hActCtx);
- ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%u, expected %u\n",
+ ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%lu, expected %lu\n",
data.ulAssemblyRosterIndex, exid);
ReleaseActCtx(handle);
@@ -1359,29 +1361,29 @@ static void test_find_string_fail(void)
ret = FindActCtxSectionStringW(0, NULL, 100, testlib_dll, &data);
ok(!ret, "FindActCtxSectionStringW succeeded\n");
- ok(GetLastError() == ERROR_SXS_SECTION_NOT_FOUND, "GetLastError()=%u\n", GetLastError());
+ ok(GetLastError() == ERROR_SXS_SECTION_NOT_FOUND, "GetLastError()=%lu\n", GetLastError());
ret = FindActCtxSectionStringW(0, NULL, ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, testlib2_dll, &data);
ok(!ret, "FindActCtxSectionStringW succeeded\n");
- ok(GetLastError() == ERROR_SXS_KEY_NOT_FOUND, "GetLastError()=%u\n", GetLastError());
+ ok(GetLastError() == ERROR_SXS_KEY_NOT_FOUND, "GetLastError()=%lu\n", GetLastError());
ret = FindActCtxSectionStringW(0, NULL, ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, testlib_dll, NULL);
ok(!ret, "FindActCtxSectionStringW succeeded\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError()=%u\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError()=%lu\n", GetLastError());
ret = FindActCtxSectionStringW(0, NULL, ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, NULL, &data);
ok(!ret, "FindActCtxSectionStringW succeeded\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError()=%u\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError()=%lu\n", GetLastError());
data.cbSize = 0;
ret = FindActCtxSectionStringW(0, NULL, ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, testlib_dll, &data);
ok(!ret, "FindActCtxSectionStringW succeeded\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError()=%u\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError()=%lu\n", GetLastError());
data.cbSize = 35;
ret = FindActCtxSectionStringW(0, NULL, ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, testlib_dll, &data);
ok(!ret, "FindActCtxSectionStringW succeeded\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError()=%u\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError()=%lu\n", GetLastError());
}
@@ -1396,7 +1398,7 @@ static void test_basic_info(HANDLE handle, int line)
ok_(__FILE__, line) (b,"ActivationContextBasicInformation failed\n");
ok_(__FILE__, line) (size == sizeof(ACTIVATION_CONTEXT_BASIC_INFORMATION),"size mismatch\n");
- ok_(__FILE__, line) (basic.dwFlags == 0, "unexpected flags %x\n",basic.dwFlags);
+ ok_(__FILE__, line) (basic.dwFlags == 0, "unexpected flags %lx\n",basic.dwFlags);
ok_(__FILE__, line) (basic.hActCtx == handle, "unexpected handle\n");
b = QueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX | QUERY_ACTCTX_FLAG_NO_ADDREF, handle, NULL,
@@ -1407,14 +1409,14 @@ static void test_basic_info(HANDLE handle, int line)
ok_(__FILE__, line) (!b,"ActivationContextBasicInformation succeeded\n");
ok_(__FILE__, line) (size == 0,"size mismatch\n");
ok_(__FILE__, line) (GetLastError() == ERROR_INVALID_PARAMETER, "Wrong last error\n");
- ok_(__FILE__, line) (basic.dwFlags == 0, "unexpected flags %x\n",basic.dwFlags);
+ ok_(__FILE__, line) (basic.dwFlags == 0, "unexpected flags %lx\n",basic.dwFlags);
ok_(__FILE__, line) (basic.hActCtx == handle, "unexpected handle\n");
}
else
{
ok_(__FILE__, line) (b,"ActivationContextBasicInformation failed\n");
ok_(__FILE__, line) (size == sizeof(ACTIVATION_CONTEXT_BASIC_INFORMATION),"size mismatch\n");
- ok_(__FILE__, line) (basic.dwFlags == 0, "unexpected flags %x\n",basic.dwFlags);
+ ok_(__FILE__, line) (basic.dwFlags == 0, "unexpected flags %lx\n",basic.dwFlags);
ok_(__FILE__, line) (basic.hActCtx == handle, "unexpected handle\n");
}
}
@@ -1484,66 +1486,66 @@ static void test_find_com_redirection(HANDLE handle, const GUID *clsid, const GU
skip("failed for guid %s\n", wine_dbgstr_guid(clsid));
return;
}
- ok_(__FILE__, line)(ret, "FindActCtxSectionGuid failed: %u\n", GetLastError());
+ ok_(__FILE__, line)(ret, "FindActCtxSectionGuid failed: %lu\n", GetLastError());
comclass = (struct comclassredirect_data*)data.lpData;
- ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%u\n", data.cbSize);
- ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%u\n", data.ulDataFormatVersion);
+ ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%lu\n", data.cbSize);
+ ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%lu\n", data.ulDataFormatVersion);
ok_(__FILE__, line)(data.lpData != NULL, "data.lpData == NULL\n");
- ok_(__FILE__, line)(comclass->size == sizeof(*comclass), "got %d for header size\n", comclass->size);
+ ok_(__FILE__, line)(comclass->size == sizeof(*comclass), "got %ld for header size\n", comclass->size);
if (data.lpData && comclass->size == sizeof(*comclass))
{
ULONG len, miscmask;
WCHAR *ptr;
- ok_(__FILE__, line)(comclass->model == ThreadingModel_Neutral, "got model %d\n", comclass->model);
+ ok_(__FILE__, line)(comclass->model == ThreadingModel_Neutral, "got model %ld\n", comclass->model);
ok_(__FILE__, line)(IsEqualGUID(&comclass->clsid, clsid), "got wrong clsid %s\n", wine_dbgstr_guid(&comclass->clsid));
ok_(__FILE__, line)(IsEqualGUID(&comclass->clsid2, clsid), "got wrong clsid2 %s\n", wine_dbgstr_guid(&comclass->clsid2));
if (tlid)
ok_(__FILE__, line)(IsEqualGUID(&comclass->tlid, tlid), "got wrong tlid %s\n", wine_dbgstr_guid(&comclass->tlid));
- ok_(__FILE__, line)(comclass->name_len > 0, "got modulename len %d\n", comclass->name_len);
+ ok_(__FILE__, line)(comclass->name_len > 0, "got modulename len %ld\n", comclass->name_len);
if (progid)
{
len = comclass->size + comclass->clrdata_len;
- ok_(__FILE__, line)(comclass->progid_offset == len, "got progid offset %d, expected %d\n", comclass->progid_offset, len);
+ ok_(__FILE__, line)(comclass->progid_offset == len, "got progid offset %ld, expected %ld\n", comclass->progid_offset, len);
}
else
- ok_(__FILE__, line)(comclass->progid_offset == 0, "got progid offset %d, expected 0\n", comclass->progid_offset);
+ ok_(__FILE__, line)(comclass->progid_offset == 0, "got progid offset %ld, expected 0\n", comclass->progid_offset);
if (comclass->progid_offset)
{
ptr = (WCHAR*)((BYTE*)comclass + comclass->progid_offset);
ok_(__FILE__, line)(!lstrcmpW(ptr, progid), "got wrong progid %s, expected %s\n", wine_dbgstr_w(ptr), wine_dbgstr_w(progid));
ok_(__FILE__, line)(lstrlenW(progid)*sizeof(WCHAR) == comclass->progid_len,
- "got progid name length %d\n", comclass->progid_len);
+ "got progid name length %ld\n", comclass->progid_len);
}
/* data length is simply header length + string data length including nulls */
len = comclass->size + comclass->clrdata_len;
if (comclass->progid_len) len += comclass->progid_len + sizeof(WCHAR);
- ok_(__FILE__, line)(data.ulLength == len, "got wrong data length %d, expected %d\n", data.ulLength, len);
+ ok_(__FILE__, line)(data.ulLength == len, "got wrong data length %ld, expected %ld\n", data.ulLength, len);
/* keyed data structure doesn't include module name, it's available from section data */
- ok_(__FILE__, line)(data.ulSectionTotalLength > comclass->name_offset, "got wrong offset %d\n", comclass->name_offset);
+ ok_(__FILE__, line)(data.ulSectionTotalLength > comclass->name_offset, "got wrong offset %ld\n", comclass->name_offset);
/* check misc fields are set */
miscmask = (comclass->flags >> 8) & 0xff;
if (miscmask)
{
if (miscmask & MiscStatus)
- ok_(__FILE__, line)(comclass->miscstatus != 0, "got miscstatus 0x%08x\n", comclass->miscstatus);
+ ok_(__FILE__, line)(comclass->miscstatus != 0, "got miscstatus 0x%08lx\n", comclass->miscstatus);
if (miscmask & MiscStatusIcon)
- ok_(__FILE__, line)(comclass->miscstatusicon != 0, "got miscstatusicon 0x%08x\n", comclass->miscstatusicon);
+ ok_(__FILE__, line)(comclass->miscstatusicon != 0, "got miscstatusicon 0x%08lx\n", comclass->miscstatusicon);
if (miscmask & MiscStatusContent)
- ok_(__FILE__, line)(comclass->miscstatuscontent != 0, "got miscstatuscontent 0x%08x\n", comclass->miscstatuscontent);
+ ok_(__FILE__, line)(comclass->miscstatuscontent != 0, "got miscstatuscontent 0x%08lx\n", comclass->miscstatuscontent);
if (miscmask & MiscStatusThumbnail)
- ok_(__FILE__, line)(comclass->miscstatusthumbnail != 0, "got miscstatusthumbnail 0x%08x\n", comclass->miscstatusthumbnail);
+ ok_(__FILE__, line)(comclass->miscstatusthumbnail != 0, "got miscstatusthumbnail 0x%08lx\n", comclass->miscstatusthumbnail);
if (miscmask & MiscStatusDocPrint)
- ok_(__FILE__, line)(comclass->miscstatusdocprint != 0, "got miscstatusdocprint 0x%08x\n", comclass->miscstatusdocprint);
+ ok_(__FILE__, line)(comclass->miscstatusdocprint != 0, "got miscstatusdocprint 0x%08lx\n", comclass->miscstatusdocprint);
}
- ok_(__FILE__, line)(!(comclass->flags & 0xffff00ff), "Unexpected flags %#x.\n", comclass->flags);
+ ok_(__FILE__, line)(!(comclass->flags & 0xffff00ff), "Unexpected flags %#lx.\n", comclass->flags);
/* part used for clrClass only */
if (comclass->clrdata_len)
@@ -1554,24 +1556,24 @@ static void test_find_com_redirection(HANDLE handle, const GUID *clsid, const GU
WCHAR *ptrW;
clrclass = (struct clrclass_data*)((BYTE*)data.lpData + comclass->clrdata_offset);
- ok_(__FILE__, line)(clrclass->size == sizeof(*clrclass), "clrclass: got size %d\n", clrclass->size);
- ok_(__FILE__, line)(clrclass->res[0] == 0, "clrclass: got res[0]=0x%08x\n", clrclass->res[0]);
- ok_(__FILE__, line)(clrclass->res[1] == 2, "clrclass: got res[1]=0x%08x\n", clrclass->res[1]);
- ok_(__FILE__, line)(clrclass->module_len == lstrlenW(mscoreeW)*sizeof(WCHAR), "clrclass: got module len %d\n", clrclass->module_len);
- ok_(__FILE__, line)(clrclass->module_offset > 0, "clrclass: got module offset %d\n", clrclass->module_offset);
+ ok_(__FILE__, line)(clrclass->size == sizeof(*clrclass), "clrclass: got size %ld\n", clrclass->size);
+ ok_(__FILE__, line)(clrclass->res[0] == 0, "clrclass: got res[0]=0x%08lx\n", clrclass->res[0]);
+ ok_(__FILE__, line)(clrclass->res[1] == 2, "clrclass: got res[1]=0x%08lx\n", clrclass->res[1]);
+ ok_(__FILE__, line)(clrclass->module_len == lstrlenW(mscoreeW)*sizeof(WCHAR), "clrclass: got module len %ld\n", clrclass->module_len);
+ ok_(__FILE__, line)(clrclass->module_offset > 0, "clrclass: got module offset %ld\n", clrclass->module_offset);
- ok_(__FILE__, line)(clrclass->name_len > 0, "clrclass: got name len %d\n", clrclass->name_len);
- ok_(__FILE__, line)(clrclass->name_offset == clrclass->size, "clrclass: got name offset %d\n", clrclass->name_offset);
- ok_(__FILE__, line)(clrclass->version_len > 0, "clrclass: got version len %d\n", clrclass->version_len);
- ok_(__FILE__, line)(clrclass->version_offset > 0, "clrclass: got version offset %d\n", clrclass->version_offset);
+ ok_(__FILE__, line)(clrclass->name_len > 0, "clrclass: got name len %ld\n", clrclass->name_len);
+ ok_(__FILE__, line)(clrclass->name_offset == clrclass->size, "clrclass: got name offset %ld\n", clrclass->name_offset);
+ ok_(__FILE__, line)(clrclass->version_len > 0, "clrclass: got version len %ld\n", clrclass->version_len);
+ ok_(__FILE__, line)(clrclass->version_offset > 0, "clrclass: got version offset %ld\n", clrclass->version_offset);
- ok_(__FILE__, line)(clrclass->res2[0] == 0, "clrclass: got res2[0]=0x%08x\n", clrclass->res2[0]);
- ok_(__FILE__, line)(clrclass->res2[1] == 0, "clrclass: got res2[1]=0x%08x\n", clrclass->res2[1]);
+ ok_(__FILE__, line)(clrclass->res2[0] == 0, "clrclass: got res2[0]=0x%08lx\n", clrclass->res2[0]);
+ ok_(__FILE__, line)(clrclass->res2[1] == 0, "clrclass: got res2[1]=0x%08lx\n", clrclass->res2[1]);
/* clrClass uses mscoree.dll as module name, but in two variants - comclass data points to module name
in lower case, clsclass subsection - in upper case */
- ok_(__FILE__, line)(comclass->name_len == lstrlenW(mscoree2W)*sizeof(WCHAR), "clrclass: got com name len %d\n", comclass->name_len);
- ok_(__FILE__, line)(comclass->name_offset > 0, "clrclass: got name offset %d\n", clrclass->name_offset);
+ ok_(__FILE__, line)(comclass->name_len == lstrlenW(mscoree2W)*sizeof(WCHAR), "clrclass: got com name len %ld\n", comclass->name_len);
+ ok_(__FILE__, line)(comclass->name_offset > 0, "clrclass: got name offset %ld\n", clrclass->name_offset);
ptrW = (WCHAR*)((BYTE*)data.lpSectionBase + comclass->name_offset);
ok_(__FILE__, line)(!lstrcmpW(ptrW, mscoreeW), "clrclass: module name %s\n", wine_dbgstr_w(ptrW));
@@ -1583,23 +1585,23 @@ static void test_find_com_redirection(HANDLE handle, const GUID *clsid, const GU
header = (struct guidsection_header*)data.lpSectionBase;
ok_(__FILE__, line)(data.lpSectionGlobalData == ((BYTE*)header + header->names_offset), "data.lpSectionGlobalData == NULL\n");
- ok_(__FILE__, line)(data.ulSectionGlobalDataLength == header->names_len, "data.ulSectionGlobalDataLength=%u\n",
+ ok_(__FILE__, line)(data.ulSectionGlobalDataLength == header->names_len, "data.ulSectionGlobalDataLength=%lu\n",
data.ulSectionGlobalDataLength);
ok_(__FILE__, line)(data.lpSectionBase != NULL, "data.lpSectionBase == NULL\n");
- ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%u\n",
+ ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%lu\n",
data.ulSectionTotalLength);
ok_(__FILE__, line)(data.hActCtx == NULL, "data.hActCtx=%p\n", data.hActCtx);
- ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%u, expected %u\n",
+ ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%lu, expected %lu\n",
data.ulAssemblyRosterIndex, exid);
/* generated guid for this class works as key guid in search */
memset(&data2, 0xfe, sizeof(data2));
data2.cbSize = sizeof(data2);
ret = FindActCtxSectionGuid(0, NULL, ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION, &comclass->alias, &data2);
- ok_(__FILE__, line)(ret, "FindActCtxSectionGuid failed: %u\n", GetLastError());
+ ok_(__FILE__, line)(ret, "FindActCtxSectionGuid failed: %lu\n", GetLastError());
comclass2 = (struct comclassredirect_data*)data2.lpData;
- ok_(__FILE__, line)(comclass->size == comclass2->size, "got wrong data length %d, expected %d\n", comclass2->size, comclass->size);
+ ok_(__FILE__, line)(comclass->size == comclass2->size, "got wrong data length %ld, expected %ld\n", comclass2->size, comclass->size);
ok_(__FILE__, line)(!memcmp(comclass, comclass2, comclass->size), "got wrong data\n");
}
@@ -1632,14 +1634,14 @@ static void test_find_ifaceps_redirection(HANDLE handle, const GUID *iid, const
data.cbSize = sizeof(data);
ret = FindActCtxSectionGuid(0, NULL, ACTIVATION_CONTEXT_SECTION_COM_INTERFACE_REDIRECTION, iid, &data);
- ok_(__FILE__, line)(ret, "FindActCtxSectionGuid failed: %u\n", GetLastError());
+ ok_(__FILE__, line)(ret, "FindActCtxSectionGuid failed: %lu\n", GetLastError());
ifaceps = (struct ifacepsredirect_data*)data.lpData;
- ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%u\n", data.cbSize);
- ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%u\n", data.ulDataFormatVersion);
+ ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%lu\n", data.cbSize);
+ ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%lu\n", data.ulDataFormatVersion);
ok_(__FILE__, line)(data.lpData != NULL, "data.lpData == NULL\n");
- ok_(__FILE__, line)(ifaceps->size == sizeof(*ifaceps), "got %d for header size\n", ifaceps->size);
+ ok_(__FILE__, line)(ifaceps->size == sizeof(*ifaceps), "got %ld for header size\n", ifaceps->size);
if (data.lpData && ifaceps->size == sizeof(*ifaceps))
{
ULONG len;
@@ -1653,29 +1655,29 @@ static void test_find_ifaceps_redirection(HANDLE handle, const GUID *iid, const
ok_(__FILE__, line)(IsEqualGUID(&ifaceps->iid, iid), "got wrong iid %s\n", wine_dbgstr_guid(&ifaceps->iid));
ok_(__FILE__, line)(IsEqualGUID(&ifaceps->tlbid, tlbid), "got wrong tlid %s\n", wine_dbgstr_guid(&ifaceps->tlbid));
- ok_(__FILE__, line)(ifaceps->name_len > 0, "got modulename len %d\n", ifaceps->name_len);
- ok_(__FILE__, line)(ifaceps->name_offset == ifaceps->size, "got progid offset %d\n", ifaceps->name_offset);
+ ok_(__FILE__, line)(ifaceps->name_len > 0, "got modulename len %ld\n", ifaceps->name_len);
+ ok_(__FILE__, line)(ifaceps->name_offset == ifaceps->size, "got progid offset %ld\n", ifaceps->name_offset);
/* data length is simply header length + string data length including nulls */
len = ifaceps->size + ifaceps->name_len + sizeof(WCHAR);
- ok_(__FILE__, line)(data.ulLength == len, "got wrong data length %d, expected %d\n", data.ulLength, len);
+ ok_(__FILE__, line)(data.ulLength == len, "got wrong data length %ld, expected %ld\n", data.ulLength, len);
/* mask purpose is to indicate if attribute was specified, for testing purposes assume that manifest
always has non-zero value for it */
if (ifaceps->mask & NumMethods)
- ok_(__FILE__, line)(ifaceps->nummethods != 0, "got nummethods %d\n", ifaceps->nummethods);
+ ok_(__FILE__, line)(ifaceps->nummethods != 0, "got nummethods %ld\n", ifaceps->nummethods);
if (ifaceps->mask & BaseIface)
ok_(__FILE__, line)(IsEqualGUID(&ifaceps->base, base), "got base %s\n", wine_dbgstr_guid(&ifaceps->base));
}
ok_(__FILE__, line)(data.lpSectionGlobalData == NULL, "data.lpSectionGlobalData != NULL\n");
- ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%u\n",
+ ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%lu\n",
data.ulSectionGlobalDataLength);
ok_(__FILE__, line)(data.lpSectionBase != NULL, "data.lpSectionBase == NULL\n");
- ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%u\n",
+ ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%lu\n",
data.ulSectionTotalLength);
ok_(__FILE__, line)(data.hActCtx == NULL, "data.hActCtx=%p\n", data.hActCtx);
- ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%u, expected %u\n",
+ ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%lu, expected %lu\n",
data.ulAssemblyRosterIndex, exid);
}
@@ -1706,30 +1708,30 @@ static void test_find_surrogate(HANDLE handle, const GUID *clsid, const WCHAR *n
skip("surrogate sections are not supported\n");
return;
}
- ok_(__FILE__, line)(ret, "FindActCtxSectionGuid failed: %u\n", GetLastError());
+ ok_(__FILE__, line)(ret, "FindActCtxSectionGuid failed: %lu\n", GetLastError());
surrogate = (struct clrsurrogate_data*)data.lpData;
- ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%u\n", data.cbSize);
- ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%u\n", data.ulDataFormatVersion);
+ ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%lu\n", data.cbSize);
+ ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%lu\n", data.ulDataFormatVersion);
ok_(__FILE__, line)(data.lpData != NULL, "data.lpData == NULL\n");
- ok_(__FILE__, line)(surrogate->size == sizeof(*surrogate), "got %d for header size\n", surrogate->size);
+ ok_(__FILE__, line)(surrogate->size == sizeof(*surrogate), "got %ld for header size\n", surrogate->size);
if (data.lpData && surrogate->size == sizeof(*surrogate))
{
WCHAR *ptrW;
ULONG len;
- ok_(__FILE__, line)(surrogate->res == 0, "invalid res value %d\n", surrogate->res);
+ ok_(__FILE__, line)(surrogate->res == 0, "invalid res value %ld\n", surrogate->res);
ok_(__FILE__, line)(IsEqualGUID(&surrogate->clsid, clsid), "got wrong clsid %s\n", wine_dbgstr_guid(&surrogate->clsid));
- ok_(__FILE__, line)(surrogate->version_len == lstrlenW(version)*sizeof(WCHAR), "got version len %d\n", surrogate->version_len);
- ok_(__FILE__, line)(surrogate->version_offset == surrogate->size, "got version offset %d\n", surrogate->version_offset);
+ ok_(__FILE__, line)(surrogate->version_len == lstrlenW(version)*sizeof(WCHAR), "got version len %ld\n", surrogate->version_len);
+ ok_(__FILE__, line)(surrogate->version_offset == surrogate->size, "got version offset %ld\n", surrogate->version_offset);
- ok_(__FILE__, line)(surrogate->name_len == lstrlenW(name)*sizeof(WCHAR), "got name len %d\n", surrogate->name_len);
- ok_(__FILE__, line)(surrogate->name_offset > surrogate->version_offset, "got name offset %d\n", surrogate->name_offset);
+ ok_(__FILE__, line)(surrogate->name_len == lstrlenW(name)*sizeof(WCHAR), "got name len %ld\n", surrogate->name_len);
+ ok_(__FILE__, line)(surrogate->name_offset > surrogate->version_offset, "got name offset %ld\n", surrogate->name_offset);
len = surrogate->size + surrogate->name_len + surrogate->version_len + 2*sizeof(WCHAR);
- ok_(__FILE__, line)(data.ulLength == len, "got wrong data length %d, expected %d\n", data.ulLength, len);
+ ok_(__FILE__, line)(data.ulLength == len, "got wrong data length %ld, expected %ld\n", data.ulLength, len);
ptrW = (WCHAR*)((BYTE*)surrogate + surrogate->name_offset);
ok(!lstrcmpW(ptrW, name), "got wrong name %s\n", wine_dbgstr_w(ptrW));
@@ -1739,13 +1741,13 @@ static void test_find_surrogate(HANDLE handle, const GUID *clsid, const WCHAR *n
}
ok_(__FILE__, line)(data.lpSectionGlobalData == NULL, "data.lpSectionGlobalData != NULL\n");
- ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%u\n",
+ ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%lu\n",
data.ulSectionGlobalDataLength);
ok_(__FILE__, line)(data.lpSectionBase != NULL, "data.lpSectionBase == NULL\n");
- ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%u\n",
+ ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%lu\n",
data.ulSectionTotalLength);
ok_(__FILE__, line)(data.hActCtx == NULL, "data.hActCtx=%p\n", data.hActCtx);
- ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%u, expected %u\n",
+ ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%lu, expected %lu\n",
data.ulAssemblyRosterIndex, exid);
}
@@ -1761,20 +1763,20 @@ static void test_find_progid_redirection(HANDLE handle, const GUID *clsid, const
data.cbSize = sizeof(data);
ret = FindActCtxSectionStringA(0, NULL, ACTIVATION_CONTEXT_SECTION_COM_PROGID_REDIRECTION, progid, &data);
- ok_(__FILE__, line)(ret, "FindActCtxSectionStringA failed: %u\n", GetLastError());
+ ok_(__FILE__, line)(ret, "FindActCtxSectionStringA failed: %lu\n", GetLastError());
progiddata = (struct progidredirect_data*)data.lpData;
- ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%u\n", data.cbSize);
- ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%u\n", data.ulDataFormatVersion);
+ ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%lu\n", data.cbSize);
+ ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%lu\n", data.ulDataFormatVersion);
ok_(__FILE__, line)(data.lpData != NULL, "data.lpData == NULL\n");
- ok_(__FILE__, line)(progiddata->size == sizeof(*progiddata), "got %d for header size\n", progiddata->size);
+ ok_(__FILE__, line)(progiddata->size == sizeof(*progiddata), "got %ld for header size\n", progiddata->size);
if (data.lpData && progiddata->size == sizeof(*progiddata))
{
GUID *guid;
- ok_(__FILE__, line)(progiddata->reserved == 0, "got reserved as %d\n", progiddata->reserved);
- ok_(__FILE__, line)(progiddata->clsid_offset > 0, "got clsid_offset as %d\n", progiddata->clsid_offset);
+ ok_(__FILE__, line)(progiddata->reserved == 0, "got reserved as %ld\n", progiddata->reserved);
+ ok_(__FILE__, line)(progiddata->clsid_offset > 0, "got clsid_offset as %ld\n", progiddata->clsid_offset);
/* progid data points to generated alias guid */
guid = (GUID*)((BYTE*)data.lpSectionBase + progiddata->clsid_offset);
@@ -1782,7 +1784,7 @@ static void test_find_progid_redirection(HANDLE handle, const GUID *clsid, const
memset(&data2, 0, sizeof(data2));
data2.cbSize = sizeof(data2);
ret = FindActCtxSectionGuid(0, NULL, ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION, guid, &data2);
- ok_(__FILE__, line)(ret, "FindActCtxSectionGuid failed: %u\n", GetLastError());
+ ok_(__FILE__, line)(ret, "FindActCtxSectionGuid failed: %lu\n", GetLastError());
comclass = (struct comclassredirect_data*)data2.lpData;
ok_(__FILE__, line)(IsEqualGUID(guid, &comclass->alias), "got wrong alias referenced from progid %s, %s\n", progid, wine_dbgstr_guid(guid));
@@ -1791,11 +1793,11 @@ static void test_find_progid_redirection(HANDLE handle, const GUID *clsid, const
header = (struct strsection_header*)data.lpSectionBase;
ok_(__FILE__, line)(data.lpSectionGlobalData == (BYTE*)header + header->global_offset, "data.lpSectionGlobalData == NULL\n");
- ok_(__FILE__, line)(data.ulSectionGlobalDataLength == header->global_len, "data.ulSectionGlobalDataLength=%u\n", data.ulSectionGlobalDataLength);
+ ok_(__FILE__, line)(data.ulSectionGlobalDataLength == header->global_len, "data.ulSectionGlobalDataLength=%lu\n", data.ulSectionGlobalDataLength);
ok_(__FILE__, line)(data.lpSectionBase != NULL, "data.lpSectionBase == NULL\n");
- ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%u\n", data.ulSectionTotalLength);
+ ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%lu\n", data.ulSectionTotalLength);
ok_(__FILE__, line)(data.hActCtx == NULL, "data.hActCtx=%p\n", data.hActCtx);
- ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%u, expected %u\n",
+ ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%lu, expected %lu\n",
data.ulAssemblyRosterIndex, exid);
}
@@ -1816,14 +1818,14 @@ static void test_wndclass_section(void)
create_manifest_file("main_wndcls.manifest", manifest_wndcls_main, -1, NULL, NULL);
handle = test_create("main_wndcls.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("testdep1.manifest");
DeleteFileA("testdep2.manifest");
DeleteFileA("main_wndcls.manifest");
ret = ActivateActCtx(handle, &cookie);
- ok(ret, "ActivateActCtx failed: %u\n", GetLastError());
+ ok(ret, "ActivateActCtx failed: %lu\n", GetLastError());
memset(&data, 0, sizeof(data));
memset(&data2, 0, sizeof(data2));
@@ -1837,12 +1839,12 @@ static void test_wndclass_section(void)
ok(ret, "got %d\n", ret);
section = (struct strsection_header*)data.lpSectionBase;
- ok(section->count == 4, "got %d\n", section->count);
- ok(section->size == sizeof(*section), "got %d\n", section->size);
+ ok(section->count == 4, "got %ld\n", section->count);
+ ok(section->size == sizeof(*section), "got %ld\n", section->size);
/* For both string same section is returned, meaning it's one wndclass section per context */
ok(data.lpSectionBase == data2.lpSectionBase, "got %p, %p\n", data.lpSectionBase, data2.lpSectionBase);
- ok(data.ulSectionTotalLength == data2.ulSectionTotalLength, "got %u, %u\n", data.ulSectionTotalLength,
+ ok(data.ulSectionTotalLength == data2.ulSectionTotalLength, "got %lu, %lu\n", data.ulSectionTotalLength,
data2.ulSectionTotalLength);
/* wndClass1 is versioned, wndClass3 is not */
@@ -1855,7 +1857,7 @@ static void test_wndclass_section(void)
ok(!lstrcmpW(ptrW, wndClass3W), "got %s\n", wine_dbgstr_w(ptrW));
ret = DeactivateActCtx(0, cookie);
- ok(ret, "DeactivateActCtx failed: %u\n", GetLastError());
+ ok(ret, "DeactivateActCtx failed: %lu\n", GetLastError());
ReleaseActCtx(handle);
}
@@ -1876,14 +1878,14 @@ static void test_dllredirect_section(void)
create_manifest_file("main_wndcls.manifest", manifest_wndcls_main, -1, NULL, NULL);
handle = test_create("main_wndcls.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("testdep1.manifest");
DeleteFileA("testdep2.manifest");
DeleteFileA("main_wndcls.manifest");
ret = ActivateActCtx(handle, &cookie);
- ok(ret, "ActivateActCtx failed: %u\n", GetLastError());
+ ok(ret, "ActivateActCtx failed: %lu\n", GetLastError());
memset(&data, 0, sizeof(data));
memset(&data2, 0, sizeof(data2));
@@ -1897,16 +1899,16 @@ static void test_dllredirect_section(void)
ok(ret, "got %d\n", ret);
section = (struct strsection_header*)data.lpSectionBase;
- ok(section->count == 4, "got %d\n", section->count);
- ok(section->size == sizeof(*section), "got %d\n", section->size);
+ ok(section->count == 4, "got %ld\n", section->count);
+ ok(section->size == sizeof(*section), "got %ld\n", section->size);
/* For both string same section is returned, meaning it's one dll redirect section per context */
ok(data.lpSectionBase == data2.lpSectionBase, "got %p, %p\n", data.lpSectionBase, data2.lpSectionBase);
- ok(data.ulSectionTotalLength == data2.ulSectionTotalLength, "got %u, %u\n", data.ulSectionTotalLength,
+ ok(data.ulSectionTotalLength == data2.ulSectionTotalLength, "got %lu, %lu\n", data.ulSectionTotalLength,
data2.ulSectionTotalLength);
ret = DeactivateActCtx(0, cookie);
- ok(ret, "DeactivateActCtx failed: %u\n", GetLastError());
+ ok(ret, "DeactivateActCtx failed: %lu\n", GetLastError());
ReleaseActCtx(handle);
}
@@ -1927,14 +1929,14 @@ static void test_typelib_section(void)
create_manifest_file("main_wndcls.manifest", manifest_wndcls_main, -1, NULL, NULL);
handle = test_create("main_wndcls.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("testdep1.manifest");
DeleteFileA("testdep2.manifest");
DeleteFileA("main_wndcls.manifest");
ret = ActivateActCtx(handle, &cookie);
- ok(ret, "ActivateActCtx failed: %u\n", GetLastError());
+ ok(ret, "ActivateActCtx failed: %lu\n", GetLastError());
memset(&data, 0, sizeof(data));
memset(&data2, 0, sizeof(data2));
@@ -1950,29 +1952,29 @@ static void test_typelib_section(void)
ok(ret, "got %d\n", ret);
section = (struct guidsection_header*)data.lpSectionBase;
- ok(section->count == 4, "got %d\n", section->count);
- ok(section->size == sizeof(*section), "got %d\n", section->size);
+ ok(section->count == 4, "got %ld\n", section->count);
+ ok(section->size == sizeof(*section), "got %ld\n", section->size);
/* For both GUIDs same section is returned */
ok(data.lpSectionBase == data2.lpSectionBase, "got %p, %p\n", data.lpSectionBase, data2.lpSectionBase);
- ok(data.ulSectionTotalLength == data2.ulSectionTotalLength, "got %u, %u\n", data.ulSectionTotalLength,
+ ok(data.ulSectionTotalLength == data2.ulSectionTotalLength, "got %lu, %lu\n", data.ulSectionTotalLength,
data2.ulSectionTotalLength);
ok(data.lpSectionGlobalData == ((BYTE*)section + section->names_offset), "data.lpSectionGlobalData == NULL\n");
- ok(data.ulSectionGlobalDataLength == section->names_len, "data.ulSectionGlobalDataLength=%u\n",
+ ok(data.ulSectionGlobalDataLength == section->names_len, "data.ulSectionGlobalDataLength=%lu\n",
data.ulSectionGlobalDataLength);
/* test some actual data */
tlib = (struct tlibredirect_data*)data.lpData;
- ok(tlib->size == sizeof(*tlib), "got %d\n", tlib->size);
+ ok(tlib->size == sizeof(*tlib), "got %ld\n", tlib->size);
ok(tlib->major_version == 1, "got %d\n", tlib->major_version);
ok(tlib->minor_version == 0, "got %d\n", tlib->minor_version);
- ok(tlib->help_offset > 0, "got %d\n", tlib->help_offset);
- ok(tlib->help_len == sizeof(helpW), "got %d\n", tlib->help_len);
+ ok(tlib->help_offset > 0, "got %ld\n", tlib->help_offset);
+ ok(tlib->help_len == sizeof(helpW), "got %ld\n", tlib->help_len);
ok(tlib->flags == (LIBFLAG_FHIDDEN|LIBFLAG_FCONTROL|LIBFLAG_FRESTRICTED), "got %x\n", tlib->flags);
ret = DeactivateActCtx(0, cookie);
- ok(ret, "DeactivateActCtx failed: %u\n", GetLastError());
+ ok(ret, "DeactivateActCtx failed: %lu\n", GetLastError());
ReleaseActCtx(handle);
}
@@ -2010,7 +2012,7 @@ static void test_actctx(void)
b = GetCurrentActCtx(&handle);
ok(handle == NULL, "handle = %p, expected NULL\n", handle);
- ok(b, "GetCurrentActCtx failed: %u\n", GetLastError());
+ ok(b, "GetCurrentActCtx failed: %lu\n", GetLastError());
if(b) {
test_basic_info(handle, __LINE__);
test_detailed_info(handle, &detailed_info0, __LINE__);
@@ -2021,7 +2023,7 @@ static void test_actctx(void)
/* test for whitespace handling in Eq ::= S? '=' S? */
create_manifest_file("test1_1.manifest", manifest1_1, -1, NULL, NULL);
handle = test_create("test1_1.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("test1_1.manifest");
ReleaseActCtx(handle);
@@ -2033,7 +2035,7 @@ static void test_actctx(void)
trace("manifest1\n");
handle = test_create("test1.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("test1.manifest");
if(handle != INVALID_HANDLE_VALUE) {
test_basic_info(handle, __LINE__);
@@ -2045,7 +2047,7 @@ static void test_actctx(void)
/* CloseHandle will generate an exception if a debugger is present */
b = CloseHandle(handle);
ok(!b, "CloseHandle succeeded\n");
- ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError() == %u\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError() == %lu\n", GetLastError());
}
ReleaseActCtx(handle);
@@ -2059,7 +2061,7 @@ static void test_actctx(void)
trace("manifest2 depmanifest1\n");
handle = test_create("test2.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("test2.manifest");
DeleteFileA("testdep.manifest");
if(handle != INVALID_HANDLE_VALUE) {
@@ -2078,7 +2080,7 @@ static void test_actctx(void)
trace("manifest2 depmanifest2\n");
handle = test_create("test2-2.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("test2-2.manifest");
DeleteFileA("testdep.manifest");
if(handle != INVALID_HANDLE_VALUE) {
@@ -2090,11 +2092,11 @@ static void test_actctx(void)
test_file_info(handle, 1, 1, testlib2_dll, __LINE__);
b = ActivateActCtx(handle, &cookie);
- ok(b, "ActivateActCtx failed: %u\n", GetLastError());
+ ok(b, "ActivateActCtx failed: %lu\n", GetLastError());
test_find_dll_redirection(handle, testlib_dll, 2, __LINE__);
test_find_dll_redirection(handle, testlib2_dll, 2, __LINE__);
b = DeactivateActCtx(0, cookie);
- ok(b, "DeactivateActCtx failed: %u\n", GetLastError());
+ ok(b, "DeactivateActCtx failed: %lu\n", GetLastError());
ReleaseActCtx(handle);
}
@@ -2107,7 +2109,7 @@ static void test_actctx(void)
}
handle = test_create("test2-3.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("test2-3.manifest");
DeleteFileA("testdep.manifest");
if(handle != INVALID_HANDLE_VALUE) {
@@ -2119,13 +2121,13 @@ static void test_actctx(void)
test_file_info(handle, 1, 1, testlib2_dll, __LINE__);
b = ActivateActCtx(handle, &cookie);
- ok(b, "ActivateActCtx failed: %u\n", GetLastError());
+ ok(b, "ActivateActCtx failed: %lu\n", GetLastError());
test_find_dll_redirection(handle, testlib_dll, 2, __LINE__);
test_find_dll_redirection(handle, testlib2_dll, 2, __LINE__);
test_find_window_class(handle, wndClassW, 2, __LINE__);
test_find_window_class(handle, wndClass2W, 2, __LINE__);
b = DeactivateActCtx(0, cookie);
- ok(b, "DeactivateActCtx failed: %u\n", GetLastError());
+ ok(b, "DeactivateActCtx failed: %lu\n", GetLastError());
ReleaseActCtx(handle);
}
@@ -2139,7 +2141,7 @@ static void test_actctx(void)
handle = test_create("test3.manifest");
ok(handle != INVALID_HANDLE_VALUE || broken(handle == INVALID_HANDLE_VALUE) /* XP pre-SP2, win2k3 w/o SP */,
- "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
if (handle == INVALID_HANDLE_VALUE)
win_skip("Some activation context features not supported, skipping a test (possibly old XP/Win2k3 system\n");
DeleteFileA("test3.manifest");
@@ -2155,7 +2157,7 @@ static void test_actctx(void)
test_file_info(handle, 0, 0, testlib_dll, __LINE__);
b = ActivateActCtx(handle, &cookie);
- ok(b, "ActivateActCtx failed: %u\n", GetLastError());
+ ok(b, "ActivateActCtx failed: %lu\n", GetLastError());
test_find_dll_redirection(handle, testlib_dll, 1, __LINE__);
test_find_dll_redirection(handle, testlib_dll, 1, __LINE__);
test_find_com_redirection(handle, &IID_CoTest, &IID_TlibTest, progidW, 1, __LINE__);
@@ -2182,7 +2184,7 @@ static void test_actctx(void)
test_find_string_fail();
b = DeactivateActCtx(0, cookie);
- ok(b, "DeactivateActCtx failed: %u\n", GetLastError());
+ ok(b, "DeactivateActCtx failed: %lu\n", GetLastError());
ReleaseActCtx(handle);
}
@@ -2207,7 +2209,7 @@ static void test_actctx(void)
if(create_manifest_file("test7.manifest", manifest7, -1, NULL, NULL)) {
handle = test_create("test7.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("test7.manifest");
DeleteFileA("testdep.manifest");
if(handle != INVALID_HANDLE_VALUE)
@@ -2223,7 +2225,7 @@ static void test_actctx(void)
if(create_manifest_file("test8.manifest", manifest8, -1, NULL, NULL)) {
handle = test_create("test8.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("test8.manifest");
DeleteFileA("testdep.manifest");
if(handle != INVALID_HANDLE_VALUE)
@@ -2239,7 +2241,7 @@ static void test_actctx(void)
if(create_manifest_file("test9.manifest", manifest9, -1, NULL, NULL)) {
handle = test_create("test9.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("test9.manifest");
DeleteFileA("testdep.manifest");
if(handle != INVALID_HANDLE_VALUE)
@@ -2253,7 +2255,7 @@ static void test_actctx(void)
if(create_manifest_file("test10.manifest", manifest10, -1, NULL, NULL)) {
handle = test_create("test10.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("test10.manifest");
DeleteFileA("testdep.manifest");
if(handle != INVALID_HANDLE_VALUE)
@@ -2268,7 +2270,7 @@ static void test_actctx(void)
if (create_manifest_file("test11.manifest", manifest11, -1, NULL, NULL))
{
handle = test_create("test11.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "Failed to create activation context for %s, error %u\n",
+ ok(handle != INVALID_HANDLE_VALUE, "Failed to create activation context for %s, error %lu\n",
"manifest11", GetLastError());
DeleteFileA("test11.manifest");
if (handle != INVALID_HANDLE_VALUE)
@@ -2285,7 +2287,7 @@ static void test_actctx(void)
}
handle = test_create("test4.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("test4.manifest");
DeleteFileA("testdep.manifest");
if(handle != INVALID_HANDLE_VALUE) {
@@ -2306,7 +2308,7 @@ static void test_actctx(void)
return;
}
handle = test_create("..\\test1.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("..\\test1.manifest");
if(handle != INVALID_HANDLE_VALUE) {
test_basic_info(handle, __LINE__);
@@ -2327,7 +2329,7 @@ static void test_actctx(void)
}
handle = test_create("test1.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("test1.manifest");
if (handle != INVALID_HANDLE_VALUE) {
test_basic_info(handle, __LINE__);
@@ -2343,7 +2345,7 @@ static void test_actctx(void)
}
handle = test_create("test1.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("test1.manifest");
if (handle != INVALID_HANDLE_VALUE) {
test_basic_info(handle, __LINE__);
@@ -2367,7 +2369,7 @@ static void test_app_manifest(void)
b = GetCurrentActCtx(&handle);
ok(handle == NULL, "handle != NULL\n");
- ok(b, "GetCurrentActCtx failed: %u\n", GetLastError());
+ ok(b, "GetCurrentActCtx failed: %lu\n", GetLastError());
if(b) {
test_basic_info(handle, __LINE__);
test_detailed_info(handle, &detailed_info1_child, __LINE__);
@@ -2383,7 +2385,7 @@ static HANDLE create_manifest(const char *filename, const char *data, int line)
handle = test_create(filename);
ok_(__FILE__, line)(handle != INVALID_HANDLE_VALUE,
- "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA(filename);
return handle;
@@ -2408,7 +2410,7 @@ static void kernel32_find(ULONG section, const char *string_to_find, BOOL should
"FindActCtxSectionStringA: expected ret = %u, got %u\n", should_find, ret);
todo_wine_if(todo)
ok_(__FILE__, line)(err == (should_find ? ERROR_SUCCESS : ERROR_SXS_KEY_NOT_FOUND),
- "FindActCtxSectionStringA: unexpected error %u\n", err);
+ "FindActCtxSectionStringA: unexpected error %lu\n", err);
memset(&data, 0xfe, sizeof(data));
data.cbSize = sizeof(data);
@@ -2420,7 +2422,7 @@ static void kernel32_find(ULONG section, const char *string_to_find, BOOL should
"FindActCtxSectionStringW: expected ret = %u, got %u\n", should_find, ret);
todo_wine_if(todo)
ok_(__FILE__, line)(err == (should_find ? ERROR_SUCCESS : ERROR_SXS_KEY_NOT_FOUND),
- "FindActCtxSectionStringW: unexpected error %u\n", err);
+ "FindActCtxSectionStringW: unexpected error %lu\n", err);
SetLastError(0);
ret = FindActCtxSectionStringA(0, NULL, section, string_to_find, NULL);
@@ -2428,7 +2430,7 @@ static void kernel32_find(ULONG section, const char *string_to_find, BOOL should
ok_(__FILE__, line)(!ret,
"FindActCtxSectionStringA: expected failure, got %u\n", ret);
ok_(__FILE__, line)(err == ERROR_INVALID_PARAMETER,
- "FindActCtxSectionStringA: unexpected error %u\n", err);
+ "FindActCtxSectionStringA: unexpected error %lu\n", err);
SetLastError(0);
ret = FindActCtxSectionStringW(0, NULL, section, string_to_findW.Buffer, NULL);
@@ -2436,7 +2438,7 @@ static void kernel32_find(ULONG section, const char *string_to_find, BOOL should
ok_(__FILE__, line)(!ret,
"FindActCtxSectionStringW: expected failure, got %u\n", ret);
ok_(__FILE__, line)(err == ERROR_INVALID_PARAMETER,
- "FindActCtxSectionStringW: unexpected error %u\n", err);
+ "FindActCtxSectionStringW: unexpected error %lu\n", err);
pRtlFreeUnicodeString(&string_to_findW);
}
@@ -2455,12 +2457,12 @@ static void ntdll_find(ULONG section, const char *string_to_find, BOOL should_fi
ret = pRtlFindActivationContextSectionString(0, NULL, section, &string_to_findW, &data);
todo_wine_if(todo)
ok_(__FILE__, line)(ret == (should_find ? STATUS_SUCCESS : STATUS_SXS_KEY_NOT_FOUND),
- "RtlFindActivationContextSectionString: unexpected status 0x%x\n", ret);
+ "RtlFindActivationContextSectionString: unexpected status 0x%lx\n", ret);
ret = pRtlFindActivationContextSectionString(0, NULL, section, &string_to_findW, NULL);
todo_wine_if(todo)
ok_(__FILE__, line)(ret == (should_find ? STATUS_SUCCESS : STATUS_SXS_KEY_NOT_FOUND),
- "RtlFindActivationContextSectionString: unexpected status 0x%x\n", ret);
+ "RtlFindActivationContextSectionString: unexpected status 0x%lx\n", ret);
pRtlFreeUnicodeString(&string_to_findW);
}
@@ -2473,7 +2475,7 @@ static void test_findsectionstring(void)
handle = create_manifest("test.manifest", testdep_manifest3, __LINE__);
ret = ActivateActCtx(handle, &cookie);
- ok(ret, "ActivateActCtx failed: %u\n", GetLastError());
+ ok(ret, "ActivateActCtx failed: %lu\n", GetLastError());
/* first we show the parameter validation from kernel32 */
kernel32_find(ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION, "testdep", FALSE, TRUE, __LINE__);
@@ -2494,7 +2496,7 @@ static void test_findsectionstring(void)
ntdll_find(ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, "wndClass3", FALSE, FALSE, __LINE__);
ret = DeactivateActCtx(0, cookie);
- ok(ret, "DeactivateActCtx failed: %u\n", GetLastError());
+ ok(ret, "DeactivateActCtx failed: %lu\n", GetLastError());
ReleaseActCtx(handle);
}
@@ -2529,7 +2531,7 @@ static void run_child_process(void)
}
sprintf(cmdline, "\"%s\" %s manifest1", argv[0], argv[1]);
ret = CreateProcessA(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
- ok(ret, "Could not create process: %u\n", GetLastError());
+ ok(ret, "Could not create process: %lu\n", GetLastError());
wait_child_process( pi.hProcess );
CloseHandle(pi.hThread);
CloseHandle(pi.hProcess);
@@ -2570,7 +2572,7 @@ static void write_manifest(const char *filename, const char *manifest)
strcat(path, filename);
file = CreateFileA(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
- ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %u\n", GetLastError());
+ ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError());
WriteFile(file, manifest, strlen(manifest), &size, NULL);
CloseHandle(file);
}
@@ -2592,7 +2594,7 @@ static void extract_resource(const char *name, const char *type, const char *pat
void *ptr;
file = CreateFileA(path, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0);
- ok(file != INVALID_HANDLE_VALUE, "file creation failed, at %s, error %d\n", path, GetLastError());
+ ok(file != INVALID_HANDLE_VALUE, "file creation failed, at %s, error %ld\n", path, GetLastError());
res = FindResourceA(NULL, name, type);
ok( res != 0, "couldn't find resource\n" );
@@ -2621,7 +2623,7 @@ static void test_CreateActCtx(void)
/* create using lpSource without specified directory */
handle = CreateActCtxA(&actctx);
- ok(handle != INVALID_HANDLE_VALUE, "failed to generate context, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "failed to generate context, error %lu\n", GetLastError());
ReleaseActCtx(handle);
/* with specified directory, that doesn't contain dependent assembly */
@@ -2637,7 +2639,7 @@ static void test_CreateActCtx(void)
handle = CreateActCtxA(&actctx);
todo_wine {
ok(handle == INVALID_HANDLE_VALUE, "got handle %p\n", handle);
- ok(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX, "got error %d\n", GetLastError());
+ ok(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX, "got error %ld\n", GetLastError());
}
if (handle != INVALID_HANDLE_VALUE) ReleaseActCtx(handle);
@@ -2653,7 +2655,7 @@ todo_wine {
strcat(dll, "testdep1.dll");
extract_resource("dummy.dll", "TESTDLL", dll);
handle = CreateActCtxA(&actctx);
- ok(handle != INVALID_HANDLE_VALUE || broken(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX) , "got error %d\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE || broken(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX) , "got error %ld\n", GetLastError());
ReleaseActCtx(handle);
DeleteFileA(dll);
@@ -2670,7 +2672,7 @@ todo_wine {
ok(handle == INVALID_HANDLE_VALUE, "got handle %p\n", handle);
todo_wine
ok(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX || broken(GetLastError() == ERROR_NOT_ENOUGH_MEMORY) /* XP, win2k3 */,
- "got error %d\n", GetLastError());
+ "got error %ld\n", GetLastError());
/* create from HMODULE - resource doesn't exist, lpSource is set */
memset(&actctx, 0, sizeof(ACTCTXA));
@@ -2683,7 +2685,7 @@ todo_wine {
SetLastError(0xdeadbeef);
handle = CreateActCtxA(&actctx);
ok(handle == INVALID_HANDLE_VALUE, "got handle %p\n", handle);
- ok(GetLastError() == ERROR_RESOURCE_NAME_NOT_FOUND, "got error %d\n", GetLastError());
+ ok(GetLastError() == ERROR_RESOURCE_NAME_NOT_FOUND, "got error %ld\n", GetLastError());
/* load manifest from lpAssemblyDirectory directory */
write_manifest("testdir.manifest", manifest1);
@@ -2704,7 +2706,7 @@ todo_wine {
ok(handle == INVALID_HANDLE_VALUE, "got handle %p\n", handle);
ok(GetLastError()==ERROR_PATH_NOT_FOUND ||
broken(GetLastError()==ERROR_FILE_NOT_FOUND) /* WinXP */,
- "got error %d\n", GetLastError());
+ "got error %ld\n", GetLastError());
CreateDirectoryA(dir, NULL);
memset(&actctx, 0, sizeof(actctx));
@@ -2716,7 +2718,7 @@ todo_wine {
SetLastError(0xdeadbeef);
handle = CreateActCtxA(&actctx);
ok(handle == INVALID_HANDLE_VALUE, "got handle %p\n", handle);
- ok(GetLastError() == ERROR_FILE_NOT_FOUND, "got error %d\n", GetLastError());
+ ok(GetLastError() == ERROR_FILE_NOT_FOUND, "got error %ld\n", GetLastError());
SetCurrentDirectoryW(work_dir);
write_manifest("assembly_dir\\testdir.manifest", manifest1);
@@ -2771,33 +2773,33 @@ static void test_ZombifyActCtx(void)
SetLastError(0xdeadbeef);
ret = ZombifyActCtx(NULL);
todo_wine
- ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "got %d, error %d\n", ret, GetLastError());
+ ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "got %d, error %ld\n", ret, GetLastError());
handle = create_manifest("test.manifest", testdep_manifest3, __LINE__);
ret = GetCurrentActCtx(¤t);
- ok(ret, "got %d, error %d\n", ret, GetLastError());
+ ok(ret, "got %d, error %ld\n", ret, GetLastError());
ok(current == NULL, "got %p\n", current);
ret = ActivateActCtx(handle, &cookie);
- ok(ret, "ActivateActCtx failed: %u\n", GetLastError());
+ ok(ret, "ActivateActCtx failed: %lu\n", GetLastError());
ret = GetCurrentActCtx(¤t);
- ok(ret, "got %d, error %d\n", ret, GetLastError());
+ ok(ret, "got %d, error %ld\n", ret, GetLastError());
ok(handle == current, "got %p, %p\n", current, handle);
memset(&basicinfo, 0xff, sizeof(basicinfo));
ret = QueryActCtxW(0, handle, 0, ActivationContextBasicInformation, &basicinfo, sizeof(basicinfo), NULL);
- ok(ret, "got %d, error %d\n", ret, GetLastError());
+ ok(ret, "got %d, error %ld\n", ret, GetLastError());
ok(basicinfo.hActCtx == handle, "got %p\n", basicinfo.hActCtx);
- ok(basicinfo.dwFlags == 0, "got %x\n", basicinfo.dwFlags);
+ ok(basicinfo.dwFlags == 0, "got %lx\n", basicinfo.dwFlags);
memset(&basicinfo, 0xff, sizeof(basicinfo));
ret = QueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX, NULL, 0, ActivationContextBasicInformation,
&basicinfo, sizeof(basicinfo), NULL);
- ok(ret, "got %d, error %d\n", ret, GetLastError());
+ ok(ret, "got %d, error %ld\n", ret, GetLastError());
ok(basicinfo.hActCtx == handle, "got %p\n", basicinfo.hActCtx);
- ok(basicinfo.dwFlags == 0, "got %x\n", basicinfo.dwFlags);
+ ok(basicinfo.dwFlags == 0, "got %lx\n", basicinfo.dwFlags);
ret = ZombifyActCtx(handle);
todo_wine
@@ -2805,19 +2807,19 @@ static void test_ZombifyActCtx(void)
memset(&basicinfo, 0xff, sizeof(basicinfo));
ret = QueryActCtxW(0, handle, 0, ActivationContextBasicInformation, &basicinfo, sizeof(basicinfo), NULL);
- ok(ret, "got %d, error %d\n", ret, GetLastError());
+ ok(ret, "got %d, error %ld\n", ret, GetLastError());
ok(basicinfo.hActCtx == handle, "got %p\n", basicinfo.hActCtx);
- ok(basicinfo.dwFlags == 0, "got %x\n", basicinfo.dwFlags);
+ ok(basicinfo.dwFlags == 0, "got %lx\n", basicinfo.dwFlags);
memset(&basicinfo, 0xff, sizeof(basicinfo));
ret = QueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX, NULL, 0, ActivationContextBasicInformation,
&basicinfo, sizeof(basicinfo), NULL);
- ok(ret, "got %d, error %d\n", ret, GetLastError());
+ ok(ret, "got %d, error %ld\n", ret, GetLastError());
ok(basicinfo.hActCtx == handle, "got %p\n", basicinfo.hActCtx);
- ok(basicinfo.dwFlags == 0, "got %x\n", basicinfo.dwFlags);
+ ok(basicinfo.dwFlags == 0, "got %lx\n", basicinfo.dwFlags);
ret = GetCurrentActCtx(¤t);
- ok(ret, "got %d, error %d\n", ret, GetLastError());
+ ok(ret, "got %d, error %ld\n", ret, GetLastError());
ok(current == handle, "got %p\n", current);
/* one more time */
@@ -2826,7 +2828,7 @@ static void test_ZombifyActCtx(void)
ok(ret, "got %d\n", ret);
ret = DeactivateActCtx(0, cookie);
- ok(ret, "DeactivateActCtx failed: %u\n", GetLastError());
+ ok(ret, "DeactivateActCtx failed: %lu\n", GetLastError());
ReleaseActCtx(handle);
}
@@ -2863,8 +2865,8 @@ static void test_no_compat(HANDLE handle, int line)
ok_(__FILE__, line)(b, "CompatibilityInformationInActivationContext failed\n");
ok_(__FILE__, line)(size == offsetof(test_act_ctx_compat_info,Elements[0]) ||
broken(size == offsetof(old_win10_test_act_ctx_compat_info,Elements[0])),
- "size mismatch got %lu\n", size);
- ok_(__FILE__, line)(compat_info.ElementCount == 0, "unexpected ElementCount %u\n", compat_info.ElementCount);
+ "size mismatch got %Iu\n", size);
+ ok_(__FILE__, line)(compat_info.ElementCount == 0, "unexpected ElementCount %lu\n", compat_info.ElementCount);
}
static void test_with_compat(HANDLE handle, DWORD num_compat, DWORD num_version,
@@ -2882,10 +2884,10 @@ static void test_with_compat(HANDLE handle, DWORD num_compat, DWORD num_version,
ok_(__FILE__, line)(b, "CompatibilityInformationInActivationContext failed\n");
ok_(__FILE__, line)(size == offsetof(test_act_ctx_compat_info,Elements[num_compat + num_version]) ||
broken(size == offsetof(old_win10_test_act_ctx_compat_info,Elements[num_compat])),
- "size mismatch got %lu\n", size);
+ "size mismatch got %Iu\n", size);
ok_(__FILE__, line)(compat_info.ElementCount == num_compat + num_version ||
broken(compat_info.ElementCount == num_compat),
- "unexpected ElementCount %u\n", compat_info.ElementCount);
+ "unexpected ElementCount %lu\n", compat_info.ElementCount);
if (size == offsetof(old_win10_test_act_ctx_compat_info,Elements[num_compat]))
{
@@ -2893,12 +2895,12 @@ static void test_with_compat(HANDLE handle, DWORD num_compat, DWORD num_version,
{
old_win10_test_act_ctx_compat_info *info = (old_win10_test_act_ctx_compat_info *)&compat_info;
ok_(__FILE__, line)(IsEqualGUID(&info->Elements[n].Id, expected_compat[n]),
- "got wrong clsid %s, expected %s for %u\n",
+ "got wrong clsid %s, expected %s for %lu\n",
wine_dbgstr_guid(&info->Elements[n].Id),
wine_dbgstr_guid(expected_compat[n]),
n);
ok_(__FILE__, line)(info->Elements[n].Type == ACTCTX_COMPATIBILITY_ELEMENT_TYPE_OS,
- "Wrong type, got %u for %u\n", (DWORD)info->Elements[n].Type, n);
+ "Wrong type, got %lu for %lu\n", (DWORD)info->Elements[n].Type, n);
}
}
else
@@ -2906,19 +2908,19 @@ static void test_with_compat(HANDLE handle, DWORD num_compat, DWORD num_version,
for (n = 0; n < num_compat; ++n)
{
ok_(__FILE__, line)(IsEqualGUID(&compat_info.Elements[n].Id, expected_compat[n]),
- "got wrong clsid %s, expected %s for %u\n",
+ "got wrong clsid %s, expected %s for %lu\n",
wine_dbgstr_guid(&compat_info.Elements[n].Id),
wine_dbgstr_guid(expected_compat[n]),
n);
ok_(__FILE__, line)(compat_info.Elements[n].Type == ACTCTX_COMPATIBILITY_ELEMENT_TYPE_OS,
- "Wrong type, got %u for %u\n", (DWORD)compat_info.Elements[n].Type, n);
+ "Wrong type, got %lu for %lu\n", (DWORD)compat_info.Elements[n].Type, n);
}
for (; n < num_compat + num_version; ++n)
{
ok_(__FILE__, line)(compat_info.Elements[n].Type == ACTCTX_COMPATIBILITY_ELEMENT_TYPE_MAXVERSIONTESTED,
- "Wrong type, got %u for %u\n", (DWORD)compat_info.Elements[n].Type, n);
+ "Wrong type, got %lu for %lu\n", (DWORD)compat_info.Elements[n].Type, n);
ok_(__FILE__, line)(compat_info.Elements[n].MaxVersionTested == expected_version[n - num_compat],
- "Wrong version, got %s for %u\n", wine_dbgstr_longlong(compat_info.Elements[n].MaxVersionTested), n);
+ "Wrong version, got %s for %lu\n", wine_dbgstr_longlong(compat_info.Elements[n].MaxVersionTested), n);
}
}
}
@@ -2935,7 +2937,7 @@ static void test_compatibility(void)
return;
}
handle = test_create("test1.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("test1.manifest");
if(handle != INVALID_HANDLE_VALUE)
{
@@ -2967,7 +2969,7 @@ static void test_compatibility(void)
return;
}
handle = test_create("no_supportedOs.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("no_supportedOs.manifest");
if(handle != INVALID_HANDLE_VALUE)
{
@@ -2984,7 +2986,7 @@ static void test_compatibility(void)
return;
}
handle = test_create("manifest_vista.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("manifest_vista.manifest");
if(handle != INVALID_HANDLE_VALUE)
{
@@ -3005,7 +3007,7 @@ static void test_compatibility(void)
return;
}
handle = test_create("manifest_vista_7_8_10_81.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("manifest_vista_7_8_10_81.manifest");
if(handle != INVALID_HANDLE_VALUE)
{
@@ -3035,7 +3037,7 @@ static void test_compatibility(void)
return;
}
handle = test_create("manifest_other_guid.manifest");
- ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
DeleteFileA("manifest_other_guid.manifest");
if(handle != INVALID_HANDLE_VALUE)
{
@@ -3069,100 +3071,100 @@ static void test_settings(void)
}
create_manifest_file( "manifest_settings.manifest", settings_manifest, -1, NULL, NULL );
handle = test_create("manifest_settings.manifest");
- ok( handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError() );
+ ok( handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError() );
DeleteFileA( "manifest_settings.manifest" );
SetLastError( 0xdeadbeef );
ret = pQueryActCtxSettingsW( 1, handle, NULL, dpiAwareW, buffer, 80, &size );
- ok( !ret, "QueryActCtxSettingsW failed err %u\n", GetLastError() );
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() );
+ ok( !ret, "QueryActCtxSettingsW failed err %lu\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef );
ret = pQueryActCtxSettingsW( 0, handle, dummyW, dpiAwareW, buffer, 80, &size );
- ok( !ret, "QueryActCtxSettingsW failed err %u\n", GetLastError() );
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() );
+ ok( !ret, "QueryActCtxSettingsW failed err %lu\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef );
size = 0xdead;
memset( buffer, 0xcc, sizeof(buffer) );
ret = pQueryActCtxSettingsW( 0, handle, NULL, dpiAwareW, buffer, 80, &size );
- ok( ret, "QueryActCtxSettingsW failed err %u\n", GetLastError() );
+ ok( ret, "QueryActCtxSettingsW failed err %lu\n", GetLastError() );
ok( !lstrcmpW( buffer, trueW ), "got %s\n", wine_dbgstr_w(buffer) );
- ok( size == lstrlenW( buffer ) + 1, "wrong len %lu\n", size );
+ ok( size == lstrlenW( buffer ) + 1, "wrong len %Iu\n", size );
SetLastError( 0xdeadbeef );
size = 0xdead;
memset( buffer, 0xcc, sizeof(buffer) );
ret = pQueryActCtxSettingsW( 0, handle, NULL, dummyW, buffer, 80, &size );
ok( !ret, "QueryActCtxSettingsW succeeded\n" );
- ok( GetLastError() == ERROR_SXS_KEY_NOT_FOUND, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_SXS_KEY_NOT_FOUND, "wrong error %lu\n", GetLastError() );
ok( buffer[0] == 0xcccc, "got %s\n", wine_dbgstr_w(buffer) );
SetLastError( 0xdeadbeef );
size = 0xdead;
memset( buffer, 0xcc, sizeof(buffer) );
ret = pQueryActCtxSettingsW( 0, handle, namespace2005W, dpiAwareW, buffer, 80, &size );
- ok( ret, "QueryActCtxSettingsW failed err %u\n", GetLastError() );
+ ok( ret, "QueryActCtxSettingsW failed err %lu\n", GetLastError() );
ok( !lstrcmpW( buffer, trueW ), "got %s\n", wine_dbgstr_w(buffer) );
- ok( size == ARRAY_SIZE(trueW), "wrong len %lu\n", size );
+ ok( size == ARRAY_SIZE(trueW), "wrong len %Iu\n", size );
SetLastError( 0xdeadbeef );
size = 0xdead;
memset( buffer, 0xcc, sizeof(buffer) );
ret = pQueryActCtxSettingsW( 0, handle, namespace2005W, dpiAwareW, buffer, lstrlenW(trueW) + 1, &size );
- ok( ret, "QueryActCtxSettingsW failed err %u\n", GetLastError() );
+ ok( ret, "QueryActCtxSettingsW failed err %lu\n", GetLastError() );
ok( !lstrcmpW( buffer, trueW ), "got %s\n", wine_dbgstr_w(buffer) );
- ok( size == ARRAY_SIZE(trueW), "wrong len %lu\n", size );
+ ok( size == ARRAY_SIZE(trueW), "wrong len %Iu\n", size );
SetLastError( 0xdeadbeef );
size = 0xdead;
memset( buffer, 0xcc, sizeof(buffer) );
ret = pQueryActCtxSettingsW( 0, handle, namespace2016W, dpiAwareW, buffer, lstrlenW(trueW) + 1, &size );
ok( !ret, "QueryActCtxSettingsW succeeded\n" );
ok( GetLastError() == ERROR_SXS_KEY_NOT_FOUND || broken( GetLastError() == ERROR_INVALID_PARAMETER ),
- "wrong error %u\n", GetLastError() );
+ "wrong error %lu\n", GetLastError() );
ok( buffer[0] == 0xcccc, "got %s\n", wine_dbgstr_w(buffer) );
SetLastError( 0xdeadbeef );
size = 0xdead;
memset( buffer, 0xcc, sizeof(buffer) );
ret = pQueryActCtxSettingsW( 0, handle, NULL, dpiAwarenessW, buffer, lstrlenW(trueW) + 1, &size );
ok( !ret, "QueryActCtxSettingsW succeeded\n" );
- ok( GetLastError() == ERROR_SXS_KEY_NOT_FOUND, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_SXS_KEY_NOT_FOUND, "wrong error %lu\n", GetLastError() );
ok( buffer[0] == 0xcccc, "got %s\n", wine_dbgstr_w(buffer) );
SetLastError( 0xdeadbeef );
size = 0xdead;
memset( buffer, 0xcc, sizeof(buffer) );
ret = pQueryActCtxSettingsW( 0, handle, namespace2005W, dpiAwarenessW, buffer, lstrlenW(trueW) + 1, &size );
ok( !ret, "QueryActCtxSettingsW succeeded\n" );
- ok( GetLastError() == ERROR_SXS_KEY_NOT_FOUND, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_SXS_KEY_NOT_FOUND, "wrong error %lu\n", GetLastError() );
ok( buffer[0] == 0xcccc, "got %s\n", wine_dbgstr_w(buffer) );
SetLastError( 0xdeadbeef );
size = 0xdead;
memset( buffer, 0xcc, sizeof(buffer) );
ret = pQueryActCtxSettingsW( 0, handle, namespace2016W, dpiAwarenessW, buffer, lstrlenW(trueW) + 1, &size );
ok( ret || broken( GetLastError() == ERROR_INVALID_PARAMETER ),
- "QueryActCtxSettingsW failed err %u\n", GetLastError() );
+ "QueryActCtxSettingsW failed err %lu\n", GetLastError() );
if (ret)
{
ok( !lstrcmpW( buffer, trueW ), "got %s\n", wine_dbgstr_w(buffer) );
- ok( size == ARRAY_SIZE(trueW), "wrong len %lu\n", size );
+ ok( size == ARRAY_SIZE(trueW), "wrong len %Iu\n", size );
}
else ok( buffer[0] == 0xcccc, "got %s\n", wine_dbgstr_w(buffer) );
SetLastError( 0xdeadbeef );
size = 0xdead;
memset( buffer, 0xcc, sizeof(buffer) );
ret = pQueryActCtxSettingsW( 0, handle, NULL, dpiAwareW, buffer, lstrlenW(trueW), &size );
- ok( ret, "QueryActCtxSettingsW failed err %u\n", GetLastError() );
+ ok( ret, "QueryActCtxSettingsW failed err %lu\n", GetLastError() );
ok( !lstrcmpW( buffer, trueW ), "got %s\n", wine_dbgstr_w(buffer) );
- ok( size == ARRAY_SIZE(trueW), "wrong len %lu\n", size );
+ ok( size == ARRAY_SIZE(trueW), "wrong len %Iu\n", size );
SetLastError( 0xdeadbeef );
size = 0xdead;
memset( buffer, 0xcc, sizeof(buffer) );
ret = pQueryActCtxSettingsW( 0, handle, NULL, dpiAwareW, buffer, lstrlenW(trueW) - 1, &size );
- ok( !ret, "QueryActCtxSettingsW failed err %u\n", GetLastError() );
- ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "wrong error %u\n", GetLastError() );
+ ok( !ret, "QueryActCtxSettingsW failed err %lu\n", GetLastError() );
+ ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "wrong error %lu\n", GetLastError() );
ok( buffer[0] == 0xcccc, "got %s\n", wine_dbgstr_w(buffer) );
- ok( size == ARRAY_SIZE(trueW), "wrong len %lu\n", size );
+ ok( size == ARRAY_SIZE(trueW), "wrong len %Iu\n", size );
ReleaseActCtx(handle);
create_manifest_file( "manifest_settings2.manifest", settings_manifest2, -1, NULL, NULL );
handle = test_create("manifest_settings2.manifest");
ok( handle != INVALID_HANDLE_VALUE || broken( handle == INVALID_HANDLE_VALUE ), /* <= vista */
- "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError() );
+ "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError() );
DeleteFileA( "manifest_settings2.manifest" );
if (handle != INVALID_HANDLE_VALUE)
{
@@ -3170,22 +3172,22 @@ static void test_settings(void)
size = 0xdead;
memset( buffer, 0xcc, sizeof(buffer) );
ret = pQueryActCtxSettingsW( 0, handle, NULL, dpiAwareW, buffer, 80, &size );
- ok( ret, "QueryActCtxSettingsW failed err %u\n", GetLastError() );
+ ok( ret, "QueryActCtxSettingsW failed err %lu\n", GetLastError() );
ok( !lstrcmpW( buffer, trueW ), "got %s\n", wine_dbgstr_w(buffer) );
- ok( size == lstrlenW( buffer ) + 1, "wrong len %lu\n", size );
+ ok( size == lstrlenW( buffer ) + 1, "wrong len %Iu\n", size );
ReleaseActCtx(handle);
}
create_manifest_file( "manifest_settings3.manifest", settings_manifest3, -1, NULL, NULL );
handle = test_create("manifest_settings3.manifest");
- ok( handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError() );
+ ok( handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError() );
DeleteFileA( "manifest_settings3.manifest" );
SetLastError( 0xdeadbeef );
size = 0xdead;
memset( buffer, 0xcc, sizeof(buffer) );
ret = pQueryActCtxSettingsW( 0, handle, NULL, dpiAwareW, buffer, 80, &size );
ok( !ret, "QueryActCtxSettingsW succeeded\n" );
- ok( GetLastError() == ERROR_SXS_KEY_NOT_FOUND, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_SXS_KEY_NOT_FOUND, "wrong error %lu\n", GetLastError() );
ReleaseActCtx(handle);
}
@@ -3228,7 +3230,7 @@ static BOOL fill_sxs_info(sxs_info *info, const char *temp, const char *path_dll
info->handle_context = CreateActCtxA(&info->context);
ok((info->handle_context != NULL && info->handle_context != INVALID_HANDLE_VALUE )
|| broken(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX), /* XP doesn't support manifests outside of PE files */
- "CreateActCtxA failed: %d\n", GetLastError());
+ "CreateActCtxA failed: %ld\n", GetLastError());
if (GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX)
{
skip("Failed to create activation context.\n");
@@ -3238,7 +3240,7 @@ static BOOL fill_sxs_info(sxs_info *info, const char *temp, const char *path_dll
if (do_load)
{
success = ActivateActCtx(info->handle_context, &info->cookie);
- ok(success, "ActivateActCtx failed: %d\n", GetLastError());
+ ok(success, "ActivateActCtx failed: %ld\n", GetLastError());
info->module = LoadLibraryA("sxs_dll.dll");
ok(info->module != NULL, "LoadLibrary failed\n");
@@ -3258,22 +3260,22 @@ static void clean_sxs_info(sxs_info *info)
if (*info->path_dll)
{
BOOL ret = DeleteFileA(info->path_dll);
- ok(ret, "DeleteFileA failed for %s: %d\n", info->path_dll, GetLastError());
+ ok(ret, "DeleteFileA failed for %s: %ld\n", info->path_dll, GetLastError());
}
if (*info->path_manifest_exe)
{
BOOL ret = DeleteFileA(info->path_manifest_exe);
- ok(ret, "DeleteFileA failed for %s: %d\n", info->path_manifest_exe, GetLastError());
+ ok(ret, "DeleteFileA failed for %s: %ld\n", info->path_manifest_exe, GetLastError());
}
if (*info->path_manifest_dll)
{
BOOL ret = DeleteFileA(info->path_manifest_dll);
- ok(ret, "DeleteFileA failed for %s: %d\n", info->path_manifest_dll, GetLastError());
+ ok(ret, "DeleteFileA failed for %s: %ld\n", info->path_manifest_dll, GetLastError());
}
if (*info->path_tmp)
{
BOOL ret = RemoveDirectoryA(info->path_tmp);
- ok(ret, "RemoveDirectoryA failed for %s: %d\n", info->path_tmp, GetLastError());
+ ok(ret, "RemoveDirectoryA failed for %s: %ld\n", info->path_tmp, GetLastError());
}
}
@@ -3348,7 +3350,7 @@ cleanup:
if (*path_dll_local)
{
BOOL success = DeleteFileA(path_dll_local);
- ok(success, "DeleteFileA failed for %s: %d\n", path_dll_local, GetLastError());
+ ok(success, "DeleteFileA failed for %s: %ld\n", path_dll_local, GetLastError());
}
clean_sxs_info(&dll);
}
@@ -3388,7 +3390,7 @@ cleanup:
if (*path_dll_local)
{
BOOL success = DeleteFileA(path_dll_local);
- ok(success, "DeleteFileA failed for %s: %d\n", path_dll_local, GetLastError());
+ ok(success, "DeleteFileA failed for %s: %ld\n", path_dll_local, GetLastError());
}
clean_sxs_info(&dll);
}
@@ -3414,7 +3416,7 @@ static void test_one_with_sxs_and_GetModuleHandleA(void)
goto cleanup;
success = ActivateActCtx(dll.handle_context, &dll.cookie);
- ok(success, "ActivateActCtx failed: %d\n", GetLastError());
+ ok(success, "ActivateActCtx failed: %ld\n", GetLastError());
module_temp = GetModuleHandleA("sxs_dll.dll");
ok (module_temp == 0, "Expected 0, got %p\n", module_temp);
@@ -3429,7 +3431,7 @@ cleanup:
if (*path_dll_local)
{
success = DeleteFileA(path_dll_local);
- ok(success, "DeleteFileA failed for %s: %d\n", path_dll_local, GetLastError());
+ ok(success, "DeleteFileA failed for %s: %ld\n", path_dll_local, GetLastError());
}
clean_sxs_info(&dll);
}
@@ -3459,7 +3461,7 @@ static void test_builtin_sxs(void)
handle_context = CreateActCtxA(&context);
ok((handle_context != NULL && handle_context != INVALID_HANDLE_VALUE )
|| broken(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX), /* XP doesn't support manifests outside of PE files */
- "CreateActCtxA failed: %d\n", GetLastError());
+ "CreateActCtxA failed: %ld\n", GetLastError());
if (GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX)
{
skip("Failed to create activation context.\n");
@@ -3468,12 +3470,12 @@ static void test_builtin_sxs(void)
success = ActivateActCtx(handle_context, &cookie);
- ok(success, "ActivateActCtx failed: %d\n", GetLastError());
+ ok(success, "ActivateActCtx failed: %ld\n", GetLastError());
module_msvcp = LoadLibraryA("msvcp90.dll");
- ok (module_msvcp != 0 || broken(module_msvcp == 0), "LoadLibraryA failed, %d\n", GetLastError());
+ ok (module_msvcp != 0 || broken(module_msvcp == 0), "LoadLibraryA failed, %ld\n", GetLastError());
module_msvcr = LoadLibraryA("msvcr90.dll");
- ok (module_msvcr != 0 || broken(module_msvcr == 0), "LoadLibraryA failed, %d\n", GetLastError());
+ ok (module_msvcr != 0 || broken(module_msvcr == 0), "LoadLibraryA failed, %ld\n", GetLastError());
if (!module_msvcp || !module_msvcr)
{
skip("Failed to find msvcp90 or msvcr90.\n");
@@ -3495,7 +3497,7 @@ cleanup:
if (*path_manifest)
{
success = DeleteFileA(path_manifest);
- ok(success, "DeleteFileA failed for %s: %d\n", path_manifest, GetLastError());
+ ok(success, "DeleteFileA failed for %s: %ld\n", path_manifest, GetLastError());
}
}
@@ -3540,7 +3542,7 @@ static void run_child_process_two_dll(int run)
si.cb = sizeof(si);
ret = CreateProcessA(exe, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
- ok(ret, "Could not create process: %u\n", GetLastError());
+ ok(ret, "Could not create process: %lu\n", GetLastError());
wait_child_process( pi.hProcess );
@@ -3566,7 +3568,7 @@ static void test_manifest_in_module(void)
ctx.lpResourceName = (LPWSTR)124;
ctx.hModule = GetModuleHandleW(NULL);
handle = CreateActCtxW(&ctx);
- ok(handle != 0, "CreateActCtx error %u\n", GetLastError());
+ ok(handle != 0, "CreateActCtx error %lu\n", GetLastError());
test_basic_info(handle, __LINE__);
test_detailed_info(handle, &detailed_info3, __LINE__);
March 1, 2022
[PATCH] Migration to long types for dlls/kernel32/tests
by Eric Pouech
Given the number of changes in dlls/kernel32/tests, it has been
decided to migrate on a smaller granularity than the module.
Basically, it'll be per file, and if very few changes, aggregation
is possible. We're considering here in some cases, more than a
thousand changes per file.
dlls/ntdll/tests should follow the same strategy of migration.
So testing the waters with this first one.
A+
---
Eric Pouech (1):
dlls/kernel32/tests/actctx.c: enable compilation with long types
dlls/kernel32/tests/actctx.c | 606 ++++++++++++++++++-----------------
1 file changed, 304 insertions(+), 302 deletions(-)
March 1, 2022
Re: [PATCH 07/27] dlls/mmdevapi/tests: enable compilation with long types
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=109493
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
mmdevapi:
render.c:1114: Test failed: Position 6497 too far after playing 100ms
=== w8 (32 bit report) ===
mmdevapi:
render.c:1340: Test failed: GetBuffer large (20671) at iteration 2
render.c:1340: Test failed: GetBuffer large (20671) at iteration 3
=== w8adm (32 bit report) ===
mmdevapi:
render.c:1340: Test failed: GetBuffer large (20671) at iteration 8
render.c:1114: Test failed: Position 6656 too far after playing 100ms
render.c:1340: Test failed: GetBuffer large (20671) at iteration 4
=== w864 (32 bit report) ===
mmdevapi:
render.c:1340: Test failed: GetBuffer large (20671) at iteration 7
=== w1064v1507 (32 bit report) ===
mmdevapi:
render.c:1114: Test failed: Position 52576 too far after playing 100ms
render.c:1340: Test failed: GetBuffer large (20671) at iteration 2
=== w1064v1809 (32 bit report) ===
mmdevapi:
render.c:1114: Test failed: Position 52280 too far after playing 100ms
render.c:1114: Test failed: Position 6371 too far after playing 100ms
=== w1064 (32 bit report) ===
mmdevapi:
render.c:1114: Test failed: Position 58488 too far after playing 100ms
render.c:1114: Test failed: Position 7067 too far after playing 100ms
=== w1064_tsign (32 bit report) ===
mmdevapi:
render.c:1114: Test failed: Position 58704 too far after playing 100ms
render.c:1114: Test failed: Position 7036 too far after playing 100ms
=== w10pro64 (32 bit report) ===
mmdevapi:
render.c:1114: Test failed: Position 55704 too far after playing 100ms
render.c:1114: Test failed: Position 7418 too far after playing 100ms
render.c:1340: Test failed: GetBuffer large (22500) at iteration 2
=== w864 (64 bit report) ===
mmdevapi:
render.c:1340: Test failed: GetBuffer large (20671) at iteration 5
=== w1064v1507 (64 bit report) ===
mmdevapi:
render.c:1114: Test failed: Position 52288 too far after playing 100ms
render.c:1340: Test failed: GetBuffer large (20671) at iteration 4
render.c:1114: Test failed: Position 7033 too far after playing 100ms
=== w1064v1809 (64 bit report) ===
mmdevapi:
render.c:1114: Test failed: Position 52152 too far after playing 100ms
render.c:1114: Test failed: Position 6617 too far after playing 100ms
=== w1064 (64 bit report) ===
mmdevapi:
render.c:1114: Test failed: Position 58568 too far after playing 100ms
render.c:1114: Test failed: Position 7222 too far after playing 100ms
=== w1064_2qxl (64 bit report) ===
mmdevapi:
render.c:1114: Test failed: Position 59104 too far after playing 100ms
render.c:1114: Test failed: Position 7306 too far after playing 100ms
=== w1064_tsign (64 bit report) ===
mmdevapi:
render.c:1114: Test failed: Position 57840 too far after playing 100ms
=== w10pro64 (64 bit report) ===
mmdevapi:
render.c:1114: Test failed: Position 58664 too far after playing 100ms
render.c:1114: Test failed: Position 7054 too far after playing 100ms
=== w10pro64_ar (64 bit report) ===
mmdevapi:
render.c:1114: Test failed: Position 7308 too far after playing 100ms
=== w10pro64_he (64 bit report) ===
mmdevapi:
render.c:1114: Test failed: Position 6949 too far after playing 100ms
=== w10pro64_ja (64 bit report) ===
mmdevapi:
render.c:1114: Test failed: Position 58544 too far after playing 100ms
render.c:1114: Test failed: Position 7002 too far after playing 100ms
render.c:1340: Test failed: GetBuffer large (22500) at iteration 4
=== w10pro64_zh_CN (64 bit report) ===
mmdevapi:
render.c:1114: Test failed: Position 58664 too far after playing 100ms
render.c:1114: Test failed: Position 7222 too far after playing 100ms
March 1, 2022
[PATCH 5/5] include: Add Windows.Gaming.Input.XusbGameControllerProvider runtimeclass definition.
by Rémi Bernon
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
include/windows.gaming.input.custom.idl | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/include/windows.gaming.input.custom.idl b/include/windows.gaming.input.custom.idl
index 001dbc36509..8347f4663d3 100644
--- a/include/windows.gaming.input.custom.idl
+++ b/include/windows.gaming.input.custom.idl
@@ -39,11 +39,13 @@ namespace Windows.Gaming.Input.Custom {
interface IHidGameControllerInputSink;
interface IHidGameControllerProvider;
interface IXusbGameControllerInputSink;
+ interface IXusbGameControllerProvider;
interface ICustomGameControllerFactory;
interface IGameControllerFactoryManagerStatics;
interface IGameControllerFactoryManagerStatics2;
runtimeclass GameControllerFactoryManager;
runtimeclass HidGameControllerProvider;
+ runtimeclass XusbGameControllerProvider;
[contract(Windows.Foundation.UniversalApiContract, 3.0)]
enum XusbDeviceSubtype
@@ -140,6 +142,17 @@ namespace Windows.Gaming.Input.Custom {
[in, size_is(report_len)] BYTE *report_buf);
}
+ [
+ contract(Windows.Foundation.UniversalApiContract, 3.0),
+ exclusiveto(Windows.Gaming.Input.Custom.XusbGameControllerProvider),
+ uuid(6e2971eb-0efb-48b4-808b-837643b2f216)
+ ]
+ interface IXusbGameControllerProvider : IInspectable
+ requires Windows.Gaming.Input.Custom.IGameControllerProvider
+ {
+ HRESULT SetVibration([in] DOUBLE rumble_intensity, [in] DOUBLE buzz_intensity);
+ }
+
[
contract(Windows.Foundation.UniversalApiContract, 3.0),
uuid(69a0ae5e-758e-4cbe-ace6-62155fe9126f)
@@ -202,4 +215,15 @@ namespace Windows.Gaming.Input.Custom {
[default] interface Windows.Gaming.Input.Custom.IHidGameControllerProvider;
interface Windows.Gaming.Input.Custom.IGameControllerProvider;
}
+
+ [
+ contract(Windows.Foundation.UniversalApiContract, 3.0),
+ marshaling_behavior(agile),
+ threading(both)
+ ]
+ runtimeclass XusbGameControllerProvider
+ {
+ [default] interface Windows.Gaming.Input.Custom.IXusbGameControllerProvider;
+ interface Windows.Gaming.Input.Custom.IGameControllerProvider;
+ }
}
--
2.34.1
March 1, 2022
[PATCH 4/5] include: Add Windows.Gaming.Input.IXusbGameControllerInputSink interface definition.
by Rémi Bernon
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
include/windows.gaming.input.custom.idl | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/include/windows.gaming.input.custom.idl b/include/windows.gaming.input.custom.idl
index e30b383e9d7..001dbc36509 100644
--- a/include/windows.gaming.input.custom.idl
+++ b/include/windows.gaming.input.custom.idl
@@ -38,6 +38,7 @@ namespace Windows.Gaming.Input.Custom {
interface IGameControllerProvider;
interface IHidGameControllerInputSink;
interface IHidGameControllerProvider;
+ interface IXusbGameControllerInputSink;
interface ICustomGameControllerFactory;
interface IGameControllerFactoryManagerStatics;
interface IGameControllerFactoryManagerStatics2;
@@ -128,6 +129,17 @@ namespace Windows.Gaming.Input.Custom {
[in, size_is(report_len)] BYTE *report_buf);
}
+ [
+ contract(Windows.Foundation.UniversalApiContract, 3.0),
+ uuid(b2ac1d95-6ecb-42b3-8aab-025401ca4712)
+ ]
+ interface IXusbGameControllerInputSink : IInspectable
+ requires Windows.Gaming.Input.Custom.IGameControllerInputSink
+ {
+ HRESULT OnInputReceived([in] UINT64 timestamp, [in] BYTE id, [in] UINT32 report_len,
+ [in, size_is(report_len)] BYTE *report_buf);
+ }
+
[
contract(Windows.Foundation.UniversalApiContract, 3.0),
uuid(69a0ae5e-758e-4cbe-ace6-62155fe9126f)
--
2.34.1
March 1, 2022
[PATCH 3/5] include: Add Windows.Gaming.Input.HidGameControllerProvider runtimeclass definition.
by Rémi Bernon
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
include/windows.gaming.input.custom.idl | 31 +++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/include/windows.gaming.input.custom.idl b/include/windows.gaming.input.custom.idl
index 5a3e94aa978..e30b383e9d7 100644
--- a/include/windows.gaming.input.custom.idl
+++ b/include/windows.gaming.input.custom.idl
@@ -37,10 +37,12 @@ namespace Windows.Gaming.Input.Custom {
interface IGameControllerInputSink;
interface IGameControllerProvider;
interface IHidGameControllerInputSink;
+ interface IHidGameControllerProvider;
interface ICustomGameControllerFactory;
interface IGameControllerFactoryManagerStatics;
interface IGameControllerFactoryManagerStatics2;
runtimeclass GameControllerFactoryManager;
+ runtimeclass HidGameControllerProvider;
[contract(Windows.Foundation.UniversalApiContract, 3.0)]
enum XusbDeviceSubtype
@@ -108,6 +110,24 @@ namespace Windows.Gaming.Input.Custom {
[in, size_is(report_len)] BYTE *report_buf);
}
+ [
+ contract(Windows.Foundation.UniversalApiContract, 4.0),
+ exclusiveto(Windows.Gaming.Input.Custom.HidGameControllerProvider),
+ uuid(95ce3af4-abf0-4b68-a081-3b7de73ff0e7)
+ ]
+ interface IHidGameControllerProvider : IInspectable
+ requires Windows.Gaming.Input.Custom.IGameControllerProvider
+ {
+ [propget] HRESULT UsageId([out, retval] UINT16 *value);
+ [propget] HRESULT UsagePage([out, retval] UINT16 *value);
+ HRESULT GetFeatureReport([in] BYTE id, [in] UINT32 report_len,
+ [out, size_is(report_len)] BYTE *report_buf);
+ HRESULT SendFeatureReport([in] BYTE id, [in] UINT32 report_len,
+ [in, size_is(report_len)] BYTE *report_buf);
+ HRESULT SendOutputReport([in] BYTE id, [in] UINT32 report_len,
+ [in, size_is(report_len)] BYTE *report_buf);
+ }
+
[
contract(Windows.Foundation.UniversalApiContract, 3.0),
uuid(69a0ae5e-758e-4cbe-ace6-62155fe9126f)
@@ -159,4 +179,15 @@ namespace Windows.Gaming.Input.Custom {
runtimeclass GameControllerFactoryManager
{
}
+
+ [
+ contract(Windows.Foundation.UniversalApiContract, 4.0),
+ marshaling_behavior(agile),
+ threading(both)
+ ]
+ runtimeclass HidGameControllerProvider
+ {
+ [default] interface Windows.Gaming.Input.Custom.IHidGameControllerProvider;
+ interface Windows.Gaming.Input.Custom.IGameControllerProvider;
+ }
}
--
2.34.1
March 1, 2022