Wine-devel
Threads by month
- ----- 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
- 950 discussions
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52645
Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com>
---
dlls/kernelbase/kernelbase.spec | 4 ++--
dlls/kernelbase/path.c | 32 ++++++++++++++++++++++++--------
dlls/shlwapi/shlwapi.spec | 2 ++
include/shlwapi.h | 8 ++++++++
4 files changed, 36 insertions(+), 10 deletions(-)
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
index c1175af2f9fe..a59d8581ff04 100644
--- a/dlls/kernelbase/kernelbase.spec
+++ b/dlls/kernelbase/kernelbase.spec
@@ -1124,8 +1124,8 @@
@ stdcall PathIsValidCharA(long long)
@ stdcall PathIsValidCharW(long long)
@ stdcall PathMatchSpecA(str str)
-# @ stub PathMatchSpecExA
-# @ stub PathMatchSpecExW
+@ stdcall PathMatchSpecExA(str str long)
+@ stdcall PathMatchSpecExW(wstr wstr long)
@ stdcall PathMatchSpecW(wstr wstr)
@ stdcall PathParseIconLocationA(str)
@ stdcall PathParseIconLocationW(wstr)
diff --git a/dlls/kernelbase/path.c b/dlls/kernelbase/path.c
index f83c68e14f55..d59f20adb6ef 100644
--- a/dlls/kernelbase/path.c
+++ b/dlls/kernelbase/path.c
@@ -2425,24 +2425,32 @@ BOOL WINAPI PathRelativePathToW(WCHAR *path, const WCHAR *from, DWORD attributes
return TRUE;
}
-BOOL WINAPI PathMatchSpecA(const char *path, const char *mask)
+HRESULT WINAPI PathMatchSpecExA(const char *path, const char *mask, DWORD flags)
{
WCHAR *pathW, *maskW;
- BOOL ret;
+ HRESULT ret;
TRACE("%s, %s\n", wine_dbgstr_a(path), wine_dbgstr_a(mask));
+ if (flags)
+ FIXME("Ignoring flags %#lx.", flags);
+
if (!lstrcmpA(mask, "*.*"))
- return TRUE; /* Matches every path */
+ return S_OK; /* Matches every path */
pathW = heap_strdupAtoW( path );
maskW = heap_strdupAtoW( mask );
- ret = PathMatchSpecW( pathW, maskW );
+ ret = PathMatchSpecExW( pathW, maskW, flags );
heap_free( pathW );
heap_free( maskW );
return ret;
}
+BOOL WINAPI PathMatchSpecA(const char *path, const char *mask)
+{
+ return PathMatchSpecExA(path, mask, 0) == S_OK;
+}
+
static BOOL path_match_maskW(const WCHAR *name, const WCHAR *mask)
{
while (*name && *mask && *mask != ';')
@@ -2475,12 +2483,15 @@ static BOOL path_match_maskW(const WCHAR *name, const WCHAR *mask)
return FALSE;
}
-BOOL WINAPI PathMatchSpecW(const WCHAR *path, const WCHAR *mask)
+HRESULT WINAPI PathMatchSpecExW(const WCHAR *path, const WCHAR *mask, DWORD flags)
{
TRACE("%s, %s\n", wine_dbgstr_w(path), wine_dbgstr_w(mask));
+ if (flags)
+ FIXME("Ignoring flags %#lx.", flags);
+
if (!lstrcmpW(mask, L"*.*"))
- return TRUE; /* Matches every path */
+ return S_OK; /* Matches every path */
while (*mask)
{
@@ -2488,7 +2499,7 @@ BOOL WINAPI PathMatchSpecW(const WCHAR *path, const WCHAR *mask)
mask++; /* Eat leading spaces */
if (path_match_maskW(path, mask))
- return TRUE; /* Matches the current path */
+ return S_OK; /* Matches the current path */
while (*mask && *mask != ';')
mask++; /* masks separated by ';' */
@@ -2497,7 +2508,12 @@ BOOL WINAPI PathMatchSpecW(const WCHAR *path, const WCHAR *mask)
mask++;
}
- return FALSE;
+ return S_FALSE;
+}
+
+BOOL WINAPI PathMatchSpecW(const WCHAR *path, const WCHAR *mask)
+{
+ return PathMatchSpecExW(path, mask, 0) == S_OK;
}
void WINAPI PathQuoteSpacesA(char *path)
diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec
index c61e45b02705..801b2c9a8908 100644
--- a/dlls/shlwapi/shlwapi.spec
+++ b/dlls/shlwapi/shlwapi.spec
@@ -642,6 +642,8 @@
@ stdcall PathMakeSystemFolderA(str)
@ stdcall PathMakeSystemFolderW(wstr)
@ stdcall -import PathMatchSpecA(str str)
+@ stdcall -import PathMatchSpecExA(str str long)
+@ stdcall -import PathMatchSpecExW(wstr wstr long)
@ stdcall -import PathMatchSpecW(wstr wstr)
@ stdcall -import PathParseIconLocationA(str)
@ stdcall -import PathParseIconLocationW(wstr)
diff --git a/include/shlwapi.h b/include/shlwapi.h
index 07ca0fac837f..a282ae6d9939 100644
--- a/include/shlwapi.h
+++ b/include/shlwapi.h
@@ -482,6 +482,14 @@ BOOL WINAPI PathMatchSpecA(LPCSTR,LPCSTR);
BOOL WINAPI PathMatchSpecW(LPCWSTR,LPCWSTR);
#define PathMatchSpec WINELIB_NAME_AW(PathMatchSpec)
+#define PMSF_NORMAL 0x00000000
+#define PMSF_MULTIPLE 0x00000001
+#define PMSF_DONT_STRIP_SPACES 0x00010000
+
+HRESULT WINAPI PathMatchSpecExA(LPCSTR,LPCSTR,DWORD);
+HRESULT WINAPI PathMatchSpecExW(LPCWSTR,LPCWSTR,DWORD);
+#define PathMatchSpecEx WINELIB_NAME_AW(PathMatchSpecEx)
+
int WINAPI PathParseIconLocationA(LPSTR);
int WINAPI PathParseIconLocationW(LPWSTR);
#define PathParseIconLocation WINELIB_NAME_AW(PathParseIconLocation)
--
2.35.1
1
0
12 Mar '22
Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com>
---
This series allows Cubase 12 to proceed to the next problem.
include/wct.h | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 76 insertions(+)
diff --git a/include/wct.h b/include/wct.h
index 0cef59d7174e..6c239786916e 100644
--- a/include/wct.h
+++ b/include/wct.h
@@ -19,9 +19,85 @@
#ifndef __WINE_WCT_H
#define __WINE_WCT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define WCT_MAX_NODE_COUNT 16
+#define WCT_OBJNAME_LENGTH 128
+
+#define WCT_ASYNC_OPEN_FLAG 0x1
+#define WCTP_OPEN_ALL_FLAGS (WCT_ASYNC_OPEN_FLAG)
+
+#define WCT_OUT_OF_PROC_FLAG 0x1
+#define WCT_OUT_OF_PROC_COM_FLAG 0x2
+#define WCT_OUT_OF_PROC_CS_FLAG 0x4
+#define WCT_NETWORK_IO_FLAG 0x8
+#define WCTP_GETINFO_ALL_FLAGS (WCT_OUT_OF_PROC_FLAG|WCT_OUT_OF_PROC_COM_FLAG|WCT_OUT_OF_PROC_CS_FLAG)
+
+typedef enum _WCT_OBJECT_TYPE
+{
+ WctCriticalSectionType = 1,
+ WctSendMessageType,
+ WctMutexType,
+ WctAlpcType,
+ WctComType,
+ WctThreadWaitType,
+ WctProcessWaitType,
+ WctThreadType,
+ WctComActivationType,
+ WctUnknownType,
+ WctSocketIoType,
+ WctSmbIoType,
+ WctMaxType
+} WCT_OBJECT_TYPE;
+
+typedef enum _WCT_OBJECT_STATUS
+{
+ WctStatusNoAccess = 1,
+ WctStatusRunning,
+ WctStatusBlocked,
+ WctStatusPidOnly,
+ WctStatusPidOnlyRpcss,
+ WctStatusOwned,
+ WctStatusNotOwned,
+ WctStatusAbandoned,
+ WctStatusUnknown,
+ WctStatusError,
+ WctStatusMax
+} WCT_OBJECT_STATUS;
+
+typedef struct _WAITCHAIN_NODE_INFO
+{
+ WCT_OBJECT_TYPE ObjectType;
+ WCT_OBJECT_STATUS ObjectStatus;
+ __C89_NAMELESS union {
+ struct {
+ WCHAR ObjectName[WCT_OBJNAME_LENGTH];
+ LARGE_INTEGER Timeout;
+ BOOL Alertable;
+ } LockObject;
+ struct {
+ DWORD ProcessId;
+ DWORD ThreadId;
+ DWORD WaitTime;
+ DWORD ContextSwitches;
+ } ThreadObject;
+ };
+} WAITCHAIN_NODE_INFO, *PWAITCHAIN_NODE_INFO;
+
+typedef LPVOID HWCT;
+typedef VOID (CALLBACK *PWAITCHAINCALLBACK) (HWCT,DWORD_PTR,DWORD,LPDWORD,PWAITCHAIN_NODE_INFO,LPBOOL);
typedef HRESULT (WINAPI *PCOGETCALLSTATE)(int,PULONG);
typedef HRESULT (WINAPI *PCOGETACTIVATIONSTATE)(GUID,DWORD,DWORD*);
+VOID WINAPI CloseThreadWaitChainSession(HWCT);
+BOOL WINAPI GetThreadWaitChain(HWCT,DWORD_PTR,DWORD,DWORD,LPDWORD,PWAITCHAIN_NODE_INFO,LPBOOL);
+HWCT WINAPI OpenThreadWaitChainSession(DWORD,PWAITCHAINCALLBACK);
void WINAPI RegisterWaitChainCOMCallback(PCOGETCALLSTATE,PCOGETACTIVATIONSTATE);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __WINE_WCT_H */
--
2.35.1
1
2
12 Mar '22
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52520
Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com>
---
The stub allows the installer from the linked bug to finish successfully.
dlls/setupapi/setupapi.spec | 1 +
dlls/setupapi/stubs.c | 9 +++++++++
2 files changed, 10 insertions(+)
diff --git a/dlls/setupapi/setupapi.spec b/dlls/setupapi/setupapi.spec
index 1b3f5cc6bd80..06d423373b8e 100644
--- a/dlls/setupapi/setupapi.spec
+++ b/dlls/setupapi/setupapi.spec
@@ -336,6 +336,7 @@
@ stub SetupDiGetClassImageListExW
@ stub SetupDiGetClassInstallParamsA
@ stub SetupDiGetClassInstallParamsW
+@ stdcall SetupDiGetClassRegistryPropertyW(ptr long ptr ptr long ptr wstr ptr)
@ stub SetupDiGetDeviceInfoListClass
@ stdcall SetupDiGetDeviceInfoListDetailA(ptr ptr)
@ stdcall SetupDiGetDeviceInfoListDetailW(ptr ptr)
diff --git a/dlls/setupapi/stubs.c b/dlls/setupapi/stubs.c
index af058b8eac8e..4b1585c8df64 100644
--- a/dlls/setupapi/stubs.c
+++ b/dlls/setupapi/stubs.c
@@ -667,3 +667,12 @@ CONFIGRET WINAPI CM_Request_Device_EjectW(DEVINST dev, PPNP_VETO_TYPE type, LPWS
FIXME("(0x%08lx, %p, %p, %lu, 0x%08lx) stub\n", dev, type, name, length, flags);
return CR_SUCCESS;
}
+
+BOOL WINAPI SetupDiGetClassRegistryPropertyW(const GUID *class, DWORD prop, DWORD *datatype, BYTE *buff, DWORD size,
+ DWORD *req_size, const WCHAR *name, VOID *reserved)
+{
+ FIXME("class %s, prop %ld, datatype %p, buff %p, size %ld, req_size %p, name %s, reserved %p stub!\n",
+ debugstr_guid(class), prop, datatype, buff, size, req_size, debugstr_w(name), reserved);
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return FALSE;
+}
--
2.35.1
1
0
[PATCH vkd3d] tests: Use only one heap for textures in the d3d12 shader runner.
by Zebediah Figura 12 Mar '22
by Zebediah Figura 12 Mar '22
12 Mar '22
The d3d12 specification forbids simultaneously binding more than one heap of a
given type.
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
Tested with 227604; I can reproduce the error without this patch applied and can
confirm this patch fixes it.
tests/shader_runner.c | 2 +-
tests/shader_runner.h | 2 ++
tests/shader_runner_d3d12.c | 24 ++++++++++++++++++------
3 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/tests/shader_runner.c b/tests/shader_runner.c
index 1808a581b..8cfdf052c 100644
--- a/tests/shader_runner.c
+++ b/tests/shader_runner.c
@@ -61,7 +61,7 @@ typedef int HRESULT;
#include "vkd3d_test.h"
#include "shader_runner.h"
-static void VKD3D_NORETURN VKD3D_PRINTF_FUNC(1, 2) fatal_error(const char *format, ...)
+void fatal_error(const char *format, ...)
{
va_list args;
diff --git a/tests/shader_runner.h b/tests/shader_runner.h
index 822a863f1..047f0d956 100644
--- a/tests/shader_runner.h
+++ b/tests/shader_runner.h
@@ -89,6 +89,8 @@ struct shader_runner_ops
void (*probe_vec4)(struct shader_context *context, const RECT *rect, const struct vec4 *v, unsigned int ulps);
};
+void fatal_error(const char *format, ...) VKD3D_NORETURN VKD3D_PRINTF_FUNC(1, 2);
+
void run_shader_tests(struct shader_context *context, int argc, char **argv, const struct shader_runner_ops *ops);
#ifdef _WIN32
diff --git a/tests/shader_runner_d3d12.c b/tests/shader_runner_d3d12.c
index 00bb9e414..571efeacd 100644
--- a/tests/shader_runner_d3d12.c
+++ b/tests/shader_runner_d3d12.c
@@ -29,7 +29,6 @@ struct d3d12_texture
struct texture t;
D3D12_DESCRIPTOR_RANGE descriptor_range;
- ID3D12DescriptorHeap *heap;
ID3D12Resource *resource;
unsigned int root_index;
};
@@ -44,6 +43,8 @@ struct d3d12_shader_context
struct shader_context c;
struct test_context test_context;
+
+ ID3D12DescriptorHeap *heap;
};
static struct d3d12_shader_context *d3d12_shader_context(struct shader_context *c)
@@ -77,6 +78,8 @@ static ID3D10Blob *compile_shader(const char *source, enum shader_model shader_m
return blob;
}
+#define MAX_RESOURCE_DESCRIPTORS 256
+
static struct texture *d3d12_runner_create_texture(struct shader_context *c, const struct texture_params *params)
{
struct d3d12_shader_context *context = d3d12_shader_context(c);
@@ -85,11 +88,17 @@ static struct texture *d3d12_runner_create_texture(struct shader_context *c, con
D3D12_SUBRESOURCE_DATA resource_data;
struct d3d12_texture *texture;
+ if (!context->heap)
+ context->heap = create_gpu_descriptor_heap(device,
+ D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, MAX_RESOURCE_DESCRIPTORS);
+
+ if (params->slot >= MAX_RESOURCE_DESCRIPTORS)
+ fatal_error("Resource slot %u is too high; please increase MAX_RESOURCE_DESCRIPTORS.\n", params->slot);
+
texture = calloc(1, sizeof(*texture));
texture->t.slot = params->slot;
- texture->heap = create_gpu_descriptor_heap(device, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, 1);
texture->resource = create_default_texture(device, params->width, params->height,
params->format, 0, D3D12_RESOURCE_STATE_COPY_DEST);
resource_data.pData = params->data;
@@ -99,7 +108,7 @@ static struct texture *d3d12_runner_create_texture(struct shader_context *c, con
transition_resource_state(test_context->list, texture->resource, D3D12_RESOURCE_STATE_COPY_DEST,
D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE | D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE);
ID3D12Device_CreateShaderResourceView(device, texture->resource,
- NULL, get_cpu_descriptor_handle(test_context, texture->heap, 0));
+ NULL, get_cpu_descriptor_handle(test_context, context->heap, params->slot));
return &texture->t;
}
@@ -108,7 +117,6 @@ static void d3d12_runner_destroy_texture(struct shader_context *c, struct textur
{
struct d3d12_texture *texture = d3d12_texture(t);
- ID3D12DescriptorHeap_Release(texture->heap);
ID3D12Resource_Release(texture->resource);
free(texture);
}
@@ -214,7 +222,7 @@ static void d3d12_runner_draw_quad(struct shader_context *c)
struct d3d12_texture *texture = d3d12_texture(context->c.textures[i]);
ID3D12GraphicsCommandList_SetGraphicsRootDescriptorTable(command_list, texture->root_index,
- get_gpu_descriptor_handle(test_context, texture->heap, 0));
+ get_gpu_descriptor_handle(test_context, context->heap, texture->t.slot));
}
ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &test_context->rtv, false, NULL);
@@ -266,12 +274,16 @@ void run_shader_tests_d3d12(int argc, char **argv)
.no_root_signature = true,
.rt_format = DXGI_FORMAT_R32G32B32A32_FLOAT,
};
- struct d3d12_shader_context context;
+ struct d3d12_shader_context context = {0};
parse_args(argc, argv);
enable_d3d12_debug_layer(argc, argv);
init_adapter_info();
init_test_context(&context.test_context, &desc);
+
run_shader_tests(&context.c, argc, argv, &d3d12_runner_ops);
+
+ if (context.heap)
+ ID3D12DescriptorHeap_Release(context.heap);
destroy_test_context(&context.test_context);
}
--
2.35.1
1
0
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
libs/vkd3d-shader/dxbc.c | 1 +
libs/vkd3d-shader/sm4.h | 1 +
libs/vkd3d-shader/trace.c | 1 +
libs/vkd3d-shader/vkd3d_shader_private.h | 1 +
4 files changed, 4 insertions(+)
diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c
index 78a06a721..2c9e3693c 100644
--- a/libs/vkd3d-shader/dxbc.c
+++ b/libs/vkd3d-shader/dxbc.c
@@ -890,6 +890,7 @@ static const struct vkd3d_sm4_opcode_info opcode_table[] =
{VKD3D_SM5_OP_DDIV, VKD3DSIH_DDIV, "d", "dd"},
{VKD3D_SM5_OP_DFMA, VKD3DSIH_DFMA, "d", "ddd"},
{VKD3D_SM5_OP_DRCP, VKD3DSIH_DRCP, "d", "d"},
+ {VKD3D_SM5_OP_MSAD, VKD3DSIH_MSAD, "u", "uuu"},
{VKD3D_SM5_OP_DTOI, VKD3DSIH_DTOI, "i", "d"},
{VKD3D_SM5_OP_DTOU, VKD3DSIH_DTOU, "u", "d"},
{VKD3D_SM5_OP_ITOD, VKD3DSIH_ITOD, "d", "i"},
diff --git a/libs/vkd3d-shader/sm4.h b/libs/vkd3d-shader/sm4.h
index 62bb4d12b..fd388c815 100644
--- a/libs/vkd3d-shader/sm4.h
+++ b/libs/vkd3d-shader/sm4.h
@@ -350,6 +350,7 @@ enum vkd3d_sm4_opcode
VKD3D_SM5_OP_DDIV = 0xd2,
VKD3D_SM5_OP_DFMA = 0xd3,
VKD3D_SM5_OP_DRCP = 0xd4,
+ VKD3D_SM5_OP_MSAD = 0xd5,
VKD3D_SM5_OP_DTOI = 0xd6,
VKD3D_SM5_OP_DTOU = 0xd7,
VKD3D_SM5_OP_ITOD = 0xd8,
diff --git a/libs/vkd3d-shader/trace.c b/libs/vkd3d-shader/trace.c
index c292c8471..6c30edc9d 100644
--- a/libs/vkd3d-shader/trace.c
+++ b/libs/vkd3d-shader/trace.c
@@ -225,6 +225,7 @@ static const char * const shader_opcode_names[] =
[VKD3DSIH_MOV ] = "mov",
[VKD3DSIH_MOVA ] = "mova",
[VKD3DSIH_MOVC ] = "movc",
+ [VKD3DSIH_MSAD ] = "msad",
[VKD3DSIH_MUL ] = "mul",
[VKD3DSIH_NE ] = "ne",
[VKD3DSIH_NOP ] = "nop",
diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h
index 177cf01d6..fa1cd6747 100644
--- a/libs/vkd3d-shader/vkd3d_shader_private.h
+++ b/libs/vkd3d-shader/vkd3d_shader_private.h
@@ -328,6 +328,7 @@ enum vkd3d_shader_opcode
VKD3DSIH_MOV,
VKD3DSIH_MOVA,
VKD3DSIH_MOVC,
+ VKD3DSIH_MSAD,
VKD3DSIH_MUL,
VKD3DSIH_NE,
VKD3DSIH_NOP,
--
2.35.1
1
0
[PATCH] programs/conhost/tests: loosen up some tests (that fail on some VMs)
by Eric Pouech 12 Mar '22
by Eric Pouech 12 Mar '22
12 Mar '22
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52648
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
programs/conhost/tests/tty.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/programs/conhost/tests/tty.c b/programs/conhost/tests/tty.c
index 849986a1c29..fa1552b3299 100644
--- a/programs/conhost/tests/tty.c
+++ b/programs/conhost/tests/tty.c
@@ -453,8 +453,9 @@ static void child_expect_read_result_(unsigned int line, HANDLE pipe, const WCHA
ok_(__FILE__,line)(!memcmp(expect, buf, count), "unexpected data %s\n", wine_dbgstr_w(buf));
}
-#define child_expect_read_control_result(a,b,c) child_expect_read_control_result_(__LINE__,a,b,c)
-static void child_expect_read_control_result_(unsigned int line, HANDLE pipe, const WCHAR *expect, DWORD state)
+#define child_expect_read_control_result(a,b,c) child_expect_read_control_result_(__LINE__,a,b,c,c)
+#define child_expect_read_control_result_broken(a,b,c,d) child_expect_read_control_result_(__LINE__,a,b,c,d)
+static void child_expect_read_control_result_(unsigned int line, HANDLE pipe, const WCHAR *expect, DWORD state, DWORD altstate)
{
size_t exlen = wcslen(expect);
WCHAR buf[4096];
@@ -468,7 +469,7 @@ static void child_expect_read_control_result_(unsigned int line, HANDLE pipe, co
count, sizeof(DWORD) + exlen * sizeof(WCHAR));
buf[count / sizeof(WCHAR)] = 0;
todo_wine_if(*(DWORD *)buf != state && *(DWORD *)buf == 0)
- ok_(__FILE__,line)(*(DWORD *)buf == state, "keyboard state: got %lx, expected %lx\n", *(DWORD *)buf, state);
+ ok_(__FILE__,line)(*(DWORD *)buf == state || broken(*(DWORD *)buf == altstate), "keyboard state: got %lx, expected %lx\n", *(DWORD *)buf, state);
ok_(__FILE__,line)(!memcmp(expect, ptr, count - sizeof(DWORD)), "unexpected data %s %s\n", wine_dbgstr_w(ptr), wine_dbgstr_w(expect));
}
@@ -1359,10 +1360,12 @@ static void test_read_console_control(void)
strcpy(buf, "def."); buf[3] = ctrl;
write_console_pipe(buf);
wcscpy(bufw, L"abcdef."); bufw[6] = (WCHAR)ctrl;
- child_expect_read_control_result(child_pipe, bufw,
- (ctrl == '\t' || ctrl == '\r') ? 0
- : ((ctrl == 30 || ctrl == 31) ? (LEFT_CTRL_PRESSED | SHIFT_PRESSED)
- : LEFT_CTRL_PRESSED));
+ if (ctrl == 30 || ctrl == 31)
+ child_expect_read_control_result_broken(child_pipe, bufw,
+ LEFT_CTRL_PRESSED | SHIFT_PRESSED, LEFT_CTRL_PRESSED);
+ else
+ child_expect_read_control_result(child_pipe, bufw,
+ (ctrl == '\t' || ctrl == '\r') ? 0 : LEFT_CTRL_PRESSED);
skip_sequence("\x1b[?25l"); /* hide cursor */
expect_output_sequence("def");
skip_sequence("\x1b[?25h"); /* show cursor */
2
1
[PATCH] include: Add IReference/IVectorView <BYTE> interface references.
by Alistair Leslie-Hughes 12 Mar '22
by Alistair Leslie-Hughes 12 Mar '22
12 Mar '22
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
include/windows.foundation.idl | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/windows.foundation.idl b/include/windows.foundation.idl
index 27bec63b0ef..91bf8862545 100644
--- a/include/windows.foundation.idl
+++ b/include/windows.foundation.idl
@@ -162,6 +162,7 @@ namespace Windows {
interface Windows.Foundation.Collections.IIterable<IInspectable *>;
interface Windows.Foundation.Collections.IIterator<HSTRING>;
interface Windows.Foundation.Collections.IIterator<IInspectable *>;
+ interface Windows.Foundation.Collections.IVectorView<BYTE>;
interface Windows.Foundation.Collections.IVectorView<HSTRING>;
interface Windows.Foundation.Collections.IVectorView<IInspectable *>;
interface Windows.Foundation.Collections.IVector<HSTRING>;
@@ -170,6 +171,7 @@ namespace Windows {
interface Windows.Foundation.EventHandler<IInspectable *>;
interface Windows.Foundation.AsyncOperationCompletedHandler<boolean>;
interface Windows.Foundation.IAsyncOperation<boolean>;
+ interface Windows.Foundation.IReference<BYTE>;
interface Windows.Foundation.IReference<INT32>;
}
}
--
2.35.1
2
1
Signed-off-by: Jinoh Kang <jinoh.kang.kr(a)gmail.com>
---
dlls/comctl32/dpa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/comctl32/dpa.c b/dlls/comctl32/dpa.c
index b8d23f6cafa..aa9a045e516 100644
--- a/dlls/comctl32/dpa.c
+++ b/dlls/comctl32/dpa.c
@@ -859,7 +859,7 @@ INT WINAPI DPA_Search (HDPA hdpa, LPVOID pFind, INT nStart,
r = hdpa->nItemCount - 1;
lpPtr = hdpa->ptrs;
while (r >= l) {
- x = (l + r) / 2;
+ x = l + (r - l) / 2;
n = (pfnCompare)(pFind, lpPtr[x], lParam);
if (n == 0)
return x;
--
2.34.1
1
0
Signed-off-by: Jinoh Kang <jinoh.kang.kr(a)gmail.com>
---
dlls/user32/spy.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/user32/spy.c b/dlls/user32/spy.c
index dc8e0b2a708..4d22acb43c2 100644
--- a/dlls/user32/spy.c
+++ b/dlls/user32/spy.c
@@ -1764,6 +1764,7 @@ static const CONTROL_CLASS cc_array[] = {
{TOOLTIPS_CLASSW, tooltips_array, ARRAY_SIZE(tooltips_array)},
{UPDOWN_CLASSW, updown_array, ARRAY_SIZE(updown_array)},
{RICHEDIT_CLASS20W, richedit_array, ARRAY_SIZE(richedit_array)},
+ {MSFTEDIT_CLASS, richedit_array, ARRAY_SIZE(richedit_array)},
{0, 0, 0}
};
--
2.34.1
1
0
12 Mar '22
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/user32/tests/menu.c | 333 +++++++++++++++++++++++-----------------------
1 file changed, 167 insertions(+), 166 deletions(-)
diff --git a/dlls/user32/tests/menu.c b/dlls/user32/tests/menu.c
index cc0a9e6d9fa..42db6d7c0d8 100644
--- a/dlls/user32/tests/menu.c
+++ b/dlls/user32/tests/menu.c
@@ -18,6 +18,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#undef WINE_NO_LONG_TYPES /* temporary for migration */
#include <stdarg.h>
#include <stdio.h>
@@ -120,9 +121,9 @@ static LRESULT WINAPI menu_ownerdraw_wnd_proc(HWND hwnd, UINT msg,
{
MEASUREITEMSTRUCT* pmis = (MEASUREITEMSTRUCT*)lparam;
if (winetest_debug > 1)
- trace("WM_MEASUREITEM received data %lx size %dx%d\n",
+ trace("WM_MEASUREITEM received data %Ix size %dx%d\n",
pmis->itemData, pmis->itemWidth, pmis->itemHeight);
- ok( !wparam, "wrong wparam %lx\n", wparam );
+ ok( !wparam, "wrong wparam %Ix\n", wparam );
ok( pmis->CtlType == ODT_MENU, "wrong type %x\n", pmis->CtlType );
MOD_odheight = pmis->itemHeight;
pmis->itemWidth = MODsizes[pmis->itemData].cx;
@@ -141,7 +142,7 @@ static LRESULT WINAPI menu_ownerdraw_wnd_proc(HWND hwnd, UINT msg,
if (winetest_debug > 1) {
RECT rc;
GetMenuItemRect( hwnd, (HMENU)pdis->hwndItem, pdis->itemData ,&rc);
- trace("WM_DRAWITEM received hwnd %p hmenu %p itemdata %ld item %d rc %s itemrc: %s\n",
+ trace("WM_DRAWITEM received hwnd %p hmenu %p itemdata %Id item %d rc %s itemrc: %s\n",
hwnd, pdis->hwndItem, pdis->itemData, pdis->itemID,
wine_dbgstr_rect(&pdis->rcItem), wine_dbgstr_rect(&rc));
oldpen=SelectObject( pdis->hDC, GetStockObject(
@@ -150,7 +151,7 @@ static LRESULT WINAPI menu_ownerdraw_wnd_proc(HWND hwnd, UINT msg,
pdis->rcItem.right,pdis->rcItem.bottom );
SelectObject( pdis->hDC, oldpen);
}
- ok( !wparam, "wrong wparam %lx\n", wparam );
+ ok( !wparam, "wrong wparam %Ix\n", wparam );
ok( pdis->CtlType == ODT_MENU, "wrong type %x\n", pdis->CtlType );
/* calculate widths of some menu texts */
if( ! MOD_txtsizes[0].size.cx)
@@ -236,7 +237,7 @@ static void test_getmenubarinfo(void)
hwnd = CreateWindowExA(0, (LPCSTR)MAKEINTATOM(atomMenuCheckClass), NULL,
WS_SYSMENU | WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 100, 100,
NULL, NULL, NULL, NULL);
- ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError());
+ ok(hwnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError());
/* no menu: getmenubarinfo should fail */
SetLastError(0xdeadbeef);
@@ -247,10 +248,10 @@ static void test_getmenubarinfo(void)
/* create menubar, no items yet */
hmenu = CreateMenu();
- ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError());
+ ok(hmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError());
ret = SetMenu(hwnd, hmenu);
- ok(ret, "SetMenu failed with error %d\n", GetLastError());
+ ok(ret, "SetMenu failed with error %ld\n", GetLastError());
SetLastError(0xdeadbeef);
ret = GetMenuBarInfo(NULL, OBJID_CLIENT, 0, &mbi);
@@ -285,7 +286,7 @@ static void test_getmenubarinfo(void)
ok(err == 0xdeadbeef, "err = %d\n", err);
ret = GetMenuBarInfo(hwnd, OBJID_MENU, 0, &mbi);
- ok(ret, "GetMenuBarInfo failed with error %d\n", GetLastError());
+ ok(ret, "GetMenuBarInfo failed with error %ld\n", GetLastError());
ok(mbi.rcBar.left == 0 && mbi.rcBar.top == 0 && mbi.rcBar.bottom == 0 && mbi.rcBar.right == 0,
"rcBar: Expected (0,0)-(0,0), got: %s\n", wine_dbgstr_rect(&mbi.rcBar));
@@ -300,7 +301,7 @@ static void test_getmenubarinfo(void)
ret = AppendMenuA(hmenu, MF_STRING , 101, "item 2");
ok(ret, "AppendMenu failed.\n");
ret = SetMenu(hwnd, hmenu);
- ok(ret, "SetMenu failed with error %d\n", GetLastError());
+ ok(ret, "SetMenu failed with error %ld\n", GetLastError());
SetLastError(0xdeadbeef);
ret = GetMenuBarInfo(hwnd, OBJID_MENU, 200, &mbi);
@@ -310,7 +311,7 @@ static void test_getmenubarinfo(void)
/* get info for the whole menu */
ret = GetMenuBarInfo(hwnd, OBJID_MENU, 0, &mbi);
- ok(ret, "GetMenuBarInfo failed with error %d\n", GetLastError());
+ ok(ret, "GetMenuBarInfo failed with error %ld\n", GetLastError());
/* calculate menu rectangle, from window rectangle and the position of the first item */
ret = GetWindowRect(hwnd, &rcw);
@@ -319,7 +320,7 @@ static void test_getmenubarinfo(void)
ok(ret, "GetMenuItemRect failed.\n");
todo_wine ok(mbi.rcBar.left == rci.left && mbi.rcBar.top == rci.top &&
mbi.rcBar.bottom == rci.bottom && mbi.rcBar.right == rcw.right - rci.left + rcw.left,
- "rcBar: Got %s instead of (%d,%d)-(%d,%d)\n", wine_dbgstr_rect(&mbi.rcBar),
+ "rcBar: Got %s instead of (%ld,%ld)-(%ld,%ld)\n", wine_dbgstr_rect(&mbi.rcBar),
rci.left, rci.top, rcw.right - rci.left + rcw.left, rci.bottom);
ok(mbi.hMenu == hmenu, "hMenu: Got %p instead of %p\n", mbi.hMenu, hmenu);
ok(mbi.fBarFocused == 0, "fBarFocused: got %d instead of 0\n", mbi.fBarFocused);
@@ -327,7 +328,7 @@ static void test_getmenubarinfo(void)
/* get info for item nr.2 */
ret = GetMenuBarInfo(hwnd, OBJID_MENU, 2, &mbi);
- ok(ret, "GetMenuBarInfo failed with error %d\n", GetLastError());
+ ok(ret, "GetMenuBarInfo failed with error %ld\n", GetLastError());
ret = GetMenuItemRect(hwnd, hmenu, 1, &rci);
ok(ret, "GetMenuItemRect failed.\n");
ok(EqualRect(&mbi.rcBar, &rci), "rcBar: Got %s instead of %s\n", wine_dbgstr_rect(&mbi.rcBar),
@@ -352,21 +353,21 @@ static void test_GetMenuItemRect(void)
hwnd = CreateWindowW((LPCWSTR)MAKEINTATOM(atomMenuCheckClass), NULL, WS_OVERLAPPEDWINDOW, 0, 0, 100, 100, NULL,
NULL, NULL, NULL);
- ok(hwnd != NULL, "CreateWindow failed with error %d\n", GetLastError());
+ ok(hwnd != NULL, "CreateWindow failed with error %ld\n", GetLastError());
hmenu = CreateMenu();
- ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError());
+ ok(hmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError());
popup_hmenu = CreatePopupMenu();
- ok(popup_hmenu != NULL, "CreatePopupMenu failed with error %d\n", GetLastError());
+ ok(popup_hmenu != NULL, "CreatePopupMenu failed with error %ld\n", GetLastError());
ret = AppendMenuA(popup_hmenu, MF_STRING, 0, "Popup");
- ok(ret, "AppendMenu failed with error %d\n", GetLastError());
+ ok(ret, "AppendMenu failed with error %ld\n", GetLastError());
ret = AppendMenuA(hmenu, MF_STRING | MF_POPUP, (UINT_PTR)popup_hmenu, "Menu");
- ok(ret, "AppendMenu failed with error %d\n", GetLastError());
+ ok(ret, "AppendMenu failed with error %ld\n", GetLastError());
ret = SetMenu(hwnd, hmenu);
- ok(ret, "SetMenu failed with error %d\n", GetLastError());
+ ok(ret, "SetMenu failed with error %ld\n", GetLastError());
/* Get the menu item rectangle of the displayed sysmenu item */
ret = GetMenuItemRect(hwnd, hmenu, 0, &item_rect);
- ok(ret, "GetMenuItemRect failed with error %d\n", GetLastError());
+ ok(ret, "GetMenuItemRect failed with error %ld\n", GetLastError());
GetWindowRect(hwnd, &window_rect);
/* Get the screen coordinate of the left top corner of the client rectangle */
client_top_left.x = 0;
@@ -374,22 +375,22 @@ static void test_GetMenuItemRect(void)
MapWindowPoints(hwnd, 0, &client_top_left, 1);
caption_height = GetSystemMetrics(SM_CYFRAME) + GetSystemMetrics(SM_CYCAPTION);
- ok(item_rect.left == client_top_left.x, "Expect item_rect.left %d == %d\n", item_rect.left, client_top_left.x);
- ok(item_rect.right <= window_rect.right, "Expect item_rect.right %d <= %d\n", item_rect.right, window_rect.right);
+ ok(item_rect.left == client_top_left.x, "Expect item_rect.left %ld == %ld\n", item_rect.left, client_top_left.x);
+ ok(item_rect.right <= window_rect.right, "Expect item_rect.right %ld <= %ld\n", item_rect.right, window_rect.right);
/* A gap of 1 pixel is added deliberately in commit 75f9e64, so using equal operator would fail on Wine.
* Check that top and bottom are correct with 1 pixel margin tolerance */
- ok(item_rect.top - (window_rect.top + caption_height) <= 1, "Expect item_rect.top %d - %d <= 1\n", item_rect.top,
+ ok(item_rect.top - (window_rect.top + caption_height) <= 1, "Expect item_rect.top %ld - %ld <= 1\n", item_rect.top,
window_rect.top + caption_height);
- ok(item_rect.bottom - (client_top_left.y - 1) <= 1, "Expect item_rect.bottom %d - %d <= 1\n", item_rect.bottom,
+ ok(item_rect.bottom - (client_top_left.y - 1) <= 1, "Expect item_rect.bottom %ld - %ld <= 1\n", item_rect.bottom,
client_top_left.y - 1);
/* Get the item rectangle of the not yet displayed popup menu item. */
ret = GetMenuItemRect(hwnd, popup_hmenu, 0, &item_rect);
- ok(ret, "GetMenuItemRect failed with error %d\n", GetLastError());
- ok(item_rect.left == client_top_left.x, "Expect item_rect.left %d == %d\n", item_rect.left, client_top_left.x);
- ok(item_rect.right == client_top_left.x, "Expect item_rect.right %d == %d\n", item_rect.right, client_top_left.x);
- ok(item_rect.top == client_top_left.y, "Expect item_rect.top %d == %d\n", item_rect.top, client_top_left.y);
- ok(item_rect.bottom == client_top_left.y, "Expect item_rect.bottom %d == %d\n", item_rect.bottom,
+ ok(ret, "GetMenuItemRect failed with error %ld\n", GetLastError());
+ ok(item_rect.left == client_top_left.x, "Expect item_rect.left %ld == %ld\n", item_rect.left, client_top_left.x);
+ ok(item_rect.right == client_top_left.x, "Expect item_rect.right %ld == %ld\n", item_rect.right, client_top_left.x);
+ ok(item_rect.top == client_top_left.y, "Expect item_rect.top %ld == %ld\n", item_rect.top, client_top_left.y);
+ ok(item_rect.bottom == client_top_left.y, "Expect item_rect.bottom %ld == %ld\n", item_rect.bottom,
client_top_left.y);
DestroyWindow(hwnd);
@@ -410,7 +411,7 @@ static void test_system_menu(void)
hwnd = CreateWindowExA(0, (LPCSTR)MAKEINTATOM(atomMenuCheckClass), NULL,
WS_SYSMENU | WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 100, 100,
NULL, NULL, NULL, NULL);
- ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError());
+ ok(hwnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError());
menu = GetSystemMenu( hwnd, FALSE );
ok( menu != NULL, "no system menu\n" );
@@ -533,7 +534,7 @@ static void test_system_menu(void)
/* now a normal (non-system) menu */
menu = CreateMenu();
- ok( menu != NULL, "CreateMenu failed with error %d\n", GetLastError() );
+ ok( menu != NULL, "CreateMenu failed with error %ld\n", GetLastError() );
res = CheckMenuItem( menu, SC_TASKLIST, 0 );
ok( res == -1, "CheckMenuItem succeeded\n" );
@@ -544,9 +545,9 @@ static void test_system_menu(void)
ret = RemoveMenu( menu, SC_TASKLIST, 0 );
ok( !ret, "RemoveMenu succeeded\n" );
ret = ModifyMenuA( menu, SC_TASKLIST, 0, SC_TASKLIST, "test" );
- ok( ret, "ModifyMenuA failed err %d\n", GetLastError() );
+ ok( ret, "ModifyMenuA failed err %ld\n", GetLastError() );
ret = ModifyMenuW( menu, SC_TASKLIST, 0, SC_TASKLIST, testW );
- ok( ret, "ModifyMenuW failed err %d\n", GetLastError() );
+ ok( ret, "ModifyMenuW failed err %ld\n", GetLastError() );
ret = ModifyMenuA( menu, SC_TASKLIST-1, 0, SC_TASKLIST, "test" );
ok( !ret, "ModifyMenu succeeded on SC_TASKLIST-1\n" );
strcpy( buffer, "test" );
@@ -589,18 +590,18 @@ static void test_menu_locked_by_window(void)
HWND hwnd = CreateWindowExA(0, (LPCSTR)MAKEINTATOM(atomMenuCheckClass), NULL,
WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 200, 200,
NULL, NULL, NULL, NULL);
- ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError());
+ ok(hwnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError());
hmenu = CreateMenu();
- ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError());
+ ok(hmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError());
ret = InsertMenuA(hmenu, 0, MF_STRING, 0, "&Test");
- ok(ret, "InsertMenu failed with error %d\n", GetLastError());
+ ok(ret, "InsertMenu failed with error %ld\n", GetLastError());
ret = SetMenu(hwnd, hmenu);
- ok(ret, "SetMenu failed with error %d\n", GetLastError());
+ ok(ret, "SetMenu failed with error %ld\n", GetLastError());
ret = DestroyMenu(hmenu);
- ok(ret, "DestroyMenu failed with error %d\n", GetLastError());
+ ok(ret, "DestroyMenu failed with error %ld\n", GetLastError());
ret = DrawMenuBar(hwnd);
- ok(ret, "DrawMenuBar failed with error %d\n", GetLastError());
+ ok(ret, "DrawMenuBar failed with error %ld\n", GetLastError());
ret = IsMenu(GetMenu(hwnd));
ok(!ret || broken(ret) /* nt4 */, "Menu handle should have been destroyed\n");
@@ -645,38 +646,38 @@ static void test_subpopup_locked_by_menu(void)
hwnd = CreateWindowExA(0, (LPCSTR)MAKEINTATOM(atomMenuCheckClass), NULL,
WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 200, 200,
NULL, NULL, NULL, NULL);
- ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError());
+ ok(hwnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError());
SetWindowLongPtrA( hwnd, GWLP_WNDPROC, (LONG_PTR) subpopuplocked_wnd_proc);
hmenu = CreatePopupMenu();
- ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError());
+ ok(hmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError());
hsubmenu = CreatePopupMenu();
- ok(hsubmenu != NULL, "CreateMenu failed with error %d\n", GetLastError());
+ ok(hsubmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError());
ret = InsertMenuA(hmenu, 0, MF_BYPOSITION | MF_POPUP | MF_STRING, (UINT_PTR)hsubmenu,
"PopUpLockTest");
- ok(ret, "InsertMenu failed with error %d\n", GetLastError());
+ ok(ret, "InsertMenu failed with error %ld\n", GetLastError());
ret = InsertMenuA(hsubmenu, 0, MF_BYPOSITION | MF_STRING, itemid, "PopUpMenu");
- ok(ret, "InsertMenu failed with error %d\n", GetLastError());
+ ok(ret, "InsertMenu failed with error %ld\n", GetLastError());
/* first some tests that all this functions properly */
mii.fMask = MIIM_SUBMENU;
ret = GetMenuItemInfoA( hmenu, 0, TRUE, &mii);
- ok( ret, "GetMenuItemInfo failed error %d\n", GetLastError());
+ ok( ret, "GetMenuItemInfo failed error %ld\n", GetLastError());
ok( mii.hSubMenu == hsubmenu, "submenu is %p\n", mii.hSubMenu);
mi.fMask |= MIM_STYLE;
ret = GetMenuInfo( hsubmenu, &mi);
- ok( ret , "GetMenuInfo returned 0 with error %d\n", GetLastError());
+ ok( ret , "GetMenuInfo returned 0 with error %ld\n", GetLastError());
ret = IsMenu( hsubmenu);
ok( ret , "Menu handle is not valid\n");
ret = TrackPopupMenu( hmenu, TPM_RETURNCMD, 100,100, 0, hwnd, NULL);
- ok( ret == itemid , "TrackPopupMenu returned %d error is %d\n", ret, GetLastError());
+ ok( ret == itemid , "TrackPopupMenu returned %d error is %ld\n", ret, GetLastError());
/* then destroy the sub-popup */
ret = DestroyMenu( hsubmenu);
- ok(ret, "DestroyMenu failed with error %d\n", GetLastError());
+ ok(ret, "DestroyMenu failed with error %ld\n", GetLastError());
/* and repeat the tests */
mii.fMask = MIIM_SUBMENU;
ret = GetMenuItemInfoA( hmenu, 0, TRUE, &mii);
- ok( ret, "GetMenuItemInfo failed error %d\n", GetLastError());
+ ok( ret, "GetMenuItemInfo failed error %ld\n", GetLastError());
/* GetMenuInfo fails now */
ok( mii.hSubMenu == hsubmenu, "submenu is %p\n", mii.hSubMenu);
mi.fMask |= MIM_STYLE;
@@ -689,7 +690,7 @@ static void test_subpopup_locked_by_menu(void)
/* but TrackPopupMenu still works! */
ret = TrackPopupMenu( hmenu, TPM_RETURNCMD, 100,100, 0, hwnd, NULL);
todo_wine {
- ok( ret == itemid , "TrackPopupMenu returned %d error is %d\n", ret, GetLastError());
+ ok( ret == itemid , "TrackPopupMenu returned %d error is %ld\n", ret, GetLastError());
}
/* clean up */
@@ -707,11 +708,11 @@ static void test_menu_ownerdraw(void)
HWND hwnd = CreateWindowExA(0, (LPCSTR)MAKEINTATOM(atomMenuCheckClass), NULL,
WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 200, 200,
NULL, NULL, NULL, NULL);
- ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError());
+ ok(hwnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError());
if( !hwnd) return;
SetWindowLongPtrA( hwnd, GWLP_WNDPROC, (LONG_PTR)menu_ownerdraw_wnd_proc);
hmenu = CreatePopupMenu();
- ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError());
+ ok(hmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError());
if( !hmenu) { DestroyWindow(hwnd);return;}
k=0;
for( j=0;j<2;j++) /* create columns */
@@ -731,11 +732,11 @@ static void test_menu_ownerdraw(void)
"item rectangles are not separated by 4 pixels space\n");
/* height should be what the MEASUREITEM message has returned */
ok( MOD_rc[0].bottom - MOD_rc[0].top == MOD_SIZE,
- "menu item has wrong height: %d should be %d\n",
+ "menu item has wrong height: %ld should be %d\n",
MOD_rc[0].bottom - MOD_rc[0].top, MOD_SIZE);
/* no gaps between the rows */
ok( MOD_rc[0].bottom - MOD_rc[1].top == 0,
- "There should not be a space between the rows, gap is %d\n",
+ "There should not be a space between the rows, gap is %ld\n",
MOD_rc[0].bottom - MOD_rc[1].top);
/* test the correct value of the item height that was sent
* by the WM_MEASUREITEM message */
@@ -751,15 +752,15 @@ static void test_menu_ownerdraw(void)
TrackPopupMenu( hmenu, TPM_RETURNCMD, 100,100, 0, hwnd, NULL);
/* left should be 4 pixels less now */
ok( leftcol == MOD_rc[0].left + 4,
- "columns should be 4 pixels to the left (actual %d).\n",
+ "columns should be 4 pixels to the left (actual %ld).\n",
leftcol - MOD_rc[0].left);
/* test width */
ok( MOD_rc[0].right - MOD_rc[0].left == 2 * MOD_avec + MOD_SIZE,
- "width of owner drawn menu item is wrong. Got %d expected %d\n",
+ "width of owner drawn menu item is wrong. Got %ld expected %d\n",
MOD_rc[0].right - MOD_rc[0].left , 2*MOD_avec + MOD_SIZE);
/* and height */
ok( MOD_rc[0].bottom - MOD_rc[0].top == MOD_SIZE,
- "Height is incorrect. Got %d expected %d\n",
+ "Height is incorrect. Got %ld expected %d\n",
MOD_rc[0].bottom - MOD_rc[0].top, MOD_SIZE);
/* test owner-drawn callback bitmap */
@@ -776,9 +777,9 @@ static void test_menu_ownerdraw(void)
/* test width/height of an ownerdraw menu bar as well */
ret = DestroyMenu(hmenu);
- ok(ret, "DestroyMenu failed with error %d\n", GetLastError());
+ ok(ret, "DestroyMenu failed with error %ld\n", GetLastError());
hmenu = CreateMenu();
- ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError());
+ ok(hmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError());
if( !hmenu) { DestroyWindow(hwnd);return;}
MOD_maxid=1;
for(i=0;i<2;i++) {
@@ -787,19 +788,19 @@ static void test_menu_ownerdraw(void)
}
ret = SetMenu( hwnd, hmenu);
UpdateWindow( hwnd); /* hack for wine to draw the window + menu */
- ok(ret, "SetMenu failed with error %d\n", GetLastError());
+ ok(ret, "SetMenu failed with error %ld\n", GetLastError());
/* test width */
ok( MOD_rc[0].right - MOD_rc[0].left == 2 * MOD_avec + MOD_SIZE,
- "width of owner drawn menu item is wrong. Got %d expected %d\n",
+ "width of owner drawn menu item is wrong. Got %ld expected %d\n",
MOD_rc[0].right - MOD_rc[0].left , 2*MOD_avec + MOD_SIZE);
/* test height */
ok( MOD_rc[0].bottom - MOD_rc[0].top == GetSystemMetrics( SM_CYMENU) - 1,
- "Height of owner drawn menu item is wrong. Got %d expected %d\n",
+ "Height of owner drawn menu item is wrong. Got %ld expected %d\n",
MOD_rc[0].bottom - MOD_rc[0].top, GetSystemMetrics( SM_CYMENU) - 1);
/* clean up */
ret = DestroyMenu(hmenu);
- ok(ret, "DestroyMenu failed with error %d\n", GetLastError());
+ ok(ret, "DestroyMenu failed with error %ld\n", GetLastError());
DestroyWindow(hwnd);
}
@@ -841,12 +842,12 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt,
mii.hbmpItem = hbmp;
}
submenu = CreateMenu();
- ok( submenu != 0, "CreateMenu failed with error %d\n", GetLastError());
+ ok( submenu != 0, "CreateMenu failed with error %ld\n", GetLastError());
if( ispop)
hmenu = CreatePopupMenu();
else
hmenu = CreateMenu();
- ok( hmenu != 0, "Create{Popup}Menu failed with error %d\n", GetLastError());
+ ok( hmenu != 0, "Create{Popup}Menu failed with error %ld\n", GetLastError());
if( hassub) {
mii.fMask |= MIIM_SUBMENU;
mii.hSubMenu = submenu;
@@ -857,10 +858,10 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt,
GetMenuInfo( hmenu, &mi);
if( mnuopt) mi.dwStyle |= mnuopt == 1 ? MNS_NOCHECK : MNS_CHECKORBMP;
ret = SetMenuInfo( hmenu, &mi);
- ok( ret, "SetMenuInfo failed with error %d\n", GetLastError());
+ ok( ret, "SetMenuInfo failed with error %ld\n", GetLastError());
}
ret = InsertMenuItemA( hmenu, 0, FALSE, &mii);
- ok( ret, "InsertMenuItem failed with error %d\n", GetLastError());
+ ok( ret, "InsertMenuItem failed with error %ld\n", GetLastError());
failed = !ret;
if( winetest_debug) {
HDC hdc=GetDC(hwnd);
@@ -876,11 +877,11 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt,
TrackPopupMenu( hmenu, TPM_RETURNCMD, 100,100, 0, hwnd, NULL);
else {
ret = SetMenu( hwnd, hmenu);
- ok(ret, "SetMenu failed with error %d\n", GetLastError());
+ ok(ret, "SetMenu failed with error %ld\n", GetLastError());
DrawMenuBar( hwnd);
}
ret = GetMenuItemRect( hwnd, hmenu, 0, &rc);
- ok(ret, "GetMenuItemRect failed with error %d\n", GetLastError());
+ ok(ret, "GetMenuItemRect failed with error %ld\n", GetLastError());
if (0) /* comment out menu size checks, behavior is different in almost every Windows version */
/* the tests should however succeed on win2000, XP and Wine (at least up to 1.1.15) */
@@ -902,7 +903,7 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt,
( hbmp ? (text ? 2:0) + bmpsize.cx : 0 ) +
(text ? 2 * MOD_avec + (text[0] ? size.cx :0): 0) ;
ok( rc.right - rc.left == expect,
- "menu width wrong, got %d expected %d\n", rc.right - rc.left, expect);
+ "menu width wrong, got %ld expected %d\n", rc.right - rc.left, expect);
failed = failed || !(rc.right - rc.left == expect);
/* check menu height */
if( ispop)
@@ -917,7 +918,7 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt,
expect = ( !(text || hbmp) ? GetSystemMetrics( SM_CYMENUSIZE)/2 :
max( GetSystemMetrics( SM_CYMENU) - 1, (hbmp ? bmpsize.cy : 0)));
ok( rc.bottom - rc.top == expect,
- "menu height wrong, got %d expected %d (%d)\n",
+ "menu height wrong, got %ld expected %d (%d)\n",
rc.bottom - rc.top, expect, GetSystemMetrics( SM_CYMENU));
failed = failed || !(rc.bottom - rc.top == expect);
if( hbmp == HBMMENU_CALLBACK && MOD_GotDrawItemMsg) {
@@ -932,18 +933,18 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt,
else /* mnuopt == 2 */
expect = 2;
ok( expect == MOD_rc[0].left,
- "bitmap left is %d expected %d\n", MOD_rc[0].left, expect);
+ "bitmap left is %ld expected %d\n", MOD_rc[0].left, expect);
failed = failed || !(expect == MOD_rc[0].left);
/* vertical */
expect = (rc.bottom - rc.top - MOD_rc[0].bottom + MOD_rc[0].top) / 2;
ok( expect == MOD_rc[0].top,
- "bitmap top is %d expected %d\n", MOD_rc[0].top, expect);
+ "bitmap top is %ld expected %d\n", MOD_rc[0].top, expect);
failed = failed || !(expect == MOD_rc[0].top);
}
}
/* if there was a failure, report details */
if( failed) {
- trace("*** count %d %s text \"%s\" bitmap %p bmsize %d,%d textsize %d+%d,%d mnuopt %d hastab %d\n",
+ trace("*** count %d %s text \"%s\" bitmap %p bmsize %ld,%ld textsize %ld+%ld,%ld mnuopt %d hastab %d\n",
count, (ispop? "POPUP": "MENUBAR"),text ? text: "(nil)", hbmp, bmpsize.cx, bmpsize.cy,
size.cx, size.cy, sc_size.cx, mnuopt, hastab);
trace(" check %d,%d arrow %d avechar %d\n",
@@ -954,9 +955,9 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt,
}
/* clean up */
ret = DestroyMenu(submenu);
- ok(ret, "DestroyMenu failed with error %d\n", GetLastError());
+ ok(ret, "DestroyMenu failed with error %ld\n", GetLastError());
ret = DestroyMenu(hmenu);
- ok(ret, "DestroyMenu failed with error %d\n", GetLastError());
+ ok(ret, "DestroyMenu failed with error %ld\n", GetLastError());
}
@@ -980,21 +981,21 @@ static void test_menu_bmp_and_string(void)
hbm_arrow = LoadBitmapA( 0, (LPCSTR)OBM_MNARROW);
GetObjectA( hbm_arrow, sizeof(bm), &bm);
arrowwidth = bm.bmWidth;
- ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError());
+ ok(hwnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError());
if( !hwnd) return;
/* test system menu */
hsysmenu = GetSystemMenu( hwnd, FALSE);
- ok( hsysmenu != NULL, "GetSystemMenu failed with error %d\n", GetLastError());
+ ok( hsysmenu != NULL, "GetSystemMenu failed with error %ld\n", GetLastError());
mi.fMask = MIM_STYLE;
mi.dwStyle = 0;
got = GetMenuInfo( hsysmenu, &mi);
- ok( got, "GetMenuInfo failed gle=%d\n", GetLastError());
- ok( MNS_CHECKORBMP == mi.dwStyle, "System Menu Style is %08x, without the bit %08x\n",
+ ok( got, "GetMenuInfo failed gle=%ld\n", GetLastError());
+ ok( MNS_CHECKORBMP == mi.dwStyle, "System Menu Style is %08lx, without the bit %08x\n",
mi.dwStyle, MNS_CHECKORBMP);
mii.fMask = MIIM_BITMAP;
mii.hbmpItem = NULL;
got = GetMenuItemInfoA( hsysmenu, SC_CLOSE, FALSE, &mii);
- ok( got, "GetMenuItemInfoA failed gle=%d\n", GetLastError());
+ ok( got, "GetMenuItemInfoA failed gle=%ld\n", GetLastError());
ok( HBMMENU_POPUP_CLOSE == mii.hbmpItem, "Item info did not get the right hbitmap: got %p expected %p\n",
mii.hbmpItem, HBMMENU_POPUP_CLOSE);
@@ -1010,7 +1011,7 @@ static void test_menu_bmp_and_string(void)
ok(mii.fState == MF_ENABLED, "expected MF_ENABLED, got %#x\n", mii.fState);
ok(mii.wID == SC_RESTORE, "expected SC_RESTORE, got %#x\n", mii.wID);
ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu);
- ok(mii.dwItemData == 0, "expected 0, got %#lx\n", mii.dwItemData);
+ ok(mii.dwItemData == 0, "expected 0, got %#Ix\n", mii.dwItemData);
ok(mii.dwTypeData == (LPSTR)bmfill, "expected %p, got %p\n", bmfill, mii.dwTypeData);
ok(mii.cch != 0, "cch should not be 0\n");
ok(mii.hbmpItem == HBMMENU_POPUP_RESTORE, "expected HBMMENU_POPUP_RESTORE, got %p\n", mii.hbmpItem);
@@ -1024,7 +1025,7 @@ static void test_menu_bmp_and_string(void)
ok(mii.fState == MF_ENABLED, "expected MF_ENABLED, got %#x\n", mii.fState);
ok(mii.wID == SC_RESTORE, "expected SC_RESTORE, got %#x\n", mii.wID);
ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu);
- ok(mii.dwItemData == 0, "expected 0, got %#lx\n", mii.dwItemData);
+ ok(mii.dwItemData == 0, "expected 0, got %#Ix\n", mii.dwItemData);
ok(mii.dwTypeData == (LPSTR)bmfill, "expected %p, got %p\n", bmfill, mii.dwTypeData);
ok(mii.cch != 0, "cch should not be 0\n");
ok(mii.hbmpItem == HBMMENU_POPUP_CLOSE, "expected HBMMENU_POPUP_CLOSE, got %p\n", mii.hbmpItem);
@@ -1043,7 +1044,7 @@ static void test_menu_bmp_and_string(void)
for( szidx=0; szidx < ARRAY_SIZE(bmsizes); szidx++) {
HBITMAP hbm = CreateBitmap( bmsizes[szidx].cx, bmsizes[szidx].cy,1,1,bmfill);
HBITMAP bitmaps[] = { HBMMENU_CALLBACK, hbm, HBMMENU_POPUP_CLOSE, NULL };
- ok( hbm != 0, "CreateBitmap failed err %d\n", GetLastError());
+ ok( hbm != 0, "CreateBitmap failed err %ld\n", GetLastError());
for( txtidx = 0; txtidx < ARRAY_SIZE(MOD_txtsizes); txtidx++) {
for( hassub = 0; hassub < 2 ; hassub++) { /* add submenu item */
for( mnuopt = 0; mnuopt < 3 ; mnuopt++){ /* test MNS_NOCHECK/MNS_CHECKORBMP */
@@ -1227,7 +1228,7 @@ static void insert_menu_item( int line, HMENU hmenu, BOOL ansi, UINT mask, UINT
if (ansi) ret = InsertMenuItemA( hmenu, 0, TRUE, &info );
else ret = InsertMenuItemW( hmenu, 0, TRUE, (MENUITEMINFOW*)&info );
if (!expect) ok_(__FILE__, line)( !ret, "InsertMenuItem should have failed.\n" );
- else ok_(__FILE__, line)( ret, "InsertMenuItem failed, err %u\n", GetLastError());
+ else ok_(__FILE__, line)( ret, "InsertMenuItem failed, err %lu\n", GetLastError());
}
static void check_menu_item_info( int line, HMENU hmenu, BOOL ansi, UINT mask, UINT type, UINT state,
@@ -1253,7 +1254,7 @@ static void check_menu_item_info( int line, HMENU hmenu, BOOL ansi, UINT mask, U
ok_(__FILE__, line)( !ret, "GetMenuItemInfo should have failed.\n" );
return;
}
- ok_(__FILE__, line)( ret, "GetMenuItemInfo failed, err %u\n", GetLastError());
+ ok_(__FILE__, line)( ret, "GetMenuItemInfo failed, err %lu\n", GetLastError());
if (mask & MIIM_TYPE)
ok_(__FILE__, line)( info.fType == type || info.fType == LOWORD(type),
"wrong type %x/%x\n", info.fType, type );
@@ -1275,7 +1276,7 @@ static void check_menu_item_info( int line, HMENU hmenu, BOOL ansi, UINT mask, U
}
if (mask & MIIM_DATA)
ok_(__FILE__, line)( info.dwItemData == data || info.dwItemData == LOWORD(data),
- "wrong item data %lx/%lx\n", info.dwItemData, data );
+ "wrong item data %Ix/%Ix\n", info.dwItemData, data );
if (mask & MIIM_BITMAP)
ok_(__FILE__, line)( info.hbmpItem == item || (ULONG_PTR)info.hbmpItem == LOWORD(item),
"wrong bmpitem %p/%p\n", info.hbmpItem, item );
@@ -1297,7 +1298,7 @@ static void check_menu_item_info( int line, HMENU hmenu, BOOL ansi, UINT mask, U
ret = ansi ? GetMenuStringA( hmenu, 0, (char *)buffer, 80, MF_BYPOSITION ) :
GetMenuStringW( hmenu, 0, buffer, 80, MF_BYPOSITION );
if (expstring)
- ok_(__FILE__, line)( ret, "GetMenuString failed, err %u\n", GetLastError());
+ ok_(__FILE__, line)( ret, "GetMenuString failed, err %lu\n", GetLastError());
else
ok_(__FILE__, line)( !ret, "GetMenuString should have failed\n" );
}
@@ -1310,7 +1311,7 @@ static void modify_menu( int line, HMENU hmenu, BOOL ansi, UINT flags, UINT_PTR
SetLastError( 0xdeadbeef );
if (ansi) ret = ModifyMenuA( hmenu, 0, flags, id, data );
else ret = ModifyMenuW( hmenu, 0, flags, id, data );
- ok_(__FILE__,line)( ret, "ModifyMenuA failed, err %u\n", GetLastError());
+ ok_(__FILE__,line)( ret, "ModifyMenuA failed, err %lu\n", GetLastError());
}
static void set_menu_item_info( int line, HMENU hmenu, BOOL ansi, UINT mask, UINT type, UINT state,
@@ -1340,7 +1341,7 @@ static void set_menu_item_info( int line, HMENU hmenu, BOOL ansi, UINT mask, UIN
SetLastError( 0xdeadbeef );
if (ansi) ret = SetMenuItemInfoA( hmenu, 0, TRUE, &info );
else ret = SetMenuItemInfoW( hmenu, 0, TRUE, (MENUITEMINFOW*)&info );
- ok_(__FILE__, line)( ret, "SetMenuItemInfo failed, err %u\n", GetLastError());
+ ok_(__FILE__, line)( ret, "SetMenuItemInfo failed, err %lu\n", GetLastError());
}
#define TMII_INSMI( c1,d1,e1,f1,g1,h1,i1,j1,k1,l1,m1,eret1 )\
@@ -2551,14 +2552,14 @@ static void test_menu_hilitemenuitem( void )
}
ok(GetLastError() == 0xdeadbeef || /* 9x */
GetLastError() == ERROR_INVALID_WINDOW_HANDLE /* NT */,
- "HiliteMenuItem: expected error ERROR_INVALID_WINDOW_HANDLE, got: %d\n", GetLastError());
+ "HiliteMenuItem: expected error ERROR_INVALID_WINDOW_HANDLE, got: %ld\n", GetLastError());
SetLastError(0xdeadbeef);
ok(!HiliteMenuItem(hWnd, NULL, 1, MF_HILITE | MF_BYPOSITION),
"HiliteMenuItem: call should have failed.\n");
ok(GetLastError() == 0xdeadbeef || /* 9x */
GetLastError() == ERROR_INVALID_MENU_HANDLE /* NT */,
- "HiliteMenuItem: expected error ERROR_INVALID_MENU_HANDLE, got: %d\n", GetLastError());
+ "HiliteMenuItem: expected error ERROR_INVALID_MENU_HANDLE, got: %ld\n", GetLastError());
ok(!(GetMenuState(hPopupMenu, 1, MF_BYPOSITION) & MF_HILITE),
"HiliteMenuItem: Item 2 is hilited\n");
@@ -2569,7 +2570,7 @@ static void test_menu_hilitemenuitem( void )
ok(HiliteMenuItem(hWnd, hPopupMenu, 1, MF_BYPOSITION),
"HiliteMenuItem: call should have succeeded.\n");
ok(GetLastError() == 0xdeadbeef,
- "HiliteMenuItem: expected error 0xdeadbeef, got: %d\n", GetLastError());
+ "HiliteMenuItem: expected error 0xdeadbeef, got: %ld\n", GetLastError());
ok(!(GetMenuState(hPopupMenu, 1, MF_BYPOSITION) & MF_HILITE),
"HiliteMenuItem: Item 2 is hilited\n");
@@ -2581,7 +2582,7 @@ static void test_menu_hilitemenuitem( void )
"HiliteMenuItem: call should have succeeded.\n");
}
ok(GetLastError() == 0xdeadbeef,
- "HiliteMenuItem: expected error 0xdeadbeef, got: %d\n", GetLastError());
+ "HiliteMenuItem: expected error 0xdeadbeef, got: %ld\n", GetLastError());
ok(!(GetMenuState(hPopupMenu, 1, MF_BYPOSITION) & MF_HILITE),
"HiliteMenuItem: Item 2 is hilited\n");
@@ -2592,7 +2593,7 @@ static void test_menu_hilitemenuitem( void )
ok(HiliteMenuItem(hWnd, hPopupMenu, 1, MF_HILITE | MF_BYPOSITION),
"HiliteMenuItem: call should not have failed.\n");
ok(GetLastError() == 0xdeadbeef,
- "HiliteMenuItem: expected error 0xdeadbeef, got: %d\n", GetLastError());
+ "HiliteMenuItem: expected error 0xdeadbeef, got: %ld\n", GetLastError());
todo_wine
{
@@ -2606,7 +2607,7 @@ static void test_menu_hilitemenuitem( void )
ok(HiliteMenuItem(hWnd, hPopupMenu, 1, MF_UNHILITE | MF_BYPOSITION),
"HiliteMenuItem: call should not have failed.\n");
ok(GetLastError() == 0xdeadbeef,
- "HiliteMenuItem: expected error 0xdeadbeef, got: %d\n", GetLastError());
+ "HiliteMenuItem: expected error 0xdeadbeef, got: %ld\n", GetLastError());
ok(!(GetMenuState(hPopupMenu, 1, MF_BYPOSITION) & MF_HILITE),
"HiliteMenuItem: Item 2 is hilited\n");
@@ -2617,7 +2618,7 @@ static void test_menu_hilitemenuitem( void )
ok(HiliteMenuItem(hWnd, hPopupMenu, 103, MF_HILITE | MF_BYCOMMAND),
"HiliteMenuItem: call should not have failed.\n");
ok(GetLastError() == 0xdeadbeef,
- "HiliteMenuItem: expected error 0xdeadbeef, got: %d\n", GetLastError());
+ "HiliteMenuItem: expected error 0xdeadbeef, got: %ld\n", GetLastError());
todo_wine
{
@@ -2631,7 +2632,7 @@ static void test_menu_hilitemenuitem( void )
ok(HiliteMenuItem(hWnd, hPopupMenu, 103, MF_UNHILITE | MF_BYCOMMAND),
"HiliteMenuItem: call should not have failed.\n");
ok(GetLastError() == 0xdeadbeef,
- "HiliteMenuItem: expected error 0xdeadbeef, got: %d\n", GetLastError());
+ "HiliteMenuItem: expected error 0xdeadbeef, got: %ld\n", GetLastError());
ok(!(GetMenuState(hPopupMenu, 2, MF_BYPOSITION) & MF_HILITE),
"HiliteMenuItem: Item 3 is hilited\n");
@@ -2797,7 +2798,7 @@ static void test_menu_resource_layout(void)
BOOL ret;
hmenu = LoadMenuIndirectA(&menu_template);
- ok(hmenu != 0, "LoadMenuIndirect error %u\n", GetLastError());
+ ok(hmenu != 0, "LoadMenuIndirect error %lu\n", GetLastError());
ret = AppendMenuA(hmenu, MF_STRING, 6, NULL);
ok(ret, "AppendMenu failed\n");
@@ -2860,7 +2861,7 @@ static HMENU create_menu_from_data(const struct menu_data *item, INT item_count)
{
SetLastError(0xdeadbeef);
ret = AppendMenuA(hmenu, item[i].type, item[i].id, item[i].str);
- ok(ret, "%d: AppendMenu(%04x, %04x, %p) error %u\n",
+ ok(ret, "%d: AppendMenu(%04x, %04x, %p) error %lu\n",
i, item[i].type, item[i].id, item[i].str, GetLastError());
}
return hmenu;
@@ -2902,7 +2903,7 @@ static HMENU create_menuitem_from_data(const struct menu_data *item, INT item_co
if( item[i].type & MF_HELP) mii.fType |= MF_HELP;
mii.wID = item[i].id;
ret = InsertMenuItemA( hmenu, -1, TRUE, &mii);
- ok(ret, "%d: InsertMenuItem(%04x, %04x, %p) error %u\n",
+ ok(ret, "%d: InsertMenuItem(%04x, %04x, %p) error %lu\n",
i, item[i].type, item[i].id, item[i].str, GetLastError());
}
return hmenu;
@@ -3086,7 +3087,7 @@ static void test_menu_getmenuinfo(void)
ok( !ret, "GetMenuInfo() should have failed\n");
ok( gle == ERROR_INVALID_PARAMETER ||
broken(gle == 0xdeadbeef), /* Win98, WinME */
- "GetMenuInfo() error got %u expected %u\n", gle, ERROR_INVALID_PARAMETER);
+ "GetMenuInfo() error got %lu expected %u\n", gle, ERROR_INVALID_PARAMETER);
SetLastError(0xdeadbeef);
mi.cbSize = 0;
ret = GetMenuInfo( hmenu, &mi);
@@ -3094,13 +3095,13 @@ static void test_menu_getmenuinfo(void)
ok( !ret, "GetMenuInfo() should have failed\n");
ok( gle == ERROR_INVALID_PARAMETER ||
broken(gle == 0xdeadbeef), /* Win98, WinME */
- "GetMenuInfo() error got %u expected %u\n", gle, ERROR_INVALID_PARAMETER);
+ "GetMenuInfo() error got %lu expected %u\n", gle, ERROR_INVALID_PARAMETER);
SetLastError(0xdeadbeef);
mi.cbSize = sizeof( MENUINFO);
ret = GetMenuInfo( hmenu, &mi);
gle= GetLastError();
ok( ret, "GetMenuInfo() should have succeeded\n");
- ok( gle == 0xdeadbeef, "GetMenuInfo() error got %u\n", gle);
+ ok( gle == 0xdeadbeef, "GetMenuInfo() error got %lu\n", gle);
SetLastError(0xdeadbeef);
mi.cbSize = 0;
ret = GetMenuInfo( NULL, &mi);
@@ -3108,7 +3109,7 @@ static void test_menu_getmenuinfo(void)
ok( !ret, "GetMenuInfo() should have failed\n");
ok( gle == ERROR_INVALID_PARAMETER ||
broken(gle == 0xdeadbeef), /* Win98, WinME */
- "GetMenuInfo() error got %u expected %u\n", gle, ERROR_INVALID_PARAMETER);
+ "GetMenuInfo() error got %lu expected %u\n", gle, ERROR_INVALID_PARAMETER);
/* clean up */
DestroyMenu( hmenu);
return;
@@ -3130,7 +3131,7 @@ static void test_menu_setmenuinfo(void)
mii.fMask = MIIM_SUBMENU;
mii.hSubMenu = hsubmenu;
ret = InsertMenuItemA( hmenu, 0, FALSE, &mii);
- ok( ret, "InsertMenuItem failed with error %d\n", GetLastError());
+ ok( ret, "InsertMenuItem failed with error %ld\n", GetLastError());
/* test some parameter errors */
SetLastError(0xdeadbeef);
ret = SetMenuInfo( hmenu, NULL);
@@ -3138,7 +3139,7 @@ static void test_menu_setmenuinfo(void)
ok( !ret, "SetMenuInfo() should have failed\n");
ok( gle == ERROR_INVALID_PARAMETER ||
broken(gle == 0xdeadbeef), /* Win98, WinME */
- "SetMenuInfo() error got %u expected %u\n", gle, ERROR_INVALID_PARAMETER);
+ "SetMenuInfo() error got %lu expected %u\n", gle, ERROR_INVALID_PARAMETER);
SetLastError(0xdeadbeef);
mi.cbSize = 0;
ret = SetMenuInfo( hmenu, &mi);
@@ -3146,13 +3147,13 @@ static void test_menu_setmenuinfo(void)
ok( !ret, "SetMenuInfo() should have failed\n");
ok( gle == ERROR_INVALID_PARAMETER ||
broken(gle == 0xdeadbeef), /* Win98, WinME */
- "SetMenuInfo() error got %u expected %u\n", gle, ERROR_INVALID_PARAMETER);
+ "SetMenuInfo() error got %lu expected %u\n", gle, ERROR_INVALID_PARAMETER);
SetLastError(0xdeadbeef);
mi.cbSize = sizeof( MENUINFO);
ret = SetMenuInfo( hmenu, &mi);
gle= GetLastError();
ok( ret, "SetMenuInfo() should have succeeded\n");
- ok( gle == 0xdeadbeef, "SetMenuInfo() error got %u\n", gle);
+ ok( gle == 0xdeadbeef, "SetMenuInfo() error got %lu\n", gle);
SetLastError(0xdeadbeef);
mi.cbSize = 0;
ret = SetMenuInfo( NULL, &mi);
@@ -3160,7 +3161,7 @@ static void test_menu_setmenuinfo(void)
ok( !ret, "SetMenuInfo() should have failed\n");
ok( gle == ERROR_INVALID_PARAMETER ||
broken(gle == 0xdeadbeef), /* Win98, WinME */
- "SetMenuInfo() error got %u expected %u\n", gle, ERROR_INVALID_PARAMETER);
+ "SetMenuInfo() error got %lu expected %u\n", gle, ERROR_INVALID_PARAMETER);
/* functional tests */
/* menu and submenu should have the CHECKORBMP style bit cleared */
SetLastError(0xdeadbeef);
@@ -3169,7 +3170,7 @@ static void test_menu_setmenuinfo(void)
ret = GetMenuInfo( hmenu, &mi);
gle= GetLastError();
ok( ret, "GetMenuInfo() should have succeeded\n");
- ok( gle == 0xdeadbeef, "GetMenuInfo() error got %u\n", gle);
+ ok( gle == 0xdeadbeef, "GetMenuInfo() error got %lu\n", gle);
ok( !(mi.dwStyle & MNS_CHECKORBMP), "menustyle was not expected to have the MNS_CHECKORBMP flag\n");
SetLastError(0xdeadbeef);
mi.cbSize = sizeof( MENUINFO);
@@ -3177,7 +3178,7 @@ static void test_menu_setmenuinfo(void)
ret = GetMenuInfo( hsubmenu, &mi);
gle= GetLastError();
ok( ret, "GetMenuInfo() should have succeeded\n");
- ok( gle == 0xdeadbeef, "GetMenuInfo() error got %u\n", gle);
+ ok( gle == 0xdeadbeef, "GetMenuInfo() error got %lu\n", gle);
ok( !(mi.dwStyle & MNS_CHECKORBMP), "menustyle was not expected to have the MNS_CHECKORBMP flag\n");
/* SetMenuInfo() */
SetLastError(0xdeadbeef);
@@ -3187,7 +3188,7 @@ static void test_menu_setmenuinfo(void)
ret = SetMenuInfo( hmenu, &mi);
gle= GetLastError();
ok( ret, "SetMenuInfo() should have succeeded\n");
- ok( gle == 0xdeadbeef, "SetMenuInfo() error got %u\n", gle);
+ ok( gle == 0xdeadbeef, "SetMenuInfo() error got %lu\n", gle);
/* Now both menus should have the MNS_CHECKORBMP style bit set */
SetLastError(0xdeadbeef);
mi.cbSize = sizeof( MENUINFO);
@@ -3195,7 +3196,7 @@ static void test_menu_setmenuinfo(void)
ret = GetMenuInfo( hmenu, &mi);
gle= GetLastError();
ok( ret, "GetMenuInfo() should have succeeded\n");
- ok( gle == 0xdeadbeef, "GetMenuInfo() error got %u\n", gle);
+ ok( gle == 0xdeadbeef, "GetMenuInfo() error got %lu\n", gle);
ok( mi.dwStyle & MNS_CHECKORBMP, "menustyle was expected to have the MNS_CHECKORBMP flag\n");
SetLastError(0xdeadbeef);
mi.cbSize = sizeof( MENUINFO);
@@ -3203,7 +3204,7 @@ static void test_menu_setmenuinfo(void)
ret = GetMenuInfo( hsubmenu, &mi);
gle= GetLastError();
ok( ret, "GetMenuInfo() should have succeeded\n");
- ok( gle == 0xdeadbeef, "GetMenuInfo() error got %u\n", gle);
+ ok( gle == 0xdeadbeef, "GetMenuInfo() error got %lu\n", gle);
ok( mi.dwStyle & MNS_CHECKORBMP, "menustyle was expected to have the MNS_CHECKORBMP flag\n");
/* now repeat that without the APPLYTOSUBMENUS flag and another style bit */
SetLastError(0xdeadbeef);
@@ -3213,7 +3214,7 @@ static void test_menu_setmenuinfo(void)
ret = SetMenuInfo( hmenu, &mi);
gle= GetLastError();
ok( ret, "SetMenuInfo() should have succeeded\n");
- ok( gle == 0xdeadbeef, "SetMenuInfo() error got %u\n", gle);
+ ok( gle == 0xdeadbeef, "SetMenuInfo() error got %lu\n", gle);
/* Now only the top menu should have the MNS_NOCHECK style bit set */
SetLastError(0xdeadbeef);
mi.cbSize = sizeof( MENUINFO);
@@ -3221,7 +3222,7 @@ static void test_menu_setmenuinfo(void)
ret = GetMenuInfo( hmenu, &mi);
gle= GetLastError();
ok( ret, "GetMenuInfo() should have succeeded\n");
- ok( gle == 0xdeadbeef, "GetMenuInfo() error got %u\n", gle);
+ ok( gle == 0xdeadbeef, "GetMenuInfo() error got %lu\n", gle);
ok( mi.dwStyle & MNS_NOCHECK, "menustyle was expected to have the MNS_NOCHECK flag\n");
SetLastError(0xdeadbeef);
mi.cbSize = sizeof( MENUINFO);
@@ -3229,7 +3230,7 @@ static void test_menu_setmenuinfo(void)
ret = GetMenuInfo( hsubmenu, &mi);
gle= GetLastError();
ok( ret, "GetMenuInfo() should have succeeded\n");
- ok( gle == 0xdeadbeef, "GetMenuInfo() error got %u\n", gle);
+ ok( gle == 0xdeadbeef, "GetMenuInfo() error got %lu\n", gle);
ok( !(mi.dwStyle & MNS_NOCHECK), "menustyle was not expected to have the MNS_NOCHECK flag\n");
/* test background brush */
@@ -3284,13 +3285,13 @@ static void test_menu_trackpopupmenu(void)
HWND hwnd = CreateWindowExA(0, (LPCSTR)MAKEINTATOM(atomMenuCheckClass), NULL,
WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 200, 200,
NULL, NULL, NULL, NULL);
- ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError());
+ ok(hwnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError());
if (!hwnd) return;
SetWindowLongPtrA( hwnd, GWLP_WNDPROC, (LONG_PTR)menu_ownerdraw_wnd_proc);
for( Ex = 0; Ex < 2; Ex++)
{
hmenu = CreatePopupMenu();
- ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError());
+ ok(hmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError());
if (!hmenu)
{
DestroyWindow(hwnd);
@@ -3307,7 +3308,7 @@ static void test_menu_trackpopupmenu(void)
ok( gle == ERROR_INVALID_MENU_HANDLE
|| broken (gle == 0xdeadbeef) /* win95 */
|| broken (gle == NO_ERROR) /* win98/ME */
- ,"TrackPopupMenu%s error got %u expected %u\n",
+ ,"TrackPopupMenu%s error got %lu expected %u\n",
Ex ? "Ex" : "", gle, ERROR_INVALID_MENU_HANDLE);
ok( !(gflag_initmenupopup || gflag_entermenuloop || gflag_initmenu),
"got unexpected message(s)%s%s%s\n",
@@ -3323,7 +3324,7 @@ static void test_menu_trackpopupmenu(void)
ok( gle == ERROR_INVALID_MENU_HANDLE
|| broken (gle == 0xdeadbeef) /* win95 */
|| broken (gle == NO_ERROR) /* win98/ME */
- ,"TrackPopupMenu%s error got %u expected %u\n",
+ ,"TrackPopupMenu%s error got %lu expected %u\n",
Ex ? "Ex" : "", gle, ERROR_INVALID_MENU_HANDLE);
ok( !(gflag_initmenupopup || gflag_entermenuloop || gflag_initmenu),
"got unexpected message(s)%s%s%s\n",
@@ -3337,7 +3338,7 @@ static void test_menu_trackpopupmenu(void)
ret = MyTrackPopupMenu( Ex, hmenu, TPM_RETURNCMD, 100,100, 0, NULL);
gle = GetLastError();
ok( !ret, "TrackPopupMenu%s should have failed\n", Ex ? "Ex" : "");
- ok( gle == ERROR_INVALID_WINDOW_HANDLE, "TrackPopupMenu%s error got %u\n", Ex ? "Ex" : "", gle );
+ ok( gle == ERROR_INVALID_WINDOW_HANDLE, "TrackPopupMenu%s error got %lu\n", Ex ? "Ex" : "", gle );
ok( !(gflag_initmenupopup || gflag_entermenuloop || gflag_initmenu),
"got unexpected message(s)%s%s%s\n",
gflag_initmenupopup ? " WM_INITMENUPOPUP ": " ",
@@ -3353,7 +3354,7 @@ static void test_menu_trackpopupmenu(void)
ok( gle == NO_ERROR
|| gle == ERROR_INVALID_MENU_HANDLE /* NT4, win2k */
|| broken (gle == 0xdeadbeef) /* win95 */
- ,"TrackPopupMenu%s error got %u expected %u or %u\n",
+ ,"TrackPopupMenu%s error got %lu expected %u or %u\n",
Ex ? "Ex" : "", gle, NO_ERROR, ERROR_INVALID_MENU_HANDLE);
ok( gflag_initmenupopup && gflag_entermenuloop && gflag_initmenu,
"missed expected message(s)%s%s%s\n",
@@ -3371,7 +3372,7 @@ static void test_menu_trackpopupmenu(void)
ok( gle == NO_ERROR
|| gle == ERROR_INVALID_MENU_HANDLE /* NT4, win2k and Vista in the TrackPopupMenuEx case */
|| broken (gle == 0xdeadbeef) /* win95 */
- ,"TrackPopupMenu%s error got %u expected %u or %u\n",
+ ,"TrackPopupMenu%s error got %lu expected %u or %u\n",
Ex ? "Ex" : "", gle, NO_ERROR, ERROR_INVALID_MENU_HANDLE);
ok( gflag_initmenupopup && gflag_entermenuloop && gflag_initmenu,
"missed expected message(s)%s%s%s\n",
@@ -3399,7 +3400,7 @@ static LRESULT WINAPI menu_track_again_wnd_proc(HWND hwnd, UINT msg, WPARAM wpar
ret = TrackPopupMenu(g_hmenu, 0, 100, 100, 0, hwnd, NULL);
ok(ret == FALSE, "got %d\n", ret);
ok(GetLastError() == ERROR_POPUP_ALREADY_ACTIVE ||
- broken(GetLastError() == 0xdeadbeef) /* W9x */, "got %d\n", GetLastError());
+ broken(GetLastError() == 0xdeadbeef) /* W9x */, "got %ld\n", GetLastError());
/* exit menu modal loop
* ( A SendMessage does not work on NT3.51 here ) */
@@ -3417,12 +3418,12 @@ static void test_menu_trackagain(void)
hwnd = CreateWindowExA(0, (LPCSTR)MAKEINTATOM(atomMenuCheckClass), NULL,
WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 200, 200,
NULL, NULL, NULL, NULL);
- ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError());
+ ok(hwnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError());
if (!hwnd) return;
SetWindowLongPtrA( hwnd, GWLP_WNDPROC, (LONG_PTR)menu_track_again_wnd_proc);
g_hmenu = CreatePopupMenu();
- ok(g_hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError());
+ ok(g_hmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError());
ret = AppendMenuA(g_hmenu, MF_STRING , 100, "item 1");
ok(ret, "AppendMenu failed.\n");
@@ -3475,14 +3476,14 @@ static void test_menu_cancelmode(void)
WS_VISIBLE | WS_CHILD, 10, 10, 20, 20,
hwnd, NULL, NULL, NULL);
ok( hwnd != NULL && hwndchild != NULL,
- "CreateWindowEx failed with error %d\n", GetLastError());
+ "CreateWindowEx failed with error %ld\n", GetLastError());
g_hwndtosend = hwnd;
SetWindowLongPtrA( hwnd, GWLP_WNDPROC, (LONG_PTR)menu_cancelmode_wnd_proc);
SetWindowLongPtrA( hwndchild, GWLP_WNDPROC, (LONG_PTR)menu_cancelmode_wnd_proc);
menu = CreatePopupMenu();
- ok( menu != NULL, "CreatePopupMenu failed with error %d\n", GetLastError());
+ ok( menu != NULL, "CreatePopupMenu failed with error %ld\n", GetLastError());
ret = AppendMenuA( menu, MF_STRING, 1, "winetest");
- ok( ret, "Functie failed lasterror is %u\n", GetLastError());
+ ok( ret, "Functie failed lasterror is %lu\n", GetLastError());
/* seems to be needed only on wine :( */
while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE))
DispatchMessageA(&msg);
@@ -3509,15 +3510,15 @@ static void test_menu_cancelmode(void)
/* test canceling tracking in a window's menu bar */
menubar = CreateMenu();
- ok( menubar != NULL, "CreateMenu failed with error %d\n", GetLastError());
+ ok( menubar != NULL, "CreateMenu failed with error %ld\n", GetLastError());
ret = AppendMenuA( menubar, MF_POPUP|MF_STRING, (UINT_PTR)menu, "winetest");
- ok( ret, "AppendMenuA failed lasterror is %u\n", GetLastError());
+ ok( ret, "AppendMenuA failed lasterror is %lu\n", GetLastError());
ret = SetMenu( hwnd, menubar );
- ok( ret, "SetMenu failed lasterror is %u\n", GetLastError());
+ ok( ret, "SetMenu failed lasterror is %lu\n", GetLastError());
/* initiate tracking */
g_hwndtosend = hwnd;
ret = SendMessageA( hwnd, WM_SYSCOMMAND, SC_KEYMENU, 0 );
- ok( ret == 0, "Sending WM_SYSCOMMAND/SC_KEYMENU failed lasterror is %u\n", GetLastError());
+ ok( ret == 0, "Sending WM_SYSCOMMAND/SC_KEYMENU failed lasterror is %lu\n", GetLastError());
while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE))
DispatchMessageA(&msg);
ok(g_got_enteridle == 0, "received %d WM_ENTERIDLE messages, none expected\n", g_got_enteridle);
@@ -3548,7 +3549,7 @@ static void test_menu_maxdepth(void)
if( !ret) break;
}
trace("Maximum depth is %d\n", i);
- ok( GetLastError() == 12345678, "unexpected error %d\n", GetLastError());
+ ok( GetLastError() == 12345678, "unexpected error %ld\n", GetLastError());
ok( i < NR_MENUS ||
broken( i == NR_MENUS), /* win98, NT */
"no ( or very large) limit on menu depth!\n");
@@ -3567,12 +3568,12 @@ static void test_menu_circref(void)
menu2 = CreatePopupMenu();
ok( menu1 && menu2, "error creating menus.\n");
ret = AppendMenuA( menu1, MF_POPUP, (UINT_PTR)menu2, "winetest");
- ok( ret, "AppendMenu failed, error is %d\n", GetLastError());
+ ok( ret, "AppendMenu failed, error is %ld\n", GetLastError());
ret = AppendMenuA( menu1, MF_STRING | MF_HILITE, 123, "winetest");
- ok( ret, "AppendMenu failed, error is %d\n", GetLastError());
+ ok( ret, "AppendMenu failed, error is %ld\n", GetLastError());
/* app chooses an id that happens to clash with its own hmenu */
ret = AppendMenuA( menu2, MF_STRING, (UINT_PTR)menu2, "winetest");
- ok( ret, "AppendMenu failed, error is %d\n", GetLastError());
+ ok( ret, "AppendMenu failed, error is %ld\n", GetLastError());
/* now attempt to change the string of the first item of menu1 */
ret = ModifyMenuA( menu1, (UINT_PTR)menu2, MF_POPUP, (UINT_PTR)menu2, "menu 2");
ok( !ret ||
@@ -3580,7 +3581,7 @@ static void test_menu_circref(void)
"ModifyMenu should have failed.\n");
if( !ret) { /* will probably stack fault if the ModifyMenu succeeded */
ret = GetMenuState( menu1, 123, 0);
- ok( ret == MF_HILITE, "GetMenuState returned %x\n",ret);
+ ok( ret == MF_HILITE, "GetMenuState returned %lx\n",ret);
}
DestroyMenu( menu2);
DestroyMenu( menu1);
@@ -3621,9 +3622,9 @@ static void test_menualign(void)
mi.fMask = MIM_STYLE;
ret = GetMenuInfo( menu, &mi);
- ok( ret, "GetMenuInfo failed: %d\n", GetLastError());
+ ok( ret, "GetMenuInfo failed: %ld\n", GetLastError());
ok( menu != NULL, "GetMenuInfo() failed\n");
- ok( 0 == mi.dwStyle, "menuinfo style is %x\n", mi.dwStyle);
+ ok( 0 == mi.dwStyle, "menuinfo style is %lx\n", mi.dwStyle);
/* test 1 */
mii.fMask = MIIM_BITMAP | MIIM_STRING | MIIM_ID;
@@ -3639,7 +3640,7 @@ static void test_menualign(void)
ret = InsertMenuItemA( menu, -1, TRUE, &mii);
ok( ret, "InsertMenuItem() failed\n");
ret = TrackPopupMenu( menu, TPM_RETURNCMD, 110, 200, 0, hwnd, NULL);
- ok( ret != 2, "User indicated that menu text alignment test 1 failed %d\n", ret);
+ ok( ret != 2, "User indicated that menu text alignment test 1 failed %ld\n", ret);
/* test 2*/
mii.fMask = MIIM_BITMAP | MIIM_STRING | MIIM_ID;
mii.wID = 3;
@@ -3661,7 +3662,7 @@ static void test_menualign(void)
ret = SetMenuItemInfoA( menu, 2, TRUE, &mii);
ok( ret, "SetMenuItemInfo() failed\n");
ret = TrackPopupMenu( menu, TPM_RETURNCMD, 110, 200, 0, hwnd, NULL);
- ok( ret != 2, "User indicated that menu text alignment test 2 failed %d\n", ret);
+ ok( ret != 2, "User indicated that menu text alignment test 2 failed %ld\n", ret);
/* test 3 */
mii.fMask = MIIM_TYPE | MIIM_ID;
mii.wID = 3;
@@ -3681,7 +3682,7 @@ static void test_menualign(void)
ret = SetMenuItemInfoA( menu, 2, TRUE, &mii);
ok( ret, "SetMenuItemInfo() failed\n");
ret = TrackPopupMenu( menu, TPM_RETURNCMD, 110, 200, 0, hwnd, NULL);
- ok( ret != 2, "User indicated that menu text alignment test 3 failed %d\n", ret);
+ ok( ret != 2, "User indicated that menu text alignment test 3 failed %ld\n", ret);
/* cleanup */
DeleteObject( hbm1);
DeleteObject( hbm2);
@@ -3731,11 +3732,11 @@ static void test_emptypopup(void)
HWND hwnd = CreateWindowExA(0, (LPCSTR)MAKEINTATOM(atomMenuCheckClass), NULL,
WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 200, 200,
NULL, NULL, NULL, NULL);
- ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError());
+ ok(hwnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError());
SetWindowLongPtrA( hwnd, GWLP_WNDPROC, (LONG_PTR)menu_ownerdraw_wnd_proc);
hmenu = CreatePopupMenu();
- ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError());
+ ok(hmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError());
gflag_initmenupopup = gflag_entermenuloop = gflag_initmenu = gflag_enteridle = 0;
selectitem_wp = 0xdeadbeef;
@@ -3749,8 +3750,8 @@ static void test_emptypopup(void)
ok(gflag_initmenu == 1, "got %i\n", gflag_initmenu);
ok(gflag_enteridle == 0, "got %i\n", gflag_initmenu);
- ok(selectitem_wp == 0xdeadbeef, "got %lx\n", selectitem_wp);
- ok(selectitem_lp == 0xdeadbeef, "got %lx\n", selectitem_lp);
+ ok(selectitem_wp == 0xdeadbeef, "got %Ix\n", selectitem_wp);
+ ok(selectitem_lp == 0xdeadbeef, "got %Ix\n", selectitem_lp);
gflag_initmenupopup = gflag_entermenuloop = gflag_initmenu = gflag_enteridle = 0;
selectitem_wp = 0xdeadbeef;
@@ -3764,8 +3765,8 @@ static void test_emptypopup(void)
ok(gflag_initmenu == 1, "got %i\n", gflag_initmenu);
ok(gflag_enteridle == 0, "got %i\n", gflag_initmenu);
- ok(selectitem_wp == 0xdeadbeef, "got %lx\n", selectitem_wp);
- ok(selectitem_lp == 0xdeadbeef, "got %lx\n", selectitem_lp);
+ ok(selectitem_wp == 0xdeadbeef, "got %Ix\n", selectitem_wp);
+ ok(selectitem_lp == 0xdeadbeef, "got %Ix\n", selectitem_lp);
SetWindowLongPtrA( hwnd, GWLP_WNDPROC, (LONG_PTR)menu_fill_in_init);
@@ -3781,13 +3782,13 @@ static void test_emptypopup(void)
ok(gflag_initmenu == 1, "got %i\n", gflag_initmenu);
ok(gflag_enteridle == 1, "got %i\n", gflag_initmenu);
- ok(selectitem_wp == 0xffff0000, "got %lx\n", selectitem_wp);
- ok(selectitem_lp == 0, "got %lx\n", selectitem_lp);
+ ok(selectitem_wp == 0xffff0000, "got %Ix\n", selectitem_wp);
+ ok(selectitem_lp == 0, "got %Ix\n", selectitem_lp);
DestroyWindow(hwnd);
ret = DestroyMenu(hmenu);
- ok(ret, "DestroyMenu failed with error %d\n", GetLastError());
+ ok(ret, "DestroyMenu failed with error %ld\n", GetLastError());
}
static HMENU get_bad_hmenu( UINT_PTR id )
@@ -3946,7 +3947,7 @@ if (0) /* FIXME: uncomment once Wine is fixed */ {
ok(mii.fState == MF_ENABLED, "expected MF_ENABLED, got %#x\n", mii.fState);
ok(mii.wID == 0, "expected 0, got %#x\n", mii.wID);
ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu);
- ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#lx\n", mii.dwItemData);
+ ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#Ix\n", mii.dwItemData);
ok(mii.dwTypeData == buf, "expected %p, got %p\n", buf, mii.dwTypeData);
ok(mii.cch == 6, "expected 6, got %u\n", mii.cch);
ok(!strcmp(buf, string), "expected %s, got %s\n", string, buf);
@@ -3962,7 +3963,7 @@ if (0) /* FIXME: uncomment once Wine is fixed */ {
ok(mii.fState == 0x81818181, "expected 0x81818181, got %#x\n", mii.fState);
ok(mii.wID == 0x81818181, "expected 0x81818181, got %#x\n", mii.wID);
ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu);
- ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#lx\n", mii.dwItemData);
+ ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#Ix\n", mii.dwItemData);
ok(mii.dwTypeData == (LPSTR)hbmp, "expected %p, got %p\n", hbmp, mii.dwTypeData);
ok(mii.cch == 6, "expected 6, got %u\n", mii.cch);
ok(mii.hbmpItem == hbmp, "expected %p, got %p\n", hbmp, mii.hbmpItem);
@@ -3980,7 +3981,7 @@ if (0) /* FIXME: uncomment once Wine is fixed */ {
ok(mii.fState == MF_ENABLED, "expected MF_ENABLED, got %#x\n", mii.fState);
ok(mii.wID == 0, "expected 0, got %#x\n", mii.wID);
ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu);
- ok(mii.dwItemData == 0, "expected 0, got %#lx\n", mii.dwItemData);
+ ok(mii.dwItemData == 0, "expected 0, got %#Ix\n", mii.dwItemData);
ok(mii.dwTypeData == (LPSTR)hbmp, "expected %p, got %p\n", hbmp, mii.dwTypeData);
ok(mii.cch == 6, "expected 6, got %u\n", mii.cch);
ok(mii.hbmpItem == hbmp, "expected %p, got %p\n", hbmp, mii.hbmpItem);
@@ -4013,7 +4014,7 @@ if (0) /* FIXME: uncomment once Wine is fixed */ {
ok(mii.fState == MF_ENABLED, "expected MF_ENABLED, got %#x\n", mii.fState);
ok(mii.wID == 0, "expected 0, got %#x\n", mii.wID);
ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu);
- ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#lx\n", mii.dwItemData);
+ ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#Ix\n", mii.dwItemData);
ok(mii.dwTypeData == buf, "expected %p, got %p\n", buf, mii.dwTypeData);
ok(mii.cch == 6, "expected 6, got %u\n", mii.cch);
ok(!strcmp(buf, string), "expected %s, got %s\n", string, buf);
@@ -4031,7 +4032,7 @@ if (0) /* FIXME: uncomment once Wine is fixed */ {
ok(mii.fState == 0x81818181, "expected 0x81818181, got %#x\n", mii.fState);
ok(mii.wID == 0x81818181, "expected 0x81818181, got %#x\n", mii.wID);
ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu);
- ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#lx\n", mii.dwItemData);
+ ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#Ix\n", mii.dwItemData);
ok(mii.dwTypeData == buf, "expected %p, got %p\n", buf, mii.dwTypeData);
ok(mii.cch == 6, "expected 6, got %u\n", mii.cch);
ok(!strcmp(buf, string), "expected %s, got %s\n", string, buf);
@@ -4050,7 +4051,7 @@ if (0) /* FIXME: uncomment once Wine is fixed */ {
ok(mii.fState == MF_ENABLED, "expected MF_ENABLED, got %#x\n", mii.fState);
ok(mii.wID == 0, "expected 0, got %#x\n", mii.wID);
ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu);
- ok(mii.dwItemData == 0, "expected 0, got %#lx\n", mii.dwItemData);
+ ok(mii.dwItemData == 0, "expected 0, got %#Ix\n", mii.dwItemData);
ok(mii.dwTypeData == buf, "expected %p, got %p\n", buf, mii.dwTypeData);
ok(mii.cch == 6, "expected 6, got %u\n", mii.cch);
ok(!strcmp(buf, string), "expected %s, got %s\n", string, buf);
@@ -4085,7 +4086,7 @@ if (0) /* FIXME: uncomment once Wine is fixed */ {
ok(mii.fState == MF_ENABLED, "expected MF_ENABLED, got %#x\n", mii.fState);
ok(mii.wID == 0, "expected 0, got %#x\n", mii.wID);
ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu);
- ok(mii.dwItemData == (ULONG_PTR)hbmp, "expected %p, got %#lx\n", hbmp, mii.dwItemData);
+ ok(mii.dwItemData == (ULONG_PTR)hbmp, "expected %p, got %#Ix\n", hbmp, mii.dwItemData);
ok(mii.dwTypeData == buf, "expected %p, got %p\n", buf, mii.dwTypeData);
ok(mii.cch == 6, "expected 6, got %u\n", mii.cch);
ok(!strcmp(buf, string), "expected %s, got %s\n", string, buf);
@@ -4104,7 +4105,7 @@ if (0) /* FIXME: uncomment once Wine is fixed */ {
ok(mii.fState == 0x81818181, "expected 0x81818181, got %#x\n", mii.fState);
ok(mii.wID == 0x81818181, "expected 0x81818181, got %#x\n", mii.wID);
ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu);
- ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#lx\n", mii.dwItemData);
+ ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#Ix\n", mii.dwItemData);
ok(mii.dwTypeData == buf, "expected %p, got %p\n", buf, mii.dwTypeData);
ok(mii.cch == 6, "expected 6, got %u\n", mii.cch);
ok(!strcmp(buf, string), "expected %s, got %s\n", string, buf);
@@ -4137,7 +4138,7 @@ if (0) /* FIXME: uncomment once Wine is fixed */ {
ok(mii.fState == MF_ENABLED, "expected MF_ENABLED, got %#x\n", mii.fState);
ok(mii.wID == 0, "expected 0, got %#x\n", mii.wID);
ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu);
- ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#lx\n", mii.dwItemData);
+ ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#Ix\n", mii.dwItemData);
ok(mii.dwTypeData == buf, "expected %p, got %p\n", buf, mii.dwTypeData);
ok(mii.cch == 6, "expected 6, got %u\n", mii.cch);
ok(!strcmp(buf, string), "expected %s, got %s\n", string, buf);
@@ -4161,7 +4162,7 @@ if (0) /* FIXME: uncomment once Wine is fixed */ {
ok(mii.fState == MF_ENABLED, "expected MF_ENABLED, got %#x\n", mii.fState);
ok(mii.wID == 0, "expected 0, got %#x\n", mii.wID);
ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu);
- ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#lx\n", mii.dwItemData);
+ ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#Ix\n", mii.dwItemData);
ok(mii.dwTypeData == buf, "expected %p, got %p\n", buf, mii.dwTypeData);
ok(mii.cch == 6, "expected 6, got %u\n", mii.cch);
ok(!strcmp(buf, string), "expected %s, got %s\n", string, buf);
@@ -4180,7 +4181,7 @@ if (0) /* FIXME: uncomment once Wine is fixed */ {
ok(mii.fState == 0x81818181, "expected 0x81818181, got %#x\n", mii.fState);
ok(mii.wID == 0x81818181, "expected 0x81818181, got %#x\n", mii.wID);
ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu);
- ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#lx\n", mii.dwItemData);
+ ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#Ix\n", mii.dwItemData);
ok(mii.dwTypeData == buf, "expected %p, got %p\n", buf, mii.dwTypeData);
ok(mii.cch == 6, "expected 6, got %u\n", mii.cch);
ok(!strcmp(buf, string), "expected %s, got %s\n", string, buf);
@@ -4204,7 +4205,7 @@ if (0) /* FIXME: uncomment once Wine is fixed */ {
ok(mii.fState == MF_ENABLED, "expected MF_ENABLED, got %#x\n", mii.fState);
ok(mii.wID == 0, "expected 0, got %#x\n", mii.wID);
ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu);
- ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#lx\n", mii.dwItemData);
+ ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#Ix\n", mii.dwItemData);
ok(mii.dwTypeData == buf, "expected %p, got %p\n", buf, mii.dwTypeData);
ok(mii.cch == 6, "expected 6, got %u\n", mii.cch);
ok(!strcmp(buf, string), "expected %s, got %s\n", string, buf);
@@ -4223,7 +4224,7 @@ if (0) /* FIXME: uncomment once Wine is fixed */ {
ok(mii.fState == 0x81818181, "expected 0x81818181, got %#x\n", mii.fState);
ok(mii.wID == 0x81818181, "expected 0x81818181, got %#x\n", mii.wID);
ok(mii.hSubMenu == 0, "expected 0, got %p\n", mii.hSubMenu);
- ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#lx\n", mii.dwItemData);
+ ok(mii.dwItemData == 0x81818181, "expected 0x81818181, got %#Ix\n", mii.dwItemData);
ok(mii.dwTypeData == (LPSTR)hbmp, "expected %p, got %p\n", hbmp, mii.dwTypeData);
ok(mii.cch == 6, "expected 6, got %u\n", mii.cch);
ok(mii.hbmpItem == hbmp, "expected %p, got %p\n", hbmp, mii.hbmpItem);
2
1