Wine-Devel
Threads by month
- ----- 2026 -----
- 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
- 6 participants
- 84545 discussions
This fixes the send part of the issue #52401 [1]: "Improper
synchronization in sock_recv/sock_send leads to arbitrary reordering of
completion of I/O requests", which was initially reported (outside
Bugzilla) by Dongwan Kim [2].
Changelog:
v1 -> v2:
- drop patch "server: Compact struct set_async_direct_result_reply."
- add async and fd arguments to async_initial_status_callback
- recv_socket_initial_callback: pass OOB flag via private instead of
implementing two separate functions for OOB and non-OOB
- detect short write in send_socket_initial_callback
- preserve the behaviour of returning success if we had a short write
and the socket is nonblocking and force_async is unset
v2 -> v3:
- fix typo in comment
v3 -> v4:
- fix typo in commit message
- address feedback
- drop patch "server: Defer postprocessing until after setting initial
status in recv_socket handler."
[1] https://bugs.winehq.org/show_bug.cgi?id=52401
[2] https://www.winehq.org/pipermail/wine-devel/2021-May/186454.html
Jinoh Kang (8):
server: Actually set initial status in set_async_direct_result
handler.
server: Ensure initial status is set in async_set_result().
server: Add async_initial_status_callback.
server: Defer postprocessing until after setting initial status in
send_socket handler.
server: Add mark_pending field to set_async_direct_result request.
server: Attempt to complete I/O request immediately in send_socket.
ntdll: Don't call try_send before server call in sock_send.
server: Replace redundant send_socket status fields with force_async
boolean field.
dlls/ntdll/unix/socket.c | 102 +++++++++++++++++++++++++--------
dlls/ntdll/unix/sync.c | 9 +--
dlls/ntdll/unix/unix_private.h | 2 +-
dlls/ws2_32/tests/sock.c | 14 ++---
server/async.c | 60 ++++++++++++++-----
server/file.h | 2 +
server/protocol.def | 6 +-
server/sock.c | 92 ++++++++++++++++-------------
8 files changed, 194 insertions(+), 93 deletions(-)
Interdiff:
diff --git a/server/async.c b/server/async.c
index ded4f8392d2..90fede50371 100644
--- a/server/async.c
+++ b/server/async.c
@@ -326,12 +326,8 @@ void async_set_initial_status_callback( struct async *async, async_initial_statu
* the initial status may be STATUS_PENDING */
void async_set_initial_status( struct async *async, unsigned int status )
{
- assert( async->unknown_status );
- if (!async->terminated)
- {
- set_async_initial_status( async, status );
- async->unknown_status = 0;
- }
+ set_async_initial_status( async, status );
+ async->unknown_status = 0;
}
void set_async_pending( struct async *async )
@@ -509,6 +505,8 @@ void async_set_result( struct object *obj, unsigned int status, apc_param_t tota
assert( async->terminated ); /* it must have been woken up if we get a result */
+ if (async->unknown_status) async_set_initial_status( async, status );
+
if (async->alerted && status == STATUS_PENDING) /* restart it */
{
async->terminated = 0;
@@ -797,11 +795,6 @@ DECL_HANDLER(set_async_direct_result)
return;
}
- /* Set iosb information field for async_initial_status_callback */
- async->iosb->result = information;
- set_async_initial_status( async, status );
- async->unknown_status = 0;
-
if (status == STATUS_PENDING)
{
async->direct_result = 0;
@@ -812,6 +805,9 @@ DECL_HANDLER(set_async_direct_result)
async->pending = 1;
}
+ /* Set iosb information field for async_initial_status_callback */
+ async->iosb->result = information;
+
/* if the I/O has completed successfully (or unsuccessfully, and
* async->pending is set), the client would have already set the IOSB.
* therefore, we can do async_set_result() directly and let the client skip
diff --git a/server/sock.c b/server/sock.c
index 1112708369d..c742bd687a1 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -3393,16 +3393,6 @@ struct object *create_socket_device( struct object *root, const struct unicode_s
return create_named_object( root, &socket_device_ops, name, attr, sd );
}
-static void recv_socket_initial_callback( void *private, struct async *async, struct fd *fd, unsigned int status )
-{
- struct sock *sock = get_fd_user( fd );
- int is_oob = (int)(long)private;
-
- sock->pending_events &= ~(is_oob ? AFD_POLL_OOB : AFD_POLL_READ);
- sock->reported_events &= ~(is_oob ? AFD_POLL_OOB : AFD_POLL_READ);
- sock_reselect( sock );
-}
-
DECL_HANDLER(recv_socket)
{
struct sock *sock = (struct sock *)get_handle_obj( current->process, req->async.handle, 0, &sock_ops );
@@ -3440,18 +3430,22 @@ DECL_HANDLER(recv_socket)
if (status == STATUS_PENDING && !req->force_async && sock->nonblocking)
status = STATUS_DEVICE_NOT_READY;
+ sock->pending_events &= ~(req->oob ? AFD_POLL_OOB : AFD_POLL_READ);
+ sock->reported_events &= ~(req->oob ? AFD_POLL_OOB : AFD_POLL_READ);
+
if ((async = create_request_async( fd, get_fd_comp_flags( fd ), &req->async )))
{
set_error( status );
- async_set_initial_status_callback( async, recv_socket_initial_callback, (void *)(long)req->oob );
-
if (timeout)
async_set_timeout( async, timeout, STATUS_IO_TIMEOUT );
if (status == STATUS_PENDING || status == STATUS_ALERTED)
queue_async( &sock->read_q, async );
+ /* always reselect; we changed reported_events above */
+ sock_reselect( sock );
+
reply->wait = async_handoff( async, NULL, 0 );
reply->options = get_fd_options( fd );
reply->nonblocking = sock->nonblocking;
--
2.34.1
2
1
[PATCH v4 8/8] server: Replace redundant send_socket status fields with force_async boolean field.
by Jinoh Kang March 3, 2022
by Jinoh Kang March 3, 2022
March 3, 2022
The 'status' field of send_socket_request is always either
STATUS_PENDING or STATUS_DEVICE_NOT_READY, and the 'total' field is
always zero.
Replace the 'status' field with 'force_async' boolean field, and get rid
of the 'total' field entirely.
Also, clean up the send_socket handler code a bit.
Signed-off-by: Jinoh Kang <jinoh.kang.kr(a)gmail.com>
---
Notes:
v1 -> v2:
- adjust patch for new field "data_size" in send_socket_request
v2 -> v3: no changes
v3 -> v4: no changes
dlls/ntdll/unix/socket.c | 8 ++------
server/protocol.def | 5 ++---
server/sock.c | 40 ++++++++--------------------------------
3 files changed, 12 insertions(+), 41 deletions(-)
diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c
index ad03907523d..11ce652fed5 100644
--- a/dlls/ntdll/unix/socket.c
+++ b/dlls/ntdll/unix/socket.c
@@ -921,13 +921,10 @@ static NTSTATUS sock_send( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, voi
data_size += len;
}
- status = force_async ? STATUS_PENDING : STATUS_DEVICE_NOT_READY;
-
SERVER_START_REQ( send_socket )
{
req->data_size = data_size;
- req->status = status;
- req->total = 0;
+ req->force_async = force_async;
req->async = server_async( handle, &async->io, event, apc, apc_user, iosb_client_ptr(io) );
status = wine_server_call( req );
wait_handle = wine_server_ptr_handle( reply->wait );
@@ -1131,8 +1128,7 @@ static NTSTATUS sock_transmit( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc,
SERVER_START_REQ( send_socket )
{
req->data_size = async->head_len + async->file_len + async->tail_len;
- req->status = STATUS_PENDING;
- req->total = 0;
+ req->force_async = 1;
req->async = server_async( handle, &async->io, event, apc, apc_user, iosb_client_ptr(io) );
status = wine_server_call( req );
wait_handle = wine_server_ptr_handle( reply->wait );
diff --git a/server/protocol.def b/server/protocol.def
index 334abb66a77..5d8038d58b9 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -1461,10 +1461,9 @@ enum server_fd_type
/* Perform a send on a socket */
@REQ(send_socket)
- data_size_t data_size; /* total number of bytes to send (>= total) */
+ data_size_t data_size; /* total number of bytes to send */
async_data_t async; /* async I/O parameters */
- unsigned int status; /* status of initial call */
- unsigned int total; /* number of bytes already sent */
+ int force_async; /* Force asynchronous mode? */
@REPLY
obj_handle_t wait; /* handle to wait on for blocking send */
unsigned int options; /* device open options */
diff --git a/server/sock.c b/server/sock.c
index e899695bb60..c742bd687a1 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -3492,7 +3492,7 @@ static void send_socket_initial_callback( void *private, struct async *async, st
DECL_HANDLER(send_socket)
{
struct sock *sock = (struct sock *)get_handle_obj( current->process, req->async.handle, 0, &sock_ops );
- unsigned int status = req->status;
+ unsigned int status = STATUS_PENDING;
timeout_t timeout = 0;
struct async *async;
struct fd *fd;
@@ -3500,32 +3500,11 @@ DECL_HANDLER(send_socket)
if (!sock) return;
fd = sock->fd;
- /* If we had a short write and the socket is nonblocking (and the client is
- * not trying to force the operation to be asynchronous), return success.
- * Windows actually refuses to send any data in this case, and returns
- * EWOULDBLOCK, but we have no way of doing that. */
- if (status == STATUS_DEVICE_NOT_READY && req->total && sock->nonblocking)
- status = STATUS_SUCCESS;
+ if (!req->force_async && !sock->nonblocking && is_fd_overlapped( fd ))
+ timeout = (timeout_t)sock->sndtimeo * -10000;
- /* send() returned EWOULDBLOCK or a short write, i.e. cannot send all data yet */
- if (status == STATUS_DEVICE_NOT_READY && !sock->nonblocking)
- {
- /* Set a timeout on the async if necessary.
- *
- * We want to do this *only* if the client gave us STATUS_DEVICE_NOT_READY.
- * If the client gave us STATUS_PENDING, it expects the async to always
- * block (it was triggered by WSASend*() with a valid OVERLAPPED
- * structure) and for the timeout not to be respected. */
- if (is_fd_overlapped( fd ))
- timeout = (timeout_t)sock->sndtimeo * -10000;
-
- status = STATUS_PENDING;
- }
-
- if ((status == STATUS_PENDING || status == STATUS_DEVICE_NOT_READY) && sock->wr_shutdown)
- status = STATUS_PIPE_DISCONNECTED;
-
- if ((status == STATUS_PENDING || status == STATUS_DEVICE_NOT_READY) && !async_queued( &sock->write_q ))
+ if (sock->wr_shutdown) status = STATUS_PIPE_DISCONNECTED;
+ else if (!async_queued( &sock->write_q ))
{
/* If write_q is not empty, we cannot really tell if the already queued
* asyncs will not consume all available space; if there's no space
@@ -3544,14 +3523,11 @@ DECL_HANDLER(send_socket)
}
}
+ if (status == STATUS_PENDING && !req->force_async && sock->nonblocking)
+ status = STATUS_DEVICE_NOT_READY;
+
if ((async = create_request_async( fd, get_fd_comp_flags( fd ), &req->async )))
{
- if (status == STATUS_SUCCESS)
- {
- struct iosb *iosb = async_get_iosb( async );
- iosb->result = req->total;
- release_object( iosb );
- }
set_error( status );
async_set_initial_status_callback( async, send_socket_initial_callback, (void *)(unsigned long)req->data_size );
--
2.34.1
1
0
[PATCH v4 7/8] ntdll: Don't call try_send before server call in sock_send.
by Jinoh Kang March 3, 2022
by Jinoh Kang March 3, 2022
March 3, 2022
Otherwise, try_send() call from sock_send() may race against try_send()
call from async_send_proc(), shuffling the packet order.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52401
Signed-off-by: Jinoh Kang <jinoh.kang.kr(a)gmail.com>
---
Notes:
v1 -> v2: no changes
v2 -> v3: no changes
v3 -> v4: no changes
dlls/ntdll/unix/socket.c | 13 ++-----------
dlls/ws2_32/tests/sock.c | 14 +++++++-------
2 files changed, 9 insertions(+), 18 deletions(-)
diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c
index 23014ceceaf..ad03907523d 100644
--- a/dlls/ntdll/unix/socket.c
+++ b/dlls/ntdll/unix/socket.c
@@ -921,22 +921,13 @@ static NTSTATUS sock_send( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, voi
data_size += len;
}
- status = try_send( fd, async );
-
- if (status != STATUS_SUCCESS && status != STATUS_DEVICE_NOT_READY)
- {
- release_fileio( &async->io );
- return status;
- }
-
- if (status == STATUS_DEVICE_NOT_READY && force_async)
- status = STATUS_PENDING;
+ status = force_async ? STATUS_PENDING : STATUS_DEVICE_NOT_READY;
SERVER_START_REQ( send_socket )
{
req->data_size = data_size;
req->status = status;
- req->total = async->sent_len;
+ req->total = 0;
req->async = server_async( handle, &async->io, event, apc, apc_user, iosb_client_ptr(io) );
status = wine_server_call( req );
wait_handle = wine_server_ptr_handle( reply->wait );
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 6b6267dc153..caf76868f89 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -7799,7 +7799,7 @@ static void test_shutdown(void)
WSASetLastError(0xdeadbeef);
ret = send(client, "test", 5, 0);
ok(ret == -1, "got %d\n", ret);
- todo_wine ok(WSAGetLastError() == WSAESHUTDOWN, "got error %u\n", WSAGetLastError());
+ ok(WSAGetLastError() == WSAESHUTDOWN, "got error %u\n", WSAGetLastError());
ret = recv(server, buffer, sizeof(buffer), 0);
ok(!ret, "got %d\n", ret);
@@ -7846,7 +7846,7 @@ static void test_shutdown(void)
WSASetLastError(0xdeadbeef);
ret = send(server, "test", 5, 0);
ok(ret == -1, "got %d\n", ret);
- todo_wine ok(WSAGetLastError() == WSAESHUTDOWN, "got error %u\n", WSAGetLastError());
+ ok(WSAGetLastError() == WSAESHUTDOWN, "got error %u\n", WSAGetLastError());
addrlen = sizeof(addr);
ret = getpeername(client, (struct sockaddr *)&addr, &addrlen);
@@ -7896,7 +7896,7 @@ static void test_shutdown(void)
WSASetLastError(0xdeadbeef);
ret = send(client, "test", 5, 0);
ok(ret == -1, "got %d\n", ret);
- todo_wine ok(WSAGetLastError() == WSAESHUTDOWN, "got error %u\n", WSAGetLastError());
+ ok(WSAGetLastError() == WSAESHUTDOWN, "got error %u\n", WSAGetLastError());
ret = recv(server, buffer, sizeof(buffer), 0);
ok(!ret, "got %d\n", ret);
@@ -7914,7 +7914,7 @@ static void test_shutdown(void)
WSASetLastError(0xdeadbeef);
ret = send(server, "test", 5, 0);
ok(ret == -1, "got %d\n", ret);
- todo_wine ok(WSAGetLastError() == WSAESHUTDOWN, "got error %u\n", WSAGetLastError());
+ ok(WSAGetLastError() == WSAESHUTDOWN, "got error %u\n", WSAGetLastError());
addrlen = sizeof(addr);
ret = getpeername(client, (struct sockaddr *)&addr, &addrlen);
@@ -8045,7 +8045,7 @@ static void test_shutdown(void)
WSASetLastError(0xdeadbeef);
ret = sendto(client, "test", 5, 0, (struct sockaddr *)&server_addr, sizeof(server_addr));
ok(ret == -1, "got %d\n", ret);
- todo_wine ok(WSAGetLastError() == WSAESHUTDOWN, "got error %u\n", WSAGetLastError());
+ ok(WSAGetLastError() == WSAESHUTDOWN, "got error %u\n", WSAGetLastError());
closesocket(client);
closesocket(server);
@@ -8126,7 +8126,7 @@ static void test_DisconnectEx(void)
WSASetLastError(0xdeadbeef);
ret = send(client, "test", 5, 0);
ok(ret == -1, "expected failure\n");
- todo_wine ok(WSAGetLastError() == WSAESHUTDOWN, "got error %u\n", WSAGetLastError());
+ ok(WSAGetLastError() == WSAESHUTDOWN, "got error %u\n", WSAGetLastError());
ret = recv(server, buffer, sizeof(buffer), 0);
ok(!ret, "got %d\n", ret);
@@ -8180,7 +8180,7 @@ static void test_DisconnectEx(void)
WSASetLastError(0xdeadbeef);
ret = send(client, "test", 5, 0);
ok(ret == -1, "expected failure\n");
- todo_wine ok(WSAGetLastError() == WSAESHUTDOWN, "got error %u\n", WSAGetLastError());
+ ok(WSAGetLastError() == WSAESHUTDOWN, "got error %u\n", WSAGetLastError());
ret = recv(server, buffer, sizeof(buffer), 0);
ok(!ret, "got %d\n", ret);
--
2.34.1
1
0
[PATCH v4 6/8] server: Attempt to complete I/O request immediately in send_socket.
by Jinoh Kang March 3, 2022
by Jinoh Kang March 3, 2022
March 3, 2022
Make send_socket alert the async immediately if poll() call detects that
there are incoming data in the socket, bypassing the wineserver's main
polling loop.
For sock_transmit, we always mark the async as pending and set the IOSB
(unless async allocation has failed).
Signed-off-by: Jinoh Kang <jinoh.kang.kr(a)gmail.com>
---
Notes:
v1 -> v2:
- retain the behaviour of returning success if we had a short write and
the socket is nonblocking and force_async is unset
v2 -> v3: fix typo in comment
v3 -> v4: no changes
dlls/ntdll/unix/socket.c | 72 ++++++++++++++++++++++++++++++++++------
server/protocol.def | 1 +
server/sock.c | 22 +++++++++++-
3 files changed, 83 insertions(+), 12 deletions(-)
diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c
index f24215b66a9..23014ceceaf 100644
--- a/dlls/ntdll/unix/socket.c
+++ b/dlls/ntdll/unix/socket.c
@@ -868,12 +868,14 @@ static NTSTATUS sock_send( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, voi
const struct WS_sockaddr *addr, unsigned int addr_len, int unix_flags, int force_async )
{
struct async_send_ioctl *async;
+ ULONG_PTR information;
HANDLE wait_handle;
DWORD async_size;
NTSTATUS status;
unsigned int i;
ULONG options;
data_size_t data_size;
+ BOOL nonblocking, alerted;
async_size = offsetof( struct async_send_ioctl, iov[count] );
@@ -939,16 +941,38 @@ static NTSTATUS sock_send( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, voi
status = wine_server_call( req );
wait_handle = wine_server_ptr_handle( reply->wait );
options = reply->options;
- if ((!NT_ERROR(status) || wait_handle) && status != STATUS_PENDING)
+ nonblocking = reply->nonblocking;
+ }
+ SERVER_END_REQ;
+
+ alerted = status == STATUS_ALERTED;
+ if (alerted)
+ {
+ status = try_send( fd, async );
+ if (status == STATUS_DEVICE_NOT_READY && (force_async || !nonblocking))
+ status = STATUS_PENDING;
+
+ /* If we had a short write and the socket is nonblocking (and we are
+ * not trying to force the operation to be asynchronous), return
+ * success. Windows actually refuses to send any data in this case,
+ * and returns EWOULDBLOCK, but we have no way of doing that. */
+ if (status == STATUS_DEVICE_NOT_READY && async->sent_len)
+ status = STATUS_SUCCESS;
+ }
+
+ if (status != STATUS_PENDING)
+ {
+ information = async->sent_len;
+ if (!NT_ERROR(status) || (wait_handle && !alerted))
{
io->Status = status;
- io->Information = async->sent_len;
+ io->Information = information;
}
+ release_fileio( &async->io );
}
- SERVER_END_REQ;
-
- if (status != STATUS_PENDING) release_fileio( &async->io );
+ else information = 0;
+ if (alerted) set_async_direct_result( &wait_handle, status, information, FALSE );
if (wait_handle) status = wait_async( wait_handle, options & FILE_SYNCHRONOUS_IO_ALERT );
return status;
}
@@ -1069,7 +1093,9 @@ static NTSTATUS sock_transmit( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc,
socklen_t addr_len;
HANDLE wait_handle;
NTSTATUS status;
+ ULONG_PTR information;
ULONG options;
+ BOOL alerted;
addr_len = sizeof(addr);
if (getpeername( fd, &addr.addr, &addr_len ) != 0)
@@ -1120,16 +1146,40 @@ static NTSTATUS sock_transmit( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc,
status = wine_server_call( req );
wait_handle = wine_server_ptr_handle( reply->wait );
options = reply->options;
- /* In theory we'd fill the iosb here, as above in sock_send(), but it's
- * actually currently impossible to get STATUS_SUCCESS. The server will
- * either return STATUS_PENDING or an error code, and in neither case
- * should the iosb be filled. */
- if (!status) FIXME( "Unhandled success status." );
}
SERVER_END_REQ;
- if (status != STATUS_PENDING) release_fileio( &async->io );
+ alerted = status == STATUS_ALERTED;
+ if (alerted)
+ {
+ status = try_transmit( fd, file_fd, async );
+ if (status == STATUS_DEVICE_NOT_READY)
+ status = STATUS_PENDING;
+ }
+ if (status != STATUS_PENDING)
+ {
+ information = async->head_cursor + async->file_cursor + async->tail_cursor;
+ if (!NT_ERROR(status) || wait_handle)
+ {
+ io->Status = status;
+ io->Information = information;
+ }
+ release_fileio( &async->io );
+ }
+ else information = 0;
+
+ if (alerted)
+ {
+ set_async_direct_result( &wait_handle, status, information, TRUE );
+ if (!(options & (FILE_SYNCHRONOUS_IO_ALERT | FILE_SYNCHRONOUS_IO_NONALERT)))
+ {
+ /* Pretend we always do async I/O. The client can always retrieve
+ * the actual I/O status via the IO_STATUS_BLOCK.
+ */
+ status = STATUS_PENDING;
+ }
+ }
if (wait_handle) status = wait_async( wait_handle, options & FILE_SYNCHRONOUS_IO_ALERT );
return status;
}
diff --git a/server/protocol.def b/server/protocol.def
index 5eb63db3091..334abb66a77 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -1468,6 +1468,7 @@ enum server_fd_type
@REPLY
obj_handle_t wait; /* handle to wait on for blocking send */
unsigned int options; /* device open options */
+ int nonblocking; /* is socket non-blocking? */
@END
diff --git a/server/sock.c b/server/sock.c
index 0e386e3537c..e899695bb60 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -3525,6 +3525,25 @@ DECL_HANDLER(send_socket)
if ((status == STATUS_PENDING || status == STATUS_DEVICE_NOT_READY) && sock->wr_shutdown)
status = STATUS_PIPE_DISCONNECTED;
+ if ((status == STATUS_PENDING || status == STATUS_DEVICE_NOT_READY) && !async_queued( &sock->write_q ))
+ {
+ /* If write_q is not empty, we cannot really tell if the already queued
+ * asyncs will not consume all available space; if there's no space
+ * available, the current request won't be immediately satiable.
+ */
+ struct pollfd pollfd;
+ pollfd.fd = get_unix_fd( sock->fd );
+ pollfd.events = POLLOUT;
+ pollfd.revents = 0;
+ if (poll(&pollfd, 1, 0) >= 0 && pollfd.revents)
+ {
+ /* Give the client opportunity to complete synchronously.
+ * If it turns out that the I/O request is not actually immediately satiable,
+ * the client may then choose to re-queue the async (with STATUS_PENDING). */
+ status = STATUS_ALERTED;
+ }
+ }
+
if ((async = create_request_async( fd, get_fd_comp_flags( fd ), &req->async )))
{
if (status == STATUS_SUCCESS)
@@ -3540,11 +3559,12 @@ DECL_HANDLER(send_socket)
if (timeout)
async_set_timeout( async, timeout, STATUS_IO_TIMEOUT );
- if (status == STATUS_PENDING)
+ if (status == STATUS_PENDING || status == STATUS_ALERTED)
queue_async( &sock->write_q, async );
reply->wait = async_handoff( async, NULL, 0 );
reply->options = get_fd_options( fd );
+ reply->nonblocking = sock->nonblocking;
release_object( async );
}
release_object( sock );
--
2.34.1
1
0
[PATCH v4 5/8] server: Add mark_pending field to set_async_direct_result request.
by Jinoh Kang March 3, 2022
by Jinoh Kang March 3, 2022
March 3, 2022
The client can set mark_pending to indicate that the full-blown I/O
completion mechanism shall be triggered (asynchronous completion) even
if the status indicates failure.
Signed-off-by: Jinoh Kang <jinoh.kang.kr(a)gmail.com>
---
Notes:
v1 -> v2: no changes
v2 -> v3: no changes
v3 -> v4: no changes
dlls/ntdll/unix/socket.c | 2 +-
dlls/ntdll/unix/sync.c | 9 +++++----
dlls/ntdll/unix/unix_private.h | 2 +-
server/async.c | 11 ++++++++---
server/protocol.def | 1 +
5 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c
index d04ebb7f874..f24215b66a9 100644
--- a/dlls/ntdll/unix/socket.c
+++ b/dlls/ntdll/unix/socket.c
@@ -767,7 +767,7 @@ static NTSTATUS sock_recv( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, voi
release_fileio( &async->io );
}
- if (alerted) set_async_direct_result( &wait_handle, status, information );
+ if (alerted) set_async_direct_result( &wait_handle, status, information, FALSE );
if (wait_handle) status = wait_async( wait_handle, options & FILE_SYNCHRONOUS_IO_ALERT );
return status;
}
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
index ee25dfd0099..0786454dad2 100644
--- a/dlls/ntdll/unix/sync.c
+++ b/dlls/ntdll/unix/sync.c
@@ -2514,7 +2514,7 @@ NTSTATUS WINAPI NtWaitForAlertByThreadId( const void *address, const LARGE_INTEG
/* Notify direct completion of async and close the wait handle if it is no longer needed.
* This function is a no-op (returns status as-is) if the supplied handle is NULL.
*/
-void set_async_direct_result( HANDLE *optional_handle, NTSTATUS status, ULONG_PTR information )
+void set_async_direct_result( HANDLE *optional_handle, NTSTATUS status, ULONG_PTR information, BOOL mark_pending )
{
NTSTATUS ret;
@@ -2522,9 +2522,10 @@ void set_async_direct_result( HANDLE *optional_handle, NTSTATUS status, ULONG_PT
SERVER_START_REQ( set_async_direct_result )
{
- req->handle = wine_server_obj_handle( *optional_handle );
- req->status = status;
- req->information = information;
+ req->handle = wine_server_obj_handle( *optional_handle );
+ req->status = status;
+ req->information = information;
+ req->mark_pending = mark_pending;
ret = wine_server_call( req );
if (ret == STATUS_SUCCESS)
*optional_handle = wine_server_ptr_handle( reply->handle );
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index b1595c792c0..b1a834efba5 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -274,7 +274,7 @@ extern NTSTATUS get_device_info( int fd, struct _FILE_FS_DEVICE_INFORMATION *inf
extern void init_files(void) DECLSPEC_HIDDEN;
extern void init_cpu_info(void) DECLSPEC_HIDDEN;
extern void add_completion( HANDLE handle, ULONG_PTR value, NTSTATUS status, ULONG info, BOOL async ) DECLSPEC_HIDDEN;
-extern void set_async_direct_result( HANDLE *optional_handle, NTSTATUS status, ULONG_PTR information );
+extern void set_async_direct_result( HANDLE *optional_handle, NTSTATUS status, ULONG_PTR information, BOOL mark_pending );
extern void dbg_init(void) DECLSPEC_HIDDEN;
diff --git a/server/async.c b/server/async.c
index 986e8a1ce24..90fede50371 100644
--- a/server/async.c
+++ b/server/async.c
@@ -800,13 +800,18 @@ DECL_HANDLER(set_async_direct_result)
async->direct_result = 0;
async->pending = 1;
}
+ else if (req->mark_pending)
+ {
+ async->pending = 1;
+ }
/* Set iosb information field for async_initial_status_callback */
async->iosb->result = information;
- /* if the I/O has completed successfully, the client would have already
- * set the IOSB. therefore, we can skip waiting on wait_handle and do
- * async_set_result() directly.
+ /* if the I/O has completed successfully (or unsuccessfully, and
+ * async->pending is set), the client would have already set the IOSB.
+ * therefore, we can do async_set_result() directly and let the client skip
+ * waiting on wait_handle.
*/
async_set_result( &async->obj, status, information );
diff --git a/server/protocol.def b/server/protocol.def
index 2e57c91ccad..5eb63db3091 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -2169,6 +2169,7 @@ enum message_type
obj_handle_t handle; /* wait handle */
apc_param_t information; /* IO_STATUS_BLOCK Information */
unsigned int status; /* completion status */
+ int mark_pending; /* set async to pending before completion? */
@REPLY
obj_handle_t handle; /* wait handle, or NULL if closed */
@END
--
2.34.1
1
0
async->initial_status_callback is called whenever the initial_status is
set. This can be used to do the post-processing after the initial
I/O has been performed by the client, but before the async is actually
completed or queued.
Signed-off-by: Jinoh Kang <jinoh.kang.kr(a)gmail.com>
---
Notes:
v1 -> v2:
- add spacing around initial_status_callback call arguments
- add async and fd arguments to async_initial_status_callback
v2 -> v3: no changes
v3 -> v4: no changes
server/async.c | 39 +++++++++++++++++++++++++++++++++++----
server/file.h | 2 ++
2 files changed, 37 insertions(+), 4 deletions(-)
diff --git a/server/async.c b/server/async.c
index d49fb8b7c04..986e8a1ce24 100644
--- a/server/async.c
+++ b/server/async.c
@@ -62,6 +62,8 @@ struct async
unsigned int comp_flags; /* completion flags */
async_completion_callback completion_callback; /* callback to be called on completion */
void *completion_callback_private; /* argument to completion_callback */
+ async_initial_status_callback initial_status_callback; /* callback to be called on initial status set */
+ void *initial_status_callback_private; /* argument to initial_status_callback */
};
static void async_dump( struct object *obj, int verbose );
@@ -139,11 +141,24 @@ static void async_satisfied( struct object *obj, struct wait_queue_entry *entry
}
}
+static void set_async_initial_status( struct async *async, unsigned int status )
+{
+ async->initial_status = status;
+ if (async->initial_status_callback)
+ {
+ async->initial_status_callback( async->initial_status_callback_private, async, async->fd, status );
+ async->initial_status_callback = NULL;
+ }
+}
+
static void async_destroy( struct object *obj )
{
struct async *async = (struct async *)obj;
assert( obj->ops == &async_ops );
+ /* ensure initial_status_callback has been called */
+ set_async_initial_status( async, async->initial_status );
+
list_remove( &async->process_entry );
if (async->queue)
@@ -281,6 +296,8 @@ struct async *create_async( struct fd *fd, struct thread *thread, const async_da
async->comp_flags = 0;
async->completion_callback = NULL;
async->completion_callback_private = NULL;
+ async->initial_status_callback = NULL;
+ async->initial_status_callback_private = NULL;
if (iosb) async->iosb = (struct iosb *)grab_object( iosb );
else async->iosb = NULL;
@@ -298,11 +315,18 @@ struct async *create_async( struct fd *fd, struct thread *thread, const async_da
return async;
}
+/* set a callback to be notified when the async initial status is set */
+void async_set_initial_status_callback( struct async *async, async_initial_status_callback func, void *private )
+{
+ async->initial_status_callback = func;
+ async->initial_status_callback_private = private;
+}
+
/* set the initial status of an async whose status was previously unknown
* the initial status may be STATUS_PENDING */
void async_set_initial_status( struct async *async, unsigned int status )
{
- async->initial_status = status;
+ set_async_initial_status( async, status );
async->unknown_status = 0;
}
@@ -359,7 +383,7 @@ obj_handle_t async_handoff( struct async *async, data_size_t *result, int force_
return async->wait_handle;
}
- async->initial_status = get_error();
+ set_async_initial_status( async, get_error() );
if (!async->pending && NT_ERROR( get_error() ))
{
@@ -398,7 +422,7 @@ obj_handle_t async_handoff( struct async *async, data_size_t *result, int force_
async->wait_handle = 0;
}
}
- async->initial_status = async->iosb->status;
+ set_async_initial_status( async, async->iosb->status );
set_error( async->iosb->status );
return async->wait_handle;
}
@@ -757,9 +781,13 @@ DECL_HANDLER(set_async_direct_result)
{
struct async *async = (struct async *)get_handle_obj( current->process, req->handle, 0, &async_ops );
unsigned int status = req->status;
+ apc_param_t information = req->information;
if (!async) return;
+ /* we only return an async handle for asyncs created via create_request_async() */
+ assert( async->iosb );
+
if (!async->unknown_status || !async->terminated || !async->alerted)
{
set_error( STATUS_INVALID_PARAMETER );
@@ -773,11 +801,14 @@ DECL_HANDLER(set_async_direct_result)
async->pending = 1;
}
+ /* Set iosb information field for async_initial_status_callback */
+ async->iosb->result = information;
+
/* if the I/O has completed successfully, the client would have already
* set the IOSB. therefore, we can skip waiting on wait_handle and do
* async_set_result() directly.
*/
- async_set_result( &async->obj, status, req->information );
+ async_set_result( &async->obj, status, information );
/* close wait handle here to avoid extra server round trip, if the I/O
* either has completed, or is pending and not blocking.
diff --git a/server/file.h b/server/file.h
index 9f9d4cd4e1a..893d4ac6411 100644
--- a/server/file.h
+++ b/server/file.h
@@ -219,6 +219,7 @@ extern struct object *create_serial( struct fd *fd );
/* async I/O functions */
typedef void (*async_completion_callback)( void *private );
+typedef void (*async_initial_status_callback)( void *private, struct async *async, struct fd *fd, unsigned int status );
extern void free_async_queue( struct async_queue *queue );
extern struct async *create_async( struct fd *fd, struct thread *thread, const async_data_t *data, struct iosb *iosb );
@@ -230,6 +231,7 @@ extern void async_set_result( struct object *obj, unsigned int status, apc_param
extern void async_set_completion_callback( struct async *async, async_completion_callback func, void *private );
extern void async_set_unknown_status( struct async *async );
extern void set_async_pending( struct async *async );
+extern void async_set_initial_status_callback( struct async *async, async_initial_status_callback func, void *private );
extern void async_set_initial_status( struct async *async, unsigned int status );
extern void async_wake_obj( struct async *async );
extern int async_waiting( struct async_queue *queue );
--
2.34.1
1
0
[PATCH v4 2/8] server: Ensure initial status is set in async_set_result().
by Jinoh Kang March 3, 2022
by Jinoh Kang March 3, 2022
March 3, 2022
Shift the resposibility of setting initial status from
set_async_direct_result request handler to async_set_result().
Signed-off-by: Jinoh Kang <jinoh.kang.kr(a)gmail.com>
---
Notes:
v3 -> v4: new patch
server/async.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/server/async.c b/server/async.c
index e92d4583c1e..d49fb8b7c04 100644
--- a/server/async.c
+++ b/server/async.c
@@ -302,7 +302,6 @@ struct async *create_async( struct fd *fd, struct thread *thread, const async_da
* the initial status may be STATUS_PENDING */
void async_set_initial_status( struct async *async, unsigned int status )
{
- assert( async->unknown_status );
async->initial_status = status;
async->unknown_status = 0;
}
@@ -482,6 +481,8 @@ void async_set_result( struct object *obj, unsigned int status, apc_param_t tota
assert( async->terminated ); /* it must have been woken up if we get a result */
+ if (async->unknown_status) async_set_initial_status( async, status );
+
if (async->alerted && status == STATUS_PENDING) /* restart it */
{
async->terminated = 0;
@@ -766,8 +767,6 @@ DECL_HANDLER(set_async_direct_result)
return;
}
- async_set_initial_status( async, status );
-
if (status == STATUS_PENDING)
{
async->direct_result = 0;
--
2.34.1
1
0
[PATCH v3 1/5] d3d10/tests: Add tests for Direct3D 10 shader reflection interfaces.
by Matteo Bruni March 3, 2022
by Matteo Bruni March 3, 2022
March 3, 2022
From: Zebediah Figura <zfigura(a)codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com>
---
v3: Update for long types correctness.
dlls/d3dcompiler_43/tests/reflection.c | 29 +++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/dlls/d3dcompiler_43/tests/reflection.c b/dlls/d3dcompiler_43/tests/reflection.c
index 9c8247790c5..bd9179779e9 100644
--- a/dlls/d3dcompiler_43/tests/reflection.c
+++ b/dlls/d3dcompiler_43/tests/reflection.c
@@ -53,7 +53,6 @@ static DWORD shader_creator[] = {
0x39207265, 0x2e39322e, 0x2e323539, 0x31313133, 0xababab00,
};
-#if D3D_COMPILER_VERSION
/*
* fxc.exe /E VS /Tvs_4_0 /Fx
*/
@@ -81,6 +80,7 @@ static DWORD test_reflection_blob[] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
};
+#if D3D_COMPILER_VERSION
static void test_reflection_references(void)
{
ID3D11ShaderReflection *ref11, *ref11_test;
@@ -212,6 +212,31 @@ static void test_reflection_interfaces(void)
count = ref11->lpVtbl->Release(ref11);
ok(!count, "Got unexpected ref count %lu.\n", count);
}
+#else
+static void test_d3d10_interfaces(void)
+{
+ ID3D10ShaderReflection *ref10;
+ IUnknown *unk;
+ HRESULT hr;
+
+ hr = D3D10ReflectShader(test_reflection_blob, sizeof(test_reflection_blob), &ref10);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+
+ hr = ref10->lpVtbl->QueryInterface(ref10, &IID_ID3D10ShaderReflection, (void **)&unk);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ IUnknown_Release(unk);
+
+ hr = ref10->lpVtbl->QueryInterface(ref10, &IID_ID3D10ShaderReflection1, (void **)&unk);
+ ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr);
+
+ hr = ref10->lpVtbl->QueryInterface(ref10, &IID_ID3D11ShaderReflection, (void **)&unk);
+ ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr);
+
+ hr = ref10->lpVtbl->QueryInterface(ref10, &IID_ID3D12ShaderReflection, (void **)&unk);
+ ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr);
+
+ ref10->lpVtbl->Release(ref10);
+}
#endif
/*
@@ -2125,6 +2150,8 @@ START_TEST(reflection)
#if D3D_COMPILER_VERSION
test_reflection_references();
test_reflection_interfaces();
+#else
+ test_d3d10_interfaces();
#endif
test_reflection_desc_vs();
test_reflection_desc_ps();
--
2.34.1
1
4
March 3, 2022
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
dlls/dinput/joystick_hid.c | 5 +++++
dlls/dinput/tests/joystick8.c | 9 ---------
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c
index 80991e8c150..87e343bb47b 100644
--- a/dlls/dinput/joystick_hid.c
+++ b/dlls/dinput/joystick_hid.c
@@ -414,6 +414,11 @@ static const WCHAR *object_usage_to_string( DIDEVICEOBJECTINSTANCEW *instance )
case MAKELONG(PID_USAGE_TRIGGER_BUTTON, HID_USAGE_PAGE_PID): return L"Trigger Button";
case MAKELONG(HID_USAGE_SIMULATION_RUDDER, HID_USAGE_PAGE_SIMULATION): return L"Rudder";
+ case MAKELONG(HID_USAGE_SIMULATION_THROTTLE, HID_USAGE_PAGE_SIMULATION): return L"Throttle";
+ case MAKELONG(HID_USAGE_SIMULATION_ACCELERATOR, HID_USAGE_PAGE_SIMULATION): return L"Accelerator";
+ case MAKELONG(HID_USAGE_SIMULATION_BRAKE, HID_USAGE_PAGE_SIMULATION): return L"Brake";
+ case MAKELONG(HID_USAGE_SIMULATION_CLUTCH, HID_USAGE_PAGE_SIMULATION): return L"Clutch";
+ case MAKELONG(HID_USAGE_SIMULATION_STEERING, HID_USAGE_PAGE_SIMULATION): return L"Steering";
default: return NULL;
}
}
diff --git a/dlls/dinput/tests/joystick8.c b/dlls/dinput/tests/joystick8.c
index e65e3ca9970..8899cbdfecf 100644
--- a/dlls/dinput/tests/joystick8.c
+++ b/dlls/dinput/tests/joystick8.c
@@ -2773,20 +2773,11 @@ static void test_driving_wheel_axes(void)
.wUsage = HID_USAGE_GENERIC_JOYSTICK,
},
};
- struct check_objects_todos object_todos[ARRAY_SIZE(expect_objects)] =
- {
- {.name = TRUE},
- {.name = TRUE},
- {.name = TRUE},
- {.name = TRUE},
- {.name = TRUE},
- };
struct check_objects_params check_objects_params =
{
.version = DIRECTINPUT_VERSION,
.expect_count = ARRAY_SIZE(expect_objects),
.expect_objs = expect_objects,
- .todo_objs = object_todos,
};
WCHAR cwd[MAX_PATH], tempdir[MAX_PATH];
--
2.34.1
2
7
[PATCH 01/20] dlls/kernel32/tests/actctx.c: enable compilation with long types
by Eric Pouech March 3, 2022
by Eric Pouech March 3, 2022
March 3, 2022
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/kernel32/tests/actctx.c | 605 +++++++++++++++++++++---------------------
1 file changed, 303 insertions(+), 302 deletions(-)
diff --git a/dlls/kernel32/tests/actctx.c b/dlls/kernel32/tests/actctx.c
index c26eb08f306..66b945230aa 100644
--- a/dlls/kernel32/tests/actctx.c
+++ b/dlls/kernel32/tests/actctx.c
@@ -15,6 +15,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 "ntstatus.h"
#define WIN32_NO_STATUS
@@ -562,7 +563,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 +575,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 +652,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 +661,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 +790,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 +805,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 +900,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 +913,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 +968,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 +993,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 +1031,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 +1052,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 +1071,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 +1204,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 +1239,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 +1270,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 +1290,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 +1301,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 +1319,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 +1333,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 +1360,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 +1397,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 +1408,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 +1485,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 +1555,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 +1584,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 +1633,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 +1654,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 +1707,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 +1740,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 +1762,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 +1783,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 +1792,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 +1817,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 +1838,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 +1856,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 +1877,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 +1898,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 +1928,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 +1951,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 +2011,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 +2022,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 +2034,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 +2046,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 +2060,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 +2079,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 +2091,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 +2108,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 +2120,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 +2140,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 +2156,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 +2183,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 +2208,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 +2224,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 +2240,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 +2254,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 +2269,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 +2286,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 +2307,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 +2328,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 +2344,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 +2368,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 +2384,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 +2409,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 +2421,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 +2429,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 +2437,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 +2456,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 +2474,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 +2495,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 +2530,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 +2571,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 +2593,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 +2622,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 +2638,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 +2654,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 +2671,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 +2684,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 +2705,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 +2717,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 +2772,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 +2806,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 +2827,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 +2864,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 +2883,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 +2894,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 +2907,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 +2936,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 +2968,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 +2985,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 +3006,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 +3036,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 +3070,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 +3171,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 +3229,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 +3239,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 +3259,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 +3349,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 +3389,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 +3415,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 +3430,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 +3460,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 +3469,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 +3496,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 +3541,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 +3567,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__);
4
26