Wine-Devel
By message
wine-devel@list.winehq.org
By month
Threads by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
February 2022
- 87 participants
- 926 discussions
[PATCH 5/8] user32/tests: Add a test for child window destruction on thread exit.
by Jacek Caban Feb. 8, 2022
by Jacek Caban Feb. 8, 2022
Feb. 8, 2022
From: Rémi Bernon <rbernon(a)codeweavers.com>
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
dlls/user32/tests/win.c | 235 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 235 insertions(+)
1
0
[PATCH 4/8] server: Don't immediately destroy child windows belonging to different thread in free_window_handle.
by Jacek Caban Feb. 8, 2022
by Jacek Caban Feb. 8, 2022
Feb. 8, 2022
Notify their thread instead.
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
dlls/user32/user_private.h | 18 ------------------
dlls/user32/win.c | 12 +-----------
include/ntuser.h | 19 +++++++++++++++++++
server/window.c | 14 +++++++++-----
4 files changed, 29 insertions(+), 34 deletions(-)
1
0
Feb. 8, 2022
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
server/window.c | 29 ++++++++++++++++++++++-------
1 file changed, 22 insertions(+), 7 deletions(-)
1
0
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
Tests show that orphaned windows' parents handles are no longer valid,
but a number of operations of children still need to work, even things
like MoveWindow(). For that to work, we still need to have parent object
around. Following patches will use that for ref-counting, while having
full server object is nice for things like leak detection.
We could avoid making window object ref-counted by detecting if we're
the last child alive when freeing its handle (and then destroying
parent), but that doesn't seem cleaner.
server/user.h | 2 +-
server/window.c | 106 +++++++++++++++++++++++++++++++++-----------
server/winstation.c | 4 +-
3 files changed, 83 insertions(+), 29 deletions(-)
1
0
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/winhttp/tests/winhttp.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c
index 053f8315fec..21af2761323 100644
--- a/dlls/winhttp/tests/winhttp.c
+++ b/dlls/winhttp/tests/winhttp.c
@@ -32,7 +32,6 @@
#include <httprequestid.h>
#include "wine/test.h"
-#include "wine/heap.h"
DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
--
2.30.2
2
1
Feb. 8, 2022
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/winhttp/Makefile.in | 1 -
dlls/winhttp/handle.c | 10 ++--
dlls/winhttp/net.c | 39 +++++++-------
dlls/winhttp/request.c | 106 +++++++++++++++++++--------------------
dlls/winhttp/session.c | 76 ++++++++++++++--------------
dlls/winhttp/url.c | 8 +--
6 files changed, 119 insertions(+), 121 deletions(-)
diff --git a/dlls/winhttp/Makefile.in b/dlls/winhttp/Makefile.in
index 44ccf738d99..97266fbc92a 100644
--- a/dlls/winhttp/Makefile.in
+++ b/dlls/winhttp/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = winhttp.dll
IMPORTLIB = winhttp
IMPORTS = uuid jsproxy user32 advapi32 ws2_32
diff --git a/dlls/winhttp/handle.c b/dlls/winhttp/handle.c
index 4fc94f10d01..38959fd6456 100644
--- a/dlls/winhttp/handle.c
+++ b/dlls/winhttp/handle.c
@@ -48,7 +48,7 @@ static ULONG_PTR max_handles;
struct object_header *addref_object( struct object_header *hdr )
{
ULONG refs = InterlockedIncrement( &hdr->refs );
- TRACE("%p -> refcount = %d\n", hdr, refs);
+ TRACE( "%p -> refcount = %lu\n", hdr, refs );
return hdr;
}
@@ -64,21 +64,21 @@ struct object_header *grab_object( HINTERNET hinternet )
LeaveCriticalSection( &handle_cs );
- TRACE("handle 0x%lx -> %p\n", handle, hdr);
+ TRACE( "handle %Ix -> %p\n", handle, hdr );
return hdr;
}
void release_object( struct object_header *hdr )
{
ULONG refs = InterlockedDecrement( &hdr->refs );
- TRACE("object %p refcount = %d\n", hdr, refs);
+ TRACE( "object %p refcount = %lu\n", hdr, refs );
if (!refs)
{
if (hdr->type == WINHTTP_HANDLE_TYPE_REQUEST) close_connection( (struct request *)hdr );
send_callback( hdr, WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING, &hdr->handle, sizeof(HINTERNET) );
- TRACE("destroying object %p\n", hdr);
+ TRACE( "destroying object %p\n", hdr );
hdr->vtbl->destroy( hdr );
}
}
@@ -134,7 +134,7 @@ BOOL free_handle( HINTERNET hinternet )
if (handles[handle])
{
hdr = handles[handle];
- TRACE("destroying handle 0x%lx for object %p\n", handle + 1, hdr);
+ TRACE( "destroying handle %Ix for object %p\n", handle + 1, hdr );
handles[handle] = NULL;
ret = TRUE;
}
diff --git a/dlls/winhttp/net.c b/dlls/winhttp/net.c
index 446dbc996e7..19fafb25804 100644
--- a/dlls/winhttp/net.c
+++ b/dlls/winhttp/net.c
@@ -36,7 +36,7 @@ static int sock_send(int fd, const void *msg, size_t len, WSAOVERLAPPED *ovr)
{
WSABUF wsabuf;
DWORD size;
- DWORD err;
+ int err;
wsabuf.len = len;
wsabuf.buf = (void *)msg;
@@ -47,7 +47,7 @@ static int sock_send(int fd, const void *msg, size_t len, WSAOVERLAPPED *ovr)
return size;
}
err = WSAGetLastError();
- if (!(ovr && err == WSA_IO_PENDING)) WARN( "send error %u\n", err );
+ if (!(ovr && err == WSA_IO_PENDING)) WARN( "send error %d\n", err );
return -1;
}
@@ -56,7 +56,7 @@ static int sock_recv(int fd, void *msg, size_t len, int flags)
int ret;
do
{
- if ((ret = recv(fd, msg, len, flags)) == -1) WARN("recv error %u\n", WSAGetLastError());
+ if ((ret = recv(fd, msg, len, flags)) == -1) WARN( "recv error %d\n", WSAGetLastError() );
}
while(ret == -1 && WSAGetLastError() == WSAEINTR);
return ret;
@@ -154,7 +154,7 @@ static DWORD netconn_verify_cert( PCCERT_CONTEXT cert, WCHAR *server, DWORD secu
}
else
err = ERROR_WINHTTP_SECURE_CHANNEL_ERROR;
- TRACE("returning %08x\n", err);
+ TRACE( "returning %#lx\n", err );
return err;
}
@@ -201,7 +201,7 @@ DWORD netconn_create( struct hostdata *host, const struct sockaddr_storage *sock
if ((conn->socket = WSASocketW( sockaddr->ss_family, SOCK_STREAM, 0, NULL, 0, WSA_FLAG_OVERLAPPED )) == -1)
{
ret = WSAGetLastError();
- WARN("unable to create socket (%u)\n", ret);
+ WARN( "unable to create socket (%lu)\n", ret );
free( conn );
return ret;
}
@@ -243,7 +243,7 @@ DWORD netconn_create( struct hostdata *host, const struct sockaddr_storage *sock
if (ret)
{
- WARN("unable to connect to host (%u)\n", ret);
+ WARN( "unable to connect to host (%lu)\n", ret );
closesocket( conn->socket );
free( conn );
return ret;
@@ -296,7 +296,7 @@ DWORD netconn_secure_connect( struct netconn *conn, WCHAR *hostname, DWORD secur
if(out_buf.cbBuffer) {
assert(status == SEC_I_CONTINUE_NEEDED);
- TRACE("sending %u bytes\n", out_buf.cbBuffer);
+ TRACE( "sending %lu bytes\n", out_buf.cbBuffer );
size = sock_send(conn->socket, out_buf.pvBuffer, out_buf.cbBuffer, NULL);
if(size != out_buf.cbBuffer) {
@@ -343,13 +343,13 @@ DWORD netconn_secure_connect( struct netconn *conn, WCHAR *hostname, DWORD secur
break;
}
- TRACE("recv %lu bytes\n", size);
+ TRACE( "recv %Iu bytes\n", size );
in_bufs[0].cbBuffer += size;
in_bufs[0].pvBuffer = read_buf;
status = InitializeSecurityContextW(cred_handle, &ctx, hostname, isc_req_flags, 0, 0, &in_desc,
0, NULL, &out_desc, &attrs, NULL);
- TRACE("InitializeSecurityContext ret %08x\n", status);
+ TRACE( "InitializeSecurityContext ret %#lx\n", status );
if(status == SEC_E_OK) {
if(in_bufs[1].BufferType == SECBUFFER_EXTRA)
@@ -366,7 +366,7 @@ DWORD netconn_secure_connect( struct netconn *conn, WCHAR *hostname, DWORD secur
res = netconn_verify_cert(cert, hostname, security_flags, check_revocation);
CertFreeCertificateContext(cert);
if(res != ERROR_SUCCESS) {
- WARN("cert verify failed: %u\n", res);
+ WARN( "cert verify failed: %lu\n", res );
break;
}
}else {
@@ -390,7 +390,7 @@ DWORD netconn_secure_connect( struct netconn *conn, WCHAR *hostname, DWORD secur
free(read_buf);
if(status != SEC_E_OK || res != ERROR_SUCCESS) {
- WARN("Failed to initialize security context: %08x\n", status);
+ WARN( "Failed to initialize security context: %#lx\n", status );
free(conn->ssl_read_buf);
conn->ssl_read_buf = NULL;
free(conn->ssl_write_buf);
@@ -420,12 +420,11 @@ static DWORD send_ssl_chunk( struct netconn *conn, const void *msg, size_t size,
memcpy( bufs[1].pvBuffer, msg, size );
if ((res = EncryptMessage(&conn->ssl_ctx, 0, &buf_desc, 0)) != SEC_E_OK)
{
- WARN("EncryptMessage failed: %08x\n", res);
+ WARN( "EncryptMessage failed: %#lx\n", res );
return res;
}
- if (sock_send( conn->socket, conn->ssl_write_buf,
- bufs[0].cbBuffer + bufs[1].cbBuffer + bufs[2].cbBuffer, ovr ) < 1)
+ if (sock_send( conn->socket, conn->ssl_write_buf, bufs[0].cbBuffer + bufs[1].cbBuffer + bufs[2].cbBuffer, ovr ) < 1)
{
WARN("send failed\n");
return WSAGetLastError();
@@ -531,7 +530,7 @@ static DWORD read_ssl_chunk( struct netconn *conn, void *buf, SIZE_T buf_size, S
continue;
default:
- WARN("failed: %08x\n", res);
+ WARN( "failed: %#lx\n", res );
return res;
}
} while (res != SEC_E_OK);
@@ -601,7 +600,7 @@ DWORD netconn_recv( struct netconn *conn, void *buf, size_t len, int flags, int
SIZE_T cread = 0;
if ((res = read_ssl_chunk( conn, (BYTE *)buf + size, len - size, &cread, &eof )))
{
- WARN("read_ssl_chunk failed: %u\n", res);
+ WARN( "read_ssl_chunk failed: %lu\n", res );
if (!size) return res;
break;
}
@@ -614,7 +613,7 @@ DWORD netconn_recv( struct netconn *conn, void *buf, size_t len, int flags, int
} while (!size || ((flags & MSG_WAITALL) && size < len));
- TRACE("received %ld bytes\n", size);
+ TRACE( "received %Iu bytes\n", size );
*recvd = size;
return ERROR_SUCCESS;
}
@@ -634,7 +633,7 @@ DWORD netconn_set_timeout( struct netconn *netconn, BOOL send, int value )
if (setsockopt( netconn->socket, SOL_SOCKET, opt, (void *)&value, sizeof(value) ) == -1)
{
DWORD err = WSAGetLastError();
- WARN("setsockopt failed (%u)\n", err );
+ WARN( "setsockopt failed (%lu)\n", err );
return err;
}
return ERROR_SUCCESS;
@@ -654,7 +653,7 @@ BOOL netconn_is_alive( struct netconn *netconn )
while (!netconn->peek_msg && !(err = read_ssl_chunk( netconn, NULL, 0, &size, &eof )) && !eof)
;
- TRACE("Checking secure connection, err %d.\n", err);
+ TRACE( "checking secure connection, err %lu\n", err );
if (netconn->peek_msg || err == WSAEWOULDBLOCK)
{
@@ -772,6 +771,6 @@ int netconn_get_cipher_strength( struct netconn *conn )
if (!conn->secure) return 0;
res = QueryContextAttributesW(&conn->ssl_ctx, SECPKG_ATTR_CONNECTION_INFO, (void*)&conn_info);
if(res != SEC_E_OK)
- WARN("QueryContextAttributesW failed: %08x\n", res);
+ WARN( "QueryContextAttributesW failed: %#lx\n", res );
return res == SEC_E_OK ? conn_info.dwCipherStrength : 0;
}
diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c
index c32a33cbaf2..d0732952e11 100644
--- a/dlls/winhttp/request.c
+++ b/dlls/winhttp/request.c
@@ -299,7 +299,7 @@ DWORD process_header( struct request *request, const WCHAR *field, const WCHAR *
int index;
struct header hdr;
- TRACE("%s: %s 0x%08x\n", debugstr_w(field), debugstr_w(value), flags);
+ TRACE( "%s: %s %#lx\n", debugstr_w(field), debugstr_w(value), flags );
if ((index = get_header_index( request, field, 0, request_only )) >= 0)
{
@@ -405,12 +405,12 @@ DWORD add_request_headers( struct request *request, const WCHAR *headers, DWORD
/***********************************************************************
* WinHttpAddRequestHeaders (winhttp.@)
*/
-BOOL WINAPI WinHttpAddRequestHeaders( HINTERNET hrequest, LPCWSTR headers, DWORD len, DWORD flags )
+BOOL WINAPI WinHttpAddRequestHeaders( HINTERNET hrequest, const WCHAR *headers, DWORD len, DWORD flags )
{
DWORD ret;
struct request *request;
- TRACE("%p, %s, %u, 0x%08x\n", hrequest, debugstr_wn(headers, len), len, flags);
+ TRACE( "%p, %s, %lu, %#lx\n", hrequest, debugstr_wn(headers, len), len, flags );
if (!headers || !len)
{
@@ -637,7 +637,7 @@ static DWORD query_headers( struct request *request, DWORD level, const WCHAR *n
if (attr >= ARRAY_SIZE(attribute_table)) return ERROR_INVALID_PARAMETER;
if (!attribute_table[attr])
{
- FIXME("attribute %u not implemented\n", attr);
+ FIXME( "attribute %lu not implemented\n", attr );
return ERROR_WINHTTP_HEADER_NOT_FOUND;
}
TRACE("attribute %s\n", debugstr_w(attribute_table[attr]));
@@ -698,12 +698,13 @@ static DWORD query_headers( struct request *request, DWORD level, const WCHAR *n
/***********************************************************************
* WinHttpQueryHeaders (winhttp.@)
*/
-BOOL WINAPI WinHttpQueryHeaders( HINTERNET hrequest, DWORD level, LPCWSTR name, LPVOID buffer, LPDWORD buflen, LPDWORD index )
+BOOL WINAPI WinHttpQueryHeaders( HINTERNET hrequest, DWORD level, const WCHAR *name, void *buffer, DWORD *buflen,
+ DWORD *index )
{
DWORD ret;
struct request *request;
- TRACE("%p, 0x%08x, %s, %p, %p, %p\n", hrequest, level, debugstr_w(name), buffer, buflen, index);
+ TRACE( "%p, %#lx, %s, %p, %p, %p\n", hrequest, level, debugstr_w(name), buffer, buflen, index );
if (!(request = (struct request *)grab_object( hrequest )))
{
@@ -1047,7 +1048,7 @@ static BOOL do_authorization( struct request *request, DWORD target, DWORD schem
break;
default:
- WARN("unknown target %x\n", target);
+ WARN( "unknown target %#lx\n", target );
return FALSE;
}
authinfo = *auth_ptr;
@@ -1126,8 +1127,8 @@ static BOOL do_authorization( struct request *request, DWORD target, DWORD schem
}
if (status != SEC_E_OK)
{
- WARN("AcquireCredentialsHandleW for scheme %s failed with error 0x%08x\n",
- debugstr_w(auth_schemes[scheme].str), status);
+ WARN( "AcquireCredentialsHandleW for scheme %s failed with error %#lx\n",
+ debugstr_w(auth_schemes[scheme].str), status );
free( authinfo );
return FALSE;
}
@@ -1199,7 +1200,7 @@ static BOOL do_authorization( struct request *request, DWORD target, DWORD schem
}
else
{
- ERR("InitializeSecurityContextW failed with error 0x%08x\n", status);
+ ERR( "InitializeSecurityContextW failed with error %#lx\n", status );
free( out.pvBuffer );
destroy_authinfo( authinfo );
*auth_ptr = NULL;
@@ -1437,7 +1438,7 @@ static DWORD ensure_cred_handle( struct request *request )
if (status != SEC_E_OK)
{
- WARN( "AcquireCredentialsHandleW failed: 0x%08x\n", status );
+ WARN( "AcquireCredentialsHandleW failed: %#lx\n", status );
return status;
}
return ERROR_SUCCESS;
@@ -1735,7 +1736,7 @@ static DWORD start_next_chunk( struct request *request, BOOL notify )
else if (ch >= 'A' && ch <= 'F') chunk_size = chunk_size * 16 + ch - 'A' + 10;
else if (ch == ';' || ch == '\r' || ch == '\n')
{
- TRACE("reading %u byte chunk\n", chunk_size);
+ TRACE( "reading %lu byte chunk\n", chunk_size );
if (request->content_length == ~0u) request->content_length = chunk_size;
else request->content_length += chunk_size;
@@ -1847,7 +1848,7 @@ static DWORD read_data( struct request *request, void *buffer, DWORD size, DWORD
if (request->read_chunked && !request->read_chunked_size) ret = refill_buffer( request, async );
done:
- TRACE( "retrieved %u bytes (%u/%u)\n", bytes_read, request->content_read, request->content_length );
+ TRACE( "retrieved %u bytes (%lu/%lu)\n", bytes_read, request->content_read, request->content_length );
if (end_of_read_data( request )) finished_reading( request );
if (async)
{
@@ -2117,12 +2118,12 @@ static DWORD send_request( struct request *request, const WCHAR *headers, DWORD
if (headers && (ret = add_request_headers( request, headers, headers_len,
WINHTTP_ADDREQ_FLAG_ADD | WINHTTP_ADDREQ_FLAG_REPLACE )))
{
- TRACE("failed to add request headers: %u\n", ret);
+ TRACE( "failed to add request headers: %lu\n", ret );
return ret;
}
if (!(request->hdr.disable_flags & WINHTTP_DISABLE_COOKIES) && (ret = add_cookie_headers( request )))
{
- WARN("failed to add cookie headers: %u\n", ret);
+ WARN( "failed to add cookie headers: %lu\n", ret );
return ret;
}
@@ -2181,14 +2182,14 @@ static void CALLBACK task_send_request( TP_CALLBACK_INSTANCE *instance, void *ct
/***********************************************************************
* WinHttpSendRequest (winhttp.@)
*/
-BOOL WINAPI WinHttpSendRequest( HINTERNET hrequest, LPCWSTR headers, DWORD headers_len,
- LPVOID optional, DWORD optional_len, DWORD total_len, DWORD_PTR context )
+BOOL WINAPI WinHttpSendRequest( HINTERNET hrequest, const WCHAR *headers, DWORD headers_len,
+ void *optional, DWORD optional_len, DWORD total_len, DWORD_PTR context )
{
DWORD ret;
struct request *request;
- TRACE("%p, %s, %u, %p, %u, %u, %lx\n", hrequest, debugstr_wn(headers, headers_len), headers_len, optional,
- optional_len, total_len, context);
+ TRACE( "%p, %s, %lu, %p, %lu, %lu, %Ix\n", hrequest, debugstr_wn(headers, headers_len), headers_len, optional,
+ optional_len, total_len, context );
if (!(request = (struct request *)grab_object( hrequest )))
{
@@ -2266,7 +2267,7 @@ static DWORD set_credentials( struct request *request, DWORD target, DWORD schem
break;
}
default:
- WARN("unknown target %u\n", target);
+ WARN( "unknown target %lu\n", target );
return ERROR_INVALID_PARAMETER;
}
return ERROR_SUCCESS;
@@ -2275,13 +2276,13 @@ static DWORD set_credentials( struct request *request, DWORD target, DWORD schem
/***********************************************************************
* WinHttpSetCredentials (winhttp.@)
*/
-BOOL WINAPI WinHttpSetCredentials( HINTERNET hrequest, DWORD target, DWORD scheme, LPCWSTR username,
- LPCWSTR password, LPVOID params )
+BOOL WINAPI WinHttpSetCredentials( HINTERNET hrequest, DWORD target, DWORD scheme, const WCHAR *username,
+ const WCHAR *password, void *params )
{
DWORD ret;
struct request *request;
- TRACE("%p, %x, 0x%08x, %s, %p, %p\n", hrequest, target, scheme, debugstr_w(username), password, params);
+ TRACE( "%p, %lu, %#lx, %s, %p, %p\n", hrequest, target, scheme, debugstr_w(username), password, params );
if (!(request = (struct request *)grab_object( hrequest )))
{
@@ -2319,7 +2320,7 @@ static DWORD handle_authorization( struct request *request, DWORD status )
break;
default:
- ERR("unhandled status %u\n", status);
+ ERR( "unhandled status %lu\n", status );
return ERROR_WINHTTP_INTERNAL_ERROR;
}
@@ -2834,7 +2835,7 @@ static DWORD query_data_available( struct request *request, DWORD *available, BO
}
done:
- TRACE("%u bytes available\n", count);
+ TRACE( "%lu bytes available\n", count );
if (async)
{
if (!ret) send_callback( &request->hdr, WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE, &count, sizeof(count) );
@@ -2922,13 +2923,13 @@ static void CALLBACK task_read_data( TP_CALLBACK_INSTANCE *instance, void *ctx,
/***********************************************************************
* WinHttpReadData (winhttp.@)
*/
-BOOL WINAPI WinHttpReadData( HINTERNET hrequest, LPVOID buffer, DWORD to_read, LPDWORD read )
+BOOL WINAPI WinHttpReadData( HINTERNET hrequest, void *buffer, DWORD to_read, DWORD *read )
{
DWORD ret;
struct request *request;
BOOL async;
- TRACE("%p, %p, %d, %p\n", hrequest, buffer, to_read, read);
+ TRACE( "%p, %p, %lu, %p\n", hrequest, buffer, to_read, read );
if (!(request = (struct request *)grab_object( hrequest )))
{
@@ -3003,12 +3004,12 @@ static void CALLBACK task_write_data( TP_CALLBACK_INSTANCE *instance, void *ctx,
/***********************************************************************
* WinHttpWriteData (winhttp.@)
*/
-BOOL WINAPI WinHttpWriteData( HINTERNET hrequest, LPCVOID buffer, DWORD to_write, LPDWORD written )
+BOOL WINAPI WinHttpWriteData( HINTERNET hrequest, const void *buffer, DWORD to_write, DWORD *written )
{
DWORD ret;
struct request *request;
- TRACE("%p, %p, %d, %p\n", hrequest, buffer, to_write, written);
+ TRACE( "%p, %p, %lu, %p\n", hrequest, buffer, to_write, written );
if (!(request = (struct request *)grab_object( hrequest )))
{
@@ -3048,7 +3049,7 @@ BOOL WINAPI WinHttpWriteData( HINTERNET hrequest, LPCVOID buffer, DWORD to_write
static BOOL socket_query_option( struct object_header *hdr, DWORD option, void *buffer, DWORD *buflen )
{
- FIXME("unimplemented option %u\n", option);
+ FIXME( "unimplemented option %lu\n", option );
SetLastError( ERROR_WINHTTP_INVALID_OPTION );
return FALSE;
}
@@ -3069,7 +3070,7 @@ static void socket_destroy( struct object_header *hdr )
static BOOL socket_set_option( struct object_header *hdr, DWORD option, void *buffer, DWORD buflen )
{
- FIXME("unimplemented option %u\n", option);
+ FIXME( "unimplemented option %lu\n", option );
SetLastError( ERROR_WINHTTP_INVALID_OPTION );
return FALSE;
}
@@ -3087,7 +3088,7 @@ HINTERNET WINAPI WinHttpWebSocketCompleteUpgrade( HINTERNET hrequest, DWORD_PTR
struct request *request;
HINTERNET hsocket = NULL;
- TRACE("%p, %08lx\n", hrequest, context);
+ TRACE( "%p, %Ix\n", hrequest, context );
if (!(request = (struct request *)grab_object( hrequest )))
{
@@ -3146,13 +3147,12 @@ static DWORD send_bytes( struct socket *socket, char *bytes, int len, int *sent,
static DWORD send_frame( struct socket *socket, enum socket_opcode opcode, USHORT status, const char *buf,
DWORD buflen, BOOL final, WSAOVERLAPPED *ovr )
{
- DWORD i, offset = 2, len = buflen;
- DWORD buffer_size, ret = 0;
+ DWORD i, offset = 2, len = buflen, buffer_size, ret = 0;
int sent_size;
char hdr[14];
char *ptr;
- TRACE( "sending %02x frame, len %u.\n", opcode, len );
+ TRACE( "sending %02x frame, len %lu\n", opcode, len );
if (opcode == SOCKET_OPCODE_CLOSE) len += sizeof(status);
@@ -3188,7 +3188,7 @@ static DWORD send_frame( struct socket *socket, enum socket_opcode opcode, USHOR
new_size = min( buffer_size, MAX_FRAME_BUFFER_SIZE );
if (!(new = realloc( socket->send_frame_buffer, new_size )))
{
- ERR("Out of memory, buffer_size %u.\n", buffer_size);
+ ERR( "out of memory, buffer_size %lu\n", buffer_size);
return ERROR_OUTOFMEMORY;
}
socket->send_frame_buffer = new;
@@ -3360,7 +3360,7 @@ DWORD WINAPI WinHttpWebSocketSend( HINTERNET hsocket, WINHTTP_WEB_SOCKET_BUFFER_
struct socket *socket;
DWORD ret = 0;
- TRACE("%p, %u, %p, %u\n", hsocket, type, buf, len);
+ TRACE( "%p, %u, %p, %lu\n", hsocket, type, buf, len );
if (len && !buf) return ERROR_INVALID_PARAMETER;
if (type != WINHTTP_WEB_SOCKET_UTF8_MESSAGE_BUFFER_TYPE && type != WINHTTP_WEB_SOCKET_BINARY_MESSAGE_BUFFER_TYPE)
@@ -3729,7 +3729,7 @@ DWORD WINAPI WinHttpWebSocketReceive( HINTERNET hsocket, void *buf, DWORD len, D
struct socket *socket;
DWORD ret;
- TRACE("%p, %p, %u, %p, %p\n", hsocket, buf, len, ret_len, ret_type);
+ TRACE( "%p, %p, %lu, %p, %p\n", hsocket, buf, len, ret_len, ret_type );
if (!buf || !len) return ERROR_INVALID_PARAMETER;
@@ -3874,7 +3874,7 @@ DWORD WINAPI WinHttpWebSocketShutdown( HINTERNET hsocket, USHORT status, void *r
struct socket *socket;
DWORD ret;
- TRACE("%p, %u, %p, %u\n", hsocket, status, reason, len);
+ TRACE( "%p, %u, %p, %lu\n", hsocket, status, reason, len );
if ((len && !reason) || len > sizeof(socket->reason)) return ERROR_INVALID_PARAMETER;
@@ -3949,7 +3949,7 @@ DWORD WINAPI WinHttpWebSocketClose( HINTERNET hsocket, USHORT status, void *reas
struct socket *socket;
DWORD ret;
- TRACE("%p, %u, %p, %u\n", hsocket, status, reason, len);
+ TRACE( "%p, %u, %p, %lu\n", hsocket, status, reason, len );
if ((len && !reason) || len > sizeof(socket->reason)) return ERROR_INVALID_PARAMETER;
@@ -4022,7 +4022,7 @@ DWORD WINAPI WinHttpWebSocketQueryCloseStatus( HINTERNET hsocket, USHORT *status
struct socket *socket;
DWORD ret;
- TRACE("%p, %p, %p, %u, %p\n", hsocket, status, reason, len, ret_len);
+ TRACE( "%p, %p, %p, %lu, %p\n", hsocket, status, reason, len, ret_len );
if (!status || (len && !reason) || !ret_len) return ERROR_INVALID_PARAMETER;
@@ -4218,7 +4218,7 @@ static HRESULT get_typeinfo( enum type_id tid, ITypeInfo **ret )
hr = LoadRegTypeLib( &LIBID_WinHttp, 5, 1, LOCALE_SYSTEM_DEFAULT, &typelib );
if (FAILED(hr))
{
- ERR("LoadRegTypeLib failed: %08x\n", hr);
+ ERR( "LoadRegTypeLib failed: %#lx\n", hr );
return hr;
}
if (InterlockedCompareExchangePointer( (void **)&winhttp_typelib, typelib, NULL ))
@@ -4231,7 +4231,7 @@ static HRESULT get_typeinfo( enum type_id tid, ITypeInfo **ret )
hr = ITypeLib_GetTypeInfoOfGuid( winhttp_typelib, winhttp_tid_id[tid], &typeinfo );
if (FAILED(hr))
{
- ERR("GetTypeInfoOfGuid(%s) failed: %08x\n", debugstr_guid(winhttp_tid_id[tid]), hr);
+ ERR( "GetTypeInfoOfGuid(%s) failed: %#lx\n", debugstr_guid(winhttp_tid_id[tid]), hr );
return hr;
}
if (InterlockedCompareExchangePointer( (void **)(winhttp_typeinfo + tid), typeinfo, NULL ))
@@ -4261,7 +4261,7 @@ static HRESULT WINAPI winhttp_request_GetTypeInfo(
ITypeInfo **info )
{
struct winhttp_request *request = impl_from_IWinHttpRequest( iface );
- TRACE("%p, %u, %u, %p\n", request, index, lcid, info);
+ TRACE( "%p, %u, %lu, %p\n", request, index, lcid, info );
return get_typeinfo( IWinHttpRequest_tid, info );
}
@@ -4278,7 +4278,7 @@ static HRESULT WINAPI winhttp_request_GetIDsOfNames(
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("%p, %s, %p, %u, %u, %p\n", request, debugstr_guid(riid), names, count, lcid, dispid);
+ TRACE( "%p, %s, %p, %u, %lu, %p\n", request, debugstr_guid(riid), names, count, lcid, dispid );
if (!names || !count || !dispid) return E_INVALIDARG;
@@ -4306,8 +4306,8 @@ static HRESULT WINAPI winhttp_request_Invoke(
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("%p, %d, %s, %d, %d, %p, %p, %p, %p\n", request, member, debugstr_guid(riid),
- lcid, flags, params, result, excep_info, arg_err);
+ TRACE( "%p, %ld, %s, %lu, %d, %p, %p, %p, %p\n", request, member, debugstr_guid(riid),
+ lcid, flags, params, result, excep_info, arg_err );
if (!IsEqualIID( riid, &IID_NULL )) return DISP_E_UNKNOWNINTERFACE;
@@ -4331,7 +4331,7 @@ static HRESULT WINAPI winhttp_request_Invoke(
hr = IWinHttpRequest_put_Option( &request->IWinHttpRequest_iface, V_I4( &option ), params->rgvarg[0] );
if (FAILED(hr))
- WARN("put_Option(%d) failed: %x\n", V_I4( &option ), hr);
+ WARN( "put_Option(%ld) failed: %#lx\n", V_I4( &option ), hr );
return hr;
}
else if (flags & (DISPATCH_PROPERTYGET | DISPATCH_METHOD))
@@ -4341,7 +4341,7 @@ static HRESULT WINAPI winhttp_request_Invoke(
hr = IWinHttpRequest_get_Option( &request->IWinHttpRequest_iface, V_I4( &option ), result );
if (FAILED(hr))
- WARN("get_Option(%d) failed: %x\n", V_I4( &option ), hr);
+ WARN( "get_Option(%ld) failed: %#lx\n", V_I4( &option ), hr );
return hr;
}
@@ -4370,8 +4370,8 @@ static HRESULT WINAPI winhttp_request_SetProxy(
struct winhttp_request *request = impl_from_IWinHttpRequest( iface );
DWORD err = ERROR_SUCCESS;
- TRACE("%p, %u, %s, %s\n", request, proxy_setting, debugstr_variant(&proxy_server),
- debugstr_variant(&bypass_list));
+ TRACE( "%p, %lu, %s, %s\n", request, proxy_setting, debugstr_variant(&proxy_server),
+ debugstr_variant(&bypass_list) );
EnterCriticalSection( &request->cs );
switch (proxy_setting)
@@ -4424,7 +4424,7 @@ static HRESULT WINAPI winhttp_request_SetCredentials(
DWORD target, scheme = WINHTTP_AUTH_SCHEME_BASIC; /* FIXME: query supported schemes */
DWORD err = ERROR_SUCCESS;
- TRACE("%p, %s, %p, 0x%08x\n", request, debugstr_w(username), password, flags);
+ TRACE( "%p, %s, %p, %#lx\n", request, debugstr_w(username), password, flags );
EnterCriticalSection( &request->cs );
if (request->state < REQUEST_STATE_OPEN)
@@ -5508,7 +5508,7 @@ static HRESULT WINAPI winhttp_request_SetTimeouts(
{
struct winhttp_request *request = impl_from_IWinHttpRequest( iface );
- TRACE("%p, %d, %d, %d, %d\n", request, resolve_timeout, connect_timeout, send_timeout, receive_timeout);
+ TRACE( "%p, %ld, %ld, %ld, %ld\n", request, resolve_timeout, connect_timeout, send_timeout, receive_timeout );
EnterCriticalSection( &request->cs );
request->resolve_timeout = resolve_timeout;
diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c
index 2620bf30ac0..971c51ada4f 100644
--- a/dlls/winhttp/session.c
+++ b/dlls/winhttp/session.c
@@ -48,11 +48,11 @@ void send_callback( struct object_header *hdr, DWORD status, void *info, DWORD b
{
if (hdr->callback && (hdr->notify_mask & status))
{
- TRACE("%p, 0x%08x, %p, %u, %u\n", hdr, status, info, buflen, hdr->recursion_count);
+ TRACE( "%p, %#lx, %p, %lu, %lu\n", hdr, status, info, buflen, hdr->recursion_count );
InterlockedIncrement( &hdr->recursion_count );
hdr->callback( hdr->handle, hdr->context, status, info, buflen );
InterlockedDecrement( &hdr->recursion_count );
- TRACE("returning from 0x%08x callback\n", status);
+ TRACE("returning from %#lx callback\n", status);
}
}
@@ -145,7 +145,7 @@ static BOOL session_query_option( struct object_header *hdr, DWORD option, void
return TRUE;
default:
- FIXME("unimplemented option %u\n", option);
+ FIXME( "unimplemented option %lu\n", option );
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;
}
@@ -161,7 +161,7 @@ static BOOL session_set_option( struct object_header *hdr, DWORD option, void *b
{
WINHTTP_PROXY_INFO *pi = buffer;
- FIXME("%u %s %s\n", pi->dwAccessType, debugstr_w(pi->lpszProxy), debugstr_w(pi->lpszProxyBypass));
+ FIXME( "%lu %s %s\n", pi->dwAccessType, debugstr_w(pi->lpszProxy), debugstr_w(pi->lpszProxyBypass) );
return TRUE;
}
case WINHTTP_OPTION_REDIRECT_POLICY:
@@ -175,7 +175,7 @@ static BOOL session_set_option( struct object_header *hdr, DWORD option, void *b
}
policy = *(DWORD *)buffer;
- TRACE("0x%x\n", policy);
+ TRACE( "%#lx\n", policy );
hdr->redirect_policy = policy;
return TRUE;
}
@@ -189,7 +189,7 @@ static BOOL session_set_option( struct object_header *hdr, DWORD option, void *b
EnterCriticalSection( &session->cs );
session->secure_protocols = *(DWORD *)buffer;
LeaveCriticalSection( &session->cs );
- TRACE("0x%x\n", session->secure_protocols);
+ TRACE( "%#lx\n", session->secure_protocols );
return TRUE;
}
case WINHTTP_OPTION_DISABLE_FEATURE:
@@ -226,15 +226,15 @@ static BOOL session_set_option( struct object_header *hdr, DWORD option, void *b
return TRUE;
case WINHTTP_OPTION_MAX_CONNS_PER_SERVER:
- FIXME("WINHTTP_OPTION_MAX_CONNS_PER_SERVER: %d\n", *(DWORD *)buffer);
+ FIXME( "WINHTTP_OPTION_MAX_CONNS_PER_SERVER: %lu\n", *(DWORD *)buffer );
return TRUE;
case WINHTTP_OPTION_MAX_CONNS_PER_1_0_SERVER:
- FIXME("WINHTTP_OPTION_MAX_CONNS_PER_1_0_SERVER: %d\n", *(DWORD *)buffer);
+ FIXME( "WINHTTP_OPTION_MAX_CONNS_PER_1_0_SERVER: %lu\n", *(DWORD *)buffer );
return TRUE;
default:
- FIXME("unimplemented option %u\n", option);
+ FIXME( "unimplemented option %lu\n", option );
SetLastError( ERROR_WINHTTP_INVALID_OPTION );
return FALSE;
}
@@ -255,7 +255,7 @@ HINTERNET WINAPI WinHttpOpen( LPCWSTR agent, DWORD access, LPCWSTR proxy, LPCWST
struct session *session;
HINTERNET handle = NULL;
- TRACE("%s, %u, %s, %s, 0x%08x\n", debugstr_w(agent), access, debugstr_w(proxy), debugstr_w(bypass), flags);
+ TRACE( "%s, %lu, %s, %s, %#lx\n", debugstr_w(agent), access, debugstr_w(proxy), debugstr_w(bypass), flags );
if (!(session = calloc( 1, sizeof(*session) ))) return NULL;
@@ -374,7 +374,7 @@ static BOOL connect_query_option( struct object_header *hdr, DWORD option, void
return TRUE;
default:
- FIXME("unimplemented option %u\n", option);
+ FIXME( "unimplemented option %lu\n", option );
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;
}
@@ -533,13 +533,13 @@ end:
/***********************************************************************
* WinHttpConnect (winhttp.@)
*/
-HINTERNET WINAPI WinHttpConnect( HINTERNET hsession, LPCWSTR server, INTERNET_PORT port, DWORD reserved )
+HINTERNET WINAPI WinHttpConnect( HINTERNET hsession, const WCHAR *server, INTERNET_PORT port, DWORD reserved )
{
struct connect *connect;
struct session *session;
HINTERNET hconnect = NULL;
- TRACE("%p, %s, %u, %x\n", hsession, debugstr_w(server), port, reserved);
+ TRACE( "%p, %s, %u, %#lx\n", hsession, debugstr_w(server), port, reserved );
if (!server)
{
@@ -841,7 +841,7 @@ static BOOL request_query_option( struct object_header *hdr, DWORD option, void
return TRUE;
default:
- FIXME("unimplemented option %u\n", option);
+ FIXME( "unimplemented option %lu\n", option );
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;
}
@@ -870,7 +870,7 @@ static BOOL request_set_option( struct object_header *hdr, DWORD option, void *b
{
WINHTTP_PROXY_INFO *pi = buffer;
- FIXME("%u %s %s\n", pi->dwAccessType, debugstr_w(pi->lpszProxy), debugstr_w(pi->lpszProxyBypass));
+ FIXME( "%lu %s %s\n", pi->dwAccessType, debugstr_w(pi->lpszProxy), debugstr_w(pi->lpszProxyBypass) );
return TRUE;
}
case WINHTTP_OPTION_DISABLE_FEATURE:
@@ -884,7 +884,7 @@ static BOOL request_set_option( struct object_header *hdr, DWORD option, void *b
}
disable = *(DWORD *)buffer;
- TRACE("0x%x\n", disable);
+ TRACE( "%#lx\n", disable );
hdr->disable_flags |= disable;
return TRUE;
}
@@ -899,7 +899,7 @@ static BOOL request_set_option( struct object_header *hdr, DWORD option, void *b
}
policy = *(DWORD *)buffer;
- TRACE("0x%x\n", policy);
+ TRACE( "%#lx\n", policy );
hdr->logon_policy = policy;
return TRUE;
}
@@ -914,7 +914,7 @@ static BOOL request_set_option( struct object_header *hdr, DWORD option, void *b
}
policy = *(DWORD *)buffer;
- TRACE("0x%x\n", policy);
+ TRACE( "%#lx\n", policy );
hdr->redirect_policy = policy;
return TRUE;
}
@@ -932,7 +932,7 @@ static BOOL request_set_option( struct object_header *hdr, DWORD option, void *b
return FALSE;
}
flags = *(DWORD *)buffer;
- TRACE("0x%x\n", flags);
+ TRACE( "%#lx\n", flags );
if (flags && (flags & ~accepted))
{
SetLastError( ERROR_INVALID_PARAMETER );
@@ -1070,14 +1070,14 @@ static BOOL request_set_option( struct object_header *hdr, DWORD option, void *b
case WINHTTP_OPTION_ENABLE_HTTP_PROTOCOL:
if (buflen == sizeof(DWORD))
{
- FIXME("WINHTTP_OPTION_ENABLE_HTTP_PROTOCOL %08x\n", *(DWORD *)buffer);
+ FIXME( "WINHTTP_OPTION_ENABLE_HTTP_PROTOCOL %#lx\n", *(DWORD *)buffer );
return TRUE;
}
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
default:
- FIXME("unimplemented option %u\n", option);
+ FIXME( "unimplemented option %lu\n", option );
SetLastError( ERROR_WINHTTP_INVALID_OPTION );
return FALSE;
}
@@ -1119,15 +1119,15 @@ static WCHAR *get_request_path( const WCHAR *object )
/***********************************************************************
* WinHttpOpenRequest (winhttp.@)
*/
-HINTERNET WINAPI WinHttpOpenRequest( HINTERNET hconnect, LPCWSTR verb, LPCWSTR object, LPCWSTR version,
- LPCWSTR referrer, LPCWSTR *types, DWORD flags )
+HINTERNET WINAPI WinHttpOpenRequest( HINTERNET hconnect, const WCHAR *verb, const WCHAR *object, const WCHAR *version,
+ const WCHAR *referrer, const WCHAR **types, DWORD flags )
{
struct request *request;
struct connect *connect;
HINTERNET hrequest = NULL;
- TRACE("%p, %s, %s, %s, %s, %p, 0x%08x\n", hconnect, debugstr_w(verb), debugstr_w(object),
- debugstr_w(version), debugstr_w(referrer), types, flags);
+ TRACE( "%p, %s, %s, %s, %s, %p, %#lx\n", hconnect, debugstr_w(verb), debugstr_w(object),
+ debugstr_w(version), debugstr_w(referrer), types, flags );
if (types && TRACE_ON(winhttp))
{
@@ -1236,7 +1236,7 @@ static BOOL query_option( struct object_header *hdr, DWORD option, void *buffer,
if (hdr->vtbl->query_option) ret = hdr->vtbl->query_option( hdr, option, buffer, buflen );
else
{
- FIXME("unimplemented option %u\n", option);
+ FIXME( "unimplemented option %lu\n", option );
SetLastError( ERROR_WINHTTP_INCORRECT_HANDLE_TYPE );
return FALSE;
}
@@ -1248,12 +1248,12 @@ static BOOL query_option( struct object_header *hdr, DWORD option, void *buffer,
/***********************************************************************
* WinHttpQueryOption (winhttp.@)
*/
-BOOL WINAPI WinHttpQueryOption( HINTERNET handle, DWORD option, LPVOID buffer, LPDWORD buflen )
+BOOL WINAPI WinHttpQueryOption( HINTERNET handle, DWORD option, void *buffer, DWORD *buflen )
{
BOOL ret = FALSE;
struct object_header *hdr;
- TRACE("%p, %u, %p, %p\n", handle, option, buffer, buflen);
+ TRACE( "%p, %lu, %p, %p\n", handle, option, buffer, buflen );
if (!(hdr = grab_object( handle )))
{
@@ -1295,7 +1295,7 @@ static BOOL set_option( struct object_header *hdr, DWORD option, void *buffer, D
if (hdr->vtbl->set_option) ret = hdr->vtbl->set_option( hdr, option, buffer, buflen );
else
{
- FIXME("unimplemented option %u\n", option);
+ FIXME( "unimplemented option %lu\n", option );
SetLastError( ERROR_WINHTTP_INCORRECT_HANDLE_TYPE );
return FALSE;
}
@@ -1307,12 +1307,12 @@ static BOOL set_option( struct object_header *hdr, DWORD option, void *buffer, D
/***********************************************************************
* WinHttpSetOption (winhttp.@)
*/
-BOOL WINAPI WinHttpSetOption( HINTERNET handle, DWORD option, LPVOID buffer, DWORD buflen )
+BOOL WINAPI WinHttpSetOption( HINTERNET handle, DWORD option, void *buffer, DWORD buflen )
{
BOOL ret = FALSE;
struct object_header *hdr;
- TRACE("%p, %u, %p, %u\n", handle, option, buffer, buflen);
+ TRACE( "%p, %lu, %p, %lu\n", handle, option, buffer, buflen );
if (!(hdr = grab_object( handle )))
{
@@ -1366,7 +1366,7 @@ static WCHAR *detect_autoproxyconfig_url_dhcp(void)
for (ptr = adapters; ptr; ptr = ptr->Next)
{
MultiByteToWideChar( CP_ACP, 0, ptr->AdapterName, -1, name, ARRAY_SIZE(name) );
- TRACE( "adapter '%s' type %u dhcpv4 enabled %d\n", wine_dbgstr_w(name), ptr->IfType, ptr->Dhcpv4Enabled );
+ TRACE( "adapter '%s' type %lu dhcpv4 enabled %d\n", wine_dbgstr_w(name), ptr->IfType, ptr->Dhcpv4Enabled );
if (ptr->IfType == IF_TYPE_SOFTWARE_LOOPBACK) continue;
/* FIXME: also skip adapters where DHCP is disabled */
@@ -1503,9 +1503,9 @@ static WCHAR *detect_autoproxyconfig_url_dns(void)
/***********************************************************************
* WinHttpDetectAutoProxyConfigUrl (winhttp.@)
*/
-BOOL WINAPI WinHttpDetectAutoProxyConfigUrl( DWORD flags, LPWSTR *url )
+BOOL WINAPI WinHttpDetectAutoProxyConfigUrl( DWORD flags, WCHAR **url )
{
- TRACE("0x%08x, %p\n", flags, url);
+ TRACE( "%#lx, %p\n", flags, url );
if (!flags || !url)
{
@@ -2104,7 +2104,7 @@ void WINAPI WinHttpFreeProxySettings( WINHTTP_PROXY_SETTINGS *settings )
DWORD WINAPI WinHttpGetProxyForUrlEx( HINTERNET hresolver, const WCHAR *url, WINHTTP_AUTOPROXY_OPTIONS *options,
DWORD_PTR ctx )
{
- FIXME("%p, %s, %p, %lx\n", hresolver, debugstr_w(url), options, ctx);
+ FIXME( "%p, %s, %p, %Ix\n", hresolver, debugstr_w(url), options, ctx );
return ERROR_WINHTTP_AUTO_PROXY_SERVICE_ERROR;
}
@@ -2114,7 +2114,7 @@ DWORD WINAPI WinHttpGetProxyForUrlEx( HINTERNET hresolver, const WCHAR *url, WIN
DWORD WINAPI WinHttpGetProxyForUrlEx2( HINTERNET hresolver, const WCHAR *url, WINHTTP_AUTOPROXY_OPTIONS *options,
DWORD selection_len, BYTE *selection, DWORD_PTR ctx )
{
- FIXME("%p, %s, %p, %u, %p, %lx\n", hresolver, debugstr_w(url), options, selection_len, selection, ctx);
+ FIXME( "%p, %s, %p, %lu, %p, %Ix\n", hresolver, debugstr_w(url), options, selection_len, selection, ctx );
return ERROR_WINHTTP_AUTO_PROXY_SERVICE_ERROR;
}
@@ -2162,7 +2162,7 @@ DWORD WINAPI WinHttpReadProxySettings( HINTERNET hsession, const WCHAR *connecti
*/
DWORD WINAPI WinHttpResetAutoProxy( HINTERNET hsession, DWORD flags )
{
- FIXME("%p, %08x\n", hsession, flags);
+ FIXME( "%p, %#lx\n", hsession, flags );
return ERROR_WINHTTP_AUTO_PROXY_SERVICE_ERROR;
}
@@ -2181,7 +2181,7 @@ WINHTTP_STATUS_CALLBACK WINAPI WinHttpSetStatusCallback( HINTERNET handle, WINHT
struct object_header *hdr;
WINHTTP_STATUS_CALLBACK ret;
- TRACE("%p, %p, 0x%08x, 0x%lx\n", handle, callback, flags, reserved);
+ TRACE( "%p, %p, %#lx, %Ix\n", handle, callback, flags, reserved );
if (!(hdr = grab_object( handle )))
{
diff --git a/dlls/winhttp/url.c b/dlls/winhttp/url.c
index 8efd5ed0c49..9e7f5478dfe 100644
--- a/dlls/winhttp/url.c
+++ b/dlls/winhttp/url.c
@@ -170,7 +170,7 @@ static DWORD parse_port( const WCHAR *str, DWORD len, INTERNET_PORT *ret )
/***********************************************************************
* WinHttpCrackUrl (winhttp.@)
*/
-BOOL WINAPI WinHttpCrackUrl( LPCWSTR url, DWORD len, DWORD flags, LPURL_COMPONENTSW uc )
+BOOL WINAPI WinHttpCrackUrl( const WCHAR *url, DWORD len, DWORD flags, URL_COMPONENTSW *uc )
{
WCHAR *p, *q, *r, *url_transformed = NULL;
INTERNET_SCHEME scheme_number = 0;
@@ -178,7 +178,7 @@ BOOL WINAPI WinHttpCrackUrl( LPCWSTR url, DWORD len, DWORD flags, LPURL_COMPONEN
BOOL overflow = FALSE;
DWORD err;
- TRACE("%s, %d, %x, %p\n", debugstr_wn(url, len), len, flags, uc);
+ TRACE( "%s, %lu, %#lx, %p\n", debugstr_wn(url, len), len, flags, uc );
if (!url || !uc || uc->dwStructSize != sizeof(*uc))
{
@@ -427,12 +427,12 @@ static BOOL get_url_length( URL_COMPONENTS *uc, DWORD flags, DWORD *len )
/***********************************************************************
* WinHttpCreateUrl (winhttp.@)
*/
-BOOL WINAPI WinHttpCreateUrl( LPURL_COMPONENTS uc, DWORD flags, LPWSTR url, LPDWORD required )
+BOOL WINAPI WinHttpCreateUrl( URL_COMPONENTS *uc, DWORD flags, WCHAR *url, DWORD *required )
{
DWORD len, len_escaped;
INTERNET_SCHEME scheme;
- TRACE("%p, 0x%08x, %p, %p\n", uc, flags, url, required);
+ TRACE( "%p, %#lx, %p, %p\n", uc, flags, url, required );
if (!uc || uc->dwStructSize != sizeof(URL_COMPONENTS) || !required)
{
--
2.30.2
1
0
Feb. 8, 2022
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/winhttp/tests/Makefile.in | 1 -
dlls/winhttp/tests/notification.c | 422 +++----
dlls/winhttp/tests/url.c | 190 +--
dlls/winhttp/tests/winhttp.c | 1902 ++++++++++++++---------------
4 files changed, 1246 insertions(+), 1269 deletions(-)
diff --git a/dlls/winhttp/tests/Makefile.in b/dlls/winhttp/tests/Makefile.in
index 73dce0b7dc9..77ebefae170 100644
--- a/dlls/winhttp/tests/Makefile.in
+++ b/dlls/winhttp/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = winhttp.dll
IMPORTS = winhttp oleaut32 ole32 crypt32 advapi32 ws2_32
diff --git a/dlls/winhttp/tests/notification.c b/dlls/winhttp/tests/notification.c
index 121190ba9d2..ffde61b3bf5 100644
--- a/dlls/winhttp/tests/notification.c
+++ b/dlls/winhttp/tests/notification.c
@@ -104,16 +104,16 @@ static void CALLBACK check_notification( HINTERNET handle, DWORD_PTR context, DW
info->index++;
while (info->index < info->count && (info->test[info->index].flags & NF_WINE_ALLOW))
{
- todo_wine ok(info->test[info->index].status != status, "unexpected %x notification\n", status);
+ todo_wine ok( info->test[info->index].status != status, "unexpected %#lx notification\n", status );
if (info->test[info->index].status == status) break;
info->index++;
}
- ok(info->index < info->count, "%u: unexpected notification 0x%08x\n", info->line, status);
+ ok( info->index < info->count, "%u: unexpected notification %#lx\n", info->line, status );
if (info->index >= info->count) return;
status_ok = (info->test[info->index].status == status);
function_ok = (info->test[info->index].function == info->function);
- ok(status_ok, "%u: expected status 0x%08x got 0x%08x\n", info->line, info->test[info->index].status, status);
+ ok( status_ok, "%u: expected status %#x got %#lx\n", info->line, info->test[info->index].status, status );
ok(function_ok, "%u: expected function %u got %u\n", info->line, info->test[info->index].function, info->function);
if (info->test[info->index].flags & NF_MAIN_THREAD)
@@ -222,7 +222,7 @@ static void test_connection_cache( void )
info.wait = CreateEventW( NULL, FALSE, FALSE, NULL );
ses = WinHttpOpen( L"winetest", 0, NULL, NULL, 0 );
- ok(ses != NULL, "failed to open session %u\n", GetLastError());
+ ok( ses != NULL, "failed to open session %lu\n", GetLastError() );
event = CreateEventW( NULL, FALSE, FALSE, NULL );
ret = WinHttpSetOption( ses, WINHTTP_OPTION_UNLOAD_NOTIFY_EVENT, &event, sizeof(event) );
@@ -235,15 +235,15 @@ static void test_connection_cache( void )
WinHttpSetStatusCallback( ses, check_notification, WINHTTP_CALLBACK_FLAG_ALL_NOTIFICATIONS, 0 );
ret = WinHttpSetOption( ses, WINHTTP_OPTION_CONTEXT_VALUE, &context, sizeof(struct info *) );
- ok(ret, "failed to set context value %u\n", GetLastError());
+ ok( ret, "failed to set context value %lu\n", GetLastError() );
setup_test( &info, winhttp_connect, __LINE__ );
con = WinHttpConnect( ses, L"test.winehq.org", 0, 0 );
- ok(con != NULL, "failed to open a connection %u\n", GetLastError());
+ ok( con != NULL, "failed to open a connection %lu\n", GetLastError() );
setup_test( &info, winhttp_open_request, __LINE__ );
req = WinHttpOpenRequest( con, NULL, L"/tests/hello.html", NULL, NULL, NULL, 0 );
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok( req != NULL, "failed to open a request %lu\n", GetLastError() );
setup_test( &info, winhttp_send_request, __LINE__ );
ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 );
@@ -253,16 +253,16 @@ static void test_connection_cache( void )
skip("connection failed, skipping\n");
goto done;
}
- ok(ret, "failed to send request %u\n", GetLastError());
+ ok( ret, "failed to send request %lu\n", GetLastError() );
setup_test( &info, winhttp_receive_response, __LINE__ );
ret = WinHttpReceiveResponse( req, NULL );
- ok(ret, "failed to receive response %u\n", GetLastError());
+ ok( ret, "failed to receive response %lu\n", GetLastError() );
size = sizeof(status);
ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL );
- ok(ret, "failed unexpectedly %u\n", GetLastError());
- ok(status == 200, "request failed unexpectedly %u\n", status);
+ ok( ret, "failed unexpectedly %lu\n", GetLastError() );
+ ok( status == 200, "request failed unexpectedly %lu\n", status );
ResetEvent( info.wait );
setup_test( &info, winhttp_close_handle, __LINE__ );
@@ -271,10 +271,10 @@ static void test_connection_cache( void )
setup_test( &info, winhttp_open_request, __LINE__ );
req = WinHttpOpenRequest( con, NULL, L"/tests/hello.html", NULL, NULL, NULL, 0 );
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok( req != NULL, "failed to open a request %lu\n", GetLastError() );
ret = WinHttpSetOption( req, WINHTTP_OPTION_CONTEXT_VALUE, &context, sizeof(struct info *) );
- ok(ret, "failed to set context value %u\n", GetLastError());
+ ok( ret, "failed to set context value %lu\n", GetLastError() );
setup_test( &info, winhttp_send_request, __LINE__ );
ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 );
@@ -284,16 +284,16 @@ static void test_connection_cache( void )
skip("connection failed, skipping\n");
goto done;
}
- ok(ret, "failed to send request %u\n", GetLastError());
+ ok( ret, "failed to send request %lu\n", GetLastError() );
setup_test( &info, winhttp_receive_response, __LINE__ );
ret = WinHttpReceiveResponse( req, NULL );
- ok(ret, "failed to receive response %u\n", GetLastError());
+ ok( ret, "failed to receive response %lu\n", GetLastError() );
size = sizeof(status);
ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL );
- ok(ret, "failed unexpectedly %u\n", GetLastError());
- ok(status == 200, "request failed unexpectedly %u\n", status);
+ ok( ret, "failed unexpectedly %lu\n", GetLastError() );
+ ok( status == 200, "request failed unexpectedly %lu\n", status );
ResetEvent( info.wait );
setup_test( &info, winhttp_close_handle, __LINE__ );
@@ -305,7 +305,7 @@ static void test_connection_cache( void )
if (unload)
{
status = WaitForSingleObject( event, 0 );
- ok(status == WAIT_TIMEOUT, "got %08x\n", status);
+ ok( status == WAIT_TIMEOUT, "got %#lx\n", status );
}
setup_test( &info, winhttp_close_handle, __LINE__ );
@@ -315,12 +315,11 @@ static void test_connection_cache( void )
if (unload)
{
status = WaitForSingleObject( event, 100 );
- ok(status == WAIT_OBJECT_0, "got %08x\n", status);
+ ok( status == WAIT_OBJECT_0, "got %#lx\n", status );
}
-
ses = WinHttpOpen( L"winetest", 0, NULL, NULL, 0 );
- ok(ses != NULL, "failed to open session %u\n", GetLastError());
+ ok( ses != NULL, "failed to open session %lu\n", GetLastError() );
if (unload)
{
@@ -331,18 +330,18 @@ static void test_connection_cache( void )
WinHttpSetStatusCallback( ses, check_notification, WINHTTP_CALLBACK_FLAG_ALL_NOTIFICATIONS, 0 );
ret = WinHttpSetOption( ses, WINHTTP_OPTION_CONTEXT_VALUE, &context, sizeof(struct info *) );
- ok(ret, "failed to set context value %u\n", GetLastError());
+ ok( ret, "failed to set context value %lu\n", GetLastError() );
setup_test( &info, winhttp_connect, __LINE__ );
con = WinHttpConnect( ses, L"test.winehq.org", 0, 0 );
- ok(con != NULL, "failed to open a connection %u\n", GetLastError());
+ ok( con != NULL, "failed to open a connection %lu\n", GetLastError() );
setup_test( &info, winhttp_open_request, __LINE__ );
req = WinHttpOpenRequest( con, NULL, L"/tests/hello.html", NULL, NULL, NULL, 0 );
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok( req != NULL, "failed to open a request %lu\n", GetLastError() );
ret = WinHttpSetOption( req, WINHTTP_OPTION_CONTEXT_VALUE, &context, sizeof(struct info *) );
- ok(ret, "failed to set context value %u\n", GetLastError());
+ ok( ret, "failed to set context value %lu\n", GetLastError() );
setup_test( &info, winhttp_send_request, __LINE__ );
ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 );
@@ -352,16 +351,16 @@ static void test_connection_cache( void )
skip("connection failed, skipping\n");
goto done;
}
- ok(ret, "failed to send request %u\n", GetLastError());
+ ok( ret, "failed to send request %lu\n", GetLastError() );
setup_test( &info, winhttp_receive_response, __LINE__ );
ret = WinHttpReceiveResponse( req, NULL );
- ok(ret, "failed to receive response %u\n", GetLastError());
+ ok( ret, "failed to receive response %lu\n", GetLastError() );
size = sizeof(status);
ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL );
- ok(ret, "failed unexpectedly %u\n", GetLastError());
- ok(status == 200, "request failed unexpectedly %u\n", status);
+ ok( ret, "failed unexpectedly %lu\n", GetLastError() );
+ ok( status == 200, "request failed unexpectedly %lu\n", status );
ResetEvent( info.wait );
setup_test( &info, winhttp_close_handle, __LINE__ );
@@ -370,10 +369,10 @@ static void test_connection_cache( void )
setup_test( &info, winhttp_open_request, __LINE__ );
req = WinHttpOpenRequest( con, NULL, L"/tests/hello.html", NULL, NULL, NULL, 0 );
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok( req != NULL, "failed to open a request %lu\n", GetLastError() );
ret = WinHttpSetOption( req, WINHTTP_OPTION_CONTEXT_VALUE, &context, sizeof(struct info *) );
- ok(ret, "failed to set context value %u\n", GetLastError());
+ ok( ret, "failed to set context value %lu\n", GetLastError() );
setup_test( &info, winhttp_send_request, __LINE__ );
ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 );
@@ -383,16 +382,16 @@ static void test_connection_cache( void )
skip("connection failed, skipping\n");
goto done;
}
- ok(ret, "failed to send request %u\n", GetLastError());
+ ok( ret, "failed to send request %lu\n", GetLastError() );
setup_test( &info, winhttp_receive_response, __LINE__ );
ret = WinHttpReceiveResponse( req, NULL );
- ok(ret, "failed to receive response %u\n", GetLastError());
+ ok( ret, "failed to receive response %lu\n", GetLastError() );
size = sizeof(status);
ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL );
- ok(ret, "failed unexpectedly %u\n", GetLastError());
- ok(status == 200, "request failed unexpectedly %u\n", status);
+ ok( ret, "failed unexpectedly %lu\n", GetLastError() );
+ ok( status == 200, "request failed unexpectedly %lu\n", status );
setup_test( &info, winhttp_close_handle, __LINE__ );
done:
@@ -403,7 +402,7 @@ done:
if (unload)
{
status = WaitForSingleObject( event, 0 );
- ok(status == WAIT_TIMEOUT, "got %08x\n", status);
+ ok( status == WAIT_TIMEOUT, "got %#lx\n", status );
}
setup_test( &info, winhttp_close_handle, __LINE__ );
@@ -415,7 +414,7 @@ done:
if (unload)
{
status = WaitForSingleObject( event, 100 );
- ok(status == WAIT_OBJECT_0, "got %08x\n", status);
+ ok( status == WAIT_OBJECT_0, "got %#lx\n", status );
}
CloseHandle( event );
@@ -462,20 +461,20 @@ static void test_redirect( void )
info.wait = CreateEventW( NULL, FALSE, FALSE, NULL );
ses = WinHttpOpen( L"winetest", 0, NULL, NULL, 0 );
- ok(ses != NULL, "failed to open session %u\n", GetLastError());
+ ok( ses != NULL, "failed to open session %lu\n", GetLastError() );
WinHttpSetStatusCallback( ses, check_notification, WINHTTP_CALLBACK_FLAG_ALL_NOTIFICATIONS, 0 );
ret = WinHttpSetOption( ses, WINHTTP_OPTION_CONTEXT_VALUE, &context, sizeof(struct info *) );
- ok(ret, "failed to set context value %u\n", GetLastError());
+ ok( ret, "failed to set context value %lu\n", GetLastError() );
setup_test( &info, winhttp_connect, __LINE__ );
con = WinHttpConnect( ses, L"test.winehq.org", 0, 0 );
- ok(con != NULL, "failed to open a connection %u\n", GetLastError());
+ ok( con != NULL, "failed to open a connection %lu\n", GetLastError() );
setup_test( &info, winhttp_open_request, __LINE__ );
req = WinHttpOpenRequest( con, NULL, L"/tests/redirect", NULL, NULL, NULL, 0 );
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok( req != NULL, "failed to open a request %lu\n", GetLastError() );
setup_test( &info, winhttp_send_request, __LINE__ );
ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 );
@@ -485,16 +484,16 @@ static void test_redirect( void )
skip("connection failed, skipping\n");
goto done;
}
- ok(ret, "failed to send request %u\n", GetLastError());
+ ok( ret, "failed to send request %lu\n", GetLastError() );
setup_test( &info, winhttp_receive_response, __LINE__ );
ret = WinHttpReceiveResponse( req, NULL );
- ok(ret, "failed to receive response %u\n", GetLastError());
+ ok( ret, "failed to receive response %lu\n", GetLastError() );
size = sizeof(status);
ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL );
- ok(ret, "failed unexpectedly %u\n", GetLastError());
- ok(status == 200, "request failed unexpectedly %u\n", status);
+ ok( ret, "failed unexpectedly %lu\n", GetLastError() );
+ ok( status == 200, "request failed unexpectedly %lu\n", status );
setup_test( &info, winhttp_close_handle, __LINE__ );
done:
@@ -543,7 +542,7 @@ static void test_async( void )
info.wait = CreateEventW( NULL, FALSE, FALSE, NULL );
ses = WinHttpOpen( L"winetest", 0, NULL, NULL, WINHTTP_FLAG_ASYNC );
- ok(ses != NULL, "failed to open session %u\n", GetLastError());
+ ok( ses != NULL, "failed to open session %lu\n", GetLastError() );
event = CreateEventW( NULL, FALSE, FALSE, NULL );
ret = WinHttpSetOption( ses, WINHTTP_OPTION_UNLOAD_NOTIFY_EVENT, &event, sizeof(event) );
@@ -556,27 +555,27 @@ static void test_async( void )
SetLastError( 0xdeadbeef );
WinHttpSetStatusCallback( ses, check_notification, WINHTTP_CALLBACK_FLAG_ALL_NOTIFICATIONS, 0 );
err = GetLastError();
- ok(err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %u\n", err);
+ ok( err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %lu\n", err );
SetLastError( 0xdeadbeef );
ret = WinHttpSetOption( ses, WINHTTP_OPTION_CONTEXT_VALUE, &context, sizeof(struct info *) );
err = GetLastError();
- ok(ret, "failed to set context value %u\n", err);
- ok(err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %u\n", err);
+ ok( ret, "failed to set context value %lu\n", err );
+ ok( err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %lu\n", err );
setup_test( &info, winhttp_connect, __LINE__ );
SetLastError( 0xdeadbeef );
con = WinHttpConnect( ses, L"test.winehq.org", 0, 0 );
err = GetLastError();
- ok(con != NULL, "failed to open a connection %u\n", err);
- ok(err == ERROR_SUCCESS || broken(err == WSAEINVAL) /* < win7 */, "got %u\n", err);
+ ok( con != NULL, "failed to open a connection %lu\n", err );
+ ok( err == ERROR_SUCCESS || broken(err == WSAEINVAL) /* < win7 */, "got %lu\n", err );
setup_test( &info, winhttp_open_request, __LINE__ );
SetLastError( 0xdeadbeef );
req = WinHttpOpenRequest( con, NULL, L"/tests/hello.html", NULL, NULL, NULL, 0 );
err = GetLastError();
- ok(req != NULL, "failed to open a request %u\n", err);
- ok(err == ERROR_SUCCESS, "got %u\n", err);
+ ok( req != NULL, "failed to open a request %lu\n", err );
+ ok( err == ERROR_SUCCESS, "got %lu\n", err );
setup_test( &info, winhttp_send_request, __LINE__ );
SetLastError( 0xdeadbeef );
@@ -591,8 +590,8 @@ static void test_async( void )
CloseHandle( info.wait );
return;
}
- ok(ret, "failed to send request %u\n", err);
- ok(err == ERROR_SUCCESS, "got %u\n", err);
+ ok( ret, "failed to send request %lu\n", err );
+ ok( err == ERROR_SUCCESS, "got %lu\n", err );
WaitForSingleObject( info.wait, INFINITE );
@@ -600,8 +599,8 @@ static void test_async( void )
SetLastError( 0xdeadbeef );
ret = WinHttpReceiveResponse( req, NULL );
err = GetLastError();
- ok(ret, "failed to receive response %u\n", err);
- ok(err == ERROR_SUCCESS, "got %u\n", err);
+ ok( ret, "failed to receive response %lu\n", err );
+ ok( err == ERROR_SUCCESS, "got %lu\n", err );
WaitForSingleObject( info.wait, INFINITE );
@@ -609,33 +608,33 @@ static void test_async( void )
SetLastError( 0xdeadbeef );
ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL );
err = GetLastError();
- ok(ret, "failed unexpectedly %u\n", err);
- ok(status == 200, "request failed unexpectedly %u\n", status);
- ok(err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %u\n", err);
+ ok( ret, "failed unexpectedly %lu\n", err );
+ ok( status == 200, "request failed unexpectedly %lu\n", status );
+ ok( err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %lu\n", err );
setup_test( &info, winhttp_query_data, __LINE__ );
SetLastError( 0xdeadbeef );
ret = WinHttpQueryDataAvailable( req, NULL );
err = GetLastError();
- ok(ret, "failed to query data available %u\n", err);
- ok(err == ERROR_SUCCESS || err == ERROR_IO_PENDING || broken(err == 0xdeadbeef) /* < win7 */, "got %u\n", err);
+ ok( ret, "failed to query data available %lu\n", err );
+ ok( err == ERROR_SUCCESS || err == ERROR_IO_PENDING || broken(err == 0xdeadbeef) /* < win7 */, "got %lu\n", err );
WaitForSingleObject( info.wait, INFINITE );
- ok(info.last_status == WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE, "got status %#x.\n", status);
- ok((err == ERROR_SUCCESS && info.last_thread_id == GetCurrentThreadId())
- || (err == ERROR_IO_PENDING && info.last_thread_id != GetCurrentThreadId()),
- "Got unexpected thread %#x, err %#x.\n", info.last_thread_id, err);
+ ok( info.last_status == WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE, "got status %#lx\n", status );
+ ok(( err == ERROR_SUCCESS && info.last_thread_id == GetCurrentThreadId())
+ || (err == ERROR_IO_PENDING && info.last_thread_id != GetCurrentThreadId()),
+ "got unexpected thread %#lx, err %#lx\n", info.last_thread_id, err );
setup_test( &info, winhttp_read_data, __LINE__ );
ret = WinHttpReadData( req, buffer, sizeof(buffer), NULL );
- ok(ret, "failed to read data %u\n", err);
+ ok( ret, "failed to read data %lu\n", err );
WaitForSingleObject( info.wait, INFINITE );
- ok(info.last_status == WINHTTP_CALLBACK_STATUS_READ_COMPLETE, "got status %#x.\n", status);
- ok((err == ERROR_SUCCESS && info.last_thread_id == GetCurrentThreadId())
- || (err == ERROR_IO_PENDING && info.last_thread_id != GetCurrentThreadId()),
- "Got unexpected thread %#x, err %#x.\n", info.last_thread_id, err);
+ ok( info.last_status == WINHTTP_CALLBACK_STATUS_READ_COMPLETE, "got status %#lx\n", status );
+ ok( (err == ERROR_SUCCESS && info.last_thread_id == GetCurrentThreadId())
+ || (err == ERROR_IO_PENDING && info.last_thread_id != GetCurrentThreadId()),
+ "got unexpected thread %#lx, err %#lx\n", info.last_thread_id, err );
setup_test( &info, winhttp_close_handle, __LINE__ );
WinHttpCloseHandle( req );
@@ -644,7 +643,7 @@ static void test_async( void )
if (unload)
{
status = WaitForSingleObject( event, 0 );
- ok(status == WAIT_TIMEOUT, "got %08x\n", status);
+ ok( status == WAIT_TIMEOUT, "got %#lx\n", status );
}
WinHttpCloseHandle( ses );
WaitForSingleObject( info.wait, INFINITE );
@@ -653,7 +652,7 @@ static void test_async( void )
if (unload)
{
status = WaitForSingleObject( event, 2000 );
- ok(status == WAIT_OBJECT_0, "got %08x\n", status);
+ ok( status == WAIT_OBJECT_0, "got %#lx\n", status );
}
CloseHandle( event );
CloseHandle( info.wait );
@@ -767,7 +766,7 @@ static void test_websocket(BOOL secure)
info.wait = CreateEventW( NULL, FALSE, FALSE, NULL );
session = WinHttpOpen( L"winetest", 0, NULL, NULL, WINHTTP_FLAG_ASYNC );
- ok( session != NULL, "got %u\n", GetLastError() );
+ ok( session != NULL, "got %lu\n", GetLastError() );
event = CreateEventW( NULL, FALSE, FALSE, NULL );
ret = WinHttpSetOption( session, WINHTTP_OPTION_UNLOAD_NOTIFY_EVENT, &event, sizeof(event) );
@@ -781,44 +780,44 @@ static void test_websocket(BOOL secure)
{
protocols = WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2;
ret = WinHttpSetOption(session, WINHTTP_OPTION_SECURE_PROTOCOLS, &protocols, sizeof(protocols));
- ok(ret, "failed to set protocols %u\n", GetLastError());
+ ok( ret, "failed to set protocols %lu\n", GetLastError() );
}
SetLastError( 0xdeadbeef );
WinHttpSetStatusCallback( session, check_notification, WINHTTP_CALLBACK_FLAG_ALL_NOTIFICATIONS, 0 );
err = GetLastError();
- ok( err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %u\n", err );
+ ok( err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %lu\n", err );
SetLastError( 0xdeadbeef );
ret = WinHttpSetOption( session, WINHTTP_OPTION_CONTEXT_VALUE, &context, sizeof(context) );
err = GetLastError();
- ok( ret, "got %u\n", err );
- ok( err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %u\n", err);
+ ok( ret, "got %lu\n", err );
+ ok( err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %lu\n", err );
setup_test( &info, winhttp_connect, __LINE__ );
SetLastError( 0xdeadbeef );
connection = WinHttpConnect( session, L"ws.ifelse.io", 0, 0 );
err = GetLastError();
- ok( connection != NULL, "got %u\n", err);
- ok( err == ERROR_SUCCESS || broken(err == WSAEINVAL) /* < win7 */, "got %u\n", err );
+ ok( connection != NULL, "got %lu\n", err );
+ ok( err == ERROR_SUCCESS || broken(err == WSAEINVAL) /* < win7 */, "got %lu\n", err );
setup_test( &info, winhttp_open_request, __LINE__ );
SetLastError( 0xdeadbeef );
request = WinHttpOpenRequest( connection, NULL, L"/", NULL, NULL, NULL, secure ? WINHTTP_FLAG_SECURE : 0);
err = GetLastError();
- ok( request != NULL, "got %u\n", err );
- ok( err == ERROR_SUCCESS, "got %u\n", err );
+ ok( request != NULL, "got %lu\n", err );
+ ok( err == ERROR_SUCCESS, "got %lu\n", err );
if (secure)
{
flags = SECURITY_FLAG_IGNORE_UNKNOWN_CA | SECURITY_FLAG_IGNORE_CERT_DATE_INVALID |
SECURITY_FLAG_IGNORE_CERT_CN_INVALID;
ret = WinHttpSetOption(request, WINHTTP_OPTION_SECURITY_FLAGS, &flags, sizeof(flags));
- ok(ret, "failed to set security flags %u\n", GetLastError());
+ ok( ret, "failed to set security flags %lu\n", GetLastError() );
}
ret = WinHttpSetOption( request, WINHTTP_OPTION_UPGRADE_TO_WEB_SOCKET, NULL, 0 );
- ok( ret, "got %u\n", GetLastError() );
+ ok( ret, "got %lu\n", GetLastError() );
setup_test( &info, winhttp_send_request, __LINE__ );
SetLastError( 0xdeadbeef );
@@ -833,81 +832,76 @@ static void test_websocket(BOOL secure)
CloseHandle( info.wait );
return;
}
- ok( ret, "got %u\n", err );
- ok( err == ERROR_SUCCESS, "got %u\n", err );
+ ok( ret, "got %lu\n", err );
+ ok( err == ERROR_SUCCESS, "got %lu\n", err );
WaitForSingleObject( info.wait, INFINITE );
setup_test( &info, winhttp_receive_response, __LINE__ );
SetLastError( 0xdeadbeef );
ret = WinHttpReceiveResponse( request, NULL );
err = GetLastError();
- ok( ret, "got %u\n", err );
- ok( err == ERROR_SUCCESS, "got %u\n", err );
+ ok( ret, "got %lu\n", err );
+ ok( err == ERROR_SUCCESS, "got %lu\n", err );
WaitForSingleObject( info.wait, INFINITE );
size = sizeof(status);
SetLastError( 0xdeadbeef );
ret = WinHttpQueryHeaders( request, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL );
err = GetLastError();
- ok( ret, "failed unexpectedly %u\n", err );
- ok( status == 101, "got %u\n", status );
- ok( err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %u\n", err );
+ ok( ret, "failed unexpectedly %lu\n", err );
+ ok( status == 101, "got %lu\n", status );
+ ok( err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %lu\n", err );
setup_test( &info, winhttp_websocket_complete_upgrade, __LINE__ );
SetLastError( 0xdeadbeef );
socket = pWinHttpWebSocketCompleteUpgrade( request, (DWORD_PTR)context );
err = GetLastError();
- ok( socket != NULL, "got %u\n", err );
- ok( err == ERROR_SUCCESS, "got %u\n", err );
+ ok( socket != NULL, "got %lu\n", err );
+ ok( err == ERROR_SUCCESS, "got %lu\n", err );
WaitForSingleObject( info.wait, INFINITE );
/* The send is executed synchronously (even if sending a reasonably big buffer exceeding SSL buffer size).
* It is possible to trigger queueing the send into another thread but that involves sending a considerable
* amount of big enough buffers. */
big_buffer = malloc( BIG_BUFFER_SIZE );
- for (i = 0; i < BIG_BUFFER_SIZE; ++i)
- big_buffer[i] = (i & 0xff) ^ 0xcc;
+ for (i = 0; i < BIG_BUFFER_SIZE; ++i) big_buffer[i] = (i & 0xff) ^ 0xcc;
setup_test( &info, winhttp_websocket_send, __LINE__ );
- err = pWinHttpWebSocketSend( socket, WINHTTP_WEB_SOCKET_BINARY_MESSAGE_BUFFER_TYPE,
- big_buffer, BIG_BUFFER_SIZE );
- ok( err == ERROR_SUCCESS, "got %u\n", err );
+ err = pWinHttpWebSocketSend( socket, WINHTTP_WEB_SOCKET_BINARY_MESSAGE_BUFFER_TYPE, big_buffer, BIG_BUFFER_SIZE );
+ ok( err == ERROR_SUCCESS, "got %lu\n", err );
WaitForSingleObject( info.wait, INFINITE );
setup_test( &info, winhttp_websocket_send, __LINE__ );
- err = pWinHttpWebSocketSend( socket, WINHTTP_WEB_SOCKET_BINARY_MESSAGE_BUFFER_TYPE,
- (void*)"hello", sizeof("hello") );
- ok( err == ERROR_SUCCESS, "got %u\n", err );
+ err = pWinHttpWebSocketSend( socket, WINHTTP_WEB_SOCKET_BINARY_MESSAGE_BUFFER_TYPE, (void *)"hello", sizeof("hello") );
+ ok( err == ERROR_SUCCESS, "got %lu\n", err );
WaitForSingleObject( info.wait, INFINITE );
setup_test( &info, winhttp_websocket_shutdown, __LINE__ );
err = pWinHttpWebSocketShutdown( socket, 1000, (void *)"success", sizeof("success") );
- ok( err == ERROR_SUCCESS, "got %u\n", err );
+ ok( err == ERROR_SUCCESS, "got %lu\n", err );
- err = pWinHttpWebSocketSend( socket, WINHTTP_WEB_SOCKET_BINARY_MESSAGE_BUFFER_TYPE,
- (void*)"hello", sizeof("hello") );
- ok( err == ERROR_INVALID_OPERATION, "got %u\n", err );
+ err = pWinHttpWebSocketSend( socket, WINHTTP_WEB_SOCKET_BINARY_MESSAGE_BUFFER_TYPE, (void *)"hello", sizeof("hello") );
+ ok( err == ERROR_INVALID_OPERATION, "got %lu\n", err );
WaitForSingleObject( info.wait, INFINITE );
err = pWinHttpWebSocketShutdown( socket, 1000, (void *)"success", sizeof("success") );
- ok( err == ERROR_INVALID_OPERATION, "got %u\n", err );
- err = pWinHttpWebSocketSend( socket, WINHTTP_WEB_SOCKET_BINARY_MESSAGE_BUFFER_TYPE,
- (void*)"hello", sizeof("hello") );
- ok( err == ERROR_INVALID_OPERATION, "got %u\n", err );
+ ok( err == ERROR_INVALID_OPERATION, "got %lu\n", err );
+ err = pWinHttpWebSocketSend( socket, WINHTTP_WEB_SOCKET_BINARY_MESSAGE_BUFFER_TYPE, (void *)"hello", sizeof("hello") );
+ ok( err == ERROR_INVALID_OPERATION, "got %lu\n", err );
setup_test( &info, winhttp_websocket_receive, __LINE__ );
buffer[0] = 0;
size = 0xdeadbeef;
type = 0xdeadbeef;
err = pWinHttpWebSocketReceive( socket, buffer, sizeof(buffer), &size, &type );
- ok( err == ERROR_SUCCESS, "got %u\n", err );
+ ok( err == ERROR_SUCCESS, "got %lu\n", err );
WaitForSingleObject( info.wait, INFINITE );
- ok( info.buflen == sizeof(*ws_status), "got unexpected buflen %u.\n", info.buflen );
+ ok( info.buflen == sizeof(*ws_status), "got %u\n", info.buflen );
ws_status = (WINHTTP_WEB_SOCKET_STATUS *)info.buffer;
ok( ws_status->eBufferType == WINHTTP_WEB_SOCKET_UTF8_MESSAGE_BUFFER_TYPE,
- "Got unexpected eBufferType %u.\n", ws_status->eBufferType );
- ok( size == 0xdeadbeef, "got %u\n", size );
+ "got unexpected eBufferType %u\n", ws_status->eBufferType );
+ ok( size == 0xdeadbeef, "got %lu\n", size );
ok( type == 0xdeadbeef, "got %u\n", type );
ok( buffer[0] == 'R', "unexpected data\n" );
@@ -923,21 +917,19 @@ static void test_websocket(BOOL secure)
ws_status = (WINHTTP_WEB_SOCKET_STATUS *)info.buffer;
ws_status->eBufferType = ~0u;
err = pWinHttpWebSocketReceive( socket, big_buffer + offset, BIG_BUFFER_SIZE - offset, &size, &type );
- ok( err == ERROR_SUCCESS, "got %u\n", err );
+ ok( err == ERROR_SUCCESS, "got %lu\n", err );
WaitForSingleObject( info.wait, INFINITE );
- ok( info.buflen == sizeof(*ws_status), "got unexpected buflen %u.\n", info.buflen );
+ ok( info.buflen == sizeof(*ws_status), "got %u\n", info.buflen );
ok( ws_status->eBufferType == WINHTTP_WEB_SOCKET_BINARY_MESSAGE_BUFFER_TYPE
- || ws_status->eBufferType == WINHTTP_WEB_SOCKET_BINARY_FRAGMENT_BUFFER_TYPE,
- "Got unexpected eBufferType %u.\n", ws_status->eBufferType );
+ || ws_status->eBufferType == WINHTTP_WEB_SOCKET_BINARY_FRAGMENT_BUFFER_TYPE, "got %u\n", ws_status->eBufferType );
offset += ws_status->dwBytesTransferred;
- ok( offset <= BIG_BUFFER_SIZE, "Got unexpected dwBytesTransferred %u.\n",
- ws_status->dwBytesTransferred );
- ok( size == 0xdeadbeef, "got %u\n", size );
+ ok( offset <= BIG_BUFFER_SIZE, "got %lu\n", ws_status->dwBytesTransferred );
+ ok( size == 0xdeadbeef, "got %lu\n", size );
ok( type == 0xdeadbeef, "got %u\n", type );
}
while (ws_status->eBufferType == WINHTTP_WEB_SOCKET_BINARY_FRAGMENT_BUFFER_TYPE);
- ok( offset == BIG_BUFFER_SIZE, "Got unexpected offset %u.\n", offset );
+ ok( offset == BIG_BUFFER_SIZE, "got %u\n", offset );
for (i = 0; i < BIG_BUFFER_SIZE; ++i)
if (big_buffer[i] != ((i & 0xff) ^ 0xcc)) break;
@@ -948,21 +940,21 @@ static void test_websocket(BOOL secure)
close_status = 0xdead;
size = sizeof(buffer) + 1;
err = pWinHttpWebSocketQueryCloseStatus( socket, &close_status, buffer, sizeof(buffer), &size );
- ok( err == ERROR_INVALID_OPERATION, "got %u\n", err );
+ ok( err == ERROR_INVALID_OPERATION, "got %lu\n", err );
ok( close_status == 0xdead, "got %u\n", close_status );
- ok( size == sizeof(buffer) + 1, "got %u\n", size );
+ ok( size == sizeof(buffer) + 1, "got %lu\n", size );
setup_test( &info, winhttp_websocket_close, __LINE__ );
err = pWinHttpWebSocketClose( socket, 1000, (void *)"success", sizeof("success") );
- ok( err == ERROR_SUCCESS, "got %u\n", err );
+ ok( err == ERROR_SUCCESS, "got %lu\n", err );
WaitForSingleObject( info.wait, INFINITE );
close_status = 0xdead;
size = sizeof(buffer) + 1;
err = pWinHttpWebSocketQueryCloseStatus( socket, &close_status, buffer, sizeof(buffer), &size );
- ok( err == ERROR_SUCCESS, "got %u\n", err );
+ ok( err == ERROR_SUCCESS, "got %lu\n", err );
ok( close_status == 1000, "got %u\n", close_status );
- ok( size <= sizeof(buffer), "got %u\n", size );
+ ok( size <= sizeof(buffer), "got %lu\n", size );
setup_test( &info, winhttp_close_handle, __LINE__ );
WinHttpCloseHandle( socket );
@@ -978,75 +970,73 @@ static void test_websocket(BOOL secure)
setup_test( &info, winhttp_open_request, __LINE__ );
request = WinHttpOpenRequest( connection, NULL, L"/", NULL, NULL, NULL, secure ? WINHTTP_FLAG_SECURE : 0);
- ok( request != NULL, "got %u\n", err );
+ ok( request != NULL, "got %lu\n", err );
if (secure)
{
flags = SECURITY_FLAG_IGNORE_UNKNOWN_CA | SECURITY_FLAG_IGNORE_CERT_DATE_INVALID |
SECURITY_FLAG_IGNORE_CERT_CN_INVALID;
ret = WinHttpSetOption(request, WINHTTP_OPTION_SECURITY_FLAGS, &flags, sizeof(flags));
- ok(ret, "failed to set security flags %u\n", GetLastError());
+ ok( ret, "failed to set security flags %lu\n", GetLastError() );
}
ret = WinHttpSetOption( request, WINHTTP_OPTION_UPGRADE_TO_WEB_SOCKET, NULL, 0 );
- ok( ret, "got %u\n", GetLastError() );
+ ok( ret, "got %lu\n", GetLastError() );
setup_test( &info, winhttp_send_request, __LINE__ );
ret = WinHttpSendRequest( request, NULL, 0, NULL, 0, 0, 0 );
- ok( ret, "got %u\n", GetLastError() );
+ ok( ret, "got %lu\n", GetLastError() );
WaitForSingleObject( info.wait, INFINITE );
setup_test( &info, winhttp_receive_response, __LINE__ );
ret = WinHttpReceiveResponse( request, NULL );
- ok( ret, "got %u\n", err );
+ ok( ret, "got %lu\n", err );
WaitForSingleObject( info.wait, INFINITE );
size = sizeof(status);
ret = WinHttpQueryHeaders( request, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL );
- ok( ret, "failed unexpectedly %u\n", err );
- ok( status == 101, "got %u\n", status );
+ ok( ret, "failed unexpectedly %lu\n", err );
+ ok( status == 101, "got %lu\n", status );
setup_test( &info, winhttp_websocket_complete_upgrade, __LINE__ );
socket = pWinHttpWebSocketCompleteUpgrade( request, (DWORD_PTR)context );
- ok( socket != NULL, "got %u\n", err );
+ ok( socket != NULL, "got %lu\n", err );
WaitForSingleObject( info.wait, INFINITE );
setup_test( &info, winhttp_websocket_receive, __LINE__ );
buffer[0] = 0;
err = pWinHttpWebSocketReceive( socket, buffer, sizeof(buffer), &size, &type );
- ok( err == ERROR_SUCCESS, "got %u\n", err );
+ ok( err == ERROR_SUCCESS, "got %lu\n", err );
WaitForSingleObject( info.wait, INFINITE );
ok( buffer[0] == 'R', "unexpected data\n" );
err = pWinHttpWebSocketReceive( socket, buffer, sizeof(buffer), &size, &type );
- ok( err == ERROR_SUCCESS, "got %u\n", err );
+ ok( err == ERROR_SUCCESS, "got %lu\n", err );
setup_test( &info, winhttp_websocket_close, __LINE__ );
err = pWinHttpWebSocketClose( socket, 1000, (void *)"success", sizeof("success") );
- ok( err == ERROR_SUCCESS, "got %u\n", err );
- ok( info.buflen == sizeof(*result), "got unexpected buflen %u.\n", info.buflen );
+ ok( err == ERROR_SUCCESS, "got %lu\n", err );
+ ok( info.buflen == sizeof(*result), "got %u\n", info.buflen );
result = (WINHTTP_WEB_SOCKET_ASYNC_RESULT *)info.buffer;
- ok( result->Operation == WINHTTP_WEB_SOCKET_RECEIVE_OPERATION, "got unexpected operation %u.\n",
- result->Operation );
- ok( !result->AsyncResult.dwResult, "got unexpected result %lu.\n", result->AsyncResult.dwResult );
- ok( result->AsyncResult.dwError == ERROR_WINHTTP_OPERATION_CANCELLED, "got unexpected error %u.\n",
- result->AsyncResult.dwError );
+ ok( result->Operation == WINHTTP_WEB_SOCKET_RECEIVE_OPERATION, "got %u\n", result->Operation );
+ ok( !result->AsyncResult.dwResult, "got %Iu\n", result->AsyncResult.dwResult );
+ ok( result->AsyncResult.dwError == ERROR_WINHTTP_OPERATION_CANCELLED, "got %lu\n", result->AsyncResult.dwError );
close_status = 0xdead;
size = sizeof(buffer) + 1;
err = pWinHttpWebSocketQueryCloseStatus( socket, &close_status, buffer, sizeof(buffer), &size );
- ok( err == ERROR_INVALID_OPERATION, "got %u\n", err );
+ ok( err == ERROR_INVALID_OPERATION, "got %lu\n", err );
ok( close_status == 0xdead, "got %u\n", close_status );
- ok( size == sizeof(buffer) + 1, "got %u\n", size );
+ ok( size == sizeof(buffer) + 1, "got %lu\n", size );
WaitForSingleObject( info.wait, INFINITE );
close_status = 0xdead;
size = sizeof(buffer) + 1;
err = pWinHttpWebSocketQueryCloseStatus( socket, &close_status, buffer, sizeof(buffer), &size );
- ok( err == ERROR_SUCCESS, "got %u\n", err );
+ ok( err == ERROR_SUCCESS, "got %lu\n", err );
ok( close_status == 1000, "got %u\n", close_status );
- ok( size <= sizeof(buffer), "got %u\n", size );
+ ok( size <= sizeof(buffer), "got %lu\n", size );
setup_test( &info, winhttp_close_handle, __LINE__ );
WinHttpCloseHandle( socket );
@@ -1062,88 +1052,87 @@ static void test_websocket(BOOL secure)
setup_test( &info, winhttp_open_request, __LINE__ );
request = WinHttpOpenRequest( connection, NULL, L"/", NULL, NULL, NULL, secure ? WINHTTP_FLAG_SECURE : 0);
- ok( request != NULL, "got %u\n", err );
+ ok( request != NULL, "got %lu\n", err );
if (secure)
{
flags = SECURITY_FLAG_IGNORE_UNKNOWN_CA | SECURITY_FLAG_IGNORE_CERT_DATE_INVALID |
SECURITY_FLAG_IGNORE_CERT_CN_INVALID;
ret = WinHttpSetOption(request, WINHTTP_OPTION_SECURITY_FLAGS, &flags, sizeof(flags));
- ok(ret, "failed to set security flags %u\n", GetLastError());
+ ok( ret, "failed to set security flags %lu\n", GetLastError() );
}
ret = WinHttpSetOption( request, WINHTTP_OPTION_UPGRADE_TO_WEB_SOCKET, NULL, 0 );
- ok( ret, "got %u\n", GetLastError() );
+ ok( ret, "got %lu\n", GetLastError() );
setup_test( &info, winhttp_send_request, __LINE__ );
ret = WinHttpSendRequest( request, NULL, 0, NULL, 0, 0, 0 );
- ok( ret, "got %u\n", GetLastError() );
+ ok( ret, "got %lu\n", GetLastError() );
WaitForSingleObject( info.wait, INFINITE );
setup_test( &info, winhttp_receive_response, __LINE__ );
ret = WinHttpReceiveResponse( request, NULL );
- ok( ret, "got %u\n", err );
+ ok( ret, "got %lu\n", err );
WaitForSingleObject( info.wait, INFINITE );
size = sizeof(status);
ret = WinHttpQueryHeaders( request, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL );
- ok( ret, "failed unexpectedly %u\n", err );
- ok( status == 101, "got %u\n", status );
+ ok( ret, "failed unexpectedly %lu\n", err );
+ ok( status == 101, "got %lu\n", status );
setup_test( &info, winhttp_websocket_complete_upgrade, __LINE__ );
socket = pWinHttpWebSocketCompleteUpgrade( request, (DWORD_PTR)context );
- ok( socket != NULL, "got %u\n", err );
+ ok( socket != NULL, "got %lu\n", err );
WaitForSingleObject( info.wait, INFINITE );
setup_test( &info, winhttp_websocket_receive, __LINE__ );
buffer[0] = 0;
err = pWinHttpWebSocketReceive( socket, buffer, sizeof(buffer), &size, &type );
- ok( err == ERROR_SUCCESS, "got %u\n", err );
+ ok( err == ERROR_SUCCESS, "got %lu\n", err );
WaitForSingleObject( info.wait, INFINITE );
ok( buffer[0] == 'R', "unexpected data\n" );
err = pWinHttpWebSocketReceive( socket, buffer, sizeof(buffer), &size, &type );
- ok( err == ERROR_SUCCESS, "got %u\n", err );
+ ok( err == ERROR_SUCCESS, "got %lu\n", err );
err = pWinHttpWebSocketReceive( socket, buffer, sizeof(buffer), &size, &type );
- ok( err == ERROR_INVALID_OPERATION, "got %u\n", err );
+ ok( err == ERROR_INVALID_OPERATION, "got %lu\n", err );
setup_test( &info, winhttp_websocket_shutdown, __LINE__ );
ws_status = (WINHTTP_WEB_SOCKET_STATUS *)info.buffer;
ws_status->eBufferType = ~0u;
err = pWinHttpWebSocketShutdown( socket, 1000, (void *)"success", sizeof("success") );
- ok( err == ERROR_SUCCESS, "got %u\n", err );
+ ok( err == ERROR_SUCCESS, "got %lu\n", err );
close_status = 0xdead;
size = sizeof(buffer) + 1;
err = pWinHttpWebSocketQueryCloseStatus( socket, &close_status, buffer, sizeof(buffer), &size );
- ok( err == ERROR_INVALID_OPERATION, "got %u\n", err );
+ ok( err == ERROR_INVALID_OPERATION, "got %lu\n", err );
ok( close_status == 0xdead, "got %u\n", close_status );
- ok( size == sizeof(buffer) + 1, "got %u\n", size );
+ ok( size == sizeof(buffer) + 1, "got %lu\n", size );
WaitForSingleObject( info.wait, INFINITE );
- ok( info.buflen == sizeof(*ws_status), "got unexpected buflen %u.\n", info.buflen );
- ok( ws_status->eBufferType == WINHTTP_WEB_SOCKET_CLOSE_BUFFER_TYPE, "Got unexpected eBufferType %u.\n",
- ws_status->eBufferType );
- ok( !ws_status->dwBytesTransferred, "got unexpected dwBytesTransferred %u.\n", ws_status->dwBytesTransferred );
+ ok( info.buflen == sizeof(*ws_status), "got %u\n", info.buflen );
+ ok( ws_status->eBufferType == WINHTTP_WEB_SOCKET_CLOSE_BUFFER_TYPE, "got %u\n", ws_status->eBufferType );
+ ok( !ws_status->dwBytesTransferred, "got %lu\n", ws_status->dwBytesTransferred );
close_status = 0xdead;
size = sizeof(buffer) + 1;
err = pWinHttpWebSocketQueryCloseStatus( socket, &close_status, buffer, sizeof(buffer), &size );
- ok( err == ERROR_SUCCESS, "got %u\n", err );
+ ok( err == ERROR_SUCCESS, "got %lu\n", err );
ok( close_status == 1000, "got %u\n", close_status );
- ok( size <= sizeof(buffer), "got %u\n", size );
+ ok( size <= sizeof(buffer), "got %lu\n", size );
err = pWinHttpWebSocketReceive( socket, buffer, sizeof(buffer), &size, &type );
- ok( err == ERROR_INVALID_OPERATION, "got %u\n", err );
+ ok( err == ERROR_INVALID_OPERATION, "got %lu\n", err );
info.buflen = 0xdeadbeef;
setup_test( &info, winhttp_websocket_close, __LINE__ );
err = pWinHttpWebSocketClose( socket, 1000, (void *)"success", sizeof("success") );
- ok( err == ERROR_SUCCESS, "got %u\n", err );
+ ok( err == ERROR_SUCCESS, "got %lu\n", err );
WaitForSingleObject( info.wait, INFINITE );
- ok( !info.buflen, "Got unexpected buflen %u.\n", info.buflen );
+ ok( !info.buflen, "got %u\n", info.buflen );
setup_test( &info, winhttp_close_handle, __LINE__ );
@@ -1154,7 +1143,7 @@ static void test_websocket(BOOL secure)
if (unload)
{
status = WaitForSingleObject( event, 0 );
- ok( status == WAIT_TIMEOUT, "got %08x\n", status );
+ ok( status == WAIT_TIMEOUT, "got %#lx\n", status );
}
WinHttpCloseHandle( session );
WaitForSingleObject( info.wait, INFINITE );
@@ -1163,7 +1152,7 @@ static void test_websocket(BOOL secure)
if (unload)
{
status = WaitForSingleObject( event, 2000 );
- ok( status == WAIT_OBJECT_0, "got %08x\n", status );
+ ok( status == WAIT_OBJECT_0, "got %#lx\n", status );
}
CloseHandle( event );
CloseHandle( info.wait );
@@ -1265,30 +1254,30 @@ static void test_basic_request(int port, const WCHAR *verb, const WCHAR *path)
BOOL ret;
ses = WinHttpOpen(NULL, WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0);
- ok(ses != NULL, "failed to open session %u\n", GetLastError());
+ ok( ses != NULL, "failed to open session %lu\n", GetLastError() );
con = WinHttpConnect(ses, L"localhost", port, 0);
- ok(con != NULL, "failed to open a connection %u\n", GetLastError());
+ ok( con != NULL, "failed to open a connection %lu\n", GetLastError() );
req = WinHttpOpenRequest(con, verb, path, NULL, NULL, NULL, 0);
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok( req != NULL, "failed to open a request %lu\n", GetLastError() );
ret = WinHttpSendRequest(req, NULL, 0, NULL, 0, 0, 0);
- ok(ret, "failed to send request %u\n", GetLastError());
+ ok( ret, "failed to send request %lu\n", GetLastError() );
ret = WinHttpReceiveResponse(req, NULL);
- ok(ret, "failed to receive response %u\n", GetLastError());
+ ok( ret, "failed to receive response %lu\n", GetLastError() );
status = 0xdeadbeef;
size = sizeof(status);
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL);
- ok(ret, "failed to query status code %u\n", GetLastError());
- ok(status == HTTP_STATUS_OK, "request failed unexpectedly %u\n", status);
+ ok( ret, "failed to query status code %lu\n", GetLastError());
+ ok( status == HTTP_STATUS_OK, "request failed unexpectedly %lu\n", status );
count = 0;
memset(buffer, 0, sizeof(buffer));
ret = WinHttpReadData(req, buffer, sizeof buffer, &count);
- ok(ret, "failed to read data %u\n", GetLastError());
+ ok( ret, "failed to read data %lu\n", GetLastError() );
ok(count == sizeof page1 - 1, "count was wrong\n");
ok(!memcmp(buffer, page1, sizeof page1), "http data wrong\n");
@@ -1337,22 +1326,22 @@ static void open_async_request(int port, struct test_request *req, struct info *
}
req->session = WinHttpOpen( L"winetest", 0, NULL, NULL, WINHTTP_FLAG_ASYNC );
- ok(req->session != NULL, "failed to open session %u\n", GetLastError());
+ ok( req->session != NULL, "failed to open session %lu\n", GetLastError() );
WinHttpSetOption( req->session, WINHTTP_OPTION_CONTEXT_VALUE, &info, sizeof(struct info *) );
WinHttpSetStatusCallback( req->session, check_notification, WINHTTP_CALLBACK_FLAG_ALL_NOTIFICATIONS, 0 );
setup_test( info, winhttp_connect, __LINE__ );
req->connection = WinHttpConnect( req->session, L"localhost", port, 0 );
- ok(req->connection != NULL, "failed to open a connection %u\n", GetLastError());
+ ok( req->connection != NULL, "failed to open a connection %lu\n", GetLastError() );
setup_test( info, winhttp_open_request, __LINE__ );
req->request = WinHttpOpenRequest( req->connection, NULL, path, NULL, NULL, NULL, 0 );
- ok(req->request != NULL, "failed to open a request %u\n", GetLastError());
+ ok( req->request != NULL, "failed to open a request %lu\n", GetLastError() );
setup_test( info, winhttp_send_request, __LINE__ );
ret = WinHttpSendRequest( req->request, NULL, 0, NULL, 0, 0, 0 );
- ok(ret, "failed to send request %u\n", GetLastError());
+ ok( ret, "failed to send request %lu\n", GetLastError() );
}
static void open_socket_request(int port, struct test_request *req, struct info *info)
@@ -1381,7 +1370,7 @@ static void server_send_reply(struct test_request *req, struct info *info, const
info->index = 0;
setup_test( info, winhttp_send_request, __LINE__ );
ret = WinHttpReceiveResponse( req->request, NULL );
- ok(ret, "failed to receive response %u\n", GetLastError());
+ ok( ret, "failed to receive response %lu\n", GetLastError() );
WaitForSingleObject( info->wait, INFINITE );
end_test( info, __LINE__ );
@@ -1437,11 +1426,11 @@ static void close_request(struct test_request *req, struct info *info, BOOL allo
setup_test( info, winhttp_close_handle, __LINE__ );
ret = WinHttpCloseHandle( req->request );
- ok(ret, "WinHttpCloseHandle failed: %u\n", GetLastError());
+ ok( ret, "WinHttpCloseHandle failed: %lu\n", GetLastError() );
ret = WinHttpCloseHandle( req->connection );
- ok(ret, "WinHttpCloseHandle failed: %u\n", GetLastError());
+ ok( ret, "WinHttpCloseHandle failed: %lu\n", GetLastError() );
ret = WinHttpCloseHandle( req->session );
- ok(ret, "WinHttpCloseHandle failed: %u\n", GetLastError());
+ ok( ret, "WinHttpCloseHandle failed: %lu\n", GetLastError() );
WaitForSingleObject( info->wait, INFINITE );
end_test( info, __LINE__ );
@@ -1468,7 +1457,7 @@ static void _read_request_data(struct test_request *req, struct info *info, cons
setup_test( info, winhttp_read_data, line );
memset(buffer, '?', sizeof(buffer));
ret = WinHttpReadData( req->request, buffer, sizeof(buffer), NULL );
- ok(ret, "failed to read data %u\n", GetLastError());
+ ok( ret, "failed to read data %lu\n", GetLastError() );
WaitForSingleObject( info->wait, INFINITE );
@@ -1578,17 +1567,15 @@ static void CALLBACK test_recursion_callback( HINTERNET handle, DWORD_PTR contex
break;
}
- ok(context->recursion_count < TEST_RECURSION_LIMIT,
- "Got unexpected context->recursion_count %u, thread %#x.\n",
- context->recursion_count, GetCurrentThreadId());
+ ok( context->recursion_count < TEST_RECURSION_LIMIT,
+ "got %lu, thread %#lx\n", context->recursion_count, GetCurrentThreadId() );
context->max_recursion_query = max( context->max_recursion_query, context->recursion_count );
InterlockedIncrement( &context->recursion_count );
ret = WinHttpReadData( context->request, &b, 1, NULL );
err = GetLastError();
- ok(ret, "Failed to read data, GetLastError() %u.\n", err);
- ok(err == ERROR_SUCCESS || err == ERROR_IO_PENDING, "Got unexpected err %u.\n", err);
- if (err == ERROR_SUCCESS)
- context->have_sync_callback = TRUE;
+ ok( ret, "failed to read data, GetLastError() %lu\n", err );
+ ok( err == ERROR_SUCCESS || err == ERROR_IO_PENDING, "got %lu\n", err );
+ if (err == ERROR_SUCCESS) context->have_sync_callback = TRUE;
InterlockedDecrement( &context->recursion_count );
break;
@@ -1598,18 +1585,16 @@ static void CALLBACK test_recursion_callback( HINTERNET handle, DWORD_PTR contex
SetEvent( context->wait );
break;
}
- ok(context->recursion_count < TEST_RECURSION_LIMIT,
- "Got unexpected context->recursion_count %u, thread %#x.\n",
- context->recursion_count, GetCurrentThreadId());
+ ok( context->recursion_count < TEST_RECURSION_LIMIT,
+ "got %lu, thread %#lx\n", context->recursion_count, GetCurrentThreadId() );
context->max_recursion_read = max( context->max_recursion_read, context->recursion_count );
context->read_from_callback = TRUE;
InterlockedIncrement( &context->recursion_count );
ret = WinHttpQueryDataAvailable( context->request, NULL );
err = GetLastError();
- ok(ret, "Failed to query data available, GetLastError() %u.\n", err);
- ok(err == ERROR_SUCCESS || err == ERROR_IO_PENDING, "Got unexpected err %u.\n", err);
- if (err == ERROR_SUCCESS)
- context->have_sync_callback = TRUE;
+ ok( ret, "failed to query data available, GetLastError() %lu\n", err );
+ ok( err == ERROR_SUCCESS || err == ERROR_IO_PENDING, "got %lu\n", err );
+ if (err == ERROR_SUCCESS) context->have_sync_callback = TRUE;
InterlockedDecrement( &context->recursion_count );
break;
}
@@ -1628,15 +1613,15 @@ static void test_recursion(void)
context.wait = CreateEventW( NULL, FALSE, FALSE, NULL );
session = WinHttpOpen( L"winetest", 0, NULL, NULL, WINHTTP_FLAG_ASYNC );
- ok(!!session, "Failed to open session, GetLastError() %u.\n", GetLastError());
+ ok( !!session, "failed to open session, GetLastError() %lu\n", GetLastError() );
WinHttpSetStatusCallback( session, test_recursion_callback, WINHTTP_CALLBACK_FLAG_ALL_NOTIFICATIONS, 0 );
connection = WinHttpConnect( session, L"test.winehq.org", 0, 0 );
- ok(!!connection, "Failed to open a connection, GetLastError() %u.\n", GetLastError());
+ ok( !!connection, "failed to open a connection, GetLastError() %lu\n", GetLastError() );
request = WinHttpOpenRequest( connection, NULL, L"/tests/hello.html", NULL, NULL, NULL, 0 );
- ok(!!request, "Failed to open a request, GetLastError() %u.\n", GetLastError());
+ ok( !!request, "failed to open a request, GetLastError() %lu\n", GetLastError() );
context.request = request;
ret = WinHttpSendRequest( request, NULL, 0, NULL, 0, 0, (DWORD_PTR)&context );
@@ -1651,39 +1636,36 @@ static void test_recursion(void)
CloseHandle( context.wait );
return;
}
- ok(ret, "Failed to send request, GetLastError() %u.\n", GetLastError());
+ ok( ret, "failed to send request, GetLastError() %lu\n", GetLastError() );
WaitForSingleObject( context.wait, INFINITE );
ret = WinHttpReceiveResponse( request, NULL );
- ok(ret, "Failed to receive response, GetLastError() %u.\n", GetLastError());
+ ok( ret, "failed to receive response, GetLastError() %lu\n", GetLastError() );
WaitForSingleObject( context.wait, INFINITE );
size = sizeof(status);
ret = WinHttpQueryHeaders( request, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, NULL,
&status, &size, NULL );
- ok(ret, "Request failed, GetLastError() %u.\n", GetLastError());
- ok(status == 200, "Request failed unexpectedly, status %u.\n", status);
+ ok( ret, "request failed, GetLastError() %lu\n", GetLastError() );
+ ok( status == 200, "request failed unexpectedly, status %lu\n", status );
ret = WinHttpQueryDataAvailable( request, NULL );
- ok(ret, "Failed to query data available, GetLastError() %u.\n", GetLastError());
+ ok( ret, "failed to query data available, GetLastError() %lu\n", GetLastError() );
WaitForSingleObject( context.wait, INFINITE );
ret = WinHttpReadData( request, &b, 1, NULL );
- ok(ret, "Failed to read data, GetLastError() %u.\n", GetLastError());
+ ok( ret, "failed to read data, GetLastError() %lu\n", GetLastError() );
WaitForSingleObject( context.wait, INFINITE );
if (context.have_sync_callback)
{
- ok(context.max_recursion_query >= 2, "Got unexpected max_recursion_query %u.\n", context.max_recursion_query);
- ok(context.max_recursion_read >= 2, "Got unexpected max_recursion_read %u.\n", context.max_recursion_read);
- }
- else
- {
- skip("No sync callbacks.\n");
+ ok( context.max_recursion_query >= 2, "got %lu\n", context.max_recursion_query );
+ ok( context.max_recursion_read >= 2, "got %lu\n", context.max_recursion_read );
}
+ else skip( "no sync callbacks\n");
WinHttpSetStatusCallback( session, NULL, WINHTTP_CALLBACK_FLAG_ALL_NOTIFICATIONS, 0 );
@@ -1720,13 +1702,13 @@ START_TEST (notification)
si.port = 7533;
thread = CreateThread( NULL, 0, server_thread, &si, 0, NULL );
- ok(thread != NULL, "failed to create thread %u\n", GetLastError());
+ ok( thread != NULL, "failed to create thread %lu\n", GetLastError() );
server_socket_available = CreateEventW( NULL, 0, 0, NULL );
server_socket_done = CreateEventW( NULL, 0, 0, NULL );
ret = WaitForSingleObject( si.event, 10000 );
- ok(ret == WAIT_OBJECT_0, "failed to start winhttp test server %u\n", GetLastError());
+ ok( ret == WAIT_OBJECT_0, "failed to start winhttp test server %lu\n", GetLastError() );
if (ret != WAIT_OBJECT_0)
{
CloseHandle(thread);
diff --git a/dlls/winhttp/tests/url.c b/dlls/winhttp/tests/url.c
index 35d23c5b083..5f137dc6365 100644
--- a/dlls/winhttp/tests/url.c
+++ b/dlls/winhttp/tests/url.c
@@ -104,31 +104,31 @@ static void WinHttpCreateUrl_test( void )
SetLastError( 0xdeadbeef );
ret = WinHttpCreateUrl( NULL, 0, NULL, &len );
ok( !ret, "expected failure\n" );
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %u\n", GetLastError() );
- ok( len == ~0u, "expected len ~0u got %u\n", len );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %lu\n", GetLastError() );
+ ok( len == ~0u, "expected len ~0u got %lu\n", len );
/* zero'ed components */
memset( &uc, 0, sizeof(URL_COMPONENTS) );
SetLastError( 0xdeadbeef );
ret = WinHttpCreateUrl( &uc, 0, NULL, &len );
ok( !ret, "expected failure\n" );
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %u\n", GetLastError() );
- ok( len == ~0u, "expected len ~0u got %u\n", len );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %lu\n", GetLastError() );
+ ok( len == ~0u, "expected len ~0u got %lu\n", len );
/* valid components, NULL url, NULL length */
fill_url_components( &uc );
SetLastError( 0xdeadbeef );
ret = WinHttpCreateUrl( &uc, 0, NULL, NULL );
ok( !ret, "expected failure\n" );
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %lu\n", GetLastError() );
/* valid components, NULL url, insufficient length */
len = 0;
SetLastError( 0xdeadbeef );
ret = WinHttpCreateUrl( &uc, 0, NULL, &len );
ok( !ret, "expected failure\n" );
- ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER got %u\n", GetLastError() );
- ok( len == 57, "expected len 57 got %u\n", len );
+ ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER got %lu\n", GetLastError() );
+ ok( len == 57, "expected len 57 got %lu\n", len );
/* valid components, NULL url, sufficient length */
SetLastError( 0xdeadbeef );
@@ -137,8 +137,8 @@ static void WinHttpCreateUrl_test( void )
err = GetLastError();
ok( !ret, "expected failure\n" );
ok( err == ERROR_INVALID_PARAMETER || broken(err == ERROR_INSUFFICIENT_BUFFER) /* < win7 */,
- "expected ERROR_INVALID_PARAMETER got %u\n", GetLastError() );
- ok( len == 256 || broken(len == 57) /* < win7 */, "expected len 256 got %u\n", len );
+ "expected ERROR_INVALID_PARAMETER got %lu\n", GetLastError() );
+ ok( len == 256 || broken(len == 57) /* < win7 */, "expected len 256 got %lu\n", len );
/* correct size, NULL url */
fill_url_components( &uc );
@@ -147,8 +147,8 @@ static void WinHttpCreateUrl_test( void )
err = GetLastError();
ok( !ret, "expected failure\n" );
ok( err == ERROR_INVALID_PARAMETER || broken(err == ERROR_INSUFFICIENT_BUFFER) /* < win7 */,
- "expected ERROR_INVALID_PARAMETER got %u\n", GetLastError() );
- ok( len == 256 || broken(len == 57) /* < win7 */, "expected len 256 got %u\n", len );
+ "expected ERROR_INVALID_PARAMETER got %lu\n", GetLastError() );
+ ok( len == 256 || broken(len == 57) /* < win7 */, "expected len 256 got %lu\n", len );
/* valid components, allocated url, short length */
SetLastError( 0xdeadbeef );
@@ -157,8 +157,8 @@ static void WinHttpCreateUrl_test( void )
len = 2;
ret = WinHttpCreateUrl( &uc, 0, url, &len );
ok( !ret, "expected failure\n" );
- ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER got %u\n", GetLastError() );
- ok( len == 57, "expected len 57 got %u\n", len );
+ ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER got %lu\n", GetLastError() );
+ ok( len == 57, "expected len 57 got %lu\n", len );
/* allocated url, NULL scheme */
SetLastError( 0xdeadbeef );
@@ -168,8 +168,8 @@ static void WinHttpCreateUrl_test( void )
ret = WinHttpCreateUrl( &uc, 0, url, &len );
ok( ret, "expected success\n" );
ok( GetLastError() == ERROR_SUCCESS || broken(GetLastError() == 0xdeadbeef) /* < win7 */,
- "expected ERROR_SUCCESS got %u\n", GetLastError() );
- ok( len == 56, "expected len 56 got %u\n", len );
+ "expected ERROR_SUCCESS got %lu\n", GetLastError() );
+ ok( len == 56, "expected len 56 got %lu\n", len );
ok( !lstrcmpW( url, url1 ), "url doesn't match\n" );
/* allocated url, 0 scheme */
@@ -179,7 +179,7 @@ static void WinHttpCreateUrl_test( void )
len = 256;
ret = WinHttpCreateUrl( &uc, 0, url, &len );
ok( ret, "expected success\n" );
- ok( len == 56, "expected len 56 got %u\n", len );
+ ok( len == 56, "expected len 56 got %lu\n", len );
/* valid components, allocated url */
fill_url_components( &uc );
@@ -187,7 +187,7 @@ static void WinHttpCreateUrl_test( void )
len = 256;
ret = WinHttpCreateUrl( &uc, 0, url, &len );
ok( ret, "expected success\n" );
- ok( len == 56, "expected len 56 got %d\n", len );
+ ok( len == 56, "expected len 56 got %lu\n", len );
ok( !lstrcmpW( url, url1 ), "url doesn't match\n" );
/* valid username, NULL password */
@@ -205,7 +205,7 @@ static void WinHttpCreateUrl_test( void )
len = 256;
ret = WinHttpCreateUrl( &uc, 0, url, &len );
ok( ret, "expected success\n" );
- ok( len == 56, "expected len 56 got %u\n", len );
+ ok( len == 56, "expected len 56 got %lu\n", len );
ok( !lstrcmpW( url, url2 ), "url doesn't match\n" );
/* valid password, NULL username */
@@ -216,7 +216,7 @@ static void WinHttpCreateUrl_test( void )
len = 256;
ret = WinHttpCreateUrl( &uc, 0, url, &len );
ok( !ret, "expected failure\n" );
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %lu\n", GetLastError() );
/* valid password, empty username */
fill_url_components( &uc );
@@ -234,7 +234,7 @@ static void WinHttpCreateUrl_test( void )
len = 256;
ret = WinHttpCreateUrl( &uc, 0, url, &len );
ok( ret, "expected success\n" );
- ok( len == 38, "expected len 38 got %u\n", len );
+ ok( len == 38, "expected len 38 got %lu\n", len );
ok( !lstrcmpW( url, url3 ), "url doesn't match\n" );
/* empty username, empty password */
@@ -245,7 +245,7 @@ static void WinHttpCreateUrl_test( void )
len = 256;
ret = WinHttpCreateUrl( &uc, 0, url, &len );
ok( ret, "expected success\n" );
- ok( len == 56, "expected len 56 got %u\n", len );
+ ok( len == 56, "expected len 56 got %lu\n", len );
ok( !lstrcmpW( url, url4 ), "url doesn't match\n" );
/* nScheme has lower precedence than lpszScheme */
@@ -256,7 +256,7 @@ static void WinHttpCreateUrl_test( void )
len = 256;
ret = WinHttpCreateUrl( &uc, 0, url, &len );
ok( ret, "expected success\n" );
- ok( len == lstrlenW( url5 ), "expected len %d got %u\n", lstrlenW( url5 ) + 1, len );
+ ok( len == lstrlenW( url5 ), "expected len %d got %lu\n", lstrlenW( url5 ) + 1, len );
ok( !lstrcmpW( url, url5 ), "url doesn't match\n" );
/* non-standard port */
@@ -267,7 +267,7 @@ static void WinHttpCreateUrl_test( void )
len = 256;
ret = WinHttpCreateUrl( &uc, 0, url, &len );
ok( ret, "expected success\n" );
- ok( len == 59, "expected len 59 got %u\n", len );
+ ok( len == 59, "expected len 59 got %lu\n", len );
ok( !lstrcmpW( url, url6 ), "url doesn't match\n" );
/* escape extra info */
@@ -278,7 +278,7 @@ static void WinHttpCreateUrl_test( void )
len = 256;
ret = WinHttpCreateUrl( &uc, ICU_ESCAPE, url, &len );
ok( ret, "expected success\n" );
- ok( len == 113, "expected len 113 got %u\n", len );
+ ok( len == 113, "expected len 113 got %lu\n", len );
ok( !lstrcmpW( url, url7 ), "url doesn't match %s\n", wine_dbgstr_w(url) );
/* escape extra info */
@@ -290,7 +290,7 @@ static void WinHttpCreateUrl_test( void )
len = 256;
ret = WinHttpCreateUrl( &uc, ICU_ESCAPE, url, &len );
ok( ret, "expected success\n" );
- ok( len == lstrlenW(url18), "expected len %u got %u\n", lstrlenW(url18), len );
+ ok( len == lstrlenW(url18), "expected len %u got %lu\n", lstrlenW(url18), len );
ok( !lstrcmpW( url, url18 ), "url doesn't match\n" );
/* extra info with Unicode characters */
@@ -304,7 +304,7 @@ static void WinHttpCreateUrl_test( void )
ret = WinHttpCreateUrl( &uc, ICU_ESCAPE, url, &len );
err = GetLastError();
ok( !ret, "expected failure\n" );
- ok( err == ERROR_INVALID_PARAMETER, "got %u\n", err );
+ ok( err == ERROR_INVALID_PARAMETER, "got %lu\n", err );
/* extra info with Unicode characters, no ICU_ESCAPE */
memset( &uc, 0, sizeof(uc) );
@@ -317,7 +317,7 @@ static void WinHttpCreateUrl_test( void )
ok( ret || broken(!ret) /* < win7 */, "expected success\n" );
if (ret)
{
- ok( len == lstrlenW(url19), "expected len %u got %u\n", lstrlenW(url19), len );
+ ok( len == lstrlenW(url19), "expected len %u got %lu\n", lstrlenW(url19), len );
ok( !lstrcmpW( url, url19 ), "url doesn't match %s\n", wine_dbgstr_w(url) );
}
@@ -330,7 +330,7 @@ static void WinHttpCreateUrl_test( void )
len = 256;
ret = WinHttpCreateUrl( &uc, ICU_ESCAPE, url, &len );
ok( ret, "expected success\n" );
- ok( len == lstrlenW(url18), "expected len %u got %u\n", lstrlenW(url18), len );
+ ok( len == lstrlenW(url18), "expected len %u got %lu\n", lstrlenW(url18), len );
ok( !lstrcmpW( url, url18 ), "url doesn't match\n" );
/* path with Unicode characters */
@@ -344,7 +344,7 @@ static void WinHttpCreateUrl_test( void )
ret = WinHttpCreateUrl( &uc, ICU_ESCAPE, url, &len );
err = GetLastError();
ok( !ret, "expected failure\n" );
- ok( err == ERROR_INVALID_PARAMETER, "got %u\n", err );
+ ok( err == ERROR_INVALID_PARAMETER, "got %lu\n", err );
/* path with Unicode characters, no ICU_ESCAPE */
memset( &uc, 0, sizeof(uc) );
@@ -357,7 +357,7 @@ static void WinHttpCreateUrl_test( void )
ok( ret || broken(!ret) /* < win7 */, "expected success\n" );
if (ret)
{
- ok( len == lstrlenW(url20), "expected len %u got %u\n", lstrlenW(url20), len );
+ ok( len == lstrlenW(url20), "expected len %u got %lu\n", lstrlenW(url20), len );
ok( !lstrcmpW( url, url20 ), "url doesn't match %s\n", wine_dbgstr_w(url) );
}
@@ -371,7 +371,7 @@ static void WinHttpCreateUrl_test( void )
len = 256;
ret = WinHttpCreateUrl( &uc, 0, url, &len );
ok( ret, "expected success\n" );
- ok( len == 58, "expected len 58 got %u\n", len );
+ ok( len == 58, "expected len 58 got %lu\n", len );
ok( !lstrcmpW( url, url8 ), "url doesn't match\n" );
HeapFree( GetProcessHeap(), 0, url );
@@ -417,21 +417,21 @@ static void WinHttpCrackUrl_test( void )
uc.dwExtraInfoLength = 20;
ret = WinHttpCrackUrl( url1, 0, 0, &uc );
- ok( ret, "WinHttpCrackUrl failed le=%u\n", GetLastError() );
+ ok( ret, "WinHttpCrackUrl failed le = %lu\n", GetLastError() );
ok( uc.nScheme == INTERNET_SCHEME_HTTP, "unexpected scheme: %u\n", uc.nScheme );
ok( !memcmp( uc.lpszScheme, http, sizeof(http) ), "unexpected scheme: %s\n", wine_dbgstr_w(uc.lpszScheme) );
- ok( uc.dwSchemeLength == 4, "unexpected scheme length: %u\n", uc.dwSchemeLength );
+ ok( uc.dwSchemeLength == 4, "unexpected scheme length: %lu\n", uc.dwSchemeLength );
ok( !memcmp( uc.lpszUserName, username, sizeof(username) ), "unexpected username: %s\n", wine_dbgstr_w(uc.lpszUserName) );
- ok( uc.dwUserNameLength == 8, "unexpected username length: %u\n", uc.dwUserNameLength );
+ ok( uc.dwUserNameLength == 8, "unexpected username length: %lu\n", uc.dwUserNameLength );
ok( !memcmp( uc.lpszPassword, password, sizeof(password) ), "unexpected password: %s\n", wine_dbgstr_w(uc.lpszPassword) );
- ok( uc.dwPasswordLength == 8, "unexpected password length: %u\n", uc.dwPasswordLength );
+ ok( uc.dwPasswordLength == 8, "unexpected password length: %lu\n", uc.dwPasswordLength );
ok( !memcmp( uc.lpszHostName, winehq, sizeof(winehq) ), "unexpected hostname: %s\n", wine_dbgstr_w(uc.lpszHostName) );
- ok( uc.dwHostNameLength == 14, "unexpected hostname length: %u\n", uc.dwHostNameLength );
+ ok( uc.dwHostNameLength == 14, "unexpected hostname length: %lu\n", uc.dwHostNameLength );
ok( uc.nPort == 80, "unexpected port: %u\n", uc.nPort );
ok( !memcmp( uc.lpszUrlPath, about, sizeof(about) ), "unexpected path: %s\n", wine_dbgstr_w(uc.lpszUrlPath) );
- ok( uc.dwUrlPathLength == 11, "unexpected path length: %u\n", uc.dwUrlPathLength );
+ ok( uc.dwUrlPathLength == 11, "unexpected path length: %lu\n", uc.dwUrlPathLength );
ok( !memcmp( uc.lpszExtraInfo, query, sizeof(query) ), "unexpected extra info: %s\n", wine_dbgstr_w(uc.lpszExtraInfo) );
- ok( uc.dwExtraInfoLength == 6, "unexpected extra info length: %u\n", uc.dwExtraInfoLength );
+ ok( uc.dwExtraInfoLength == 6, "unexpected extra info length: %lu\n", uc.dwExtraInfoLength );
/* buffers of insufficient length */
uc.dwSchemeLength = 1;
@@ -441,19 +441,19 @@ static void WinHttpCrackUrl_test( void )
ret = WinHttpCrackUrl( url1, 0, 0, &uc );
error = GetLastError();
ok( !ret, "WinHttpCrackUrl succeeded\n" );
- ok( error == ERROR_INSUFFICIENT_BUFFER, "got %u, expected ERROR_INSUFFICIENT_BUFFER\n", error );
- ok( uc.dwSchemeLength == 5, "unexpected scheme length: %u\n", uc.dwSchemeLength );
- ok( uc.dwHostNameLength == 15, "unexpected hostname length: %u\n", uc.dwHostNameLength );
- ok( uc.dwUrlPathLength == 11, "unexpected path length: %u\n", uc.dwUrlPathLength );
+ ok( error == ERROR_INSUFFICIENT_BUFFER, "got %lu, expected ERROR_INSUFFICIENT_BUFFER\n", error );
+ ok( uc.dwSchemeLength == 5, "unexpected scheme length: %lu\n", uc.dwSchemeLength );
+ ok( uc.dwHostNameLength == 15, "unexpected hostname length: %lu\n", uc.dwHostNameLength );
+ ok( uc.dwUrlPathLength == 11, "unexpected path length: %lu\n", uc.dwUrlPathLength );
/* no buffers */
reset_url_components( &uc );
SetLastError( 0xdeadbeef );
ret = WinHttpCrackUrl( url_k1, 0, 0, &uc);
error = GetLastError();
- ok( ret, "WinHttpCrackUrl failed le=%u\n", error );
+ ok( ret, "WinHttpCrackUrl failed le = %lu\n", error );
ok( error == ERROR_SUCCESS || broken(error == ERROR_INVALID_PARAMETER) /* < win7 */,
- "got %u, expected ERROR_SUCCESS\n", error );
+ "got %lu, expected ERROR_SUCCESS\n", error );
ok( uc.nScheme == INTERNET_SCHEME_HTTP, "unexpected scheme\n" );
ok( uc.lpszScheme == url_k1,"unexpected scheme\n" );
ok( uc.dwSchemeLength == 4, "unexpected scheme length\n" );
@@ -473,7 +473,7 @@ static void WinHttpCrackUrl_test( void )
uc.dwSchemeLength = uc.dwHostNameLength = uc.dwUserNameLength = 1;
uc.dwPasswordLength = uc.dwUrlPathLength = uc.dwExtraInfoLength = 1;
ret = WinHttpCrackUrl( url_k2, 0, 0,&uc);
- ok( ret, "WinHttpCrackUrl failed le=%u\n", GetLastError() );
+ ok( ret, "WinHttpCrackUrl failed le = %lu\n", GetLastError() );
ok( uc.nScheme == INTERNET_SCHEME_HTTP, "unexpected scheme\n" );
ok( uc.lpszScheme == url_k2, "unexpected scheme\n" );
ok( uc.dwSchemeLength == 4, "unexpected scheme length\n" );
@@ -491,7 +491,7 @@ static void WinHttpCrackUrl_test( void )
reset_url_components( &uc );
ret = WinHttpCrackUrl( url_k3, 0, 0, &uc );
- ok( ret, "WinHttpCrackUrl failed le=%u\n", GetLastError() );
+ ok( ret, "WinHttpCrackUrl failed le = %lu\n", GetLastError() );
ok( uc.nScheme == INTERNET_SCHEME_HTTPS, "unexpected scheme\n" );
ok( uc.lpszScheme == url_k3, "unexpected scheme\n" );
ok( uc.dwSchemeLength == 5, "unexpected scheme length\n" );
@@ -513,80 +513,80 @@ static void WinHttpCrackUrl_test( void )
ret = WinHttpCrackUrl( url_k4, 0, 0, &uc );
ok( !ret, "WinHttpCrackUrl succeeded\n" );
error = GetLastError();
- ok( error == ERROR_WINHTTP_INVALID_URL, "got %u\n", error );
+ ok( error == ERROR_WINHTTP_INVALID_URL, "got %lu\n", error );
reset_url_components( &uc );
SetLastError( 0xdeadbeef );
ret = WinHttpCrackUrl( url_k5, 0, 0, &uc );
ok( !ret, "WinHttpCrackUrl succeeded\n" );
error = GetLastError();
- ok( error == ERROR_WINHTTP_INVALID_URL, "got %u\n", error );
+ ok( error == ERROR_WINHTTP_INVALID_URL, "got %lu\n", error );
reset_url_components( &uc );
SetLastError( 0xdeadbeef );
ret = WinHttpCrackUrl( url_k6, 0, 0, &uc );
ok( !ret, "WinHttpCrackUrl succeeded\n" );
error = GetLastError();
- ok( error == ERROR_WINHTTP_UNRECOGNIZED_SCHEME, "got %u\n", error );
+ ok( error == ERROR_WINHTTP_UNRECOGNIZED_SCHEME, "got %lu\n", error );
reset_url_components( &uc );
SetLastError( 0xdeadbeef );
ret = WinHttpCrackUrl( url_k7, 0, 0, &uc );
ok( !ret, "WinHttpCrackUrl succeeded\n" );
error = GetLastError();
- ok( error == ERROR_WINHTTP_UNRECOGNIZED_SCHEME, "got %u\n", error );
+ ok( error == ERROR_WINHTTP_UNRECOGNIZED_SCHEME, "got %lu\n", error );
reset_url_components( &uc );
SetLastError( 0xdeadbeef );
ret = WinHttpCrackUrl( url_k8, 0, 0, &uc );
error = GetLastError();
ok( !ret, "WinHttpCrackUrl succeeded\n" );
- ok( error == ERROR_WINHTTP_UNRECOGNIZED_SCHEME, "got %u\n", error );
+ ok( error == ERROR_WINHTTP_UNRECOGNIZED_SCHEME, "got %lu\n", error );
reset_url_components( &uc );
ret = WinHttpCrackUrl( url_k9, 0, 0, &uc );
- ok( ret, "WinHttpCrackUrl failed le=%u\n", GetLastError() );
+ ok( ret, "WinHttpCrackUrl failed le = %lu\n", GetLastError() );
ok( uc.lpszUrlPath == url_k9 + 14 || broken(uc.lpszUrlPath == url_k9 + 13) /* win8 */,
"unexpected path: %s\n", wine_dbgstr_w(uc.lpszUrlPath) );
- ok( uc.dwUrlPathLength == 0, "unexpected path length: %u\n", uc.dwUrlPathLength );
+ ok( uc.dwUrlPathLength == 0, "unexpected path length: %lu\n", uc.dwUrlPathLength );
ok( uc.lpszExtraInfo == url_k9 + 14 || broken(uc.lpszExtraInfo == url_k9 + 13) /* win8 */,
"unexpected extra info: %s\n", wine_dbgstr_w(uc.lpszExtraInfo) );
ok( uc.dwExtraInfoLength == 0 || broken(uc.dwExtraInfoLength == 1) /* win8 */,
- "unexpected extra info length: %u\n", uc.dwExtraInfoLength );
+ "unexpected extra info length: %lu\n", uc.dwExtraInfoLength );
reset_url_components( &uc );
ret = WinHttpCrackUrl( url_k10, 0, 0, &uc );
- ok( ret, "WinHttpCrackUrl failed le=%u\n", GetLastError() );
+ ok( ret, "WinHttpCrackUrl failed le = %lu\n", GetLastError() );
ok( uc.lpszUrlPath == url_k10 + 13, "unexpected path: %s\n", wine_dbgstr_w(uc.lpszUrlPath) );
- ok( uc.dwUrlPathLength == 7, "unexpected path length: %u\n", uc.dwUrlPathLength );
+ ok( uc.dwUrlPathLength == 7, "unexpected path length: %lu\n", uc.dwUrlPathLength );
ok( uc.lpszExtraInfo == url_k10 + 20, "unexpected extra info: %s\n", wine_dbgstr_w(uc.lpszExtraInfo) );
- ok( uc.dwExtraInfoLength == 0, "unexpected extra info length: %u\n", uc.dwExtraInfoLength );
+ ok( uc.dwExtraInfoLength == 0, "unexpected extra info length: %lu\n", uc.dwExtraInfoLength );
reset_url_components( &uc );
SetLastError( 0xdeadbeef );
ret = WinHttpCrackUrl( url4, 0, 0, &uc );
error = GetLastError();
ok( !ret, "WinHttpCrackUrl succeeded\n" );
- ok( error == ERROR_WINHTTP_INVALID_URL, "got %u\n", error );
+ ok( error == ERROR_WINHTTP_INVALID_URL, "got %lu\n", error );
reset_url_components( &uc );
SetLastError( 0xdeadbeef );
ret = WinHttpCrackUrl( empty, 0, 0, &uc );
error = GetLastError();
ok( !ret, "WinHttpCrackUrl succeeded\n" );
- ok( error == ERROR_WINHTTP_UNRECOGNIZED_SCHEME, "got %u\n", error );
+ ok( error == ERROR_WINHTTP_UNRECOGNIZED_SCHEME, "got %lu\n", error );
SetLastError( 0xdeadbeef );
ret = WinHttpCrackUrl( url1, 0, 0, NULL );
error = GetLastError();
ok( !ret, "WinHttpCrackUrl succeeded\n" );
- ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
+ ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
SetLastError( 0xdeadbeef );
ret = WinHttpCrackUrl( NULL, 0, 0, &uc );
error = GetLastError();
ok( !ret, "WinHttpCrackUrl succeeded\n" );
- ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
+ ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
/* decoding without buffers */
reset_url_components( &uc );
@@ -594,7 +594,7 @@ static void WinHttpCrackUrl_test( void )
ret = WinHttpCrackUrl( url7, 0, ICU_DECODE, &uc );
error = GetLastError();
ok( !ret, "WinHttpCrackUrl succeeded\n" );
- ok( error == ERROR_INVALID_PARAMETER, "got %u, expected ERROR_INVALID_PARAMETER\n", error );
+ ok( error == ERROR_INVALID_PARAMETER, "got %lu, expected ERROR_INVALID_PARAMETER\n", error );
/* decoding with buffers */
uc.lpszScheme = scheme;
@@ -613,11 +613,11 @@ static void WinHttpCrackUrl_test( void )
path[0] = 0;
ret = WinHttpCrackUrl( url7, 0, ICU_DECODE, &uc );
- ok( ret, "WinHttpCrackUrl failed %u\n", GetLastError() );
+ ok( ret, "WinHttpCrackUrl failed %lu\n", GetLastError() );
ok( !memcmp( uc.lpszUrlPath + 11, escape, 21 * sizeof(WCHAR) ), "unexpected path\n" );
- ok( uc.dwUrlPathLength == 32, "unexpected path length %u\n", uc.dwUrlPathLength );
+ ok( uc.dwUrlPathLength == 32, "unexpected path length %lu\n", uc.dwUrlPathLength );
ok( !memcmp( uc.lpszExtraInfo, escape + 21, 12 * sizeof(WCHAR) ), "unexpected extra info\n" );
- ok( uc.dwExtraInfoLength == 12, "unexpected extra info length %u\n", uc.dwExtraInfoLength );
+ ok( uc.dwExtraInfoLength == 12, "unexpected extra info length %lu\n", uc.dwExtraInfoLength );
/* Urls with specified port numbers */
/* decoding with buffers */
@@ -637,25 +637,25 @@ static void WinHttpCrackUrl_test( void )
path[0] = 0;
ret = WinHttpCrackUrl( url6, 0, 0, &uc );
- ok( ret, "WinHttpCrackUrl failed le=%u\n", GetLastError() );
+ ok( ret, "WinHttpCrackUrl failed le = %lu\n", GetLastError() );
ok( !memcmp( uc.lpszHostName, winehq, sizeof(winehq) ), "unexpected host name: %s\n", wine_dbgstr_w(uc.lpszHostName) );
- ok( uc.dwHostNameLength == 14, "unexpected host name length: %d\n", uc.dwHostNameLength );
+ ok( uc.dwHostNameLength == 14, "unexpected host name length: %lu\n", uc.dwHostNameLength );
ok( uc.nPort == 42, "unexpected port: %u\n", uc.nPort );
/* decoding without buffers */
reset_url_components( &uc );
ret = WinHttpCrackUrl( url8, 0, 0, &uc );
- ok( ret, "WinHttpCrackUrl failed le=%u\n", GetLastError() );
+ ok( ret, "WinHttpCrackUrl failed le = %lu\n", GetLastError() );
ok( uc.nPort == 0, "unexpected port: %u\n", uc.nPort );
reset_url_components( &uc );
ret = WinHttpCrackUrl( url9, 0, 0, &uc );
- ok( ret, "WinHttpCrackUrl failed le=%u\n", GetLastError() );
+ ok( ret, "WinHttpCrackUrl failed le = %lu\n", GetLastError() );
ok( uc.nPort == 80, "unexpected port: %u\n", uc.nPort );
reset_url_components( &uc );
ret = WinHttpCrackUrl( url10, 0, 0, &uc );
- ok( ret, "WinHttpCrackUrl failed le=%u\n", GetLastError() );
+ ok( ret, "WinHttpCrackUrl failed le = %lu\n", GetLastError() );
ok( uc.nPort == 443, "unexpected port: %u\n", uc.nPort );
reset_url_components( &uc );
@@ -663,18 +663,18 @@ static void WinHttpCrackUrl_test( void )
ret = WinHttpCrackUrl( empty, 0, 0, &uc );
error = GetLastError();
ok( !ret, "WinHttpCrackUrl succeeded\n" );
- ok( error == ERROR_WINHTTP_UNRECOGNIZED_SCHEME, "got %u, expected ERROR_WINHTTP_UNRECOGNIZED_SCHEME\n", error );
+ ok( error == ERROR_WINHTTP_UNRECOGNIZED_SCHEME, "got %lu, expected ERROR_WINHTTP_UNRECOGNIZED_SCHEME\n", error );
reset_url_components( &uc );
SetLastError( 0xdeadbeef );
ret = WinHttpCrackUrl( http, 0, 0, &uc );
error = GetLastError();
ok( !ret, "WinHttpCrackUrl succeeded\n" );
- ok( error == ERROR_WINHTTP_UNRECOGNIZED_SCHEME, "got %u, expected ERROR_WINHTTP_UNRECOGNIZED_SCHEME\n", error );
+ ok( error == ERROR_WINHTTP_UNRECOGNIZED_SCHEME, "got %lu, expected ERROR_WINHTTP_UNRECOGNIZED_SCHEME\n", error );
reset_url_components( &uc );
ret = WinHttpCrackUrl( url11, 0, 0, &uc);
- ok( ret, "WinHttpCrackUrl failed le=%u\n", GetLastError() );
+ ok( ret, "WinHttpCrackUrl failed le = %lu\n", GetLastError() );
ok( uc.nScheme == INTERNET_SCHEME_HTTP, "unexpected scheme\n" );
ok( uc.lpszScheme == url11,"unexpected scheme\n" );
ok( uc.dwSchemeLength == 4, "unexpected scheme length\n" );
@@ -702,7 +702,7 @@ static void WinHttpCrackUrl_test( void )
uc.dwExtraInfoLength = 0;
uc.nPort = 0;
ret = WinHttpCrackUrl( url12, 0, ICU_DECODE, &uc );
- ok( ret, "WinHttpCrackUrl failed le=%u\n", GetLastError() );
+ ok( ret, "WinHttpCrackUrl failed le = %lu\n", GetLastError() );
uc.lpszScheme = scheme;
uc.dwSchemeLength = 20;
@@ -718,10 +718,10 @@ static void WinHttpCrackUrl_test( void )
uc.dwExtraInfoLength = 0;
uc.nPort = 0;
ret = WinHttpCrackUrl( url13, 0, ICU_ESCAPE|ICU_DECODE, &uc );
- ok( ret, "WinHttpCrackUrl failed le=%u\n", GetLastError() );
+ ok( ret, "WinHttpCrackUrl failed le = %lu\n", GetLastError() );
ok( !lstrcmpW( uc.lpszHostName, L"winehq.o g" ), "unexpected host name\n" );
ok( !lstrcmpW( uc.lpszUrlPath, L"/path%20with%20spaces" ), "unexpected path\n" );
- ok( uc.dwUrlPathLength == lstrlenW(L"/path%20with%20spaces"), "got %u\n", uc.dwUrlPathLength );
+ ok( uc.dwUrlPathLength == lstrlenW(L"/path%20with%20spaces"), "got %lu\n", uc.dwUrlPathLength );
uc.dwStructSize = sizeof(uc);
uc.lpszScheme = NULL;
@@ -739,21 +739,21 @@ static void WinHttpCrackUrl_test( void )
uc.lpszExtraInfo = NULL;
uc.dwExtraInfoLength = ~0u;
ret = WinHttpCrackUrl( url14, 0, 0, &uc );
- ok( ret, "WinHttpCrackUrl failed le=%u\n", GetLastError() );
+ ok( ret, "WinHttpCrackUrl failed le = %lu\n", GetLastError() );
ok( !uc.lpszScheme, "unexpected scheme %s\n", wine_dbgstr_w(uc.lpszScheme) );
- ok( !uc.dwSchemeLength, "unexpected length %u\n", uc.dwSchemeLength );
+ ok( !uc.dwSchemeLength, "unexpected length %lu\n", uc.dwSchemeLength );
ok( uc.nScheme == INTERNET_SCHEME_HTTP, "unexpected scheme %u\n", uc.nScheme );
ok( !lstrcmpW( uc.lpszHostName, url14 + 7 ), "unexpected hostname %s\n", wine_dbgstr_w(uc.lpszHostName) );
- ok( uc.dwHostNameLength == 14, "unexpected length %u\n", uc.dwHostNameLength );
+ ok( uc.dwHostNameLength == 14, "unexpected length %lu\n", uc.dwHostNameLength );
ok( uc.nPort == 80, "unexpected port %u\n", uc.nPort );
ok( !uc.lpszUserName, "unexpected username\n" );
- ok( !uc.dwUserNameLength, "unexpected length %u\n", uc.dwUserNameLength );
+ ok( !uc.dwUserNameLength, "unexpected length %lu\n", uc.dwUserNameLength );
ok( !uc.lpszPassword, "unexpected password\n" );
- ok( !uc.dwPasswordLength, "unexpected length %u\n", uc.dwPasswordLength );
+ ok( !uc.dwPasswordLength, "unexpected length %lu\n", uc.dwPasswordLength );
ok( !lstrcmpW( uc.lpszUrlPath, url14 + 21 ), "unexpected path %s\n", wine_dbgstr_w(uc.lpszUrlPath) );
- ok( uc.dwUrlPathLength == 5, "unexpected length %u\n", uc.dwUrlPathLength );
+ ok( uc.dwUrlPathLength == 5, "unexpected length %lu\n", uc.dwUrlPathLength );
ok( !uc.lpszExtraInfo[0], "unexpected extra info %s\n", wine_dbgstr_w(uc.lpszExtraInfo) );
- ok( uc.dwExtraInfoLength == 0, "unexpected length %u\n", uc.dwExtraInfoLength );
+ ok( uc.dwExtraInfoLength == 0, "unexpected length %lu\n", uc.dwExtraInfoLength );
uc.dwStructSize = sizeof(uc);
uc.lpszScheme = scheme;
@@ -774,39 +774,39 @@ static void WinHttpCrackUrl_test( void )
ret = WinHttpCrackUrl( url14, 0, 0, &uc );
error = GetLastError();
ok( !ret, "WinHttpCrackUrl succeeded\n" );
- ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
+ ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
ok( !lstrcmpW( uc.lpszScheme, http ), "unexpected scheme %s\n", wine_dbgstr_w(uc.lpszScheme) );
- ok( !uc.dwSchemeLength, "unexpected length %u\n", uc.dwSchemeLength );
+ ok( !uc.dwSchemeLength, "unexpected length %lu\n", uc.dwSchemeLength );
ok( uc.nScheme == 0, "unexpected scheme %u\n", uc.nScheme );
ok( !uc.lpszHostName, "unexpected hostname %s\n", wine_dbgstr_w(uc.lpszHostName) );
- ok( uc.dwHostNameLength == 0, "unexpected length %u\n", uc.dwHostNameLength );
+ ok( uc.dwHostNameLength == 0, "unexpected length %lu\n", uc.dwHostNameLength );
ok( uc.nPort == 0, "unexpected port %u\n", uc.nPort );
ok( !uc.lpszUserName, "unexpected username\n" );
- ok( uc.dwUserNameLength == ~0u, "unexpected length %u\n", uc.dwUserNameLength );
+ ok( uc.dwUserNameLength == ~0u, "unexpected length %lu\n", uc.dwUserNameLength );
ok( !uc.lpszPassword, "unexpected password\n" );
- ok( uc.dwPasswordLength == ~0u, "unexpected length %u\n", uc.dwPasswordLength );
+ ok( uc.dwPasswordLength == ~0u, "unexpected length %lu\n", uc.dwPasswordLength );
ok( !uc.lpszUrlPath, "unexpected path %s\n", wine_dbgstr_w(uc.lpszUrlPath) );
- ok( uc.dwUrlPathLength == 0, "unexpected length %u\n", uc.dwUrlPathLength );
+ ok( uc.dwUrlPathLength == 0, "unexpected length %lu\n", uc.dwUrlPathLength );
ok( !uc.lpszExtraInfo, "unexpected extra info %s\n", wine_dbgstr_w(uc.lpszExtraInfo) );
- ok( uc.dwExtraInfoLength == 0, "unexpected length %u\n", uc.dwExtraInfoLength );
+ ok( uc.dwExtraInfoLength == 0, "unexpected length %lu\n", uc.dwExtraInfoLength );
reset_url_components( &uc );
SetLastError( 0xdeadbeef );
ret = WinHttpCrackUrl( url15, 0, 0, &uc );
error = GetLastError();
ok( !ret, "WinHttpCrackUrl succeeded\n" );
- ok( error == ERROR_WINHTTP_INVALID_URL, "got %u\n", error );
+ ok( error == ERROR_WINHTTP_INVALID_URL, "got %lu\n", error );
reset_url_components( &uc );
uc.nPort = 1;
ret = WinHttpCrackUrl( url16, 0, 0, &uc );
- ok( ret, "got %u\n", GetLastError() );
+ ok( ret, "got %lu\n", GetLastError() );
ok( !uc.nPort, "got %u\n", uc.nPort );
reset_url_components( &uc );
uc.nPort = 1;
ret = WinHttpCrackUrl( url17, 0, 0, &uc );
- ok( ret, "got %u\n", GetLastError() );
+ ok( ret, "got %lu\n", GetLastError() );
todo_wine ok( uc.nPort == 80, "got %u\n", uc.nPort );
memset( &uc, 0, sizeof(uc) );
@@ -818,9 +818,9 @@ static void WinHttpCrackUrl_test( void )
uc.lpszUrlPath = path;
uc.dwUrlPathLength = ARRAY_SIZE(path);
ret = WinHttpCrackUrl( url21, 0, 0, &uc );
- ok( ret, "got %u\n", GetLastError() );
+ ok( ret, "got %lu\n", GetLastError() );
ok( !lstrcmpW( uc.lpszUrlPath, url21 + 37 ), "unexpected path %s\n", wine_dbgstr_w(uc.lpszUrlPath) );
- ok( uc.dwUrlPathLength == 50, "unexpected length %u\n", uc.dwUrlPathLength );
+ ok( uc.dwUrlPathLength == 50, "unexpected length %lu\n", uc.dwUrlPathLength );
}
START_TEST(url)
diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c
index 21af2761323..354c85c6d28 100644
--- a/dlls/winhttp/tests/winhttp.c
+++ b/dlls/winhttp/tests/winhttp.c
@@ -50,8 +50,8 @@ static BOOL proxy_active(void)
SetLastError(0xdeadbeef);
if (WinHttpGetDefaultProxyConfiguration(&proxy_info))
{
- ok(GetLastError() == ERROR_SUCCESS || broken(GetLastError() == 0xdeadbeef) /* < win7 */,
- "got %u\n", GetLastError());
+ ok( GetLastError() == ERROR_SUCCESS || broken(GetLastError() == 0xdeadbeef) /* < win7 */,
+ "got %lu\n", GetLastError() );
active = (proxy_info.lpszProxy != NULL);
if (active)
GlobalFree(proxy_info.lpszProxy);
@@ -72,92 +72,89 @@ static void test_WinHttpQueryOption(void)
SetLastError(0xdeadbeef);
session = WinHttpOpen(L"winetest", 0, 0, 0, 0);
- ok(session != NULL, "WinHttpOpen failed to open session, error %u\n", GetLastError());
+ ok( session != NULL, "WinHttpOpen failed to open session, error %lu\n", GetLastError() );
SetLastError(0xdeadbeef);
ret = WinHttpQueryOption(session, WINHTTP_OPTION_REDIRECT_POLICY, NULL, NULL);
- ok(!ret, "should fail to set redirect policy %u\n", GetLastError());
- ok(GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
+ ok( !ret, "should fail to set redirect policy %lu\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError() );
size = 0xdeadbeef;
SetLastError(0xdeadbeef);
ret = WinHttpQueryOption(session, WINHTTP_OPTION_REDIRECT_POLICY, NULL, &size);
ok(!ret, "should fail to query option\n");
- ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER,
- "expected ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError());
- ok(size == 4, "expected 4, got %u\n", size);
+ ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError() );
+ ok( size == 4, "expected 4, got %lu\n", size );
feature = 0xdeadbeef;
size = sizeof(feature) - 1;
SetLastError(0xdeadbeef);
ret = WinHttpQueryOption(session, WINHTTP_OPTION_REDIRECT_POLICY, &feature, &size);
ok(!ret, "should fail to query option\n");
- ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER,
- "expected ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError());
- ok(size == 4, "expected 4, got %u\n", size);
+ ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError() );
+ ok( size == 4, "expected 4, got %lu\n", size );
feature = 0xdeadbeef;
size = sizeof(feature) + 1;
SetLastError(0xdeadbeef);
ret = WinHttpQueryOption(session, WINHTTP_OPTION_REDIRECT_POLICY, &feature, &size);
- ok(ret, "failed to query option %u\n", GetLastError());
+ ok(ret, "failed to query option %lu\n", GetLastError());
ok(GetLastError() == ERROR_SUCCESS || broken(GetLastError() == 0xdeadbeef) /* < win7 */,
- "got %u\n", GetLastError());
- ok(size == sizeof(feature), "WinHttpQueryOption should set the size: %u\n", size);
+ "got %lu\n", GetLastError());
+ ok(size == sizeof(feature), "WinHttpQueryOption should set the size: %lu\n", size);
ok(feature == WINHTTP_OPTION_REDIRECT_POLICY_DISALLOW_HTTPS_TO_HTTP,
- "expected WINHTTP_OPTION_REDIRECT_POLICY_DISALLOW_HTTPS_TO_HTTP, got %#x\n", feature);
+ "expected WINHTTP_OPTION_REDIRECT_POLICY_DISALLOW_HTTPS_TO_HTTP, got %#lx\n", feature);
SetLastError(0xdeadbeef);
ret = WinHttpSetOption(session, WINHTTP_OPTION_REDIRECT_POLICY, NULL, sizeof(feature));
- ok(!ret, "should fail to set redirect policy %u\n", GetLastError());
+ ok(!ret, "should fail to set redirect policy %lu\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
feature = WINHTTP_OPTION_REDIRECT_POLICY_ALWAYS;
SetLastError(0xdeadbeef);
ret = WinHttpSetOption(session, WINHTTP_OPTION_REDIRECT_POLICY, &feature, sizeof(feature) - 1);
- ok(!ret, "should fail to set redirect policy %u\n", GetLastError());
+ ok(!ret, "should fail to set redirect policy %lu\n", GetLastError());
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER,
- "expected ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError());
+ "expected ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError());
feature = WINHTTP_OPTION_REDIRECT_POLICY_ALWAYS;
SetLastError(0xdeadbeef);
ret = WinHttpSetOption(session, WINHTTP_OPTION_REDIRECT_POLICY, &feature, sizeof(feature) + 1);
- ok(!ret, "should fail to set redirect policy %u\n", GetLastError());
+ ok(!ret, "should fail to set redirect policy %lu\n", GetLastError());
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER,
- "expected ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError());
+ "expected ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError());
feature = WINHTTP_OPTION_REDIRECT_POLICY_ALWAYS;
SetLastError(0xdeadbeef);
ret = WinHttpSetOption(session, WINHTTP_OPTION_REDIRECT_POLICY, &feature, sizeof(feature));
- ok(ret, "failed to set redirect policy %u\n", GetLastError());
+ ok(ret, "failed to set redirect policy %lu\n", GetLastError());
feature = 0xdeadbeef;
size = sizeof(feature);
SetLastError(0xdeadbeef);
ret = WinHttpQueryOption(session, WINHTTP_OPTION_REDIRECT_POLICY, &feature, &size);
- ok(ret, "failed to query option %u\n", GetLastError());
+ ok(ret, "failed to query option %lu\n", GetLastError());
ok(feature == WINHTTP_OPTION_REDIRECT_POLICY_ALWAYS,
- "expected WINHTTP_OPTION_REDIRECT_POLICY_ALWAYS, got %#x\n", feature);
+ "expected WINHTTP_OPTION_REDIRECT_POLICY_ALWAYS, got %#lx\n", feature);
feature = WINHTTP_DISABLE_COOKIES;
SetLastError(0xdeadbeef);
ret = WinHttpSetOption(session, WINHTTP_OPTION_DISABLE_FEATURE, &feature, sizeof(feature));
ok(!ret, "should fail to set disable feature for a session\n");
ok(GetLastError() == ERROR_WINHTTP_INCORRECT_HANDLE_TYPE,
- "expected ERROR_WINHTTP_INCORRECT_HANDLE_TYPE, got %u\n", GetLastError());
+ "expected ERROR_WINHTTP_INCORRECT_HANDLE_TYPE, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
connection = WinHttpConnect(session, L"test.winehq.org", INTERNET_DEFAULT_HTTP_PORT, 0);
- ok(connection != NULL, "WinHttpConnect failed to open a connection, error: %u\n", GetLastError());
+ ok(connection != NULL, "WinHttpConnect failed to open a connection, error: %lu\n", GetLastError());
feature = WINHTTP_DISABLE_COOKIES;
SetLastError(0xdeadbeef);
ret = WinHttpSetOption(connection, WINHTTP_OPTION_DISABLE_FEATURE, &feature, sizeof(feature));
ok(!ret, "should fail to set disable feature for a connection\n");
ok(GetLastError() == ERROR_WINHTTP_INCORRECT_HANDLE_TYPE,
- "expected ERROR_WINHTTP_INCORRECT_HANDLE_TYPE, got %u\n", GetLastError());
+ "expected ERROR_WINHTTP_INCORRECT_HANDLE_TYPE, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
request = WinHttpOpenRequest(connection, NULL, NULL, NULL, WINHTTP_NO_REFERER,
@@ -174,80 +171,80 @@ static void test_WinHttpQueryOption(void)
ret = WinHttpQueryOption(request, WINHTTP_OPTION_DISABLE_FEATURE, &feature, &size);
ok(!ret, "should fail to query disable feature for a request\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
feature = 0;
size = sizeof(feature);
SetLastError(0xdeadbeef);
ret = WinHttpSetOption(request, WINHTTP_OPTION_DISABLE_FEATURE, &feature, sizeof(feature));
- ok(ret, "failed to set feature %u\n", GetLastError());
+ ok(ret, "failed to set feature %lu\n", GetLastError());
feature = 0xffffffff;
size = sizeof(feature);
SetLastError(0xdeadbeef);
ret = WinHttpSetOption(request, WINHTTP_OPTION_DISABLE_FEATURE, &feature, sizeof(feature));
- ok(ret, "failed to set feature %u\n", GetLastError());
+ ok(ret, "failed to set feature %lu\n", GetLastError());
feature = WINHTTP_DISABLE_COOKIES;
size = sizeof(feature);
SetLastError(0xdeadbeef);
ret = WinHttpSetOption(request, WINHTTP_OPTION_DISABLE_FEATURE, &feature, sizeof(feature));
- ok(ret, "failed to set feature %u\n", GetLastError());
+ ok(ret, "failed to set feature %lu\n", GetLastError());
size = 0;
SetLastError(0xdeadbeef);
ret = WinHttpQueryOption(request, WINHTTP_OPTION_DISABLE_FEATURE, NULL, &size);
ok(!ret, "should fail to query disable feature for a request\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
feature = 0xdeadbeef;
size = sizeof(feature);
SetLastError(0xdeadbeef);
ret = WinHttpQueryOption(request, WINHTTP_OPTION_ENABLE_FEATURE, &feature, &size);
ok(!ret, "should fail to query enabled features for a request\n");
- ok(feature == 0xdeadbeef, "expect feature 0xdeadbeef, got %u\n", feature);
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
+ ok(feature == 0xdeadbeef, "expect feature 0xdeadbeef, got %#lx\n", feature);
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
feature = WINHTTP_ENABLE_SSL_REVOCATION;
SetLastError(0xdeadbeef);
ret = WinHttpSetOption(request, WINHTTP_OPTION_ENABLE_FEATURE, 0, sizeof(feature));
ok(!ret, "should fail to enable WINHTTP_ENABLE_SSL_REVOCATION with invalid parameters\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpSetOption(request, WINHTTP_OPTION_ENABLE_FEATURE, &feature, 0);
ok(!ret, "should fail to enable WINHTTP_ENABLE_SSL_REVOCATION with invalid parameters\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpSetOption(request, WINHTTP_OPTION_ENABLE_FEATURE, &feature, sizeof(feature));
ok(ret, "failed to set feature\n");
ok(GetLastError() == NO_ERROR || broken(GetLastError() == 0xdeadbeef), /* Doesn't set error code on Vista or older */
- "expected NO_ERROR, got %u\n", GetLastError());
+ "expected NO_ERROR, got %lu\n", GetLastError());
feature = 0xdeadbeef;
SetLastError(0xdeadbeef);
ret = WinHttpSetOption(request, WINHTTP_OPTION_ENABLE_FEATURE, &feature, sizeof(feature));
ok(!ret, "should fail to enable WINHTTP_ENABLE_SSL_REVOCATION with invalid parameters\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
feature = 6;
size = sizeof(feature);
ret = WinHttpSetOption(request, WINHTTP_OPTION_CONNECT_RETRIES, &feature, sizeof(feature));
- ok(ret, "failed to set WINHTTP_OPTION_CONNECT_RETRIES %u\n", GetLastError());
+ ok(ret, "failed to set WINHTTP_OPTION_CONNECT_RETRIES %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpCloseHandle(request);
- ok(ret, "WinHttpCloseHandle failed on closing request: %u\n", GetLastError());
+ ok(ret, "WinHttpCloseHandle failed on closing request: %lu\n", GetLastError());
done:
SetLastError(0xdeadbeef);
ret = WinHttpCloseHandle(connection);
- ok(ret, "WinHttpCloseHandle failed on closing connection: %u\n", GetLastError());
+ ok(ret, "WinHttpCloseHandle failed on closing connection: %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpCloseHandle(session);
- ok(ret, "WinHttpCloseHandle failed on closing session: %u\n", GetLastError());
+ ok(ret, "WinHttpCloseHandle failed on closing session: %lu\n", GetLastError());
}
static void test_WinHttpOpenRequest (void)
@@ -261,21 +258,21 @@ static void test_WinHttpOpenRequest (void)
WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0);
err = GetLastError();
ok(session != NULL, "WinHttpOpen failed to open session.\n");
- ok(err == ERROR_SUCCESS, "got %u\n", err);
+ ok(err == ERROR_SUCCESS, "got %lu\n", err);
/* Test with a bad server name */
SetLastError(0xdeadbeef);
connection = WinHttpConnect(session, NULL, INTERNET_DEFAULT_HTTP_PORT, 0);
err = GetLastError();
ok (connection == NULL, "WinHttpConnect succeeded in opening connection to NULL server argument.\n");
- ok(err == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %u.\n", err);
+ ok(err == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %lu.\n", err);
/* Test with a valid server name */
SetLastError(0xdeadbeef);
connection = WinHttpConnect (session, L"test.winehq.org", INTERNET_DEFAULT_HTTP_PORT, 0);
err = GetLastError();
- ok(connection != NULL, "WinHttpConnect failed to open a connection, error: %u.\n", err);
- ok(err == ERROR_SUCCESS || broken(err == WSAEINVAL) /* < win7 */, "got %u\n", err);
+ ok(connection != NULL, "WinHttpConnect failed to open a connection, error: %lu.\n", err);
+ ok(err == ERROR_SUCCESS || broken(err == WSAEINVAL) /* < win7 */, "got %lu\n", err);
SetLastError(0xdeadbeef);
request = WinHttpOpenRequest(connection, NULL, NULL, NULL, WINHTTP_NO_REFERER,
@@ -286,8 +283,8 @@ static void test_WinHttpOpenRequest (void)
skip("Network unreachable, skipping.\n");
goto done;
}
- ok(request != NULL, "WinHttpOpenrequest failed to open a request, error: %u.\n", err);
- ok(err == ERROR_SUCCESS, "got %u\n", err);
+ ok(request != NULL, "WinHttpOpenrequest failed to open a request, error: %lu.\n", err);
+ ok(err == ERROR_SUCCESS, "got %lu\n", err);
SetLastError(0xdeadbeef);
ret = WinHttpSendRequest(request, WINHTTP_NO_ADDITIONAL_HEADERS, 0, NULL, 0, 0, 0);
@@ -297,14 +294,14 @@ static void test_WinHttpOpenRequest (void)
skip("Connection failed, skipping.\n");
goto done;
}
- ok(ret, "WinHttpSendRequest failed: %u\n", err);
- ok(err == ERROR_SUCCESS, "got %u\n", err);
+ ok(ret, "WinHttpSendRequest failed: %lu\n", err);
+ ok(err == ERROR_SUCCESS, "got %lu\n", err);
SetLastError(0xdeadbeef);
ret = WinHttpCloseHandle(request);
err = GetLastError();
- ok(ret, "WinHttpCloseHandle failed on closing request, got %u.\n", err);
- ok(err == ERROR_SUCCESS, "got %u\n", err);
+ ok(ret, "WinHttpCloseHandle failed on closing request, got %lu.\n", err);
+ ok(err == ERROR_SUCCESS, "got %lu\n", err);
done:
ret = WinHttpCloseHandle(connection);
@@ -321,13 +318,13 @@ static void test_empty_headers_param(void)
BOOL ret;
ses = WinHttpOpen(L"winetest", 0, NULL, NULL, 0);
- ok(ses != NULL, "failed to open session %u\n", GetLastError());
+ ok(ses != NULL, "failed to open session %lu\n", GetLastError());
con = WinHttpConnect(ses, L"test.winehq.org", 80, 0);
- ok(con != NULL, "failed to open a connection %u\n", GetLastError());
+ ok(con != NULL, "failed to open a connection %lu\n", GetLastError());
req = WinHttpOpenRequest(con, NULL, NULL, NULL, NULL, NULL, 0);
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok(req != NULL, "failed to open a request %lu\n", GetLastError());
ret = WinHttpSendRequest(req, L"", 0, NULL, 0, 0, 0);
err = GetLastError();
@@ -336,7 +333,7 @@ static void test_empty_headers_param(void)
skip("connection failed, skipping\n");
goto done;
}
- ok(ret, "failed to send request %u\n", GetLastError());
+ ok(ret, "failed to send request %lu\n", GetLastError());
done:
WinHttpCloseHandle(req);
@@ -366,7 +363,7 @@ static void test_WinHttpSendRequest (void)
ok(session != NULL, "WinHttpOpen failed to open session.\n");
connection = WinHttpConnect (session, L"test.winehq.org", INTERNET_DEFAULT_HTTP_PORT, 0);
- ok(connection != NULL, "WinHttpConnect failed to open a connection, error: %u.\n", GetLastError());
+ ok(connection != NULL, "WinHttpConnect failed to open a connection, error: %lu\n", GetLastError());
request = WinHttpOpenRequest(connection, L"POST", L"tests/post.php", NULL, WINHTTP_NO_REFERER,
WINHTTP_DEFAULT_ACCEPT_TYPES, WINHTTP_FLAG_BYPASS_PROXY_CACHE);
@@ -375,25 +372,25 @@ static void test_WinHttpSendRequest (void)
skip("Network unreachable, skipping.\n");
goto done;
}
- ok(request != NULL, "WinHttpOpenrequest failed to open a request, error: %u.\n", GetLastError());
+ ok(request != NULL, "WinHttpOpenrequest failed to open a request, error: %lu\n", GetLastError());
if (!request) goto done;
method[0] = 0;
len = sizeof(method);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_REQUEST_METHOD, NULL, method, &len, NULL);
- ok(ret, "got %u\n", GetLastError());
- ok(len == lstrlenW(L"POST") * sizeof(WCHAR), "got %u\n", len);
+ ok(ret, "got %lu\n", GetLastError());
+ ok(len == lstrlenW(L"POST") * sizeof(WCHAR), "got %lu\n", len);
ok(!lstrcmpW(method, L"POST"), "got %s\n", wine_dbgstr_w(method));
context = 0xdeadbeef;
ret = WinHttpSetOption(request, WINHTTP_OPTION_CONTEXT_VALUE, &context, sizeof(context));
- ok(ret, "WinHttpSetOption failed: %u\n", GetLastError());
+ ok(ret, "WinHttpSetOption failed: %lu\n", GetLastError());
/* writing more data than promised by the content-length header causes an error when the connection
is reused, so disable keep-alive */
disable = WINHTTP_DISABLE_KEEP_ALIVE;
ret = WinHttpSetOption(request, WINHTTP_OPTION_DISABLE_FEATURE, &disable, sizeof(disable));
- ok(ret, "WinHttpSetOption failed: %u\n", GetLastError());
+ ok(ret, "WinHttpSetOption failed: %lu\n", GetLastError());
context++;
ret = WinHttpSendRequest(request, content_type, header_len, post_data, optional_len, total_len, context);
@@ -403,13 +400,13 @@ static void test_WinHttpSendRequest (void)
skip("connection failed, skipping\n");
goto done;
}
- ok(ret == TRUE, "WinHttpSendRequest failed: %u\n", GetLastError());
+ ok(ret == TRUE, "WinHttpSendRequest failed: %lu\n", GetLastError());
context = 0;
size = sizeof(context);
ret = WinHttpQueryOption(request, WINHTTP_OPTION_CONTEXT_VALUE, &context, &size);
- ok(ret, "WinHttpQueryOption failed: %u\n", GetLastError());
- ok(context == 0xdeadbef0, "expected 0xdeadbef0, got %lx\n", context);
+ ok(ret, "WinHttpQueryOption failed: %lu\n", GetLastError());
+ ok(context == 0xdeadbef0, "expected 0xdeadbef0, got %#Ix\n", context);
for (i = 3; post_data[i]; i++)
{
@@ -418,12 +415,12 @@ static void test_WinHttpSendRequest (void)
ret = WinHttpWriteData(request, &post_data[i], 1, &bytes_rw);
if (ret)
{
- ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS got %u.\n", GetLastError());
- ok(bytes_rw == 1, "WinHttpWriteData failed, wrote %u bytes instead of 1 byte.\n", bytes_rw);
+ ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS got %lu\n", GetLastError());
+ ok(bytes_rw == 1, "WinHttpWriteData failed, wrote %lu bytes instead of 1 byte\n", bytes_rw);
}
else /* Since we already passed all optional data in WinHttpSendRequest Win7 fails our WinHttpWriteData call */
{
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER got %u.\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER got %lu\n", GetLastError());
ok(bytes_rw == -1, "Expected bytes_rw to remain unchanged.\n");
}
}
@@ -431,22 +428,22 @@ static void test_WinHttpSendRequest (void)
SetLastError(0xdeadbeef);
ret = WinHttpReceiveResponse(request, NULL);
ok(GetLastError() == ERROR_SUCCESS || broken(GetLastError() == ERROR_NO_TOKEN) /* < win7 */,
- "Expected ERROR_SUCCESS got %u.\n", GetLastError());
- ok(ret == TRUE, "WinHttpReceiveResponse failed: %u.\n", GetLastError());
+ "Expected ERROR_SUCCESS got %lu\n", GetLastError());
+ ok(ret == TRUE, "WinHttpReceiveResponse failed: %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_ORIG_URI, NULL, NULL, &len, NULL);
- ok(!ret && GetLastError() == ERROR_WINHTTP_HEADER_NOT_FOUND, "got %u\n", GetLastError());
+ ok(!ret && GetLastError() == ERROR_WINHTTP_HEADER_NOT_FOUND, "got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_MAX + 1, NULL, NULL, &len, NULL);
- ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "got %u\n", GetLastError());
+ ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "got %lu\n", GetLastError());
bytes_rw = -1;
ret = WinHttpReadData(request, buffer, sizeof(buffer) - 1, &bytes_rw);
- ok(ret == TRUE, "WinHttpReadData failed: %u.\n", GetLastError());
+ ok(ret == TRUE, "WinHttpReadData failed: %lu\n", GetLastError());
- ok(bytes_rw == sizeof(test_post) - 1, "Read %u bytes\n", bytes_rw);
+ ok(bytes_rw == sizeof(test_post) - 1, "Read %lu bytes\n", bytes_rw);
ok(!memcmp(buffer, test_post, sizeof(test_post) - 1), "Data read did not match.\n");
done:
@@ -469,19 +466,19 @@ static void test_WinHttpTimeFromSystemTime(void)
ret = WinHttpTimeFromSystemTime(&time, NULL);
err = GetLastError();
ok(!ret, "WinHttpTimeFromSystemTime succeeded\n");
- ok(err == ERROR_INVALID_PARAMETER, "got %u\n", err);
+ ok(err == ERROR_INVALID_PARAMETER, "got %lu\n", err);
SetLastError(0xdeadbeef);
ret = WinHttpTimeFromSystemTime(NULL, time_string);
err = GetLastError();
ok(!ret, "WinHttpTimeFromSystemTime succeeded\n");
- ok(err == ERROR_INVALID_PARAMETER, "got %u\n", err);
+ ok(err == ERROR_INVALID_PARAMETER, "got %lu\n", err);
SetLastError(0xdeadbeef);
ret = WinHttpTimeFromSystemTime(&time, time_string);
err = GetLastError();
- ok(ret, "WinHttpTimeFromSystemTime failed: %u\n", err);
- ok(err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %u\n", err);
+ ok(ret, "WinHttpTimeFromSystemTime failed: %lu\n", err);
+ ok(err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %lu\n", err);
ok(!memcmp(time_string, L"Mon, 28 Jul 2008 10:05:52 GMT", sizeof(L"Mon, 28 Jul 2008 10:05:52 GMT")),
"Time string returned did not match expected time string.\n");
}
@@ -497,27 +494,27 @@ static void test_WinHttpTimeToSystemTime(void)
ret = WinHttpTimeToSystemTime(L"Mon, 28 Jul 2008 10:05:52 GMT\n", NULL);
err = GetLastError();
ok(!ret, "WinHttpTimeToSystemTime succeeded\n");
- ok(err == ERROR_INVALID_PARAMETER, "got %u\n", err);
+ ok(err == ERROR_INVALID_PARAMETER, "got %lu\n", err);
SetLastError(0xdeadbeef);
ret = WinHttpTimeToSystemTime(NULL, &time);
err = GetLastError();
ok(!ret, "WinHttpTimeToSystemTime succeeded\n");
- ok(err == ERROR_INVALID_PARAMETER, "got %u\n", err);
+ ok(err == ERROR_INVALID_PARAMETER, "got %lu\n", err);
SetLastError(0xdeadbeef);
ret = WinHttpTimeToSystemTime(L"Mon, 28 Jul 2008 10:05:52 GMT\n", &time);
err = GetLastError();
- ok(ret, "WinHttpTimeToSystemTime failed: %u\n", err);
- ok(err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %u\n", err);
+ ok(ret, "WinHttpTimeToSystemTime failed: %lu\n", err);
+ ok(err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %lu\n", err);
ok(memcmp(&time, &expected_time, sizeof(SYSTEMTIME)) == 0,
"Returned SYSTEMTIME structure did not match expected SYSTEMTIME structure.\n");
SetLastError(0xdeadbeef);
ret = WinHttpTimeToSystemTime(L" mon 28 jul 2008 10 05 52\n", &time);
err = GetLastError();
- ok(ret, "WinHttpTimeToSystemTime failed: %u\n", err);
- ok(err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %u\n", err);
+ ok(ret, "WinHttpTimeToSystemTime failed: %lu\n", err);
+ ok(err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %lu\n", err);
ok(memcmp(&time, &expected_time, sizeof(SYSTEMTIME)) == 0,
"Returned SYSTEMTIME structure did not match expected SYSTEMTIME structure.\n");
}
@@ -564,7 +561,7 @@ static void test_WinHttpAddHeaders(void)
ok(session != NULL, "WinHttpOpen failed to open session.\n");
connection = WinHttpConnect (session, L"test.winehq.org", INTERNET_DEFAULT_HTTP_PORT, 0);
- ok(connection != NULL, "WinHttpConnect failed to open a connection, error: %u.\n", GetLastError());
+ ok(connection != NULL, "WinHttpConnect failed to open a connection, error: %lu\n", GetLastError());
request = WinHttpOpenRequest(connection, L"POST", L"/posttest.php", NULL, WINHTTP_NO_REFERER,
WINHTTP_DEFAULT_ACCEPT_TYPES, 0);
@@ -573,7 +570,7 @@ static void test_WinHttpAddHeaders(void)
skip("Network unreachable, skipping.\n");
goto done;
}
- ok(request != NULL, "WinHttpOpenRequest failed to open a request, error: %u.\n", GetLastError());
+ ok(request != NULL, "WinHttpOpenRequest failed to open a request, error: %lu\n", GetLastError());
index = 0;
len = sizeof(buffer);
@@ -583,18 +580,18 @@ static void test_WinHttpAddHeaders(void)
SetLastError(0xdeadbeef);
ret = WinHttpAddRequestHeaders(request, test_headers[0], -1L, WINHTTP_ADDREQ_FLAG_ADD);
err = GetLastError();
- ok(ret, "WinHttpAddRequestHeaders failed to add new header, got %d with error %u.\n", ret, err);
- ok(err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %u\n", err);
+ ok(ret, "WinHttpAddRequestHeaders failed to add new header, got %d with error %lu\n", ret, err);
+ ok(err == ERROR_SUCCESS || broken(err == 0xdeadbeef) /* < win7 */, "got %lu\n", err);
index = 0;
len = sizeof(buffer);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"Warning", buffer, &len, &index);
- ok(ret == TRUE, "WinHttpQueryHeaders failed: %u\n", GetLastError());
+ ok(ret == TRUE, "WinHttpQueryHeaders failed: %lu\n", GetLastError());
ok(index == 1, "WinHttpQueryHeaders failed: header index not incremented\n");
ok(!memcmp(buffer, test_indices[0], sizeof(test_indices[0])),
"WinHttpQueryHeaders failed: incorrect string returned\n");
- ok(len == 5*sizeof(WCHAR), "WinHttpQueryHeaders failed: invalid length returned, expected 5, got %d\n", len);
+ ok(len == 5 * sizeof(WCHAR), "WinHttpQueryHeaders failed: invalid length returned, expected 5, got %lu\n", len);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"Warning", buffer, &len, &index);
@@ -612,7 +609,7 @@ static void test_WinHttpAddHeaders(void)
ok(ret == FALSE, "WinHttpQueryHeaders unexpectedly succeeded with a buffer that's too small.\n");
ok(memcmp(buffer, check_buffer, sizeof(buffer)) == 0,
"WinHttpQueryHeaders failed, modified the buffer when it should not have.\n");
- ok(len == 6*sizeof(WCHAR), "WinHttpQueryHeaders returned invalid length, expected 12, got %d\n", len);
+ ok(len == 6 * sizeof(WCHAR), "WinHttpQueryHeaders returned invalid length, expected 12, got %lu\n", len);
/* Try with a NULL buffer */
index = 0;
@@ -621,8 +618,8 @@ static void test_WinHttpAddHeaders(void)
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_RAW_HEADERS_CRLF | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"Warning", NULL, &len, &index);
ok(ret == FALSE, "WinHttpQueryHeaders unexpectedly succeeded.\n");
- ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError());
- ok(len > 40, "WinHttpQueryHeaders returned invalid length: expected greater than 40, got %d\n", len);
+ ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError());
+ ok(len > 40, "WinHttpQueryHeaders returned invalid length: expected greater than 40, got %lu\n", len);
ok(index == 0, "WinHttpQueryHeaders incorrectly incremented header index.\n");
/* Try with a NULL buffer and a length that's too small */
@@ -633,8 +630,8 @@ static void test_WinHttpAddHeaders(void)
L"Warning", NULL, &len, &index);
ok(ret == FALSE, "WinHttpQueryHeaders unexpectedly succeeded.\n");
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER,
- "WinHttpQueryHeaders set incorrect error: expected ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError());
- ok(len > 40, "WinHttpQueryHeaders returned invalid length: expected greater than 40, got %d\n", len);
+ "WinHttpQueryHeaders set incorrect error: expected ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError());
+ ok(len > 40, "WinHttpQueryHeaders returned invalid length: expected greater than 40, got %lu\n", len);
ok(index == 0, "WinHttpQueryHeaders incorrectly incremented header index.\n");
index = 0;
@@ -644,8 +641,8 @@ static void test_WinHttpAddHeaders(void)
L"Warning", NULL, &len, &index);
ok(ret == FALSE, "WinHttpQueryHeaders unexpectedly succeeded.\n");
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER,
- "WinHttpQueryHeaders set incorrect error: expected ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError());
- ok(len > 40, "WinHttpQueryHeaders returned invalid length: expected greater than 40, got %d\n", len);
+ "WinHttpQueryHeaders set incorrect error: expected ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError());
+ ok(len > 40, "WinHttpQueryHeaders returned invalid length: expected greater than 40, got %lu\n", len);
ok(index == 0, "WinHttpQueryHeaders failed: index was incremented.\n");
/* valid query */
@@ -672,8 +669,8 @@ static void test_WinHttpAddHeaders(void)
L"Warning", NULL, &len, &index);
ok(ret == FALSE, "WinHttpQueryHeaders unexpectedly succeeded.\n");
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER,
- "WinHttpQueryHeaders set incorrect error: expected ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError());
- ok(len > 40, "WinHttpQueryHeaders returned invalid length: expected greater than 40, got %d\n", len);
+ "WinHttpQueryHeaders set incorrect error: expected ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError());
+ ok(len > 40, "WinHttpQueryHeaders returned invalid length: expected greater than 40, got %lu\n", len);
ok(index == 0, "WinHttpQueryHeaders failed: index was incremented.\n");
oldlen = len;
@@ -682,7 +679,7 @@ static void test_WinHttpAddHeaders(void)
memset(buffer, 0xff, sizeof(buffer));
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_RAW_HEADERS | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"Warning", buffer, &len, &index);
- ok(ret == TRUE, "WinHttpQueryHeaders failed %u\n", GetLastError());
+ ok(ret == TRUE, "WinHttpQueryHeaders failed %lu\n", GetLastError());
ok(len + sizeof(WCHAR) <= oldlen, "resulting length longer than advertized\n");
ok((len < sizeof(buffer) - sizeof(WCHAR)) && !buffer[len / sizeof(WCHAR)] && !buffer[len / sizeof(WCHAR) - 1],
"no double NULL terminator\n");
@@ -697,14 +694,14 @@ static void test_WinHttpAddHeaders(void)
len = sizeof(buffer);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"Warning", buffer, &len, &index);
- ok(ret == TRUE, "WinHttpQueryHeaders failed: %u\n", GetLastError());
+ ok(ret == TRUE, "WinHttpQueryHeaders failed: %lu\n", GetLastError());
ok(index == 1, "WinHttpQueryHeaders failed to increment index.\n");
ok(memcmp(buffer, test_indices[0], sizeof(test_indices[0])) == 0, "WinHttpQueryHeaders returned incorrect string.\n");
len = sizeof(buffer);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"Warning", buffer, &len, &index);
- ok(ret == TRUE, "WinHttpQueryHeaders failed: %u\n", GetLastError());
+ ok(ret == TRUE, "WinHttpQueryHeaders failed: %lu\n", GetLastError());
ok(index == 2, "WinHttpQueryHeaders failed to increment index.\n");
ok(memcmp(buffer, test_indices[1], sizeof(test_indices[1])) == 0, "WinHttpQueryHeaders returned incorrect string.\n");
@@ -715,7 +712,7 @@ static void test_WinHttpAddHeaders(void)
len = sizeof(buffer);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"Warning", buffer, &len, &index);
- ok(ret == TRUE, "WinHttpQueryHeaders failed: %u\n", GetLastError());
+ ok(ret == TRUE, "WinHttpQueryHeaders failed: %lu\n", GetLastError());
ok(index == 1, "WinHttpQueryHeaders failed to increment index.\n");
reverse = (memcmp(buffer, test_indices[1], sizeof(test_indices[1])) != 0); /* Win7 returns values in reverse order of adding */
ok(!memcmp(buffer, test_indices[reverse ? 2 : 1], sizeof(test_indices[reverse ? 2 : 1])),
@@ -724,7 +721,7 @@ static void test_WinHttpAddHeaders(void)
len = sizeof(buffer);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"Warning", buffer, &len, &index);
- ok(ret == TRUE, "WinHttpQueryHeaders failed: %u\n", GetLastError());
+ ok(ret == TRUE, "WinHttpQueryHeaders failed: %lu\n", GetLastError());
ok(index == 2, "WinHttpQueryHeaders failed to increment index.\n");
ok(!memcmp(buffer, test_indices[reverse ? 1 : 2], sizeof(test_indices[reverse ? 1 : 2])),
"WinHttpQueryHeaders returned incorrect string.\n");
@@ -737,7 +734,7 @@ static void test_WinHttpAddHeaders(void)
len = sizeof(buffer);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"Warning", buffer, &len, &index);
- ok(ret == TRUE, "WinHttpQueryHeaders failed: %u\n", GetLastError());
+ ok(ret == TRUE, "WinHttpQueryHeaders failed: %lu\n", GetLastError());
ok(index == 1, "WinHttpQueryHeaders failed to increment index.\n");
ok(!memcmp(buffer, test_indices[reverse ? 2 : 1], sizeof(test_indices[reverse ? 2 : 1])),
"WinHttpQueryHeaders returned incorrect string.\n");
@@ -745,7 +742,7 @@ static void test_WinHttpAddHeaders(void)
len = sizeof(buffer);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"Warning", buffer, &len, &index);
- ok(ret == TRUE, "WinHttpQueryHeaders failed: %u\n", GetLastError());
+ ok(ret == TRUE, "WinHttpQueryHeaders failed: %lu\n", GetLastError());
ok(index == 2, "WinHttpQueryHeaders failed to increment index.\n");
ok(!memcmp(buffer, test_indices[reverse ? 1 : 2], sizeof(test_indices[reverse ? 1 : 2])),
"WinHttpQueryHeaders returned incorrect string.\n");
@@ -763,7 +760,7 @@ static void test_WinHttpAddHeaders(void)
len = sizeof(buffer);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"Warning", buffer, &len, &index);
- ok(ret == TRUE, "WinHttpQueryHeaders failed: %u\n", GetLastError());
+ ok(ret == TRUE, "WinHttpQueryHeaders failed: %lu\n", GetLastError());
ok(index == 1, "WinHttpQueryHeaders failed to increment index.\n");
ok(!memcmp(buffer, reverse ? L"test3, test4" : L"test2, test4",
reverse ? sizeof(L"test3, test4") : sizeof(L"test2, test4")),
@@ -772,7 +769,7 @@ static void test_WinHttpAddHeaders(void)
len = sizeof(buffer);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"Warning", buffer, &len, &index);
- ok(ret == TRUE, "WinHttpQueryHeaders failed: %u\n", GetLastError());
+ ok(ret == TRUE, "WinHttpQueryHeaders failed: %lu\n", GetLastError());
ok(index == 2, "WinHttpQueryHeaders failed to increment index.\n");
ok(!memcmp(buffer, test_indices[reverse ? 1 : 2], sizeof(test_indices[reverse ? 1 : 2])),
"WinHttpQueryHeaders returned incorrect string.\n");
@@ -790,7 +787,7 @@ static void test_WinHttpAddHeaders(void)
len = sizeof(buffer);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"Warning", buffer, &len, &index);
- ok(ret == TRUE, "WinHttpQueryHeaders failed: %u\n", GetLastError());
+ ok(ret == TRUE, "WinHttpQueryHeaders failed: %lu\n", GetLastError());
ok(index == 1, "WinHttpQueryHeaders failed to increment index.\n");
ok(!memcmp(buffer, reverse ? L"test3, test4, test5" : L"test2, test4, test5",
@@ -800,7 +797,7 @@ static void test_WinHttpAddHeaders(void)
len = sizeof(buffer);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"Warning", buffer, &len, &index);
- ok(ret == TRUE, "WinHttpQueryHeaders failed: %u\n", GetLastError());
+ ok(ret == TRUE, "WinHttpQueryHeaders failed: %lu\n", GetLastError());
ok(index == 2, "WinHttpQueryHeaders failed to increment index.\n");
ok(!memcmp(buffer, test_indices[reverse ? 1 : 2], sizeof(test_indices[reverse ? 1 : 2])),
"WinHttpQueryHeaders returned incorrect string.\n");
@@ -819,7 +816,7 @@ static void test_WinHttpAddHeaders(void)
len = sizeof(buffer);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"Warning", buffer, &len, &index);
- ok(ret == TRUE, "WinHttpQueryHeaders failed: %u\n", GetLastError());
+ ok(ret == TRUE, "WinHttpQueryHeaders failed: %lu\n", GetLastError());
ok(index == 1, "WinHttpQueryHeaders failed to increment index.\n");
ok(!memcmp(buffer, reverse ? L"test3, test4, test5; test6" : L"test2, test4, test5; test6",
@@ -829,7 +826,7 @@ static void test_WinHttpAddHeaders(void)
len = sizeof(buffer);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"Warning", buffer, &len, &index);
- ok(ret == TRUE, "WinHttpQueryHeaders failed: %u\n", GetLastError());
+ ok(ret == TRUE, "WinHttpQueryHeaders failed: %lu\n", GetLastError());
ok(index == 2, "WinHttpQueryHeaders failed to increment index.\n");
ok(!memcmp(buffer, test_indices[reverse ? 1 : 2], sizeof(test_indices[reverse ? 1 : 2])),
"WinHttpQueryHeaders returned incorrect string.\n");
@@ -847,7 +844,7 @@ static void test_WinHttpAddHeaders(void)
len = sizeof(buffer);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"Warning", buffer, &len, &index);
- ok(ret == TRUE, "WinHttpQueryHeaders failed: %u\n", GetLastError());
+ ok(ret == TRUE, "WinHttpQueryHeaders failed: %lu\n", GetLastError());
ok(index == 1, "WinHttpQueryHeaders failed to increment index.\n");
ok(!memcmp(buffer, test_indices[reverse ? 3 : 2], sizeof(test_indices[reverse ? 3 : 2])),
"WinHttpQueryHeaders returned incorrect string.\n");
@@ -855,7 +852,7 @@ static void test_WinHttpAddHeaders(void)
len = sizeof(buffer);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"Warning", buffer, &len, &index);
- ok(ret == TRUE, "WinHttpQueryHeaders failed: %u\n", GetLastError());
+ ok(ret == TRUE, "WinHttpQueryHeaders failed: %lu\n", GetLastError());
ok(index == 2, "WinHttpQueryHeaders failed to increment index.\n");
ok(!memcmp(buffer, test_indices[reverse ? 1 : 3], sizeof(test_indices[reverse ? 1 : 3])),
"WinHttpQueryHeaders returned incorrect string.\n");
@@ -876,7 +873,7 @@ static void test_WinHttpAddHeaders(void)
len = sizeof(buffer);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"a", buffer, &len, &index);
- ok(ret, "WinHttpQueryHeaders failed: %u\n", GetLastError());
+ ok(ret, "WinHttpQueryHeaders failed: %lu\n", GetLastError());
ok(!memcmp(buffer, L"", sizeof(L"")), "unexpected result\n");
ret = WinHttpAddRequestHeaders(request, test_headers[10], ~0u, WINHTTP_ADDREQ_FLAG_ADD);
@@ -896,7 +893,7 @@ static void test_WinHttpAddHeaders(void)
len = sizeof(buffer);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"field", buffer, &len, &index);
- ok(ret, "WinHttpQueryHeaders failed: %u\n", GetLastError());
+ ok(ret, "WinHttpQueryHeaders failed: %lu\n", GetLastError());
ok(!memcmp(buffer, L"value ", sizeof(L"value ")) || !memcmp(buffer, L"value", sizeof(L"value")),
"unexpected result\n");
@@ -905,20 +902,20 @@ static void test_WinHttpAddHeaders(void)
WINHTTP_ADDREQ_FLAG_ADD | WINHTTP_ADDREQ_FLAG_REPLACE);
err = GetLastError();
ok(!ret, "unexpected success\n");
- ok(err == ERROR_INVALID_PARAMETER, "got %u\n", err);
+ ok(err == ERROR_INVALID_PARAMETER, "got %lu\n", err);
ret = WinHttpAddRequestHeaders(request, L"Range: bytes=0-773\r\n", ~0u,
WINHTTP_ADDREQ_FLAG_ADD | WINHTTP_ADDREQ_FLAG_REPLACE);
- ok(ret, "failed to add header: %u\n", GetLastError());
+ ok(ret, "failed to add header: %lu\n", GetLastError());
index = 0;
len = sizeof(buffer);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"Range", buffer, &len, &index);
- ok(ret, "failed to get range header %u\n", GetLastError());
+ ok(ret, "failed to get range header %lu\n", GetLastError());
ok(!memcmp(buffer, L"bytes=0-773", sizeof(L"bytes=0-773")), "incorrect string returned\n");
- ok(len == lstrlenW(L"bytes=0-773") * sizeof(WCHAR), "wrong length %u\n", len);
- ok(index == 1, "wrong index %u\n", index);
+ ok(len == lstrlenW(L"bytes=0-773") * sizeof(WCHAR), "wrong length %lu\n", len);
+ ok(index == 1, "wrong index %lu\n", index);
index = 0;
len = sizeof(buffer);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
@@ -929,21 +926,21 @@ static void test_WinHttpAddHeaders(void)
ret = WinHttpAddRequestHeaders(request, test_headers[14], ~0u, WINHTTP_ADDREQ_FLAG_REPLACE);
err = GetLastError();
ok(!ret, "unexpected success\n");
- ok(err == ERROR_WINHTTP_HEADER_NOT_FOUND, "got %u\n", err);
+ ok(err == ERROR_WINHTTP_HEADER_NOT_FOUND, "got %lu\n", err);
ret = WinHttpAddRequestHeaders(request, test_headers[14], ~0u, WINHTTP_ADDREQ_FLAG_ADD);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
index = 0;
len = sizeof(buffer);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"name", buffer, &len, &index);
- ok(ret, "got %u\n", GetLastError());
- ok(index == 1, "wrong index %u\n", index);
+ ok(ret, "got %lu\n", GetLastError());
+ ok(index == 1, "wrong index %lu\n", index);
ok(!memcmp(buffer, L"value", sizeof(L"value")), "incorrect string\n");
ret = WinHttpAddRequestHeaders(request, test_headers[15], ~0u, WINHTTP_ADDREQ_FLAG_REPLACE);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
index = 0;
len = sizeof(buffer);
@@ -952,17 +949,17 @@ static void test_WinHttpAddHeaders(void)
L"name", buffer, &len, &index);
err = GetLastError();
ok(!ret, "unexpected success\n");
- ok(err == ERROR_WINHTTP_HEADER_NOT_FOUND, "got %u\n", err);
+ ok(err == ERROR_WINHTTP_HEADER_NOT_FOUND, "got %lu\n", err);
ret = WinHttpAddRequestHeaders(request, test_headers[14], -1L, 0);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
index = 0;
len = sizeof(buffer);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"name", buffer, &len, &index);
- ok(ret, "got %u\n", GetLastError());
- ok(index == 1, "wrong index %u\n", index);
+ ok(ret, "got %lu\n", GetLastError());
+ ok(index == 1, "wrong index %lu\n", index);
ok(!memcmp(buffer, L"value", sizeof(L"value")), "incorrect string\n");
ret = WinHttpCloseHandle(request);
@@ -1006,36 +1003,36 @@ static void test_secure_connection(void)
char buffer[32];
ses = WinHttpOpen(L"winetest", 0, NULL, NULL, 0);
- ok(ses != NULL, "failed to open session %u\n", GetLastError());
+ ok(ses != NULL, "failed to open session %lu\n", GetLastError());
policy = WINHTTP_OPTION_REDIRECT_POLICY_ALWAYS;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_REDIRECT_POLICY, &policy, sizeof(policy));
- ok(ret, "failed to set redirect policy %u\n", GetLastError());
+ ok(ret, "failed to set redirect policy %lu\n", GetLastError());
protocols = WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_SECURE_PROTOCOLS, &protocols, sizeof(protocols));
err = GetLastError();
- ok(ret || err == ERROR_INVALID_PARAMETER /* < win7 */, "failed to set protocols %u\n", err);
+ ok(ret || err == ERROR_INVALID_PARAMETER /* < win7 */, "failed to set protocols %lu\n", err);
con = WinHttpConnect(ses, L"test.winehq.org", 443, 0);
- ok(con != NULL, "failed to open a connection %u\n", GetLastError());
+ ok(con != NULL, "failed to open a connection %lu\n", GetLastError());
SetLastError( 0xdeadbeef );
protocols = WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2;
ret = WinHttpSetOption(con, WINHTTP_OPTION_SECURE_PROTOCOLS, &protocols, sizeof(protocols));
err = GetLastError();
ok(!ret, "unexpected success\n");
- ok(err == ERROR_WINHTTP_INCORRECT_HANDLE_TYPE, "got %u\n", err);
+ ok(err == ERROR_WINHTTP_INCORRECT_HANDLE_TYPE, "got %lu\n", err);
/* try without setting WINHTTP_FLAG_SECURE */
req = WinHttpOpenRequest(con, NULL, NULL, NULL, NULL, NULL, 0);
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok(req != NULL, "failed to open a request %lu\n", GetLastError());
ret = WinHttpSetOption(req, WINHTTP_OPTION_CLIENT_CERT_CONTEXT, WINHTTP_NO_CLIENT_CERT_CONTEXT, 0);
err = GetLastError();
ok(!ret, "unexpected success\n");
ok(err == ERROR_WINHTTP_INCORRECT_HANDLE_STATE || broken(err == ERROR_INVALID_PARAMETER) /* winxp */,
- "setting client cert context returned %u\n", err);
+ "setting client cert context returned %lu\n", err);
ret = WinHttpSendRequest(req, NULL, 0, NULL, 0, 0, 0);
err = GetLastError();
@@ -1044,31 +1041,31 @@ static void test_secure_connection(void)
skip("Connection failed, skipping.\n");
goto cleanup;
}
- ok(ret, "failed to send request %u\n", GetLastError());
+ ok(ret, "failed to send request %lu\n", GetLastError());
ret = WinHttpReceiveResponse(req, NULL);
- ok(ret, "failed to receive response %u\n", GetLastError());
+ ok(ret, "failed to receive response %lu\n", GetLastError());
status = 0xdeadbeef;
size = sizeof(status);
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL);
- ok(ret, "header query failed %u\n", GetLastError());
- ok(status == HTTP_STATUS_BAD_REQUEST, "got %u\n", status);
+ ok(ret, "header query failed %lu\n", GetLastError());
+ ok(status == HTTP_STATUS_BAD_REQUEST, "got %lu\n", status);
WinHttpCloseHandle(req);
req = WinHttpOpenRequest(con, NULL, NULL, NULL, NULL, NULL, WINHTTP_FLAG_SECURE);
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok(req != NULL, "failed to open a request %lu\n", GetLastError());
flags = 0xdeadbeef;
size = sizeof(flags);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_SECURITY_FLAGS, &flags, &size);
- ok(ret, "failed to query security flags %u\n", GetLastError());
- ok(!flags, "got %08x\n", flags);
+ ok(ret, "failed to query security flags %lu\n", GetLastError());
+ ok(!flags, "got %#lx\n", flags);
flags = SECURITY_FLAG_IGNORE_CERT_WRONG_USAGE;
ret = WinHttpSetOption(req, WINHTTP_OPTION_SECURITY_FLAGS, &flags, sizeof(flags));
- ok(ret, "failed to set security flags %u\n", GetLastError());
+ ok(ret, "failed to set security flags %lu\n", GetLastError());
flags = SECURITY_FLAG_SECURE;
ret = WinHttpSetOption(req, WINHTTP_OPTION_SECURITY_FLAGS, &flags, sizeof(flags));
@@ -1081,15 +1078,15 @@ static void test_secure_connection(void)
flags = SECURITY_FLAG_IGNORE_UNKNOWN_CA | SECURITY_FLAG_IGNORE_CERT_DATE_INVALID |
SECURITY_FLAG_IGNORE_CERT_CN_INVALID;
ret = WinHttpSetOption(req, WINHTTP_OPTION_SECURITY_FLAGS, &flags, sizeof(flags));
- ok(ret, "failed to set security flags %u\n", GetLastError());
+ ok(ret, "failed to set security flags %lu\n", GetLastError());
flags = 0;
ret = WinHttpSetOption(req, WINHTTP_OPTION_SECURITY_FLAGS, &flags, sizeof(flags));
- ok(ret, "failed to set security flags %u\n", GetLastError());
+ ok(ret, "failed to set security flags %lu\n", GetLastError());
ret = WinHttpSetOption(req, WINHTTP_OPTION_CLIENT_CERT_CONTEXT, WINHTTP_NO_CLIENT_CERT_CONTEXT, 0);
err = GetLastError();
- ok(ret || broken(!ret && err == ERROR_INVALID_PARAMETER) /* winxp */, "failed to set client cert context %u\n", err);
+ ok(ret || broken(!ret && err == ERROR_INVALID_PARAMETER) /* winxp */, "failed to set client cert context %lu\n", err);
WinHttpSetStatusCallback(req, cert_error, WINHTTP_CALLBACK_STATUS_SECURE_FAILURE, 0);
@@ -1101,20 +1098,20 @@ static void test_secure_connection(void)
skip("secure connection failed, skipping remaining secure tests\n");
goto cleanup;
}
- ok(ret, "failed to send request %u\n", GetLastError());
+ ok(ret, "failed to send request %lu\n", GetLastError());
size = sizeof(cert);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_SERVER_CERT_CONTEXT, &cert, &size );
- ok(ret, "failed to retrieve certificate context %u\n", GetLastError());
+ ok(ret, "failed to retrieve certificate context %lu\n", GetLastError());
if (ret) CertFreeCertificateContext(cert);
size = sizeof(bitness);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_SECURITY_KEY_BITNESS, &bitness, &size );
- ok(ret, "failed to retrieve key bitness %u\n", GetLastError());
+ ok(ret, "failed to retrieve key bitness %lu\n", GetLastError());
size = sizeof(info);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_SECURITY_CERTIFICATE_STRUCT, &info, &size );
- ok(ret, "failed to retrieve certificate info %u\n", GetLastError());
+ ok(ret, "failed to retrieve certificate info %lu\n", GetLastError());
if (ret)
{
@@ -1123,7 +1120,7 @@ static void test_secure_connection(void)
trace("lpszProtocolName %s\n", wine_dbgstr_w(info.lpszProtocolName));
trace("lpszSignatureAlgName %s\n", wine_dbgstr_w(info.lpszSignatureAlgName));
trace("lpszEncryptionAlgName %s\n", wine_dbgstr_w(info.lpszEncryptionAlgName));
- trace("dwKeySize %u\n", info.dwKeySize);
+ trace("dwKeySize %lu\n", info.dwKeySize);
LocalFree( info.lpszSubjectInfo );
LocalFree( info.lpszIssuerInfo );
}
@@ -1134,18 +1131,18 @@ static void test_secure_connection(void)
skip("connection error, skipping remaining secure tests\n");
goto cleanup;
}
- ok(ret, "failed to receive response %u\n", GetLastError());
+ ok(ret, "failed to receive response %lu\n", GetLastError());
available_size = 0;
ret = WinHttpQueryDataAvailable(req, &available_size);
- ok(ret, "failed to query available data %u\n", GetLastError());
- ok(available_size > 2014, "available_size = %u\n", available_size);
+ ok(ret, "failed to query available data %lu\n", GetLastError());
+ ok(available_size > 2014, "available_size = %lu\n", available_size);
status = 0xdeadbeef;
size = sizeof(status);
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL);
- ok(ret, "failed unexpectedly %u\n", GetLastError());
- ok(status == HTTP_STATUS_OK, "request failed unexpectedly %u\n", status);
+ ok(ret, "failed unexpectedly %lu\n", GetLastError());
+ ok(status == HTTP_STATUS_OK, "request failed unexpectedly %lu\n", status);
size = 0;
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_RAW_HEADERS_CRLF, NULL, NULL, &size, NULL);
@@ -1156,18 +1153,18 @@ static void test_secure_connection(void)
{
size = 0;
ret = WinHttpReadData(req, buffer, sizeof(buffer), &size);
- ok(ret == TRUE, "WinHttpReadData failed: %u.\n", GetLastError());
+ ok(ret == TRUE, "WinHttpReadData failed: %lu\n", GetLastError());
if (!size) break;
read_size += size;
if (read_size <= 32)
ok(!memcmp(buffer, data_start, sizeof(data_start)-1), "not expected: %.32s\n", buffer);
}
- ok(read_size >= available_size, "read_size = %u, available_size = %u\n", read_size, available_size);
+ ok(read_size >= available_size, "read_size = %lu, available_size = %lu\n", read_size, available_size);
size = sizeof(cert);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_SERVER_CERT_CONTEXT, &cert, &size);
- ok(ret, "failed to retrieve certificate context %u\n", GetLastError());
+ ok(ret, "failed to retrieve certificate context %lu\n", GetLastError());
if (ret) CertFreeCertificateContext(cert);
cleanup:
@@ -1184,13 +1181,13 @@ static void test_request_parameter_defaults(void)
BOOL ret;
ses = WinHttpOpen(L"winetest", 0, NULL, NULL, 0);
- ok(ses != NULL, "failed to open session %u\n", GetLastError());
+ ok(ses != NULL, "failed to open session %lu\n", GetLastError());
con = WinHttpConnect(ses, L"test.winehq.org", 0, 0);
- ok(con != NULL, "failed to open a connection %u\n", GetLastError());
+ ok(con != NULL, "failed to open a connection %lu\n", GetLastError());
req = WinHttpOpenRequest(con, NULL, NULL, NULL, NULL, NULL, 0);
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok(req != NULL, "failed to open a request %lu\n", GetLastError());
ret = WinHttpSendRequest(req, NULL, 0, NULL, 0, 0, 0);
error = GetLastError();
@@ -1199,21 +1196,21 @@ static void test_request_parameter_defaults(void)
skip("connection failed, skipping\n");
goto done;
}
- ok(ret, "failed to send request %u\n", GetLastError());
+ ok(ret, "failed to send request %lu\n", GetLastError());
ret = WinHttpReceiveResponse(req, NULL);
- ok(ret, "failed to receive response %u\n", GetLastError());
+ ok(ret, "failed to receive response %lu\n", GetLastError());
status = 0xdeadbeef;
size = sizeof(status);
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL);
- ok(ret, "failed unexpectedly %u\n", GetLastError());
- ok(status == HTTP_STATUS_OK, "request failed unexpectedly %u\n", status);
+ ok(ret, "failed unexpectedly %lu\n", GetLastError());
+ ok(status == HTTP_STATUS_OK, "request failed unexpectedly %lu\n", status);
WinHttpCloseHandle(req);
req = WinHttpOpenRequest(con, L"", L"", L"", NULL, NULL, 0);
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok(req != NULL, "failed to open a request %lu\n", GetLastError());
ret = WinHttpSendRequest(req, NULL, 0, NULL, 0, 0, 0);
error = GetLastError();
@@ -1222,29 +1219,29 @@ static void test_request_parameter_defaults(void)
skip("connection failed, skipping\n");
goto done;
}
- ok(ret, "failed to send request %u\n", GetLastError());
+ ok(ret, "failed to send request %lu\n", GetLastError());
ret = WinHttpReceiveResponse(req, NULL);
- ok(ret, "failed to receive response %u\n", GetLastError());
+ ok(ret, "failed to receive response %lu\n", GetLastError());
size = 0;
SetLastError(0xdeadbeef);
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_VERSION, NULL, NULL, &size, NULL);
error = GetLastError();
ok(!ret, "succeeded unexpectedly\n");
- ok(error == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER, got %u\n", error);
+ ok(error == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER, got %lu\n", error);
version = HeapAlloc(GetProcessHeap(), 0, size);
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_VERSION, NULL, version, &size, NULL);
- ok(ret, "failed unexpectedly %u\n", GetLastError());
- ok(lstrlenW(version) == size / sizeof(WCHAR), "unexpected size %u\n", size);
+ ok(ret, "failed unexpectedly %lu\n", GetLastError());
+ ok(lstrlenW(version) == size / sizeof(WCHAR), "unexpected size %lu\n", size);
HeapFree(GetProcessHeap(), 0, version);
status = 0xdeadbeef;
size = sizeof(status);
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL);
- ok(ret, "failed unexpectedly %u\n", GetLastError());
- ok(status == HTTP_STATUS_OK, "request failed unexpectedly %u\n", status);
+ ok(ret, "failed unexpectedly %lu\n", GetLastError());
+ ok(status == HTTP_STATUS_OK, "request failed unexpectedly %lu\n", status);
done:
WinHttpCloseHandle(req);
@@ -1350,7 +1347,7 @@ static void test_set_default_proxy_config(void)
SetLastError(0xdeadbeef);
ret = WinHttpSetDefaultProxyConfiguration(NULL);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
}
/* test with invalid access type */
@@ -1359,7 +1356,7 @@ static void test_set_default_proxy_config(void)
SetLastError(0xdeadbeef);
ret = WinHttpSetDefaultProxyConfiguration(&info);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
/* at a minimum, the proxy server must be set */
info.dwAccessType = WINHTTP_ACCESS_TYPE_NAMED_PROXY;
@@ -1367,12 +1364,12 @@ static void test_set_default_proxy_config(void)
SetLastError(0xdeadbeef);
ret = WinHttpSetDefaultProxyConfiguration(&info);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
info.lpszProxyBypass = normalString;
SetLastError(0xdeadbeef);
ret = WinHttpSetDefaultProxyConfiguration(&info);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
/* the proxy server can't have wide characters */
info.lpszProxy = wideString;
@@ -1383,7 +1380,7 @@ static void test_set_default_proxy_config(void)
else
ok((!ret && GetLastError() == ERROR_INVALID_PARAMETER) ||
broken(ret), /* Earlier winhttp versions on W2K/XP */
- "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
info.lpszProxy = normalString;
SetLastError(0xdeadbeef);
@@ -1392,9 +1389,9 @@ static void test_set_default_proxy_config(void)
skip("couldn't set default proxy configuration: access denied\n");
else
{
- ok(ret, "WinHttpSetDefaultProxyConfiguration failed: %u\n", GetLastError());
- ok(GetLastError() == ERROR_SUCCESS || broken(GetLastError() == 0xdeadbeef) /* < win7 */,
- "got %u\n", GetLastError());
+ ok(ret, "WinHttpSetDefaultProxyConfiguration failed: %lu\n", GetLastError());
+ ok(GetLastError() == ERROR_SUCCESS || broken(GetLastError() == 0xdeadbeef) /* < win7 */,
+ "got %lu\n", GetLastError());
}
set_default_proxy_reg_value( saved_proxy_settings, len, type );
}
@@ -1406,488 +1403,488 @@ static void test_timeouts(void)
HINTERNET ses, req, con;
ses = WinHttpOpen(L"winetest", 0, NULL, NULL, 0);
- ok(ses != NULL, "failed to open session %u\n", GetLastError());
+ ok(ses != NULL, "failed to open session %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpSetTimeouts(ses, -2, 0, 0, 0);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpSetTimeouts(ses, 0, -2, 0, 0);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpSetTimeouts(ses, 0, 0, -2, 0);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpSetTimeouts(ses, 0, 0, 0, -2);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpSetTimeouts(ses, -1, -1, -1, -1);
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
ok(GetLastError() == ERROR_SUCCESS || broken(GetLastError() == 0xdeadbeef) /* < win7 */,
- "expected ERROR_SUCCESS, got %u\n", GetLastError());
+ "expected ERROR_SUCCESS, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpSetTimeouts(ses, 0, 0, 0, 0);
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpSetTimeouts(ses, 0x0123, 0x4567, 0x89ab, 0xcdef);
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_RESOLVE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0x0123, "Expected 0x0123, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0x0123, "Expected 0x0123, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0x4567, "Expected 0x4567, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0x4567, "Expected 0x4567, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_SEND_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0x89ab, "Expected 0x89ab, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0x89ab, "Expected 0x89ab, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xcdef, "Expected 0xcdef, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xcdef, "Expected 0xcdef, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_RESOLVE_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_RESOLVE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0, "Expected 0, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0, "Expected 0, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0, "Expected 0, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0, "Expected 0, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_SEND_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_SEND_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0, "Expected 0, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0, "Expected 0, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0, "Expected 0, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0, "Expected 0, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xbeefdead;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_RESOLVE_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_RESOLVE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xbeefdead, "Expected 0xbeefdead, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xbeefdead;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xbeefdead, "Expected 0xbeefdead, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xbeefdead;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_SEND_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_SEND_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xbeefdead, "Expected 0xbeefdead, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xbeefdead;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xbeefdead, "Expected 0xbeefdead, got %lu\n", value);
con = WinHttpConnect(ses, L"test.winehq.org", 0, 0);
- ok(con != NULL, "failed to open a connection %u\n", GetLastError());
+ ok(con != NULL, "failed to open a connection %lu\n", GetLastError());
/* Timeout values should match the last one set for session */
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(con, WINHTTP_OPTION_RESOLVE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xbeefdead, "Expected 0xbeefdead, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(con, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xbeefdead, "Expected 0xbeefdead, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(con, WINHTTP_OPTION_SEND_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xbeefdead, "Expected 0xbeefdead, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(con, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xbeefdead, "Expected 0xbeefdead, got %lu\n", value);
SetLastError(0xdeadbeef);
ret = WinHttpSetTimeouts(con, -2, 0, 0, 0);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpSetTimeouts(con, 0, -2, 0, 0);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpSetTimeouts(con, 0, 0, -2, 0);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpSetTimeouts(con, 0, 0, 0, -2);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpSetTimeouts(con, -1, -1, -1, -1);
ok(!ret && GetLastError() == ERROR_WINHTTP_INCORRECT_HANDLE_TYPE,
- "expected ERROR_WINHTTP_INVALID_TYPE, got %u\n", GetLastError());
+ "expected ERROR_WINHTTP_INVALID_TYPE, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpSetTimeouts(con, 0, 0, 0, 0);
ok(!ret && GetLastError() == ERROR_WINHTTP_INCORRECT_HANDLE_TYPE,
- "expected ERROR_WINHTTP_INVALID_TYPE, got %u\n", GetLastError());
+ "expected ERROR_WINHTTP_INVALID_TYPE, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0;
ret = WinHttpSetOption(con, WINHTTP_OPTION_RESOLVE_TIMEOUT, &value, sizeof(value));
ok(!ret && GetLastError() == ERROR_WINHTTP_INCORRECT_HANDLE_TYPE,
- "expected ERROR_WINHTTP_INVALID_TYPE, got %u\n", GetLastError());
+ "expected ERROR_WINHTTP_INVALID_TYPE, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0;
ret = WinHttpSetOption(con, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, sizeof(value));
ok(!ret && GetLastError() == ERROR_WINHTTP_INCORRECT_HANDLE_TYPE,
- "expected ERROR_WINHTTP_INVALID_TYPE, got %u\n", GetLastError());
+ "expected ERROR_WINHTTP_INVALID_TYPE, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0;
ret = WinHttpSetOption(con, WINHTTP_OPTION_SEND_TIMEOUT, &value, sizeof(value));
ok(!ret && GetLastError() == ERROR_WINHTTP_INCORRECT_HANDLE_TYPE,
- "expected ERROR_WINHTTP_INVALID_TYPE, got %u\n", GetLastError());
+ "expected ERROR_WINHTTP_INVALID_TYPE, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0;
ret = WinHttpSetOption(con, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, sizeof(value));
ok(!ret && GetLastError() == ERROR_WINHTTP_INCORRECT_HANDLE_TYPE,
- "expected ERROR_WINHTTP_INVALID_TYPE, got %u\n", GetLastError());
+ "expected ERROR_WINHTTP_INVALID_TYPE, got %lu\n", GetLastError());
/* Changing timeout values for session should affect the values for connection */
SetLastError(0xdeadbeef);
value = 0xdead;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_RESOLVE_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(con, WINHTTP_OPTION_RESOLVE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xdead, "Expected 0xdead, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xdead;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(con, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xdead, "Expected 0xdead, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xdead;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_SEND_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(con, WINHTTP_OPTION_SEND_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xdead, "Expected 0xdead, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xdead;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(con, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xdead, "Expected 0xdead, got %lu\n", value);
req = WinHttpOpenRequest(con, NULL, NULL, NULL, NULL, NULL, 0);
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok(req != NULL, "failed to open a request %lu\n", GetLastError());
/* Timeout values should match the last one set for session */
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_RESOLVE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xdead, "Expected 0xdead, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xdead, "Expected 0xdead, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_SEND_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xdead, "Expected 0xdead, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xdead, "Expected 0xdead, got %lu\n", value);
SetLastError(0xdeadbeef);
ret = WinHttpSetTimeouts(req, -2, 0, 0, 0);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpSetTimeouts(req, 0, -2, 0, 0);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpSetTimeouts(req, 0, 0, -2, 0);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpSetTimeouts(req, 0, 0, 0, -2);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpSetTimeouts(req, -1, -1, -1, -1);
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpSetTimeouts(req, 0, 0, 0, 0);
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpSetTimeouts(req, 0xcdef, 0x89ab, 0x4567, 0x0123);
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_RESOLVE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xcdef, "Expected 0xcdef, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xcdef, "Expected 0xcdef, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0x89ab, "Expected 0x89ab, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0x89ab, "Expected 0x89ab, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_SEND_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0x4567, "Expected 0x4567, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0x4567, "Expected 0x4567, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0x0123, "Expected 0x0123, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0x0123, "Expected 0x0123, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0;
ret = WinHttpSetOption(req, WINHTTP_OPTION_RESOLVE_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_RESOLVE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0, "Expected 0, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0, "Expected 0, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0;
ret = WinHttpSetOption(req, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0, "Expected 0, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0, "Expected 0, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0;
ret = WinHttpSetOption(req, WINHTTP_OPTION_SEND_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_SEND_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0, "Expected 0, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0, "Expected 0, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0;
ret = WinHttpSetOption(req, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0, "Expected 0, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0, "Expected 0, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xbeefdead;
ret = WinHttpSetOption(req, WINHTTP_OPTION_RESOLVE_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_RESOLVE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xbeefdead, "Expected 0xbeefdead, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xbeefdead;
ret = WinHttpSetOption(req, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xbeefdead, "Expected 0xbeefdead, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xbeefdead;
ret = WinHttpSetOption(req, WINHTTP_OPTION_SEND_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_SEND_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xbeefdead, "Expected 0xbeefdead, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xbeefdead;
ret = WinHttpSetOption(req, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xbeefdead, "Expected 0xbeefdead, got %lu\n", value);
/* Changing timeout values for session should not affect the values for a request,
* neither should the other way around.
@@ -1895,162 +1892,162 @@ static void test_timeouts(void)
SetLastError(0xdeadbeef);
value = 0xbeefdead;
ret = WinHttpSetOption(req, WINHTTP_OPTION_RESOLVE_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_RESOLVE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xdead, "Expected 0xdead, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xbeefdead;
ret = WinHttpSetOption(req, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xdead, "Expected 0xdead, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xbeefdead;
ret = WinHttpSetOption(req, WINHTTP_OPTION_SEND_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_SEND_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xdead, "Expected 0xdead, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xbeefdead;
ret = WinHttpSetOption(req, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xdead, "Expected 0xdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xdead, "Expected 0xdead, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xbeef;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_RESOLVE_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_RESOLVE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xbeefdead, "Expected 0xbeefdead, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xbeef;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_CONNECT_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xbeefdead, "Expected 0xbeefdead, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xbeef;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_SEND_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_SEND_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xbeefdead, "Expected 0xbeefdead, got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xbeef;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(DWORD);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_RECEIVE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 0xbeefdead, "Expected 0xbeefdead, got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 0xbeefdead, "Expected 0xbeefdead, got %lu\n", value);
/* response timeout */
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(value);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_RECEIVE_RESPONSE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == ~0u, "got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == ~0u, "got %lu\n", value);
SetLastError(0xdeadbeef);
value = 30000;
ret = WinHttpSetOption(req, WINHTTP_OPTION_RECEIVE_RESPONSE_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(value);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_RECEIVE_RESPONSE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- todo_wine ok(value == 0xbeefdead, "got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ todo_wine ok(value == 0xbeefdead, "got %lu\n", value);
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(value);
ret = WinHttpQueryOption(con, WINHTTP_OPTION_RECEIVE_RESPONSE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == ~0u, "got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == ~0u, "got %lu\n", value);
SetLastError(0xdeadbeef);
value = 30000;
ret = WinHttpSetOption(con, WINHTTP_OPTION_RECEIVE_RESPONSE_TIMEOUT, &value, sizeof(value));
ok(!ret, "expected failure\n");
- ok(GetLastError() == ERROR_WINHTTP_INCORRECT_HANDLE_TYPE, "got %u\n", GetLastError());
+ ok(GetLastError() == ERROR_WINHTTP_INCORRECT_HANDLE_TYPE, "got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(value);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_RECEIVE_RESPONSE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == ~0u, "got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == ~0u, "got %lu\n", value);
SetLastError(0xdeadbeef);
value = 48878;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_RECEIVE_RESPONSE_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(value);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_RECEIVE_RESPONSE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- todo_wine ok(value == 48879, "got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ todo_wine ok(value == 48879, "got %lu\n", value);
SetLastError(0xdeadbeef);
value = 48880;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_RECEIVE_RESPONSE_TIMEOUT, &value, sizeof(value));
- ok(ret, "%u\n", GetLastError());
+ ok(ret, "%lu\n", GetLastError());
SetLastError(0xdeadbeef);
value = 0xdeadbeef;
size = sizeof(value);
ret = WinHttpQueryOption(ses, WINHTTP_OPTION_RECEIVE_RESPONSE_TIMEOUT, &value, &size);
- ok(ret, "%u\n", GetLastError());
- ok(value == 48880, "got %u\n", value);
+ ok(ret, "%lu\n", GetLastError());
+ ok(value == 48880, "got %lu\n", value);
WinHttpCloseHandle(req);
WinHttpCloseHandle(con);
@@ -2066,17 +2063,17 @@ static void test_resolve_timeout(void)
if (! proxy_active())
{
ses = WinHttpOpen(L"winetest", 0, NULL, NULL, 0);
- ok(ses != NULL, "failed to open session %u\n", GetLastError());
+ ok(ses != NULL, "failed to open session %lu\n", GetLastError());
timeout = 10000;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_RESOLVE_TIMEOUT, &timeout, sizeof(timeout));
- ok(ret, "failed to set resolve timeout %u\n", GetLastError());
+ ok(ret, "failed to set resolve timeout %lu\n", GetLastError());
con = WinHttpConnect(ses, L"nxdomain.winehq.org", 0, 0);
- ok(con != NULL, "failed to open a connection %u\n", GetLastError());
+ ok(con != NULL, "failed to open a connection %lu\n", GetLastError());
req = WinHttpOpenRequest(con, NULL, NULL, NULL, NULL, NULL, 0);
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok(req != NULL, "failed to open a request %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpSendRequest(req, NULL, 0, NULL, 0, 0, 0);
@@ -2086,12 +2083,12 @@ static void test_resolve_timeout(void)
goto done;
}
ok(GetLastError() == ERROR_WINHTTP_NAME_NOT_RESOLVED,
- "expected ERROR_WINHTTP_NAME_NOT_RESOLVED got %u\n", GetLastError());
+ "expected ERROR_WINHTTP_NAME_NOT_RESOLVED got %lu\n", GetLastError());
ret = WinHttpReceiveResponse( req, NULL );
ok( !ret && (GetLastError() == ERROR_WINHTTP_INCORRECT_HANDLE_STATE ||
GetLastError() == ERROR_WINHTTP_OPERATION_CANCELLED /* < win7 */),
- "got %u\n", GetLastError() );
+ "got %lu\n", GetLastError() );
WinHttpCloseHandle(req);
WinHttpCloseHandle(con);
@@ -2101,17 +2098,17 @@ static void test_resolve_timeout(void)
skip("Skipping host resolution tests, host resolution performed by proxy\n");
ses = WinHttpOpen(L"winetest", 0, NULL, NULL, 0);
- ok(ses != NULL, "failed to open session %u\n", GetLastError());
+ ok(ses != NULL, "failed to open session %lu\n", GetLastError());
timeout = 10000;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_RESOLVE_TIMEOUT, &timeout, sizeof(timeout));
- ok(ret, "failed to set resolve timeout %u\n", GetLastError());
+ ok(ret, "failed to set resolve timeout %lu\n", GetLastError());
con = WinHttpConnect(ses, L"test.winehq.org", 0, 0);
- ok(con != NULL, "failed to open a connection %u\n", GetLastError());
+ ok(con != NULL, "failed to open a connection %lu\n", GetLastError());
req = WinHttpOpenRequest(con, NULL, NULL, NULL, NULL, NULL, 0);
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok(req != NULL, "failed to open a request %lu\n", GetLastError());
ret = WinHttpSendRequest(req, NULL, 0, NULL, 0, 0, 0);
if (!ret && GetLastError() == ERROR_WINHTTP_CANNOT_CONNECT)
@@ -2489,71 +2486,71 @@ static void test_basic_request(int port, const WCHAR *verb, const WCHAR *path)
BOOL ret;
ses = WinHttpOpen(L"winetest", WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0);
- ok(ses != NULL, "failed to open session %u\n", GetLastError());
+ ok(ses != NULL, "failed to open session %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpSetOption(ses, 0, buffer, sizeof(buffer));
- ok(!ret && GetLastError() == ERROR_WINHTTP_INVALID_OPTION, "got %u\n", GetLastError());
+ ok(!ret && GetLastError() == ERROR_WINHTTP_INVALID_OPTION, "got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpQueryOption(ses, 0, buffer, &size);
- ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "got %u\n", GetLastError());
+ ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "got %lu\n", GetLastError());
con = WinHttpConnect(ses, L"localhost", port, 0);
- ok(con != NULL, "failed to open a connection %u\n", GetLastError());
+ ok(con != NULL, "failed to open a connection %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpSetOption(con, 0, buffer, sizeof(buffer));
- todo_wine ok(!ret && GetLastError() == ERROR_WINHTTP_INVALID_OPTION, "got %u\n", GetLastError());
+ todo_wine ok(!ret && GetLastError() == ERROR_WINHTTP_INVALID_OPTION, "got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpQueryOption(con, 0, buffer, &size);
- ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "got %u\n", GetLastError());
+ ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "got %lu\n", GetLastError());
req = WinHttpOpenRequest(con, verb, path, NULL, NULL, NULL, 0);
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok(req != NULL, "failed to open a request %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpSetOption(req, 0, buffer, sizeof(buffer));
- ok(!ret && GetLastError() == ERROR_WINHTTP_INVALID_OPTION, "got %u\n", GetLastError());
+ ok(!ret && GetLastError() == ERROR_WINHTTP_INVALID_OPTION, "got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpQueryOption(req, 0, buffer, &size);
- ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "got %u\n", GetLastError());
+ ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "got %lu\n", GetLastError());
ret = WinHttpSendRequest(req, NULL, 0, NULL, 0, 0, 0);
- ok(ret, "failed to send request %u\n", GetLastError());
+ ok(ret, "failed to send request %lu\n", GetLastError());
ret = WinHttpReceiveResponse(req, NULL);
- ok(ret, "failed to receive response %u\n", GetLastError());
+ ok(ret, "failed to receive response %lu\n", GetLastError());
status = 0xdeadbeef;
size = sizeof(status);
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL);
- ok(ret, "failed to query status code %u\n", GetLastError());
- ok(status == HTTP_STATUS_OK, "request failed unexpectedly %u\n", status);
+ ok(ret, "failed to query status code %lu\n", GetLastError());
+ ok(status == HTTP_STATUS_OK, "request failed unexpectedly %lu\n", status);
supported = first = target = 0xdeadbeef;
SetLastError(0xdeadbeef);
ret = WinHttpQueryAuthSchemes(req, &supported, &first, &target);
error = GetLastError();
ok(!ret, "unexpected success\n");
- ok(error == ERROR_INVALID_OPERATION, "expected ERROR_INVALID_OPERATION, got %u\n", error);
- ok(supported == 0xdeadbeef, "got %x\n", supported);
- ok(first == 0xdeadbeef, "got %x\n", first);
- ok(target == 0xdeadbeef, "got %x\n", target);
+ ok(error == ERROR_INVALID_OPERATION, "expected ERROR_INVALID_OPERATION, got %lu\n", error);
+ ok(supported == 0xdeadbeef, "got %lu\n", supported);
+ ok(first == 0xdeadbeef, "got %lu\n", first);
+ ok(target == 0xdeadbeef, "got %lu\n", target);
size = sizeof(buffer2);
memset(buffer2, 0, sizeof(buffer2));
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_RAW_HEADERS_CRLF, NULL, buffer2, &size, NULL);
- ok(ret, "failed to query for raw headers: %u\n", GetLastError());
+ ok(ret, "failed to query for raw headers: %lu\n", GetLastError());
ok(!memcmp(buffer2 + lstrlenW(buffer2) - 4, L"\r\n\r\n", sizeof(L"\r\n\r\n")),
"WinHttpQueryHeaders returned invalid end of header string\n");
size = sizeof(buffer2);
memset(buffer2, 0, sizeof(buffer2));
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_RAW_HEADERS, NULL, buffer2, &size, NULL);
- ok(ret, "failed to query for raw headers: %u\n", GetLastError());
+ ok(ret, "failed to query for raw headers: %lu\n", GetLastError());
ok(!memcmp(buffer2 + (size / sizeof(WCHAR)) - 1, L"", sizeof(L"")),
"WinHttpQueryHeaders returned invalid end of header string\n");
ok(buffer2[(size / sizeof(WCHAR)) - 2] != 0, "returned string has too many NULL characters\n");
@@ -2561,7 +2558,7 @@ static void test_basic_request(int port, const WCHAR *verb, const WCHAR *path)
count = 0;
memset(buffer, 0, sizeof(buffer));
ret = WinHttpReadData(req, buffer, sizeof buffer, &count);
- ok(ret, "failed to read data %u\n", GetLastError());
+ ok(ret, "failed to read data %lu\n", GetLastError());
ok(count == sizeof page1 - 1, "count was wrong\n");
ok(!memcmp(buffer, page1, sizeof page1), "http data wrong\n");
@@ -2578,82 +2575,82 @@ static void test_basic_authentication(int port)
BOOL ret;
ses = WinHttpOpen(L"winetest", WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0);
- ok(ses != NULL, "failed to open session %u\n", GetLastError());
+ ok(ses != NULL, "failed to open session %lu\n", GetLastError());
con = WinHttpConnect(ses, L"localhost", port, 0);
- ok(con != NULL, "failed to open a connection %u\n", GetLastError());
+ ok(con != NULL, "failed to open a connection %lu\n", GetLastError());
req = WinHttpOpenRequest(con, NULL, L"/auth", NULL, NULL, NULL, 0);
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok(req != NULL, "failed to open a request %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpQueryAuthSchemes(NULL, NULL, NULL, NULL);
error = GetLastError();
ok(!ret, "expected failure\n");
- ok(error == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %u\n", error);
+ ok(error == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %lu\n", error);
SetLastError(0xdeadbeef);
ret = WinHttpQueryAuthSchemes(req, NULL, NULL, NULL);
error = GetLastError();
ok(!ret, "expected failure\n");
- ok(error == ERROR_INVALID_PARAMETER || error == ERROR_INVALID_OPERATION, "got %u\n", error);
+ ok(error == ERROR_INVALID_PARAMETER || error == ERROR_INVALID_OPERATION, "got %lu\n", error);
supported = 0xdeadbeef;
SetLastError(0xdeadbeef);
ret = WinHttpQueryAuthSchemes(req, &supported, NULL, NULL);
error = GetLastError();
ok(!ret, "expected failure\n");
- ok(error == ERROR_INVALID_PARAMETER || error == ERROR_INVALID_OPERATION, "got %u\n", error);
- ok(supported == 0xdeadbeef, "got %x\n", supported);
+ ok(error == ERROR_INVALID_PARAMETER || error == ERROR_INVALID_OPERATION, "got %lu\n", error);
+ ok(supported == 0xdeadbeef, "got %lu\n", supported);
supported = first = 0xdeadbeef;
SetLastError(0xdeadbeef);
ret = WinHttpQueryAuthSchemes(req, &supported, &first, NULL);
error = GetLastError();
ok(!ret, "expected failure\n");
- ok(error == ERROR_INVALID_PARAMETER || error == ERROR_INVALID_OPERATION, "got %u\n", error);
- ok(supported == 0xdeadbeef, "got %x\n", supported);
- ok(first == 0xdeadbeef, "got %x\n", first);
+ ok(error == ERROR_INVALID_PARAMETER || error == ERROR_INVALID_OPERATION, "got %lu\n", error);
+ ok(supported == 0xdeadbeef, "got %lu\n", supported);
+ ok(first == 0xdeadbeef, "got %lu\n", first);
supported = first = target = 0xdeadbeef;
SetLastError(0xdeadbeef);
ret = WinHttpQueryAuthSchemes(req, &supported, &first, &target);
error = GetLastError();
ok(!ret, "expected failure\n");
- ok(error == ERROR_INVALID_OPERATION, "expected ERROR_INVALID_OPERATION, got %u\n", error);
- ok(supported == 0xdeadbeef, "got %x\n", supported);
- ok(first == 0xdeadbeef, "got %x\n", first);
- ok(target == 0xdeadbeef, "got %x\n", target);
+ ok(error == ERROR_INVALID_OPERATION, "expected ERROR_INVALID_OPERATION, got %lu\n", error);
+ ok(supported == 0xdeadbeef, "got %lu\n", supported);
+ ok(first == 0xdeadbeef, "got %lu\n", first);
+ ok(target == 0xdeadbeef, "got %lu\n", target);
supported = first = target = 0xdeadbeef;
SetLastError(0xdeadbeef);
ret = WinHttpQueryAuthSchemes(NULL, &supported, &first, &target);
error = GetLastError();
ok(!ret, "expected failure\n");
- ok(error == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %u\n", error);
- ok(supported == 0xdeadbeef, "got %x\n", supported);
- ok(first == 0xdeadbeef, "got %x\n", first);
- ok(target == 0xdeadbeef, "got %x\n", target);
+ ok(error == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %lu\n", error);
+ ok(supported == 0xdeadbeef, "got %lu\n", supported);
+ ok(first == 0xdeadbeef, "got %lu\n", first);
+ ok(target == 0xdeadbeef, "got %lu\n", target);
ret = WinHttpSendRequest(req, NULL, 0, NULL, 0, 0, 0);
- ok(ret, "failed to send request %u\n", GetLastError());
+ ok(ret, "failed to send request %lu\n", GetLastError());
ret = WinHttpReceiveResponse(req, NULL);
- ok(ret, "failed to receive response %u\n", GetLastError());
+ ok(ret, "failed to receive response %lu\n", GetLastError());
status = 0xdeadbeef;
size = sizeof(status);
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL);
- ok(ret, "failed to query status code %u\n", GetLastError());
- ok(status == HTTP_STATUS_DENIED, "request failed unexpectedly %u\n", status);
+ ok(ret, "failed to query status code %lu\n", GetLastError());
+ ok(status == HTTP_STATUS_DENIED, "request failed unexpectedly %lu\n", status);
size = 0;
ret = WinHttpReadData(req, buffer, sizeof(buffer), &size);
error = GetLastError();
- ok(ret || broken(error == ERROR_WINHTTP_SHUTDOWN || error == ERROR_WINHTTP_TIMEOUT) /* XP */, "failed to read data %u\n", GetLastError());
+ ok(ret || broken(error == ERROR_WINHTTP_SHUTDOWN || error == ERROR_WINHTTP_TIMEOUT) /* XP */, "failed to read data %lu\n", GetLastError());
if (ret)
{
- ok(size == 12, "expected 12, got %u\n", size);
+ ok(size == 12, "expected 12, got %lu\n", size);
ok(!memcmp(buffer, unauthorized, 12), "got %s\n", buffer);
}
@@ -2661,70 +2658,70 @@ static void test_basic_authentication(int port)
SetLastError(0xdeadbeef);
ret = WinHttpQueryAuthSchemes(req, &supported, &first, &target);
error = GetLastError();
- ok(ret, "failed to query authentication schemes %u\n", error);
- ok(error == ERROR_SUCCESS || broken(error == 0xdeadbeef) /* < win7 */, "expected ERROR_SUCCESS, got %u\n", error);
- ok(supported == WINHTTP_AUTH_SCHEME_BASIC, "got %x\n", supported);
- ok(first == WINHTTP_AUTH_SCHEME_BASIC, "got %x\n", first);
- ok(target == WINHTTP_AUTH_TARGET_SERVER, "got %x\n", target);
+ ok(ret, "failed to query authentication schemes %lu\n", error);
+ ok(error == ERROR_SUCCESS || broken(error == 0xdeadbeef) /* < win7 */, "expected ERROR_SUCCESS, got %lu\n", error);
+ ok(supported == WINHTTP_AUTH_SCHEME_BASIC, "got %lu\n", supported);
+ ok(first == WINHTTP_AUTH_SCHEME_BASIC, "got %lu\n", first);
+ ok(target == WINHTTP_AUTH_TARGET_SERVER, "got %lu\n", target);
SetLastError(0xdeadbeef);
ret = WinHttpSetCredentials(req, WINHTTP_AUTH_TARGET_SERVER, WINHTTP_AUTH_SCHEME_NTLM, NULL, NULL, NULL);
error = GetLastError();
- ok(ret, "failed to set credentials %u\n", error);
- ok(error == ERROR_SUCCESS || broken(error == 0xdeadbeef) /* < win7 */, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(ret, "failed to set credentials %lu\n", error);
+ ok(error == ERROR_SUCCESS || broken(error == 0xdeadbeef) /* < win7 */, "expected ERROR_SUCCESS, got %lu\n", error);
ret = WinHttpSetCredentials(req, WINHTTP_AUTH_TARGET_SERVER, WINHTTP_AUTH_SCHEME_PASSPORT, NULL, NULL, NULL);
- ok(ret, "failed to set credentials %u\n", GetLastError());
+ ok(ret, "failed to set credentials %lu\n", GetLastError());
ret = WinHttpSetCredentials(req, WINHTTP_AUTH_TARGET_SERVER, WINHTTP_AUTH_SCHEME_NEGOTIATE, NULL, NULL, NULL);
- ok(ret, "failed to set credentials %u\n", GetLastError());
+ ok(ret, "failed to set credentials %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpSetCredentials(req, WINHTTP_AUTH_TARGET_SERVER, WINHTTP_AUTH_SCHEME_DIGEST, NULL, NULL, NULL);
error = GetLastError();
ok(!ret, "expected failure\n");
- ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error);
+ ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", error);
SetLastError(0xdeadbeef);
ret = WinHttpSetCredentials(req, WINHTTP_AUTH_TARGET_SERVER, WINHTTP_AUTH_SCHEME_BASIC, NULL, NULL, NULL);
error = GetLastError();
ok(!ret, "expected failure\n");
- ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error);
+ ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", error);
SetLastError(0xdeadbeef);
ret = WinHttpSetCredentials(req, WINHTTP_AUTH_TARGET_SERVER, WINHTTP_AUTH_SCHEME_BASIC, L"user", NULL, NULL);
error = GetLastError();
ok(!ret, "expected failure\n");
- ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error);
+ ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", error);
SetLastError(0xdeadbeef);
ret = WinHttpSetCredentials(req, WINHTTP_AUTH_TARGET_SERVER, WINHTTP_AUTH_SCHEME_BASIC, NULL, L"pwd", NULL);
error = GetLastError();
ok(!ret, "expected failure\n");
- ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error);
+ ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", error);
ret = WinHttpSetCredentials(req, WINHTTP_AUTH_TARGET_SERVER, WINHTTP_AUTH_SCHEME_BASIC, L"user", L"pwd", NULL);
- ok(ret, "failed to set credentials %u\n", GetLastError());
+ ok(ret, "failed to set credentials %lu\n", GetLastError());
ret = WinHttpSendRequest(req, NULL, 0, NULL, 0, 0, 0);
- ok(ret, "failed to send request %u\n", GetLastError());
+ ok(ret, "failed to send request %lu\n", GetLastError());
ret = WinHttpReceiveResponse(req, NULL);
- ok(ret, "failed to receive response %u\n", GetLastError());
+ ok(ret, "failed to receive response %lu\n", GetLastError());
status = 0xdeadbeef;
size = sizeof(status);
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL);
- ok(ret, "failed to query status code %u\n", GetLastError());
- ok(status == HTTP_STATUS_OK, "request failed unexpectedly %u\n", status);
+ ok(ret, "failed to query status code %lu\n", GetLastError());
+ ok(status == HTTP_STATUS_OK, "request failed unexpectedly %lu\n", status);
size = 0;
ret = WinHttpReadData(req, buffer, sizeof(buffer), &size);
error = GetLastError();
- ok(ret || broken(error == ERROR_WINHTTP_SHUTDOWN || error == ERROR_WINHTTP_TIMEOUT) /* XP */, "failed to read data %u\n", GetLastError());
+ ok(ret || broken(error == ERROR_WINHTTP_SHUTDOWN || error == ERROR_WINHTTP_TIMEOUT) /* XP */, "failed to read data %lu\n", GetLastError());
if (ret)
{
- ok(size == 11, "expected 11, got %u\n", size);
+ ok(size == 11, "expected 11, got %lu\n", size);
ok(!memcmp(buffer, hello_world, 11), "got %s\n", buffer);
}
@@ -2734,36 +2731,36 @@ static void test_basic_authentication(int port)
/* now set the credentials first to show that they get sent with the first request */
ses = WinHttpOpen(L"winetest", WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0);
- ok(ses != NULL, "failed to open session %u\n", GetLastError());
+ ok(ses != NULL, "failed to open session %lu\n", GetLastError());
con = WinHttpConnect(ses, L"localhost", port, 0);
- ok(con != NULL, "failed to open a connection %u\n", GetLastError());
+ ok(con != NULL, "failed to open a connection %lu\n", GetLastError());
req = WinHttpOpenRequest(con, NULL, L"/auth_with_creds", NULL, NULL, NULL, 0);
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok(req != NULL, "failed to open a request %lu\n", GetLastError());
ret = WinHttpSetCredentials(req, WINHTTP_AUTH_TARGET_SERVER, WINHTTP_AUTH_SCHEME_BASIC, L"user", L"pwd", NULL);
- ok(ret, "failed to set credentials %u\n", GetLastError());
+ ok(ret, "failed to set credentials %lu\n", GetLastError());
ret = WinHttpSendRequest(req, NULL, 0, NULL, 0, 0, 0);
- ok(ret, "failed to send request %u\n", GetLastError());
+ ok(ret, "failed to send request %lu\n", GetLastError());
ret = WinHttpReceiveResponse(req, NULL);
- ok(ret, "failed to receive response %u\n", GetLastError());
+ ok(ret, "failed to receive response %lu\n", GetLastError());
status = 0xdeadbeef;
size = sizeof(status);
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL);
- ok(ret, "failed to query status code %u\n", GetLastError());
- ok(status == HTTP_STATUS_OK, "request failed unexpectedly %u\n", status);
+ ok(ret, "failed to query status code %lu\n", GetLastError());
+ ok(status == HTTP_STATUS_OK, "request failed unexpectedly %lu\n", status);
size = 0;
ret = WinHttpReadData(req, buffer, sizeof(buffer), &size);
error = GetLastError();
- ok(ret || broken(error == ERROR_WINHTTP_SHUTDOWN || error == ERROR_WINHTTP_TIMEOUT) /* XP */, "failed to read data %u\n", GetLastError());
+ ok(ret || broken(error == ERROR_WINHTTP_SHUTDOWN || error == ERROR_WINHTTP_TIMEOUT) /* XP */, "failed to read data %lu\n", GetLastError());
if (ret)
{
- ok(size == 11, "expected 11, got %u\n", size);
+ ok(size == 11, "expected 11, got %lu\n", size);
ok(!memcmp(buffer, hello_world, 11), "got %s\n", buffer);
}
@@ -2774,68 +2771,68 @@ static void test_basic_authentication(int port)
/* credentials set with WinHttpSetCredentials take precedence over those set through options */
ses = WinHttpOpen(L"winetest", WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0);
- ok(ses != NULL, "failed to open session %u\n", GetLastError());
+ ok(ses != NULL, "failed to open session %lu\n", GetLastError());
con = WinHttpConnect(ses, L"localhost", port, 0);
- ok(con != NULL, "failed to open a connection %u\n", GetLastError());
+ ok(con != NULL, "failed to open a connection %lu\n", GetLastError());
req = WinHttpOpenRequest(con, NULL, L"/auth", NULL, NULL, NULL, 0);
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok(req != NULL, "failed to open a request %lu\n", GetLastError());
ret = WinHttpSetCredentials(req, WINHTTP_AUTH_TARGET_SERVER, WINHTTP_AUTH_SCHEME_BASIC, L"user", L"pwd", NULL);
- ok(ret, "failed to set credentials %u\n", GetLastError());
+ ok(ret, "failed to set credentials %lu\n", GetLastError());
ret = WinHttpSetOption(req, WINHTTP_OPTION_USERNAME, (void *)L"user", lstrlenW(L"user"));
- ok(ret, "failed to set username %u\n", GetLastError());
+ ok(ret, "failed to set username %lu\n", GetLastError());
ret = WinHttpSetOption(req, WINHTTP_OPTION_PASSWORD, (void *)L"pwd2", lstrlenW(L"pwd2"));
- ok(ret, "failed to set password %u\n", GetLastError());
+ ok(ret, "failed to set password %lu\n", GetLastError());
ret = WinHttpSendRequest(req, NULL, 0, NULL, 0, 0, 0);
- ok(ret, "failed to send request %u\n", GetLastError());
+ ok(ret, "failed to send request %lu\n", GetLastError());
ret = WinHttpReceiveResponse(req, NULL);
- ok(ret, "failed to receive response %u\n", GetLastError());
+ ok(ret, "failed to receive response %lu\n", GetLastError());
status = 0xdeadbeef;
size = sizeof(status);
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL);
- ok(ret, "failed to query status code %u\n", GetLastError());
- ok(status == HTTP_STATUS_OK, "request failed unexpectedly %u\n", status);
+ ok(ret, "failed to query status code %lu\n", GetLastError());
+ ok(status == HTTP_STATUS_OK, "request failed unexpectedly %lu\n", status);
WinHttpCloseHandle(req);
WinHttpCloseHandle(con);
WinHttpCloseHandle(ses);
ses = WinHttpOpen(L"winetest", WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0);
- ok(ses != NULL, "failed to open session %u\n", GetLastError());
+ ok(ses != NULL, "failed to open session %lu\n", GetLastError());
con = WinHttpConnect(ses, L"localhost", port, 0);
- ok(con != NULL, "failed to open a connection %u\n", GetLastError());
+ ok(con != NULL, "failed to open a connection %lu\n", GetLastError());
req = WinHttpOpenRequest(con, NULL, L"/auth", NULL, NULL, NULL, 0);
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok(req != NULL, "failed to open a request %lu\n", GetLastError());
ret = WinHttpSetOption(req, WINHTTP_OPTION_USERNAME, (void *)L"user", lstrlenW(L"user"));
- ok(ret, "failed to set username %u\n", GetLastError());
+ ok(ret, "failed to set username %lu\n", GetLastError());
ret = WinHttpSetOption(req, WINHTTP_OPTION_PASSWORD, (void *)L"pwd", lstrlenW(L"pwd"));
- ok(ret, "failed to set password %u\n", GetLastError());
+ ok(ret, "failed to set password %lu\n", GetLastError());
ret = WinHttpSetCredentials(req, WINHTTP_AUTH_TARGET_SERVER, WINHTTP_AUTH_SCHEME_BASIC, L"user", L"pwd2", NULL);
- ok(ret, "failed to set credentials %u\n", GetLastError());
+ ok(ret, "failed to set credentials %lu\n", GetLastError());
ret = WinHttpSendRequest(req, NULL, 0, NULL, 0, 0, 0);
- ok(ret, "failed to send request %u\n", GetLastError());
+ ok(ret, "failed to send request %lu\n", GetLastError());
ret = WinHttpReceiveResponse(req, NULL);
- ok(ret, "failed to receive response %u\n", GetLastError());
+ ok(ret, "failed to receive response %lu\n", GetLastError());
status = 0xdeadbeef;
size = sizeof(status);
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL);
- ok(ret, "failed to query status code %u\n", GetLastError());
- ok(status == HTTP_STATUS_DENIED, "request failed unexpectedly %u\n", status);
+ ok(ret, "failed to query status code %lu\n", GetLastError());
+ ok(status == HTTP_STATUS_DENIED, "request failed unexpectedly %lu\n", status);
WinHttpCloseHandle(req);
WinHttpCloseHandle(con);
@@ -2850,13 +2847,13 @@ static void test_multi_authentication(int port)
BOOL ret;
ses = WinHttpOpen(L"winetest", WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0);
- ok(ses != NULL, "failed to open session %u\n", GetLastError());
+ ok(ses != NULL, "failed to open session %lu\n", GetLastError());
con = WinHttpConnect(ses, L"localhost", port, 0);
- ok(con != NULL, "failed to open a connection %u\n", GetLastError());
+ ok(con != NULL, "failed to open a connection %lu\n", GetLastError());
req = WinHttpOpenRequest(con, L"GET", L"/multiauth", NULL, NULL, NULL, 0);
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok(req != NULL, "failed to open a request %lu\n", GetLastError());
ret = WinHttpSendRequest(req, WINHTTP_NO_ADDITIONAL_HEADERS, 0,
WINHTTP_NO_REQUEST_DATA,0, 0, 0 );
@@ -2868,25 +2865,25 @@ static void test_multi_authentication(int port)
supported = first = target = 0xdeadbeef;
ret = WinHttpQueryAuthSchemes(req, &supported, &first, &target);
ok(ret, "expected success\n");
- ok(supported == (WINHTTP_AUTH_SCHEME_BASIC | WINHTTP_AUTH_SCHEME_NTLM), "got %x\n", supported);
- ok(target == WINHTTP_AUTH_TARGET_SERVER, "got %x\n", target);
- ok(first == WINHTTP_AUTH_SCHEME_BASIC, "got %x\n", first);
+ ok(supported == (WINHTTP_AUTH_SCHEME_BASIC | WINHTTP_AUTH_SCHEME_NTLM), "got %#lx\n", supported);
+ ok(target == WINHTTP_AUTH_TARGET_SERVER, "got %#lx\n", target);
+ ok(first == WINHTTP_AUTH_SCHEME_BASIC, "got %#lx\n", first);
index = 0;
size = sizeof(buf);
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_CUSTOM, L"WWW-Authenticate", buf, &size, &index);
ok(ret, "expected success\n");
ok(!lstrcmpW(buf, L"Bearer"), "buf = %s\n", wine_dbgstr_w(buf));
- ok(size == lstrlenW(buf) * sizeof(WCHAR), "size = %u\n", size);
- ok(index == 1, "index = %u\n", index);
+ ok(size == lstrlenW(buf) * sizeof(WCHAR), "size = %lu\n", size);
+ ok(index == 1, "index = %lu\n", index);
index = 0;
size = 0xdeadbeef;
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_CUSTOM, L"WWW-Authenticate", NULL, &size, &index);
ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER,
- "WinHttpQueryHeaders returned %x(%u)\n", ret, GetLastError());
- ok(size == (lstrlenW(buf) + 1) * sizeof(WCHAR), "size = %u\n", size);
- ok(index == 0, "index = %u\n", index);
+ "WinHttpQueryHeaders returned %d(%lu)\n", ret, GetLastError());
+ ok(size == (lstrlenW(buf) + 1) * sizeof(WCHAR), "size = %lu\n", size);
+ ok(index == 0, "index = %lu\n", index);
WinHttpCloseHandle(req);
WinHttpCloseHandle(con);
@@ -2900,13 +2897,13 @@ static void test_large_data_authentication(int port)
BOOL ret;
ses = WinHttpOpen(L"winetest", WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0);
- ok(ses != NULL, "failed to open session %u\n", GetLastError());
+ ok(ses != NULL, "failed to open session %lu\n", GetLastError());
con = WinHttpConnect(ses, L"localhost", port, 0);
- ok(con != NULL, "failed to open a connection %u\n", GetLastError());
+ ok(con != NULL, "failed to open a connection %lu\n", GetLastError());
req = WinHttpOpenRequest(con, L"GET", L"/largeauth", NULL, NULL, NULL, 0);
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok(req != NULL, "failed to open a request %lu\n", GetLastError());
ret = WinHttpSendRequest(req, WINHTTP_NO_ADDITIONAL_HEADERS, 0, WINHTTP_NO_REQUEST_DATA, 0, 0, 0);
ok(ret, "expected success\n");
@@ -2918,13 +2915,13 @@ static void test_large_data_authentication(int port)
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, NULL,
&status, &size, NULL);
ok(ret, "expected success\n");
- ok(status == HTTP_STATUS_DENIED, "got %d\n", status);
+ ok(status == HTTP_STATUS_DENIED, "got %lu\n", status);
ret = WinHttpSetCredentials(req, WINHTTP_AUTH_TARGET_SERVER, WINHTTP_AUTH_SCHEME_NTLM, L"user", L"pwd", NULL);
ok(ret, "expected success\n");
ret = WinHttpSendRequest(req, WINHTTP_NO_ADDITIONAL_HEADERS, 0, WINHTTP_NO_REQUEST_DATA, 0, 0, 0);
- ok(ret, "expected success %d\n", GetLastError());
+ ok(ret, "expected success %lu\n", GetLastError());
ret = WinHttpReceiveResponse(req, NULL);
ok(ret, "expected success\n");
@@ -2933,7 +2930,7 @@ static void test_large_data_authentication(int port)
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, NULL,
&status, &size, NULL);
ok(ret, "expected success\n");
- ok(status == HTTP_STATUS_OK, "got %d\n", status);
+ ok(status == HTTP_STATUS_OK, "got %lu\n", status);
WinHttpCloseHandle(req);
WinHttpCloseHandle(con);
@@ -2947,19 +2944,19 @@ static void test_no_headers(int port)
BOOL ret;
ses = WinHttpOpen(L"winetest", WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0);
- ok(ses != NULL, "failed to open session %u\n", GetLastError());
+ ok(ses != NULL, "failed to open session %lu\n", GetLastError());
con = WinHttpConnect(ses, L"localhost", port, 0);
- ok(con != NULL, "failed to open a connection %u\n", GetLastError());
+ ok(con != NULL, "failed to open a connection %lu\n", GetLastError());
req = WinHttpOpenRequest(con, NULL, L"/no_headers", NULL, NULL, NULL, 0);
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok(req != NULL, "failed to open a request %lu\n", GetLastError());
ret = WinHttpSendRequest(req, NULL, 0, NULL, 0, 0, 0);
if (!ret)
{
error = GetLastError();
- ok(error == ERROR_WINHTTP_INVALID_SERVER_RESPONSE, "got %u\n", error);
+ ok(error == ERROR_WINHTTP_INVALID_SERVER_RESPONSE, "got %lu\n", error);
}
else
{
@@ -2967,7 +2964,7 @@ static void test_no_headers(int port)
ret = WinHttpReceiveResponse(req, NULL);
error = GetLastError();
ok(!ret, "expected failure\n");
- ok(error == ERROR_WINHTTP_INVALID_SERVER_RESPONSE, "got %u\n", error);
+ ok(error == ERROR_WINHTTP_INVALID_SERVER_RESPONSE, "got %lu\n", error);
}
WinHttpCloseHandle(req);
@@ -2983,13 +2980,13 @@ static void test_no_content(int port)
BOOL ret;
ses = WinHttpOpen(L"winetest", WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0);
- ok(ses != NULL, "failed to open session %u\n", GetLastError());
+ ok(ses != NULL, "failed to open session %lu\n", GetLastError());
con = WinHttpConnect(ses, L"localhost", port, 0);
- ok(con != NULL, "failed to open a connection %u\n", GetLastError());
+ ok(con != NULL, "failed to open a connection %lu\n", GetLastError());
req = WinHttpOpenRequest(con, NULL, L"/no_content", NULL, NULL, NULL, 0);
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok(req != NULL, "failed to open a request %lu\n", GetLastError());
size = 12345;
SetLastError(0xdeadbeef);
@@ -2997,9 +2994,9 @@ static void test_no_content(int port)
todo_wine {
ok(!ret, "expected error\n");
ok(GetLastError() == ERROR_WINHTTP_INCORRECT_HANDLE_STATE,
- "expected ERROR_WINHTTP_INCORRECT_HANDLE_STATE, got 0x%08x\n", GetLastError());
+ "expected ERROR_WINHTTP_INCORRECT_HANDLE_STATE, got %lu\n", GetLastError());
ok(size == 12345 || broken(size == 0) /* Win <= 2003 */,
- "expected 12345, got %u\n", size);
+ "expected 12345, got %lu\n", size);
}
ret = WinHttpSendRequest(req, NULL, 0, NULL, 0, 0, 0);
@@ -3013,7 +3010,7 @@ static void test_no_content(int port)
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER,
NULL, &status, &size, NULL);
ok(ret, "expected success\n");
- ok(status == HTTP_STATUS_NO_CONTENT, "expected status 204, got %d\n", status);
+ ok(status == HTTP_STATUS_NO_CONTENT, "expected status 204, got %lu\n", status);
SetLastError(0xdeadbeef);
size = sizeof(status);
@@ -3021,28 +3018,28 @@ static void test_no_content(int port)
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_CONTENT_LENGTH | WINHTTP_QUERY_FLAG_NUMBER,
NULL, &status, &size, 0);
ok(!ret, "expected no content-length header\n");
- ok(GetLastError() == ERROR_WINHTTP_HEADER_NOT_FOUND, "wrong error %u\n", GetLastError());
- ok(status == 12345, "expected 0, got %d\n", status);
+ ok(GetLastError() == ERROR_WINHTTP_HEADER_NOT_FOUND, "wrong error %lu\n", GetLastError());
+ ok(status == 12345, "expected 0, got %lu\n", status);
SetLastError(0xdeadbeef);
size = 12345;
ret = WinHttpQueryDataAvailable(req, &size);
ok(ret, "expected success\n");
ok(GetLastError() == ERROR_SUCCESS || broken(GetLastError() == 0xdeadbeef) /* < win7 */,
- "wrong error %u\n", GetLastError());
- ok(!size, "expected 0, got %u\n", size);
+ "wrong error %lu\n", GetLastError());
+ ok(!size, "expected 0, got %lu\n", size);
SetLastError(0xdeadbeef);
ret = WinHttpReadData(req, buf, len, &bytes_read);
ok(ret, "expected success\n");
ok(GetLastError() == ERROR_SUCCESS || broken(GetLastError() == 0xdeadbeef) /* < win7 */,
- "wrong error %u\n", GetLastError());
- ok(!bytes_read, "expected 0, got %u\n", bytes_read);
+ "wrong error %lu\n", GetLastError());
+ ok(!bytes_read, "expected 0, got %lu\n", bytes_read);
size = 12345;
ret = WinHttpQueryDataAvailable(req, &size);
ok(ret, "expected success\n");
- ok(size == 0, "expected 0, got %d\n", size);
+ ok(size == 0, "expected 0, got %lu\n", size);
WinHttpCloseHandle(req);
@@ -3050,9 +3047,8 @@ static void test_no_content(int port)
SetLastError(0xdeadbeef);
ret = WinHttpQueryDataAvailable(req, &size);
ok(!ret, "expected error\n");
- ok(GetLastError() == ERROR_INVALID_HANDLE,
- "expected ERROR_INVALID_HANDLE, got 0x%08x\n", GetLastError());
- ok(size == 12345, "expected 12345, got %u\n", size);
+ ok(GetLastError() == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %#lx\n", GetLastError());
+ ok(size == 12345, "expected 12345, got %lu\n", size);
WinHttpCloseHandle(con);
WinHttpCloseHandle(ses);
@@ -3066,49 +3062,49 @@ static void test_head_request(int port)
BOOL ret;
ses = WinHttpOpen(L"winetest", WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0);
- ok(ses != NULL, "failed to open session %u\n", GetLastError());
+ ok(ses != NULL, "failed to open session %lu\n", GetLastError());
con = WinHttpConnect(ses, L"localhost", port, 0);
- ok(con != NULL, "failed to open a connection %u\n", GetLastError());
+ ok(con != NULL, "failed to open a connection %lu\n", GetLastError());
req = WinHttpOpenRequest(con, L"HEAD", L"/head", NULL, NULL, NULL, 0);
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok(req != NULL, "failed to open a request %lu\n", GetLastError());
ret = WinHttpSendRequest(req, NULL, 0, NULL, 0, 0, 0);
- ok(ret, "failed to send request %u\n", GetLastError());
+ ok(ret, "failed to send request %lu\n", GetLastError());
ret = WinHttpReceiveResponse(req, NULL);
- ok(ret, "failed to receive response %u\n", GetLastError());
+ ok(ret, "failed to receive response %lu\n", GetLastError());
status = 0xdeadbeef;
size = sizeof(status);
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER,
NULL, &status, &size, NULL);
- ok(ret, "failed to get status code %u\n", GetLastError());
- ok(status == HTTP_STATUS_OK, "got %u\n", status);
+ ok(ret, "failed to get status code %lu\n", GetLastError());
+ ok(status == HTTP_STATUS_OK, "got %lu\n", status);
len = 0xdeadbeef;
size = sizeof(len);
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_CONTENT_LENGTH | WINHTTP_QUERY_FLAG_NUMBER,
NULL, &len, &size, 0);
- ok(ret, "failed to get content-length header %u\n", GetLastError());
- ok(len == HTTP_STATUS_CONTINUE, "got %u\n", len);
+ ok(ret, "failed to get content-length header %lu\n", GetLastError());
+ ok(len == HTTP_STATUS_CONTINUE, "got %lu\n", len);
count = 0xdeadbeef;
ret = WinHttpQueryDataAvailable(req, &count);
- ok(ret, "failed to query data available %u\n", GetLastError());
- ok(!count, "got %u\n", count);
+ ok(ret, "failed to query data available %lu\n", GetLastError());
+ ok(!count, "got %lu\n", count);
len = sizeof(buf);
count = 0xdeadbeef;
ret = WinHttpReadData(req, buf, len, &count);
- ok(ret, "failed to read data %u\n", GetLastError());
- ok(!count, "got %u\n", count);
+ ok(ret, "failed to read data %lu\n", GetLastError());
+ ok(!count, "got %lu\n", count);
count = 0xdeadbeef;
ret = WinHttpQueryDataAvailable(req, &count);
- ok(ret, "failed to query data available %u\n", GetLastError());
- ok(!count, "got %u\n", count);
+ ok(ret, "failed to query data available %lu\n", GetLastError());
+ ok(!count, "got %lu\n", count);
WinHttpCloseHandle(req);
WinHttpCloseHandle(con);
@@ -3123,37 +3119,37 @@ static void test_redirect(int port)
BOOL ret;
ses = WinHttpOpen(L"winetest", WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0);
- ok(ses != NULL, "failed to open session %u\n", GetLastError());
+ ok(ses != NULL, "failed to open session %lu\n", GetLastError());
con = WinHttpConnect(ses, L"localhost", port, 0);
- ok(con != NULL, "failed to open a connection %u\n", GetLastError());
+ ok(con != NULL, "failed to open a connection %lu\n", GetLastError());
req = WinHttpOpenRequest(con, L"POST", L"/redirect", NULL, NULL, NULL, 0);
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok(req != NULL, "failed to open a request %lu\n", GetLastError());
ret = WinHttpSendRequest(req, NULL, 0, (void *)"data", sizeof("data"), sizeof("data"), 0);
- ok(ret, "failed to send request %u\n", GetLastError());
+ ok(ret, "failed to send request %lu\n", GetLastError());
ret = WinHttpReceiveResponse(req, NULL);
- ok(ret, "failed to receive response %u\n", GetLastError());
+ ok(ret, "failed to receive response %lu\n", GetLastError());
status = 0xdeadbeef;
size = sizeof(status);
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER,
NULL, &status, &size, NULL);
- ok(ret, "failed to get status code %u\n", GetLastError());
- ok(status == HTTP_STATUS_OK, "got %u\n", status);
+ ok(ret, "failed to get status code %lu\n", GetLastError());
+ ok(status == HTTP_STATUS_OK, "got %lu\n", status);
count = 0;
ret = WinHttpQueryDataAvailable(req, &count);
- ok(ret, "failed to query data available %u\n", GetLastError());
- ok(count == 128, "got %u\n", count);
+ ok(ret, "failed to query data available %lu\n", GetLastError());
+ ok(count == 128, "got %lu\n", count);
len = sizeof(buf);
count = 0;
ret = WinHttpReadData(req, buf, len, &count);
- ok(ret, "failed to read data %u\n", GetLastError());
- ok(count == 128, "got %u\n", count);
+ ok(ret, "failed to read data %lu\n", GetLastError());
+ ok(count == 128, "got %lu\n", count);
WinHttpCloseHandle(req);
WinHttpCloseHandle(con);
@@ -3178,30 +3174,30 @@ static void test_websocket(int port)
}
session = WinHttpOpen(L"winetest", 0, NULL, NULL, 0);
- ok(session != NULL, "got %u\n", GetLastError());
+ ok(session != NULL, "got %lu\n", GetLastError());
connection = WinHttpConnect(session, L"localhost", port, 0);
- ok(connection != NULL, "got %u\n", GetLastError());
+ ok(connection != NULL, "got %lu\n", GetLastError());
request = WinHttpOpenRequest(connection, L"GET", L"/websocket", NULL, NULL, NULL, 0);
- ok(request != NULL, "got %u\n", GetLastError());
+ ok(request != NULL, "got %lu\n", GetLastError());
ret = WinHttpSetOption(request, WINHTTP_OPTION_UPGRADE_TO_WEB_SOCKET, NULL, 0);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
size = sizeof(header);
SetLastError(0xdeadbeef);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_UPGRADE, NULL, &header, &size, NULL);
error = GetLastError();
ok(!ret, "success\n");
- todo_wine ok(error == ERROR_WINHTTP_INCORRECT_HANDLE_STATE, "got %u\n", error);
+ todo_wine ok(error == ERROR_WINHTTP_INCORRECT_HANDLE_STATE, "got %lu\n", error);
size = sizeof(header);
SetLastError(0xdeadbeef);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CONNECTION, NULL, &header, &size, NULL);
error = GetLastError();
ok(!ret, "success\n");
- todo_wine ok(error == ERROR_WINHTTP_INCORRECT_HANDLE_STATE, "got %u\n", error);
+ todo_wine ok(error == ERROR_WINHTTP_INCORRECT_HANDLE_STATE, "got %lu\n", error);
index = 0;
size = sizeof(buf);
@@ -3210,7 +3206,7 @@ static void test_websocket(int port)
L"Sec-WebSocket-Key", buf, &size, &index);
error = GetLastError();
ok(!ret, "success\n");
- ok(error == ERROR_WINHTTP_HEADER_NOT_FOUND, "got %u\n", error);
+ ok(error == ERROR_WINHTTP_HEADER_NOT_FOUND, "got %lu\n", error);
index = 0;
size = sizeof(buf);
@@ -3219,65 +3215,65 @@ static void test_websocket(int port)
L"Sec-WebSocket-Version", buf, &size, &index);
error = GetLastError();
ok(!ret, "success\n");
- ok(error == ERROR_WINHTTP_HEADER_NOT_FOUND, "got %u\n", error);
+ ok(error == ERROR_WINHTTP_HEADER_NOT_FOUND, "got %lu\n", error);
ret = WinHttpSendRequest(request, NULL, 0, NULL, 0, 0, 0);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
size = sizeof(header);
SetLastError(0xdeadbeef);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_UPGRADE, NULL, &header, &size, NULL);
error = GetLastError();
ok(!ret, "success\n");
- todo_wine ok(error == ERROR_WINHTTP_INCORRECT_HANDLE_STATE, "got %u\n", error);
+ todo_wine ok(error == ERROR_WINHTTP_INCORRECT_HANDLE_STATE, "got %lu\n", error);
size = sizeof(header);
SetLastError(0xdeadbeef);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CONNECTION, NULL, &header, &size, NULL);
error = GetLastError();
ok(!ret, "success\n");
- todo_wine ok(error == ERROR_WINHTTP_INCORRECT_HANDLE_STATE, "got %u\n", error);
+ todo_wine ok(error == ERROR_WINHTTP_INCORRECT_HANDLE_STATE, "got %lu\n", error);
index = 0;
buf[0] = 0;
size = sizeof(buf);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"Sec-WebSocket-Key", buf, &size, &index);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
index = 0;
buf[0] = 0;
size = sizeof(buf);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"Sec-WebSocket-Version", buf, &size, &index);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
ret = WinHttpReceiveResponse(request, NULL);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
count = 0xdeadbeef;
ret = WinHttpQueryDataAvailable(request, &count);
- ok(ret, "got %u\n", GetLastError());
- ok(!count, "got %u\n", count);
+ ok(ret, "got %lu\n", GetLastError());
+ ok(!count, "got %lu\n", count);
header[0] = 0;
size = sizeof(header);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_UPGRADE, NULL, &header, &size, NULL);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
ok(!wcscmp( header, L"websocket" ), "got %s\n", wine_dbgstr_w(header));
header[0] = 0;
size = sizeof(header);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CONNECTION, NULL, &header, &size, NULL);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
ok(!wcscmp( header, L"Upgrade" ), "got %s\n", wine_dbgstr_w(header));
status = 0xdeadbeef;
size = sizeof(status);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, NULL, &status,
&size, NULL);
- ok(ret, "got %u\n", GetLastError());
- ok(status == HTTP_STATUS_SWITCH_PROTOCOLS, "got %u\n", status);
+ ok(ret, "got %lu\n", GetLastError());
+ ok(status == HTTP_STATUS_SWITCH_PROTOCOLS, "got %lu\n", status);
len = 0xdeadbeef;
size = sizeof(len);
@@ -3288,191 +3284,191 @@ static void test_websocket(int port)
index = 0;
size = sizeof(buf);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM, L"Sec-WebSocket-Accept", buf, &size, &index);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
socket = pWinHttpWebSocketCompleteUpgrade(request, 0);
- ok(socket != NULL, "got %u\n", GetLastError());
+ ok(socket != NULL, "got %lu\n", GetLastError());
size = sizeof(header);
ret = WinHttpQueryHeaders(socket, WINHTTP_QUERY_UPGRADE, NULL, &header, &size, NULL);
error = GetLastError();
ok(!ret, "success\n");
- ok(error == ERROR_WINHTTP_INCORRECT_HANDLE_TYPE, "got %u\n", error);
+ ok(error == ERROR_WINHTTP_INCORRECT_HANDLE_TYPE, "got %lu\n", error);
header[0] = 0;
size = sizeof(header);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_UPGRADE, NULL, &header, &size, NULL);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
ok(!wcscmp( header, L"websocket" ), "got %s\n", wine_dbgstr_w(header));
header[0] = 0;
size = sizeof(header);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CONNECTION, NULL, &header, &size, NULL);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
ok(!wcscmp( header, L"Upgrade" ), "got %s\n", wine_dbgstr_w(header));
index = 0;
size = sizeof(buf);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM, L"Sec-WebSocket-Accept", buf, &size, &index);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
/* sending request again generates new key */
ret = WinHttpSendRequest(request, NULL, 0, NULL, 0, 0, 0);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
/* and creates a new websocket */
socket2 = pWinHttpWebSocketCompleteUpgrade(request, 0);
- ok(socket2 != NULL, "got %u\n", GetLastError());
+ ok(socket2 != NULL, "got %lu\n", GetLastError());
ok(socket2 != socket, "got same socket\n");
WinHttpCloseHandle(connection);
/* request handle is still valid */
size = sizeof(ctx);
ret = WinHttpQueryOption(request, WINHTTP_OPTION_CONTEXT_VALUE, &ctx, &size);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
ret = WinHttpCloseHandle(socket2);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
ret = WinHttpCloseHandle(socket);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
ret = WinHttpQueryOption(request, WINHTTP_OPTION_CONTEXT_VALUE, &ctx, &size);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
ret = WinHttpCloseHandle(session);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
ret = WinHttpQueryOption(request, WINHTTP_OPTION_CONTEXT_VALUE, &ctx, &size);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
ret = WinHttpCloseHandle(request);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
session = WinHttpOpen(L"winetest", 0, NULL, NULL, 0);
- ok(session != NULL, "got %u\n", GetLastError());
+ ok(session != NULL, "got %lu\n", GetLastError());
connection = WinHttpConnect(session, L"ws.ifelse.io", 0, 0);
- ok(connection != NULL, "got %u\n", GetLastError());
+ ok(connection != NULL, "got %lu\n", GetLastError());
request = WinHttpOpenRequest(connection, L"GET", L"/", NULL, NULL, NULL, 0);
- ok(request != NULL, "got %u\n", GetLastError());
+ ok(request != NULL, "got %lu\n", GetLastError());
ret = WinHttpSetOption(request, WINHTTP_OPTION_UPGRADE_TO_WEB_SOCKET, NULL, 0);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
ret = WinHttpSendRequest(request, NULL, 0, NULL, 0, 0, 0);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
ret = WinHttpReceiveResponse(request, NULL);
- ok(ret, "got %u\n", GetLastError());
+ ok(ret, "got %lu\n", GetLastError());
status = 0xdeadbeef;
size = sizeof(status);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, NULL, &status,
&size, NULL);
- ok(ret, "got %u\n", GetLastError());
- ok(status == HTTP_STATUS_SWITCH_PROTOCOLS, "got %u\n", status);
+ ok(ret, "got %lu\n", GetLastError());
+ ok(status == HTTP_STATUS_SWITCH_PROTOCOLS, "got %lu\n", status);
socket = pWinHttpWebSocketCompleteUpgrade(request, 0);
- ok(socket != NULL, "got %u\n", GetLastError());
+ ok(socket != NULL, "got %lu\n", GetLastError());
buf[0] = 0;
count = 0;
type = 0xdeadbeef;
error = pWinHttpWebSocketReceive(socket, buf, sizeof(buf), &count, &type);
- ok(!error, "got %u\n", error);
+ ok(!error, "got %lu\n", error);
ok(buf[0] == 'R', "got %c\n", buf[0]);
- ok(count == 26, "got %u\n", count);
+ ok(count == 26, "got %lu\n", count);
ok(type == WINHTTP_WEB_SOCKET_UTF8_MESSAGE_BUFFER_TYPE, "got %u\n", type);
error = pWinHttpWebSocketSend(socket, WINHTTP_WEB_SOCKET_BINARY_MESSAGE_BUFFER_TYPE, NULL, 1);
- ok(error == ERROR_INVALID_PARAMETER, "got %u\n", error);
+ ok(error == ERROR_INVALID_PARAMETER, "got %lu\n", error);
large_buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(buf) * 2);
memcpy(large_buf, "hello", sizeof("hello"));
memcpy(large_buf + sizeof(buf), "world", sizeof("world"));
error = pWinHttpWebSocketSend(socket, WINHTTP_WEB_SOCKET_BINARY_MESSAGE_BUFFER_TYPE, large_buf, sizeof(buf) * 2);
- ok(!error, "got %u\n", error);
+ ok(!error, "got %lu\n", error);
HeapFree(GetProcessHeap(), 0, large_buf);
error = pWinHttpWebSocketReceive(socket, NULL, 0, NULL, NULL);
- ok(error == ERROR_INVALID_PARAMETER, "got %u\n", error);
+ ok(error == ERROR_INVALID_PARAMETER, "got %lu\n", error);
error = pWinHttpWebSocketReceive(socket, buf, 0, NULL, NULL);
- ok(error == ERROR_INVALID_PARAMETER, "got %u\n", error);
+ ok(error == ERROR_INVALID_PARAMETER, "got %lu\n", error);
error = pWinHttpWebSocketReceive(socket, NULL, 1, NULL, NULL);
- ok(error == ERROR_INVALID_PARAMETER, "got %u\n", error);
+ ok(error == ERROR_INVALID_PARAMETER, "got %lu\n", error);
buf[0] = 0;
count = 0;
type = 0xdeadbeef;
error = pWinHttpWebSocketReceive(socket, buf, sizeof(buf), &count, &type);
- ok(!error, "got %u\n", error);
+ ok(!error, "got %lu\n", error);
ok(buf[0] == 'h', "got %c\n", buf[0]);
- ok(count == sizeof(buf), "got %u\n", count);
+ ok(count == sizeof(buf), "got %lu\n", count);
ok(type == WINHTTP_WEB_SOCKET_BINARY_FRAGMENT_BUFFER_TYPE, "got %u\n", type);
buf[0] = 0;
count = 0;
type = 0xdeadbeef;
error = pWinHttpWebSocketReceive(socket, buf, sizeof(buf), &count, &type);
- ok(!error, "got %u\n", error);
+ ok(!error, "got %lu\n", error);
ok(buf[0] == 'w', "got %c\n", buf[0]);
- ok(count == sizeof(buf), "got %u\n", count);
+ ok(count == sizeof(buf), "got %lu\n", count);
ok(type == WINHTTP_WEB_SOCKET_BINARY_MESSAGE_BUFFER_TYPE, "got %u\n", type);
error = pWinHttpWebSocketShutdown(socket, WINHTTP_WEB_SOCKET_SUCCESS_CLOSE_STATUS, NULL, 1);
- ok(error == ERROR_INVALID_PARAMETER, "got %u\n", error);
+ ok(error == ERROR_INVALID_PARAMETER, "got %lu\n", error);
error = pWinHttpWebSocketShutdown(socket, WINHTTP_WEB_SOCKET_SUCCESS_CLOSE_STATUS, buf, sizeof(buf));
- ok(error == ERROR_INVALID_PARAMETER, "got %u\n", error);
+ ok(error == ERROR_INVALID_PARAMETER, "got %lu\n", error);
error = pWinHttpWebSocketShutdown(socket, WINHTTP_WEB_SOCKET_SUCCESS_CLOSE_STATUS, (void *)"success",
sizeof("success"));
- ok(!error, "got %u\n", error);
+ ok(!error, "got %lu\n", error);
error = pWinHttpWebSocketClose(socket, WINHTTP_WEB_SOCKET_SUCCESS_CLOSE_STATUS, NULL, 1);
- ok(error == ERROR_INVALID_PARAMETER, "got %u\n", error);
+ ok(error == ERROR_INVALID_PARAMETER, "got %lu\n", error);
error = pWinHttpWebSocketClose(socket, WINHTTP_WEB_SOCKET_SUCCESS_CLOSE_STATUS, buf, sizeof(buf));
- ok(error == ERROR_INVALID_PARAMETER, "got %u\n", error);
+ ok(error == ERROR_INVALID_PARAMETER, "got %lu\n", error);
error = pWinHttpWebSocketClose(socket, WINHTTP_WEB_SOCKET_SUCCESS_CLOSE_STATUS, (void *)"success2",
sizeof("success2"));
- ok(!error, "got %u\n", error);
+ ok(!error, "got %lu\n", error);
error = pWinHttpWebSocketQueryCloseStatus(socket, NULL, NULL, 0, NULL);
- ok(error == ERROR_INVALID_PARAMETER, "got %u\n", error);
+ ok(error == ERROR_INVALID_PARAMETER, "got %lu\n", error);
error = pWinHttpWebSocketQueryCloseStatus(socket, &close_status, NULL, 0, NULL);
- ok(error == ERROR_INVALID_PARAMETER, "got %u\n", error);
+ ok(error == ERROR_INVALID_PARAMETER, "got %lu\n", error);
error = pWinHttpWebSocketQueryCloseStatus(socket, &close_status, buf, 0, NULL);
- ok(error == ERROR_INVALID_PARAMETER, "got %u\n", error);
+ ok(error == ERROR_INVALID_PARAMETER, "got %lu\n", error);
error = pWinHttpWebSocketQueryCloseStatus(socket, &close_status, buf, sizeof(buf), NULL);
- ok(error == ERROR_INVALID_PARAMETER, "got %u\n", error);
+ ok(error == ERROR_INVALID_PARAMETER, "got %lu\n", error);
error = pWinHttpWebSocketQueryCloseStatus(socket, NULL, NULL, 0, &len);
- ok(error == ERROR_INVALID_PARAMETER, "got %u\n", error);
+ ok(error == ERROR_INVALID_PARAMETER, "got %lu\n", error);
len = 0xdeadbeef;
error = pWinHttpWebSocketQueryCloseStatus(socket, &close_status, NULL, 0, &len);
- ok(!error, "got %u\n", error);
- ok(!len, "got %u\n", len);
+ ok(!error, "got %lu\n", error);
+ ok(!len, "got %lu\n", len);
error = pWinHttpWebSocketQueryCloseStatus(socket, &close_status, NULL, 1, &len);
- ok(error == ERROR_INVALID_PARAMETER, "got %u\n", error);
+ ok(error == ERROR_INVALID_PARAMETER, "got %lu\n", error);
close_status = 0xdead;
len = 0xdeadbeef;
memset(buf, 0, sizeof(buf));
error = pWinHttpWebSocketQueryCloseStatus(socket, &close_status, buf, sizeof(buf), &len);
- ok(!error, "got %u\n", error);
- ok(close_status == 1000, "got %08x\n", close_status);
- ok(!len, "got %u\n", len);
+ ok(!error, "got %lu\n", error);
+ ok(close_status == 1000, "got %d\n", close_status);
+ ok(!len, "got %lu\n", len);
WinHttpCloseHandle(socket);
WinHttpCloseHandle(request);
@@ -3494,44 +3490,44 @@ static void test_not_modified(int port)
session = WinHttpOpen(L"winetest", WINHTTP_ACCESS_TYPE_NO_PROXY,
WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0);
- ok(session != NULL, "WinHttpOpen failed: %u\n", GetLastError());
+ ok(session != NULL, "WinHttpOpen failed: %lu\n", GetLastError());
connection = WinHttpConnect(session, L"localhost", port, 0);
- ok(connection != NULL, "WinHttpConnect failed: %u\n", GetLastError());
+ ok(connection != NULL, "WinHttpConnect failed: %lu\n", GetLastError());
request = WinHttpOpenRequest(connection, NULL, L"/not_modified", NULL, WINHTTP_NO_REFERER,
WINHTTP_DEFAULT_ACCEPT_TYPES, WINHTTP_FLAG_BYPASS_PROXY_CACHE);
- ok(request != NULL, "WinHttpOpenrequest failed: %u\n", GetLastError());
+ ok(request != NULL, "WinHttpOpenrequest failed: %lu\n", GetLastError());
ret = WinHttpSendRequest(request, today, 0, NULL, 0, 0, 0);
- ok(ret, "WinHttpSendRequest failed: %u\n", GetLastError());
+ ok(ret, "WinHttpSendRequest failed: %lu\n", GetLastError());
ret = WinHttpReceiveResponse(request, NULL);
- ok(ret, "WinHttpReceiveResponse failed: %u\n", GetLastError());
+ ok(ret, "WinHttpReceiveResponse failed: %lu\n", GetLastError());
index = 0;
len = sizeof(buffer);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_CUSTOM | WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"If-Modified-Since", buffer, &len, &index);
- ok(ret, "failed to get header %u\n", GetLastError());
+ ok(ret, "failed to get header %lu\n", GetLastError());
status = 0xdeadbeef;
size = sizeof(status);
ret = WinHttpQueryHeaders(request, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER,
NULL, &status, &size, NULL);
- ok(ret, "WinHttpQueryHeaders failed: %u\n", GetLastError());
- ok(status == HTTP_STATUS_NOT_MODIFIED, "got %u\n", status);
+ ok(ret, "WinHttpQueryHeaders failed: %lu\n", GetLastError());
+ ok(status == HTTP_STATUS_NOT_MODIFIED, "got %lu\n", status);
size = 0xdeadbeef;
ret = WinHttpQueryDataAvailable(request, &size);
- ok(ret, "WinHttpQueryDataAvailable failed: %u\n", GetLastError());
- ok(!size, "got %u\n", size);
+ ok(ret, "WinHttpQueryDataAvailable failed: %lu\n", GetLastError());
+ ok(!size, "got %lu\n", size);
WinHttpCloseHandle(request);
WinHttpCloseHandle(connection);
WinHttpCloseHandle(session);
start = GetTickCount() - start;
- ok(start <= 2000, "Expected less than 2 seconds for the test, got %u ms\n", start);
+ ok(start <= 2000, "Expected less than 2 seconds for the test, got %lu ms\n", start);
}
static void test_bad_header( int port )
@@ -3542,34 +3538,34 @@ static void test_bad_header( int port )
BOOL ret;
ses = WinHttpOpen( L"winetest", WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0 );
- ok( ses != NULL, "failed to open session %u\n", GetLastError() );
+ ok( ses != NULL, "failed to open session %lu\n", GetLastError() );
con = WinHttpConnect( ses, L"localhost", port, 0 );
- ok( con != NULL, "failed to open a connection %u\n", GetLastError() );
+ ok( con != NULL, "failed to open a connection %lu\n", GetLastError() );
req = WinHttpOpenRequest( con, NULL, NULL, NULL, NULL, NULL, 0 );
- ok( req != NULL, "failed to open a request %u\n", GetLastError() );
+ ok( req != NULL, "failed to open a request %lu\n", GetLastError() );
ret = WinHttpAddRequestHeaders( req, L"Content-Type: text/html\n\rContent-Length:6\rCookie:111", ~0u, WINHTTP_ADDREQ_FLAG_ADD );
- ok( ret, "failed to add header %u\n", GetLastError() );
+ ok( ret, "failed to add header %lu\n", GetLastError() );
index = 0;
buffer[0] = 0;
len = sizeof(buffer);
ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_CUSTOM|WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"Content-Type", buffer, &len, &index );
- ok( ret, "failed to query headers %u\n", GetLastError() );
+ ok( ret, "failed to query headers %lu\n", GetLastError() );
ok( !lstrcmpW( buffer, L"text/html" ), "got %s\n", wine_dbgstr_w(buffer) );
- ok( index == 1, "index = %u\n", index );
+ ok( index == 1, "index = %lu\n", index );
index = 0;
buffer[0] = 0;
len = sizeof(buffer);
ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_CUSTOM|WINHTTP_QUERY_FLAG_REQUEST_HEADERS,
L"Cookie", buffer, &len, &index );
- ok( ret, "failed to query headers %u\n", GetLastError() );
+ ok( ret, "failed to query headers %lu\n", GetLastError() );
ok( !lstrcmpW( buffer, L"111" ), "got %s\n", wine_dbgstr_w(buffer) );
- ok( index == 1, "index = %u\n", index );
+ ok( index == 1, "index = %lu\n", index );
WinHttpCloseHandle( req );
WinHttpCloseHandle( con );
@@ -3583,16 +3579,16 @@ static void test_multiple_reads(int port)
BOOL ret;
ses = WinHttpOpen(L"winetest", WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0);
- ok(ses != NULL, "failed to open session %u\n", GetLastError());
+ ok(ses != NULL, "failed to open session %lu\n", GetLastError());
con = WinHttpConnect(ses, L"localhost", port, 0);
- ok(con != NULL, "failed to open a connection %u\n", GetLastError());
+ ok(con != NULL, "failed to open a connection %lu\n", GetLastError());
req = WinHttpOpenRequest(con, NULL, L"big", NULL, NULL, NULL, 0);
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok(req != NULL, "failed to open a request %lu\n", GetLastError());
ret = WinHttpSendRequest(req, NULL, 0, NULL, 0, 0, 0);
- ok(ret, "failed to send request %u\n", GetLastError());
+ ok(ret, "failed to send request %lu\n", GetLastError());
ret = WinHttpReceiveResponse(req, NULL);
ok(ret == TRUE, "expected success\n");
@@ -3601,7 +3597,7 @@ static void test_multiple_reads(int port)
{
DWORD len = 0xdeadbeef;
ret = WinHttpQueryDataAvailable( req, &len );
- ok( ret, "WinHttpQueryDataAvailable failed with error %u\n", GetLastError() );
+ ok( ret, "WinHttpQueryDataAvailable failed with error %lu\n", GetLastError() );
if (ret) ok( len != 0xdeadbeef, "WinHttpQueryDataAvailable return wrong length\n" );
if (len)
{
@@ -3609,8 +3605,8 @@ static void test_multiple_reads(int port)
char *buf = HeapAlloc( GetProcessHeap(), 0, len + 1 );
ret = WinHttpReadData( req, buf, len, &bytes_read );
- ok(ret, "WinHttpReadData failed: %u.\n", GetLastError());
- ok( len == bytes_read, "only got %u of %u available\n", bytes_read, len );
+ ok(ret, "WinHttpReadData failed: %lu\n", GetLastError());
+ ok( len == bytes_read, "only got %lu of %lu available\n", bytes_read, len );
HeapFree( GetProcessHeap(), 0, buf );
if (!bytes_read) break;
@@ -3618,7 +3614,7 @@ static void test_multiple_reads(int port)
}
if (!len) break;
}
- ok(total_len == BIG_BUFFER_LEN, "got wrong length: 0x%x\n", total_len);
+ ok(total_len == BIG_BUFFER_LEN, "got wrong length: %lu\n", total_len);
WinHttpCloseHandle(req);
WinHttpCloseHandle(con);
@@ -3632,146 +3628,146 @@ static void test_cookies( int port )
BOOL ret;
ses = WinHttpOpen( L"winetest", WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0 );
- ok( ses != NULL, "failed to open session %u\n", GetLastError() );
+ ok( ses != NULL, "failed to open session %lu\n", GetLastError() );
con = WinHttpConnect( ses, L"localhost", port, 0 );
- ok( con != NULL, "failed to open a connection %u\n", GetLastError() );
+ ok( con != NULL, "failed to open a connection %lu\n", GetLastError() );
req = WinHttpOpenRequest( con, NULL, L"/cookie", NULL, NULL, NULL, 0 );
- ok( req != NULL, "failed to open a request %u\n", GetLastError() );
+ ok( req != NULL, "failed to open a request %lu\n", GetLastError() );
ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 );
- ok( ret, "failed to send request %u\n", GetLastError() );
+ ok( ret, "failed to send request %lu\n", GetLastError() );
ret = WinHttpReceiveResponse( req, NULL );
- ok( ret, "failed to receive response %u\n", GetLastError() );
+ ok( ret, "failed to receive response %lu\n", GetLastError() );
status = 0xdeadbeef;
size = sizeof(status);
ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL );
- ok( ret, "failed to query status code %u\n", GetLastError() );
- ok( status == HTTP_STATUS_OK, "request failed unexpectedly %u\n", status );
+ ok( ret, "failed to query status code %lu\n", GetLastError() );
+ ok( status == HTTP_STATUS_OK, "request failed unexpectedly %lu\n", status );
WinHttpCloseHandle( req );
req = WinHttpOpenRequest( con, NULL, L"/cookie2", NULL, NULL, NULL, 0 );
- ok( req != NULL, "failed to open a request %u\n", GetLastError() );
+ ok( req != NULL, "failed to open a request %lu\n", GetLastError() );
ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 );
- ok( ret, "failed to send request %u\n", GetLastError() );
+ ok( ret, "failed to send request %lu\n", GetLastError() );
ret = WinHttpReceiveResponse( req, NULL );
- ok( ret, "failed to receive response %u\n", GetLastError() );
+ ok( ret, "failed to receive response %lu\n", GetLastError() );
status = 0xdeadbeef;
size = sizeof(status);
ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL );
- ok( ret, "failed to query status code %u\n", GetLastError() );
- ok( status == HTTP_STATUS_OK, "request failed unexpectedly %u\n", status );
+ ok( ret, "failed to query status code %lu\n", GetLastError() );
+ ok( status == HTTP_STATUS_OK, "request failed unexpectedly %lu\n", status );
WinHttpCloseHandle( req );
WinHttpCloseHandle( con );
con = WinHttpConnect( ses, L"localhost", port, 0 );
- ok( con != NULL, "failed to open a connection %u\n", GetLastError() );
+ ok( con != NULL, "failed to open a connection %lu\n", GetLastError() );
req = WinHttpOpenRequest( con, NULL, L"/cookie2", NULL, NULL, NULL, 0 );
- ok( req != NULL, "failed to open a request %u\n", GetLastError() );
+ ok( req != NULL, "failed to open a request %lu\n", GetLastError() );
ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 );
- ok( ret, "failed to send request %u\n", GetLastError() );
+ ok( ret, "failed to send request %lu\n", GetLastError() );
ret = WinHttpReceiveResponse( req, NULL );
- ok( ret, "failed to receive response %u\n", GetLastError() );
+ ok( ret, "failed to receive response %lu\n", GetLastError() );
status = 0xdeadbeef;
size = sizeof(status);
ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL );
- ok( ret, "failed to query status code %u\n", GetLastError() );
- ok( status == HTTP_STATUS_OK, "request failed unexpectedly %u\n", status );
+ ok( ret, "failed to query status code %lu\n", GetLastError() );
+ ok( status == HTTP_STATUS_OK, "request failed unexpectedly %lu\n", status );
WinHttpCloseHandle( req );
req = WinHttpOpenRequest( con, NULL, L"/cookie3", NULL, NULL, NULL, 0 );
- ok( req != NULL, "failed to open a request %u\n", GetLastError() );
+ ok( req != NULL, "failed to open a request %lu\n", GetLastError() );
ret = WinHttpSendRequest( req, L"Cookie: name=value2\r\n", ~0u, NULL, 0, 0, 0 );
- ok( ret, "failed to send request %u\n", GetLastError() );
+ ok( ret, "failed to send request %lu\n", GetLastError() );
ret = WinHttpReceiveResponse( req, NULL );
- ok( ret, "failed to receive response %u\n", GetLastError() );
+ ok( ret, "failed to receive response %lu\n", GetLastError() );
status = 0xdeadbeef;
size = sizeof(status);
ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL );
- ok( ret, "failed to query status code %u\n", GetLastError() );
- ok( status == HTTP_STATUS_OK || broken(status == HTTP_STATUS_BAD_REQUEST), "request failed unexpectedly %u\n", status );
+ ok( ret, "failed to query status code %lu\n", GetLastError() );
+ ok( status == HTTP_STATUS_OK || broken(status == HTTP_STATUS_BAD_REQUEST), "request failed unexpectedly %lu\n", status );
WinHttpCloseHandle( req );
WinHttpCloseHandle( con );
WinHttpCloseHandle( ses );
ses = WinHttpOpen( L"winetest", WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0 );
- ok( ses != NULL, "failed to open session %u\n", GetLastError() );
+ ok( ses != NULL, "failed to open session %lu\n", GetLastError() );
con = WinHttpConnect( ses, L"localhost", port, 0 );
- ok( con != NULL, "failed to open a connection %u\n", GetLastError() );
+ ok( con != NULL, "failed to open a connection %lu\n", GetLastError() );
req = WinHttpOpenRequest( con, NULL, L"/cookie2", NULL, NULL, NULL, 0 );
- ok( req != NULL, "failed to open a request %u\n", GetLastError() );
+ ok( req != NULL, "failed to open a request %lu\n", GetLastError() );
ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 );
- ok( ret, "failed to send request %u\n", GetLastError() );
+ ok( ret, "failed to send request %lu\n", GetLastError() );
ret = WinHttpReceiveResponse( req, NULL );
- ok( ret, "failed to receive response %u\n", GetLastError() );
+ ok( ret, "failed to receive response %lu\n", GetLastError() );
status = 0xdeadbeef;
size = sizeof(status);
ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL );
- ok( ret, "failed to query status code %u\n", GetLastError() );
- ok( status == HTTP_STATUS_BAD_REQUEST, "request failed unexpectedly %u\n", status );
+ ok( ret, "failed to query status code %lu\n", GetLastError() );
+ ok( status == HTTP_STATUS_BAD_REQUEST, "request failed unexpectedly %lu\n", status );
WinHttpCloseHandle( req );
WinHttpCloseHandle( con );
WinHttpCloseHandle( ses );
ses = WinHttpOpen( L"winetest", WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0 );
- ok( ses != NULL, "failed to open session %u\n", GetLastError() );
+ ok( ses != NULL, "failed to open session %lu\n", GetLastError() );
con = WinHttpConnect( ses, L"localhost", port, 0 );
- ok( con != NULL, "failed to open a connection %u\n", GetLastError() );
+ ok( con != NULL, "failed to open a connection %lu\n", GetLastError() );
req = WinHttpOpenRequest( con, NULL, L"/cookie4", NULL, NULL, NULL, 0 );
- ok( req != NULL, "failed to open a request %u\n", GetLastError() );
+ ok( req != NULL, "failed to open a request %lu\n", GetLastError() );
ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 );
- ok( ret, "failed to send request %u\n", GetLastError() );
+ ok( ret, "failed to send request %lu\n", GetLastError() );
ret = WinHttpReceiveResponse( req, NULL );
- ok( ret, "failed to receive response %u\n", GetLastError() );
+ ok( ret, "failed to receive response %lu\n", GetLastError() );
status = 0xdeadbeef;
size = sizeof(status);
ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL );
- ok( ret, "failed to query status code %u\n", GetLastError() );
- ok( status == HTTP_STATUS_OK, "request failed unexpectedly %u\n", status );
+ ok( ret, "failed to query status code %lu\n", GetLastError() );
+ ok( status == HTTP_STATUS_OK, "request failed unexpectedly %lu\n", status );
WinHttpCloseHandle( req );
req = WinHttpOpenRequest( con, NULL, L"/cookie5", NULL, NULL, NULL, 0 );
- ok( req != NULL, "failed to open a request %u\n", GetLastError() );
+ ok( req != NULL, "failed to open a request %lu\n", GetLastError() );
ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 );
- ok( ret, "failed to send request %u\n", GetLastError() );
+ ok( ret, "failed to send request %lu\n", GetLastError() );
ret = WinHttpReceiveResponse( req, NULL );
- ok( ret, "failed to receive response %u\n", GetLastError() );
+ ok( ret, "failed to receive response %lu\n", GetLastError() );
status = 0xdeadbeef;
size = sizeof(status);
ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL );
- ok( ret, "failed to query status code %u\n", GetLastError() );
+ ok( ret, "failed to query status code %lu\n", GetLastError() );
ok( status == HTTP_STATUS_OK || broken(status == HTTP_STATUS_BAD_REQUEST) /* < win7 */,
- "request failed unexpectedly %u\n", status );
+ "request failed unexpectedly %lu\n", status );
WinHttpCloseHandle( req );
WinHttpCloseHandle( con );
@@ -3785,20 +3781,20 @@ static void do_request( HINTERNET con, const WCHAR *obj, DWORD flags )
BOOL ret;
req = WinHttpOpenRequest( con, NULL, obj, NULL, NULL, NULL, flags );
- ok( req != NULL, "failed to open a request %u\n", GetLastError() );
+ ok( req != NULL, "failed to open a request %lu\n", GetLastError() );
ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 );
- ok( ret, "failed to send request %u\n", GetLastError() );
+ ok( ret, "failed to send request %lu\n", GetLastError() );
ret = WinHttpReceiveResponse( req, NULL );
- ok( ret, "failed to receive response %u\n", GetLastError() );
+ ok( ret, "failed to receive response %lu\n", GetLastError() );
status = 0xdeadbeef;
size = sizeof(status);
ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL );
- ok( ret, "failed to query status code %u\n", GetLastError() );
+ ok( ret, "failed to query status code %lu\n", GetLastError() );
ok( status == HTTP_STATUS_OK || broken(status == HTTP_STATUS_BAD_REQUEST) /* < win7 */,
- "request %s with flags %08x failed %u\n", wine_dbgstr_w(obj), flags, status );
+ "request %s with flags %#lx failed %lu\n", wine_dbgstr_w(obj), flags, status );
WinHttpCloseHandle( req );
}
@@ -3829,10 +3825,10 @@ static void test_request_path_escapes( int port )
HINTERNET ses, con;
ses = WinHttpOpen( L"winetest", WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0 );
- ok( ses != NULL, "failed to open session %u\n", GetLastError() );
+ ok( ses != NULL, "failed to open session %lu\n", GetLastError() );
con = WinHttpConnect( ses, L"localhost", port, 0 );
- ok( con != NULL, "failed to open a connection %u\n", GetLastError() );
+ ok( con != NULL, "failed to open a connection %lu\n", GetLastError() );
do_request( con, objW, 0 );
do_request( con, obj2W, WINHTTP_FLAG_ESCAPE_PERCENT );
@@ -3854,13 +3850,13 @@ static void test_connection_info( int port )
BOOL ret;
ses = WinHttpOpen( L"winetest", WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0 );
- ok( ses != NULL, "failed to open session %u\n", GetLastError() );
+ ok( ses != NULL, "failed to open session %lu\n", GetLastError() );
con = WinHttpConnect( ses, L"localhost", port, 0 );
- ok( con != NULL, "failed to open a connection %u\n", GetLastError() );
+ ok( con != NULL, "failed to open a connection %lu\n", GetLastError() );
req = WinHttpOpenRequest( con, NULL, L"/basic", NULL, NULL, NULL, 0 );
- ok( req != NULL, "failed to open a request %u\n", GetLastError() );
+ ok( req != NULL, "failed to open a request %lu\n", GetLastError() );
size = sizeof(info);
SetLastError( 0xdeadbeef );
@@ -3872,32 +3868,32 @@ static void test_connection_info( int port )
return;
}
ok( !ret, "unexpected success\n" );
- ok( error == ERROR_WINHTTP_INCORRECT_HANDLE_STATE, "got %u\n", error );
+ ok( error == ERROR_WINHTTP_INCORRECT_HANDLE_STATE, "got %lu\n", error );
ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 );
- ok( ret, "failed to send request %u\n", GetLastError() );
+ ok( ret, "failed to send request %lu\n", GetLastError() );
size = 0;
SetLastError( 0xdeadbeef );
ret = WinHttpQueryOption( req, WINHTTP_OPTION_CONNECTION_INFO, &info, &size );
error = GetLastError();
ok( !ret, "unexpected success\n" );
- ok( error == ERROR_INSUFFICIENT_BUFFER, "got %u\n", error );
+ ok( error == ERROR_INSUFFICIENT_BUFFER, "got %lu\n", error );
size = sizeof(info);
memset( &info, 0, sizeof(info) );
ret = WinHttpQueryOption( req, WINHTTP_OPTION_CONNECTION_INFO, &info, &size );
- ok( ret, "failed to retrieve connection info %u\n", GetLastError() );
- ok( info.cbSize == sizeof(info) || info.cbSize == sizeof(info) - sizeof(info.cbSize) /* Win7 */, "wrong size %u\n", info.cbSize );
+ ok( ret, "failed to retrieve connection info %lu\n", GetLastError() );
+ ok( info.cbSize == sizeof(info) || info.cbSize == sizeof(info) - sizeof(info.cbSize) /* Win7 */, "wrong size %lu\n", info.cbSize );
ret = WinHttpReceiveResponse( req, NULL );
- ok( ret, "failed to receive response %u\n", GetLastError() );
+ ok( ret, "failed to receive response %lu\n", GetLastError() );
size = sizeof(info);
memset( &info, 0, sizeof(info) );
ret = WinHttpQueryOption( req, WINHTTP_OPTION_CONNECTION_INFO, &info, &size );
- ok( ret, "failed to retrieve connection info %u\n", GetLastError() );
- ok( info.cbSize == sizeof(info) || info.cbSize == sizeof(info) - sizeof(info.cbSize) /* Win7 */, "wrong size %u\n", info.cbSize );
+ ok( ret, "failed to retrieve connection info %lu\n", GetLastError() );
+ ok( info.cbSize == sizeof(info) || info.cbSize == sizeof(info) - sizeof(info.cbSize) /* Win7 */, "wrong size %lu\n", info.cbSize );
WinHttpCloseHandle( req );
WinHttpCloseHandle( con );
@@ -3914,25 +3910,25 @@ static void test_passport_auth( int port )
BOOL ret;
ses = WinHttpOpen( L"winetest", 0, NULL, NULL, 0 );
- ok( ses != NULL, "got %u\n", GetLastError() );
+ ok( ses != NULL, "got %lu\n", GetLastError() );
option = WINHTTP_ENABLE_PASSPORT_AUTH;
ret = WinHttpSetOption( ses, WINHTTP_OPTION_CONFIGURE_PASSPORT_AUTH, &option, sizeof(option) );
- ok( ret, "got %u\n", GetLastError() );
+ ok( ret, "got %lu\n", GetLastError() );
con = WinHttpConnect( ses, L"localhost", port, 0 );
- ok( con != NULL, "got %u\n", GetLastError() );
+ ok( con != NULL, "got %lu\n", GetLastError() );
req = WinHttpOpenRequest( con, NULL, L"/passport", NULL, NULL, NULL, 0 );
- ok( req != NULL, "got %u\n", GetLastError() );
+ ok( req != NULL, "got %lu\n", GetLastError() );
ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 );
- ok( ret, "got %u\n", GetLastError() );
+ ok( ret, "got %lu\n", GetLastError() );
ret = WinHttpReceiveResponse( req, NULL );
err = GetLastError();
ok( ret || broken(!ret && err == ERROR_WINHTTP_LOGIN_FAILURE) /* winxp */
- || broken(!ret && err == ERROR_WINHTTP_INVALID_SERVER_RESPONSE ), "got %u\n", err );
+ || broken(!ret && err == ERROR_WINHTTP_INVALID_SERVER_RESPONSE ), "got %lu\n", err );
if (!ret)
{
win_skip("no support for Passport redirects\n");
@@ -3942,23 +3938,23 @@ static void test_passport_auth( int port )
status = 0xdeadbeef;
size = sizeof(status);
ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL );
- ok( ret, "got %u\n", GetLastError() );
- ok( status == HTTP_STATUS_DENIED, "got %u\n", status );
+ ok( ret, "got %lu\n", GetLastError() );
+ ok( status == HTTP_STATUS_DENIED, "got %lu\n", status );
buf[0] = 0;
size = sizeof(buf);
ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_STATUS_TEXT, NULL, buf, &size, NULL );
- ok( ret, "got %u\n", GetLastError() );
+ ok( ret, "got %lu\n", GetLastError() );
ok( !lstrcmpW(L"Found", buf) || broken(!lstrcmpW(L"Unauthorized", buf)) /* < win7 */, "got %s\n",
wine_dbgstr_w(buf) );
buf[0] = 0;
size = sizeof(buf);
ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_RAW_HEADERS_CRLF, NULL, buf, &size, NULL );
- ok( ret || broken(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER) /* < win7 */, "got %u\n", GetLastError() );
+ ok( ret || broken(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER) /* < win7 */, "got %lu\n", GetLastError() );
if (ret)
{
- ok( size == lstrlenW(headersW) * sizeof(WCHAR), "got %u\n", size );
+ ok( size == lstrlenW(headersW) * sizeof(WCHAR), "got %lu\n", size );
ok( !lstrcmpW(headersW, buf), "got %s\n", wine_dbgstr_w(buf) );
}
@@ -3980,108 +3976,108 @@ static void test_credentials(void)
BOOL ret;
ses = WinHttpOpen(L"winetest", 0, proxy_userW, proxy_passW, 0);
- ok(ses != NULL, "failed to open session %u\n", GetLastError());
+ ok(ses != NULL, "failed to open session %lu\n", GetLastError());
con = WinHttpConnect(ses, L"localhost", 0, 0);
- ok(con != NULL, "failed to open a connection %u\n", GetLastError());
+ ok(con != NULL, "failed to open a connection %lu\n", GetLastError());
req = WinHttpOpenRequest(con, NULL, NULL, NULL, NULL, NULL, 0);
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok(req != NULL, "failed to open a request %lu\n", GetLastError());
size = ARRAY_SIZE(buffer);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_PROXY_USERNAME, &buffer, &size);
- ok(ret, "failed to query proxy username %u\n", GetLastError());
+ ok(ret, "failed to query proxy username %lu\n", GetLastError());
ok(!buffer[0], "unexpected result %s\n", wine_dbgstr_w(buffer));
- ok(!size, "expected 0, got %u\n", size);
+ ok(!size, "expected 0, got %lu\n", size);
size = ARRAY_SIZE(buffer);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_PROXY_PASSWORD, &buffer, &size);
- ok(ret, "failed to query proxy password %u\n", GetLastError());
+ ok(ret, "failed to query proxy password %lu\n", GetLastError());
ok(!buffer[0], "unexpected result %s\n", wine_dbgstr_w(buffer));
- ok(!size, "expected 0, got %u\n", size);
+ ok(!size, "expected 0, got %lu\n", size);
ret = WinHttpSetOption(req, WINHTTP_OPTION_PROXY_USERNAME, proxy_userW, lstrlenW(proxy_userW));
- ok(ret, "failed to set username %u\n", GetLastError());
+ ok(ret, "failed to set username %lu\n", GetLastError());
size = ARRAY_SIZE(buffer);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_PROXY_USERNAME, &buffer, &size);
- ok(ret, "failed to query proxy username %u\n", GetLastError());
+ ok(ret, "failed to query proxy username %lu\n", GetLastError());
ok(!wcscmp(buffer, proxy_userW), "unexpected result %s\n", wine_dbgstr_w(buffer));
- ok(size == lstrlenW(proxy_userW) * sizeof(WCHAR), "unexpected result %u\n", size);
+ ok(size == lstrlenW(proxy_userW) * sizeof(WCHAR), "unexpected result %lu\n", size);
size = ARRAY_SIZE(buffer);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_USERNAME, &buffer, &size);
- ok(ret, "failed to query username %u\n", GetLastError());
+ ok(ret, "failed to query username %lu\n", GetLastError());
ok(!buffer[0], "unexpected result %s\n", wine_dbgstr_w(buffer));
- ok(!size, "expected 0, got %u\n", size);
+ ok(!size, "expected 0, got %lu\n", size);
size = ARRAY_SIZE(buffer);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_PASSWORD, &buffer, &size);
- ok(ret, "failed to query password %u\n", GetLastError());
+ ok(ret, "failed to query password %lu\n", GetLastError());
ok(!buffer[0], "unexpected result %s\n", wine_dbgstr_w(buffer));
- ok(!size, "expected 0, got %u\n", size);
+ ok(!size, "expected 0, got %lu\n", size);
ret = WinHttpSetOption(req, WINHTTP_OPTION_PROXY_PASSWORD, proxy_passW, lstrlenW(proxy_passW));
- ok(ret, "failed to set proxy password %u\n", GetLastError());
+ ok(ret, "failed to set proxy password %lu\n", GetLastError());
size = ARRAY_SIZE(buffer);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_PROXY_PASSWORD, &buffer, &size);
- ok(ret, "failed to query proxy password %u\n", GetLastError());
+ ok(ret, "failed to query proxy password %lu\n", GetLastError());
ok(!wcscmp(buffer, proxy_passW), "unexpected result %s\n", wine_dbgstr_w(buffer));
- ok(size == lstrlenW(proxy_passW) * sizeof(WCHAR), "unexpected result %u\n", size);
+ ok(size == lstrlenW(proxy_passW) * sizeof(WCHAR), "unexpected result %lu\n", size);
ret = WinHttpSetOption(req, WINHTTP_OPTION_USERNAME, userW, lstrlenW(userW));
- ok(ret, "failed to set username %u\n", GetLastError());
+ ok(ret, "failed to set username %lu\n", GetLastError());
size = ARRAY_SIZE(buffer);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_USERNAME, &buffer, &size);
- ok(ret, "failed to query username %u\n", GetLastError());
+ ok(ret, "failed to query username %lu\n", GetLastError());
ok(!wcscmp(buffer, userW), "unexpected result %s\n", wine_dbgstr_w(buffer));
- ok(size == lstrlenW(userW) * sizeof(WCHAR), "unexpected result %u\n", size);
+ ok(size == lstrlenW(userW) * sizeof(WCHAR), "unexpected result %lu\n", size);
ret = WinHttpSetOption(req, WINHTTP_OPTION_PASSWORD, passW, lstrlenW(passW));
- ok(ret, "failed to set password %u\n", GetLastError());
+ ok(ret, "failed to set password %lu\n", GetLastError());
size = ARRAY_SIZE(buffer);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_PASSWORD, &buffer, &size);
- ok(ret, "failed to query password %u\n", GetLastError());
+ ok(ret, "failed to query password %lu\n", GetLastError());
ok(!wcscmp(buffer, passW), "unexpected result %s\n", wine_dbgstr_w(buffer));
- ok(size == lstrlenW(passW) * sizeof(WCHAR), "unexpected result %u\n", size);
+ ok(size == lstrlenW(passW) * sizeof(WCHAR), "unexpected result %lu\n", size);
WinHttpCloseHandle(req);
req = WinHttpOpenRequest(con, NULL, NULL, NULL, NULL, NULL, 0);
- ok(req != NULL, "failed to open a request %u\n", GetLastError());
+ ok(req != NULL, "failed to open a request %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpSetCredentials(req, WINHTTP_AUTH_TARGET_SERVER, WINHTTP_AUTH_SCHEME_BASIC, userW, NULL, NULL);
error = GetLastError();
ok(!ret, "expected failure\n");
- ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error);
+ ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", error);
SetLastError(0xdeadbeef);
ret = WinHttpSetCredentials(req, WINHTTP_AUTH_TARGET_SERVER, WINHTTP_AUTH_SCHEME_BASIC, NULL, passW, NULL);
error = GetLastError();
ok(!ret, "expected failure\n");
- ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error);
+ ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", error);
ret = WinHttpSetCredentials(req, WINHTTP_AUTH_TARGET_SERVER, WINHTTP_AUTH_SCHEME_BASIC, userW, passW, NULL);
- ok(ret, "failed to set credentials %u\n", GetLastError());
+ ok(ret, "failed to set credentials %lu\n", GetLastError());
size = ARRAY_SIZE(buffer);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_USERNAME, &buffer, &size);
- ok(ret, "failed to query username %u\n", GetLastError());
+ ok(ret, "failed to query username %lu\n", GetLastError());
todo_wine {
ok(!buffer[0], "unexpected result %s\n", wine_dbgstr_w(buffer));
- ok(!size, "expected 0, got %u\n", size);
+ ok(!size, "expected 0, got %lu\n", size);
}
size = ARRAY_SIZE(buffer);
ret = WinHttpQueryOption(req, WINHTTP_OPTION_PASSWORD, &buffer, &size);
- ok(ret, "failed to query password %u\n", GetLastError());
+ ok(ret, "failed to query password %lu\n", GetLastError());
todo_wine {
ok(!buffer[0], "unexpected result %s\n", wine_dbgstr_w(buffer));
- ok(!size, "expected 0, got %u\n", size);
+ ok(!size, "expected 0, got %lu\n", size);
}
WinHttpCloseHandle(req);
@@ -4112,7 +4108,7 @@ static void test_IWinHttpRequest(int port)
CoInitialize( NULL );
hr = CoCreateInstance( &CLSID_WinHttpRequest, NULL, CLSCTX_INPROC_SERVER, &IID_IWinHttpRequest, (void **)&req );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
V_VT( &empty ) = VT_ERROR;
V_ERROR( &empty ) = 0xdeadbeef;
@@ -4123,54 +4119,54 @@ static void test_IWinHttpRequest(int port)
method = SysAllocString( L"POST" );
url = SysAllocString( L"http://test.winehq.org/tests/post.php" );
hr = IWinHttpRequest_Open( req, method, url, async );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
SysFreeString( method );
SysFreeString( url );
V_VT( &data ) = VT_BSTR;
V_BSTR( &data ) = SysAllocString( L"testdata\x80" );
hr = IWinHttpRequest_Send( req, data );
- ok( hr == S_OK || hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_INVALID_SERVER_RESPONSE ), "got %08x\n", hr );
+ ok( hr == S_OK || hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_INVALID_SERVER_RESPONSE ), "got %#lx\n", hr );
SysFreeString( V_BSTR( &data ) );
if (hr != S_OK) goto done;
hr = IWinHttpRequest_Open( req, NULL, NULL, empty );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
method = SysAllocString( L"GET" );
hr = IWinHttpRequest_Open( req, method, NULL, empty );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
hr = IWinHttpRequest_Open( req, method, NULL, async );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
url = SysAllocString( L"http://test.winehq.org" );
hr = IWinHttpRequest_Open( req, NULL, url, empty );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
hr = IWinHttpRequest_Abort( req );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_Open( req, method, url, empty );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_Abort( req );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
IWinHttpRequest_Release( req );
hr = CoCreateInstance( &CLSID_WinHttpRequest, NULL, CLSCTX_INPROC_SERVER, &IID_IWinHttpRequest, (void **)&req );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
SysFreeString( url );
url = SysAllocString( L"test.winehq.org" );
hr = IWinHttpRequest_Open( req, method, url, async );
- ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_UNRECOGNIZED_SCHEME ), "got %08x\n", hr );
+ ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_UNRECOGNIZED_SCHEME ), "got %#lx\n", hr );
SysFreeString( method );
method = SysAllocString( L"INVALID" );
hr = IWinHttpRequest_Open( req, method, url, async );
- ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_UNRECOGNIZED_SCHEME ), "got %08x\n", hr );
+ ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_UNRECOGNIZED_SCHEME ), "got %#lx\n", hr );
SysFreeString( method );
method = SysAllocString( L"GET" );
@@ -4179,401 +4175,401 @@ static void test_IWinHttpRequest(int port)
V_VT( &async ) = VT_ERROR;
V_ERROR( &async ) = DISP_E_PARAMNOTFOUND;
hr = IWinHttpRequest_Open( req, method, url, async );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
V_VT( &cp ) = VT_ERROR;
V_ERROR( &cp ) = 0xdeadbeef;
hr = IWinHttpRequest_get_Option( req, WinHttpRequestOption_URLCodePage, &cp );
- ok( hr == S_OK, "got %08x\n", hr );
- ok( V_VT( &cp ) == VT_I4, "got %08x\n", V_VT( &cp ) );
- ok( V_I4( &cp ) == CP_UTF8, "got %u\n", V_I4( &cp ) );
+ ok( hr == S_OK, "got %#lx\n", hr );
+ ok( V_VT( &cp ) == VT_I4, "got %#x\n", V_VT( &cp ) );
+ ok( V_I4( &cp ) == CP_UTF8, "got %ld\n", V_I4( &cp ) );
V_VT( &cp ) = VT_UI4;
V_UI4( &cp ) = CP_ACP;
hr = IWinHttpRequest_put_Option( req, WinHttpRequestOption_URLCodePage, cp );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
V_VT( &cp ) = VT_ERROR;
V_ERROR( &cp ) = 0xdeadbeef;
hr = IWinHttpRequest_get_Option( req, WinHttpRequestOption_URLCodePage, &cp );
- ok( hr == S_OK, "got %08x\n", hr );
- ok( V_VT( &cp ) == VT_I4, "got %08x\n", V_VT( &cp ) );
- ok( V_I4( &cp ) == CP_ACP, "got %u\n", V_I4( &cp ) );
+ ok( hr == S_OK, "got %#lx\n", hr );
+ ok( V_VT( &cp ) == VT_I4, "got %#x\n", V_VT( &cp ) );
+ ok( V_I4( &cp ) == CP_ACP, "got %ld\n", V_I4( &cp ) );
value = SysAllocString( L"utf-8" );
V_VT( &cp ) = VT_BSTR;
V_BSTR( &cp ) = value;
hr = IWinHttpRequest_put_Option( req, WinHttpRequestOption_URLCodePage, cp );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
SysFreeString( value );
V_VT( &cp ) = VT_ERROR;
V_ERROR( &cp ) = 0xdeadbeef;
hr = IWinHttpRequest_get_Option( req, WinHttpRequestOption_URLCodePage, &cp );
- ok( hr == S_OK, "got %08x\n", hr );
- ok( V_VT( &cp ) == VT_I4, "got %08x\n", V_VT( &cp ) );
- ok( V_I4( &cp ) == CP_UTF8, "got %u\n", V_I4( &cp ) );
+ ok( hr == S_OK, "got %#lx\n", hr );
+ ok( V_VT( &cp ) == VT_I4, "got %#x\n", V_VT( &cp ) );
+ ok( V_I4( &cp ) == CP_UTF8, "got %ld\n", V_I4( &cp ) );
hr = IWinHttpRequest_Abort( req );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_Send( req, empty );
- ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_OPEN ), "got %08x\n", hr );
+ ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_OPEN ), "got %#lx\n", hr );
hr = IWinHttpRequest_Abort( req );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
IWinHttpRequest_Release( req );
hr = CoCreateInstance( &CLSID_WinHttpRequest, NULL, CLSCTX_INPROC_SERVER, &IID_IWinHttpRequest, (void **)&req );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_get_ResponseText( req, NULL );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
hr = IWinHttpRequest_get_ResponseText( req, &response );
- ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %08x\n", hr );
+ ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %#lx\n", hr );
hr = IWinHttpRequest_get_Status( req, NULL );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
hr = IWinHttpRequest_get_Status( req, &status );
- ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %08x\n", hr );
+ ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %#lx\n", hr );
hr = IWinHttpRequest_get_StatusText( req, NULL );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
hr = IWinHttpRequest_get_StatusText( req, &status_text );
- ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %08x\n", hr );
+ ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %#lx\n", hr );
hr = IWinHttpRequest_get_ResponseBody( req, NULL );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
hr = IWinHttpRequest_SetTimeouts( req, 10000, 10000, 10000, 10000 );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_SetCredentials( req, NULL, NULL, 0xdeadbeef );
- ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_OPEN ), "got %08x\n", hr );
+ ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_OPEN ), "got %#lx\n", hr );
VariantInit( &proxy_server );
V_VT( &proxy_server ) = VT_ERROR;
VariantInit( &bypass_list );
V_VT( &bypass_list ) = VT_ERROR;
hr = IWinHttpRequest_SetProxy( req, HTTPREQUEST_PROXYSETTING_DIRECT, proxy_server, bypass_list );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_SetProxy( req, HTTPREQUEST_PROXYSETTING_PROXY, proxy_server, bypass_list );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_SetProxy( req, HTTPREQUEST_PROXYSETTING_DIRECT, proxy_server, bypass_list );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_GetAllResponseHeaders( req, NULL );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
hr = IWinHttpRequest_GetAllResponseHeaders( req, &headers );
- ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %08x\n", hr );
+ ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %#lx\n", hr );
hr = IWinHttpRequest_GetResponseHeader( req, NULL, NULL );
- ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %08x\n", hr );
+ ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %#lx\n", hr );
connection = SysAllocString( L"Connection" );
hr = IWinHttpRequest_GetResponseHeader( req, connection, NULL );
- ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %08x\n", hr );
+ ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %#lx\n", hr );
hr = IWinHttpRequest_GetResponseHeader( req, connection, &value );
- ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %08x\n", hr );
+ ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %#lx\n", hr );
hr = IWinHttpRequest_SetRequestHeader( req, NULL, NULL );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
date = SysAllocString( L"Date" );
hr = IWinHttpRequest_SetRequestHeader( req, date, NULL );
- ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_OPEN ), "got %08x\n", hr );
+ ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_OPEN ), "got %#lx\n", hr );
today = SysAllocString( todayW );
hr = IWinHttpRequest_SetRequestHeader( req, date, today );
- ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_OPEN ), "got %08x\n", hr );
+ ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_OPEN ), "got %#lx\n", hr );
hr = IWinHttpRequest_SetAutoLogonPolicy( req, 0xdeadbeef );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
hr = IWinHttpRequest_SetAutoLogonPolicy( req, AutoLogonPolicy_OnlyIfBypassProxy );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
SysFreeString( method );
method = SysAllocString( L"GET" );
SysFreeString( url );
url = SysAllocString( L"http://test.winehq.org" );
hr = IWinHttpRequest_Open( req, method, url, async );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_get_ResponseText( req, NULL );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
hr = IWinHttpRequest_get_ResponseText( req, &response );
- ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %08x\n", hr );
+ ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %#lx\n", hr );
hr = IWinHttpRequest_get_Status( req, &status );
- ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %08x\n", hr );
+ ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %#lx\n", hr );
hr = IWinHttpRequest_get_StatusText( req, &status_text );
- ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %08x\n", hr );
+ ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %#lx\n", hr );
hr = IWinHttpRequest_get_ResponseBody( req, NULL );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
hr = IWinHttpRequest_SetTimeouts( req, 10000, 10000, 10000, 10000 );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_SetCredentials( req, NULL, NULL, 0xdeadbeef );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
username = SysAllocString( L"username" );
hr = IWinHttpRequest_SetCredentials( req, username, NULL, 0xdeadbeef );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
password = SysAllocString( L"password" );
hr = IWinHttpRequest_SetCredentials( req, NULL, password, 0xdeadbeef );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
hr = IWinHttpRequest_SetCredentials( req, username, password, 0xdeadbeef );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
hr = IWinHttpRequest_SetCredentials( req, NULL, password, HTTPREQUEST_SETCREDENTIALS_FOR_SERVER );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
hr = IWinHttpRequest_SetCredentials( req, username, password, HTTPREQUEST_SETCREDENTIALS_FOR_SERVER );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
V_VT( &proxy_server ) = VT_BSTR;
V_BSTR( &proxy_server ) = SysAllocString( L"proxyserver" );
V_VT( &bypass_list ) = VT_BSTR;
V_BSTR( &bypass_list ) = SysAllocString( L"bypasslist" );
hr = IWinHttpRequest_SetProxy( req, HTTPREQUEST_PROXYSETTING_PROXY, proxy_server, bypass_list );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_SetProxy( req, 0xdeadbeef, proxy_server, bypass_list );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
hr = IWinHttpRequest_SetProxy( req, HTTPREQUEST_PROXYSETTING_DIRECT, proxy_server, bypass_list );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_GetAllResponseHeaders( req, &headers );
- ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %08x\n", hr );
+ ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %#lx\n", hr );
hr = IWinHttpRequest_GetResponseHeader( req, connection, &value );
- ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %08x\n", hr );
+ ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %#lx\n", hr );
hr = IWinHttpRequest_SetRequestHeader( req, date, today );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_SetRequestHeader( req, date, NULL );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_SetAutoLogonPolicy( req, AutoLogonPolicy_OnlyIfBypassProxy );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_Send( req, empty );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_Send( req, empty );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_get_ResponseText( req, NULL );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
hr = IWinHttpRequest_get_ResponseText( req, &response );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
ok( !memcmp(response, data_start, sizeof(data_start)), "got %s\n", wine_dbgstr_wn(response, 32) );
SysFreeString( response );
hr = IWinHttpRequest_get_Status( req, NULL );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
status = 0;
hr = IWinHttpRequest_get_Status( req, &status );
- ok( hr == S_OK, "got %08x\n", hr );
- trace("Status=%d\n", status);
+ ok( hr == S_OK, "got %#lx\n", hr );
+ trace("Status = %lu\n", status);
hr = IWinHttpRequest_get_StatusText( req, NULL );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
hr = IWinHttpRequest_get_StatusText( req, &status_text );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
trace("StatusText=%s\n", wine_dbgstr_w(status_text));
SysFreeString( status_text );
hr = IWinHttpRequest_get_ResponseBody( req, NULL );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
hr = IWinHttpRequest_SetCredentials( req, username, password, HTTPREQUEST_SETCREDENTIALS_FOR_SERVER );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_SetProxy( req, HTTPREQUEST_PROXYSETTING_PROXY, proxy_server, bypass_list );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_SetProxy( req, HTTPREQUEST_PROXYSETTING_DIRECT, proxy_server, bypass_list );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_GetAllResponseHeaders( req, NULL );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
hr = IWinHttpRequest_GetAllResponseHeaders( req, &headers );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
SysFreeString( headers );
hr = IWinHttpRequest_GetResponseHeader( req, NULL, NULL );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
hr = IWinHttpRequest_GetResponseHeader( req, connection, NULL );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
hr = IWinHttpRequest_GetResponseHeader( req, connection, &value );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
SysFreeString( value );
hr = IWinHttpRequest_SetRequestHeader( req, date, today );
- ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_AFTER_SEND ), "got %08x\n", hr );
+ ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_AFTER_SEND ), "got %#lx\n", hr );
hr = IWinHttpRequest_SetAutoLogonPolicy( req, AutoLogonPolicy_OnlyIfBypassProxy );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
VariantInit( &timeout );
V_VT( &timeout ) = VT_I4;
V_I4( &timeout ) = 10;
hr = IWinHttpRequest_WaitForResponse( req, timeout, &succeeded );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_get_Status( req, &status );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_get_StatusText( req, &status_text );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
SysFreeString( status_text );
hr = IWinHttpRequest_SetCredentials( req, username, password, HTTPREQUEST_SETCREDENTIALS_FOR_SERVER );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_SetProxy( req, HTTPREQUEST_PROXYSETTING_PROXY, proxy_server, bypass_list );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_SetProxy( req, HTTPREQUEST_PROXYSETTING_DIRECT, proxy_server, bypass_list );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_Send( req, empty );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_get_ResponseText( req, NULL );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
hr = IWinHttpRequest_get_ResponseText( req, &response );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
SysFreeString( response );
hr = IWinHttpRequest_get_ResponseBody( req, NULL );
- ok( hr == E_INVALIDARG, "got %08x\n", hr );
+ ok( hr == E_INVALIDARG, "got %#lx\n", hr );
VariantInit( &body );
V_VT( &body ) = VT_ERROR;
hr = IWinHttpRequest_get_ResponseBody( req, &body );
- ok( hr == S_OK, "got %08x\n", hr );
- ok( V_VT( &body ) == (VT_ARRAY|VT_UI1), "got %08x\n", V_VT( &body ) );
+ ok( hr == S_OK, "got %#lx\n", hr );
+ ok( V_VT( &body ) == (VT_ARRAY|VT_UI1), "got %#x\n", V_VT( &body ) );
hr = VariantClear( &body );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
VariantInit( &body );
V_VT( &body ) = VT_ERROR;
hr = IWinHttpRequest_get_ResponseStream( req, &body );
- ok( hr == S_OK, "got %08x\n", hr );
- ok( V_VT( &body ) == VT_UNKNOWN, "got %08x\n", V_VT( &body ) );
+ ok( hr == S_OK, "got %#lx\n", hr );
+ ok( V_VT( &body ) == VT_UNKNOWN, "got %#x\n", V_VT( &body ) );
hr = IUnknown_QueryInterface( V_UNKNOWN( &body ), &IID_IStream, (void **)&stream );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
ok( V_UNKNOWN( &body ) == (IUnknown *)stream, "got different interface pointer\n" );
buf[0] = 0;
count = 0xdeadbeef;
hr = IStream_Read( stream, buf, 128, &count );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
ok( count != 0xdeadbeef, "count not set\n" );
ok( buf[0], "no data\n" );
VariantInit( &body2 );
V_VT( &body2 ) = VT_ERROR;
hr = IWinHttpRequest_get_ResponseStream( req, &body2 );
- ok( hr == S_OK, "got %08x\n", hr );
- ok( V_VT( &body2 ) == VT_UNKNOWN, "got %08x\n", V_VT( &body2 ) );
+ ok( hr == S_OK, "got %#lx\n", hr );
+ ok( V_VT( &body2 ) == VT_UNKNOWN, "got %#x\n", V_VT( &body2 ) );
ok( V_UNKNOWN( &body ) != V_UNKNOWN( &body2 ), "got same interface pointer\n" );
hr = IUnknown_QueryInterface( V_UNKNOWN( &body2 ), &IID_IStream, (void **)&stream2 );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
ok( V_UNKNOWN( &body2 ) == (IUnknown *)stream2, "got different interface pointer\n" );
IStream_Release( stream2 );
hr = VariantClear( &body );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = VariantClear( &body2 );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_SetProxy( req, HTTPREQUEST_PROXYSETTING_PROXY, proxy_server, bypass_list );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_SetProxy( req, HTTPREQUEST_PROXYSETTING_DIRECT, proxy_server, bypass_list );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_GetAllResponseHeaders( req, &headers );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
SysFreeString( headers );
hr = IWinHttpRequest_GetResponseHeader( req, connection, &value );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
SysFreeString( value );
hr = IWinHttpRequest_SetRequestHeader( req, date, today );
- ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_AFTER_SEND ), "got %08x\n", hr );
+ ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_AFTER_SEND ), "got %#lx\n", hr );
hr = IWinHttpRequest_SetAutoLogonPolicy( req, AutoLogonPolicy_OnlyIfBypassProxy );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_Send( req, empty );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_Abort( req );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_Abort( req );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
IWinHttpRequest_Release( req );
pos.QuadPart = 0;
hr = IStream_Seek( stream, pos, STREAM_SEEK_SET, NULL );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
buf[0] = 0;
count = 0xdeadbeef;
hr = IStream_Read( stream, buf, 128, &count );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
ok( count != 0xdeadbeef, "count not set\n" );
ok( buf[0], "no data\n" );
IStream_Release( stream );
hr = CoCreateInstance( &CLSID_WinHttpRequest, NULL, CLSCTX_INPROC_SERVER, &IID_IWinHttpRequest, (void **)&req );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
V_VT( &async ) = VT_I4;
V_I4( &async ) = 1;
hr = IWinHttpRequest_Open( req, method, url, async );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_Send( req, empty );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
hr = IWinHttpRequest_WaitForResponse( req, timeout, &succeeded );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
IWinHttpRequest_Release( req );
@@ -4588,31 +4584,31 @@ static void test_IWinHttpRequest(int port)
VariantClear( &bypass_list );
hr = CoCreateInstance( &CLSID_WinHttpRequest, NULL, CLSCTX_INPROC_SERVER, &IID_IWinHttpRequest, (void **)&req );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
url = SysAllocString( L"https://test.winehq.org:443" );
method = SysAllocString( L"POST" );
V_VT( &async ) = VT_BOOL;
V_BOOL( &async ) = VARIANT_FALSE;
hr = IWinHttpRequest_Open( req, method, url, async );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
SysFreeString( method );
SysFreeString( url );
hr = IWinHttpRequest_Send( req, empty );
ok( hr == S_OK || hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_INVALID_SERVER_RESPONSE ) ||
- hr == SEC_E_ILLEGAL_MESSAGE /* winxp */, "got %08x\n", hr );
+ hr == SEC_E_ILLEGAL_MESSAGE /* winxp */, "got %#lx\n", hr );
if (hr != S_OK) goto done;
hr = IWinHttpRequest_get_ResponseText( req, &response );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
ok( !memcmp(response, data_start, sizeof(data_start)), "got %s\n", wine_dbgstr_wn(response, 32) );
SysFreeString( response );
IWinHttpRequest_Release( req );
hr = CoCreateInstance( &CLSID_WinHttpRequest, NULL, CLSCTX_INPROC_SERVER, &IID_IWinHttpRequest, (void **)&req );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
sprintf( buf, "http://localhost:%d/auth", port );
MultiByteToWideChar( CP_ACP, 0, buf, -1, bufW, ARRAY_SIZE( bufW ));
@@ -4621,28 +4617,28 @@ static void test_IWinHttpRequest(int port)
V_VT( &async ) = VT_BOOL;
V_BOOL( &async ) = VARIANT_FALSE;
hr = IWinHttpRequest_Open( req, method, url, async );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
SysFreeString( method );
SysFreeString( url );
hr = IWinHttpRequest_get_Status( req, &status );
- ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %08x\n", hr );
+ ok( hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND ), "got %#lx\n", hr );
V_VT( &data ) = VT_BSTR;
V_BSTR( &data ) = SysAllocString( L"testdata\x80" );
hr = IWinHttpRequest_Send( req, data );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
SysFreeString( V_BSTR( &data ) );
hr = IWinHttpRequest_get_ResponseText( req, &response );
- ok( hr == S_OK, "got %08x\n", hr );
+ ok( hr == S_OK, "got %#lx\n", hr );
ok( !memcmp( response, L"Unauthorized", sizeof(L"Unauthorized") ), "got %s\n", wine_dbgstr_w(response) );
SysFreeString( response );
status = 0xdeadbeef;
hr = IWinHttpRequest_get_Status( req, &status );
- ok( hr == S_OK, "got %08x\n", hr );
- ok( status == HTTP_STATUS_DENIED, "got %d\n", status );
+ ok( hr == S_OK, "got %#lx\n", hr );
+ ok( status == HTTP_STATUS_DENIED, "got %lu\n", status );
done:
IWinHttpRequest_Release( req );
@@ -4666,7 +4662,7 @@ static void request_get_property(IWinHttpRequest *request, int property, VARIANT
VariantInit(ret);
hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0,
DISPATCH_PROPERTYGET, ¶ms, ret, NULL, NULL);
- ok(hr == S_OK, "error %#x\n", hr);
+ ok(hr == S_OK, "error %#lx\n", hr);
}
static void test_IWinHttpRequest_Invoke(void)
@@ -4688,28 +4684,28 @@ static void test_IWinHttpRequest_Invoke(void)
CoInitialize(NULL);
hr = CLSIDFromProgID(L"WinHttp.WinHttpRequest.5.1", &clsid);
- ok(hr == S_OK, "CLSIDFromProgID error %#x\n", hr);
+ ok(hr == S_OK, "CLSIDFromProgID error %#lx\n", hr);
bret = IsEqualIID(&clsid, &CLSID_WinHttpRequest);
ok(bret || broken(!bret) /* win2003 */, "not expected %s\n", wine_dbgstr_guid(&clsid));
hr = CoCreateInstance(&CLSID_WinHttpRequest, 0, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&request);
- ok(hr == S_OK, "error %#x\n", hr);
+ ok(hr == S_OK, "error %#lx\n", hr);
hr = IWinHttpRequest_QueryInterface(request, &IID_IDispatch, (void **)&dispatch);
- ok(hr == S_OK, "error %#x\n", hr);
+ ok(hr == S_OK, "error %#lx\n", hr);
IDispatch_Release(dispatch);
hr = IWinHttpRequest_GetIDsOfNames(request, &IID_NULL, &open, 1, 0x0409, &id);
- ok(hr == S_OK, "error %#x\n", hr);
- ok(id == DISPID_HTTPREQUEST_OPEN, "expected DISPID_HTTPREQUEST_OPEN, got %u\n", id);
+ ok(hr == S_OK, "error %#lx\n", hr);
+ ok(id == DISPID_HTTPREQUEST_OPEN, "expected DISPID_HTTPREQUEST_OPEN, got %lu\n", id);
hr = IWinHttpRequest_GetIDsOfNames(request, &IID_NULL, &option, 1, 0x0409, &id);
- ok(hr == S_OK, "error %#x\n", hr);
- ok(id == DISPID_HTTPREQUEST_OPTION, "expected DISPID_HTTPREQUEST_OPTION, got %u\n", id);
+ ok(hr == S_OK, "error %#lx\n", hr);
+ ok(id == DISPID_HTTPREQUEST_OPTION, "expected DISPID_HTTPREQUEST_OPTION, got %lu\n", id);
request_get_property(request, WinHttpRequestOption_URLCodePage, &ret);
- ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %d\n", V_VT(&ret));
- ok(V_I4(&ret) == CP_UTF8, "expected CP_UTF8, got %d\n", V_I4(&ret));
+ ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %#x\n", V_VT(&ret));
+ ok(V_I4(&ret) == CP_UTF8, "expected CP_UTF8, got %ld\n", V_I4(&ret));
memset(¶ms, 0, sizeof(params));
params.cArgs = 2;
@@ -4722,11 +4718,11 @@ static void test_IWinHttpRequest_Invoke(void)
VariantInit(&ret);
hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0,
DISPATCH_METHOD, ¶ms, NULL, NULL, &err);
- ok(hr == S_OK, "error %#x\n", hr);
+ ok(hr == S_OK, "error %#lx\n", hr);
request_get_property(request, WinHttpRequestOption_URLCodePage, &ret);
- ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %d\n", V_VT(&ret));
- ok(V_I4(&ret) == CP_UTF8, "expected CP_UTF8, got %d\n", V_I4(&ret));
+ ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %#x\n", V_VT(&ret));
+ ok(V_I4(&ret) == CP_UTF8, "expected CP_UTF8, got %ld\n", V_I4(&ret));
memset(¶ms, 0, sizeof(params));
params.cArgs = 2;
@@ -4739,11 +4735,11 @@ static void test_IWinHttpRequest_Invoke(void)
VariantInit(&ret);
hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0,
DISPATCH_METHOD | DISPATCH_PROPERTYPUT, ¶ms, NULL, NULL, &err);
- ok(hr == S_OK, "error %#x\n", hr);
+ ok(hr == S_OK, "error %#lx\n", hr);
request_get_property(request, WinHttpRequestOption_URLCodePage, &ret);
- ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %d\n", V_VT(&ret));
- ok(V_I4(&ret) == CP_UTF8, "expected CP_UTF8, got %d\n", V_I4(&ret));
+ ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %#x\n", V_VT(&ret));
+ ok(V_I4(&ret) == CP_UTF8, "expected CP_UTF8, got %ld\n", V_I4(&ret));
memset(¶ms, 0, sizeof(params));
params.cArgs = 2;
@@ -4756,11 +4752,11 @@ static void test_IWinHttpRequest_Invoke(void)
VariantInit(&ret);
hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0,
DISPATCH_PROPERTYPUT, ¶ms, NULL, NULL, &err);
- ok(hr == S_OK, "error %#x\n", hr);
+ ok(hr == S_OK, "error %#lx\n", hr);
request_get_property(request, WinHttpRequestOption_URLCodePage, &ret);
- ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %d\n", V_VT(&ret));
- ok(V_I4(&ret) == 1252, "expected 1252, got %d\n", V_I4(&ret));
+ ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %#x\n", V_VT(&ret));
+ ok(V_I4(&ret) == 1252, "expected 1252, got %ld\n", V_I4(&ret));
memset(¶ms, 0, sizeof(params));
params.cArgs = 2;
@@ -4772,37 +4768,37 @@ static void test_IWinHttpRequest_Invoke(void)
V_VT(&arg[1]) = VT_R8;
V_R8(&arg[1]) = 2.0; /* WinHttpRequestOption_URLCodePage */
hr = IWinHttpRequest_Invoke(request, id, &IID_NULL, 0, DISPATCH_METHOD, ¶ms, NULL, NULL, &err);
- ok(hr == S_OK, "error %#x\n", hr);
+ ok(hr == S_OK, "error %#lx\n", hr);
request_get_property(request, WinHttpRequestOption_URLCodePage, &ret);
- ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %d\n", V_VT(&ret));
- ok(V_I4(&ret) == 1252, "expected 1252, got %d\n", V_I4(&ret));
+ ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %#x\n", V_VT(&ret));
+ ok(V_I4(&ret) == 1252, "expected 1252, got %ld\n", V_I4(&ret));
VariantInit(&ret);
hr = IWinHttpRequest_Invoke(request, id, &IID_NULL, 0, DISPATCH_METHOD, ¶ms, &ret, NULL, &err);
- ok(hr == S_OK, "error %#x\n", hr);
+ ok(hr == S_OK, "error %#lx\n", hr);
request_get_property(request, WinHttpRequestOption_URLCodePage, &ret);
- ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %d\n", V_VT(&ret));
- ok(V_I4(&ret) == 1252, "expected 1252, got %d\n", V_I4(&ret));
+ ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %#x\n", V_VT(&ret));
+ ok(V_I4(&ret) == 1252, "expected 1252, got %ld\n", V_I4(&ret));
VariantInit(&ret);
hr = IWinHttpRequest_Invoke(request, id, &IID_NULL, 0, DISPATCH_PROPERTYPUT, ¶ms, &ret, NULL, &err);
- ok(hr == S_OK, "error %#x\n", hr);
+ ok(hr == S_OK, "error %#lx\n", hr);
request_get_property(request, WinHttpRequestOption_URLCodePage, &ret);
- ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %d\n", V_VT(&ret));
- ok(V_I4(&ret) == CP_UTF8, "expected CP_UTF8, got %d\n", V_I4(&ret));
+ ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %#x\n", V_VT(&ret));
+ ok(V_I4(&ret) == CP_UTF8, "expected CP_UTF8, got %ld\n", V_I4(&ret));
hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, DISPATCH_PROPERTYPUT, ¶ms, NULL, NULL, NULL);
- ok(hr == S_OK, "error %#x\n", hr);
+ ok(hr == S_OK, "error %#lx\n", hr);
hr = IWinHttpRequest_Invoke(request, 255, &IID_NULL, 0, DISPATCH_PROPERTYPUT, ¶ms, NULL, NULL, NULL);
- ok(hr == DISP_E_MEMBERNOTFOUND, "error %#x\n", hr);
+ ok(hr == DISP_E_MEMBERNOTFOUND, "error %#lx\n", hr);
VariantInit(&ret);
hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_IUnknown, 0, DISPATCH_PROPERTYPUT, ¶ms, &ret, NULL, &err);
- ok(hr == DISP_E_UNKNOWNINTERFACE, "error %#x\n", hr);
+ ok(hr == DISP_E_UNKNOWNINTERFACE, "error %#lx\n", hr);
VariantInit(&ret);
if (0) /* crashes */
@@ -4810,13 +4806,13 @@ static void test_IWinHttpRequest_Invoke(void)
params.cArgs = 1;
hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, DISPATCH_PROPERTYPUT, ¶ms, &ret, NULL, &err);
- ok(hr == DISP_E_TYPEMISMATCH, "error %#x\n", hr);
+ ok(hr == DISP_E_TYPEMISMATCH, "error %#lx\n", hr);
VariantInit(&arg[2]);
params.cArgs = 3;
hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, DISPATCH_PROPERTYPUT, ¶ms, &ret, NULL, &err);
todo_wine
- ok(hr == S_OK, "error %#x\n", hr);
+ ok(hr == S_OK, "error %#lx\n", hr);
VariantInit(&arg[0]);
VariantInit(&arg[1]);
@@ -4826,46 +4822,46 @@ static void test_IWinHttpRequest_Invoke(void)
V_VT(&arg[0]) = VT_I4;
V_I4(&arg[0]) = WinHttpRequestOption_URLCodePage;
hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, DISPATCH_PROPERTYGET, ¶ms, NULL, NULL, NULL);
- ok(hr == S_OK, "error %#x\n", hr);
+ ok(hr == S_OK, "error %#lx\n", hr);
V_VT(&ret) = 0xdead;
V_I4(&ret) = 0xbeef;
hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, DISPATCH_METHOD|DISPATCH_PROPERTYGET, ¶ms, &ret, NULL, NULL);
- ok(hr == S_OK, "error %#x\n", hr);
- ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %d\n", V_VT(&ret));
- ok(V_I4(&ret) == CP_UTF8, "expected CP_UTF8, got %d\n", V_I4(&ret));
+ ok(hr == S_OK, "error %#lx\n", hr);
+ ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %#x\n", V_VT(&ret));
+ ok(V_I4(&ret) == CP_UTF8, "expected CP_UTF8, got %ld\n", V_I4(&ret));
V_VT(&ret) = 0xdead;
V_I4(&ret) = 0xbeef;
hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, DISPATCH_METHOD, ¶ms, &ret, NULL, NULL);
- ok(hr == S_OK, "error %#x\n", hr);
- ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %d\n", V_VT(&ret));
- ok(V_I4(&ret) == CP_UTF8, "expected CP_UTF8, got %d\n", V_I4(&ret));
+ ok(hr == S_OK, "error %#lx\n", hr);
+ ok(V_VT(&ret) == VT_I4, "expected VT_I4, got %#x\n", V_VT(&ret));
+ ok(V_I4(&ret) == CP_UTF8, "expected CP_UTF8, got %ld\n", V_I4(&ret));
hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, DISPATCH_METHOD|DISPATCH_PROPERTYGET, ¶ms, NULL, NULL, NULL);
- ok(hr == S_OK, "error %#x\n", hr);
+ ok(hr == S_OK, "error %#lx\n", hr);
V_VT(&ret) = 0xdead;
V_I4(&ret) = 0xbeef;
hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, 0, ¶ms, &ret, NULL, NULL);
- ok(hr == S_OK, "error %#x\n", hr);
- ok(V_VT(&ret) == VT_EMPTY, "expected VT_EMPTY, got %d\n", V_VT(&ret));
- ok(V_I4(&ret) == 0xbeef || V_I4(&ret) == 0 /* Win8 */, "expected 0xdead, got %d\n", V_I4(&ret));
+ ok(hr == S_OK, "error %#lx\n", hr);
+ ok(V_VT(&ret) == VT_EMPTY, "expected VT_EMPTY, got %#x\n", V_VT(&ret));
+ ok(V_I4(&ret) == 0xbeef || V_I4(&ret) == 0 /* Win8 */, "expected 0xdead, got %ld\n", V_I4(&ret));
hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, 0, ¶ms, NULL, NULL, NULL);
- ok(hr == S_OK, "error %#x\n", hr);
+ ok(hr == S_OK, "error %#lx\n", hr);
hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_IUnknown, 0, DISPATCH_PROPERTYGET, ¶ms, NULL, NULL, NULL);
- ok(hr == DISP_E_UNKNOWNINTERFACE, "error %#x\n", hr);
+ ok(hr == DISP_E_UNKNOWNINTERFACE, "error %#lx\n", hr);
params.cArgs = 2;
hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, DISPATCH_PROPERTYGET, ¶ms, NULL, NULL, NULL);
todo_wine
- ok(hr == S_OK, "error %#x\n", hr);
+ ok(hr == S_OK, "error %#lx\n", hr);
params.cArgs = 0;
hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, DISPATCH_PROPERTYGET, ¶ms, NULL, NULL, NULL);
- ok(hr == DISP_E_PARAMNOTFOUND, "error %#x\n", hr);
+ ok(hr == DISP_E_PARAMNOTFOUND, "error %#lx\n", hr);
SysFreeString(utf8);
@@ -4875,7 +4871,7 @@ static void test_IWinHttpRequest_Invoke(void)
VariantInit(&ret);
hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_SETAUTOLOGONPOLICY, &IID_NULL, 0,
DISPATCH_METHOD, ¶ms, &ret, NULL, NULL);
- ok(hr == S_OK, "error %#x\n", hr);
+ ok(hr == S_OK, "error %#lx\n", hr);
IWinHttpRequest_Release(request);
@@ -4892,20 +4888,20 @@ static void test_WinHttpDetectAutoProxyConfigUrl(void)
ret = WinHttpDetectAutoProxyConfigUrl( 0, NULL );
error = GetLastError();
ok( !ret, "expected failure\n" );
- ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
+ ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
url = NULL;
SetLastError(0xdeadbeef);
ret = WinHttpDetectAutoProxyConfigUrl( 0, &url );
error = GetLastError();
ok( !ret, "expected failure\n" );
- ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
+ ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
SetLastError(0xdeadbeef);
ret = WinHttpDetectAutoProxyConfigUrl( WINHTTP_AUTO_DETECT_TYPE_DNS_A, NULL );
error = GetLastError();
ok( !ret, "expected failure\n" );
- ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
+ ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
url = (WCHAR *)0xdeadbeef;
SetLastError(0xdeadbeef);
@@ -4913,7 +4909,7 @@ static void test_WinHttpDetectAutoProxyConfigUrl(void)
error = GetLastError();
if (!ret)
{
- ok( error == ERROR_WINHTTP_AUTODETECTION_FAILED, "got %u\n", error );
+ ok( error == ERROR_WINHTTP_AUTODETECTION_FAILED, "got %lu\n", error );
ok( !url || broken(url == (WCHAR *)0xdeadbeef), "got %p\n", url );
}
else
@@ -4928,12 +4924,12 @@ static void test_WinHttpDetectAutoProxyConfigUrl(void)
error = GetLastError();
if (!ret)
{
- ok( error == ERROR_WINHTTP_AUTODETECTION_FAILED, "got %u\n", error );
+ ok( error == ERROR_WINHTTP_AUTODETECTION_FAILED, "got %lu\n", error );
ok( !url || broken(url == (WCHAR *)0xdeadbeef), "got %p\n", url );
}
else
{
- ok( error == ERROR_SUCCESS, "got %u\n", error );
+ ok( error == ERROR_SUCCESS, "got %lu\n", error );
trace("%s\n", wine_dbgstr_w(url));
GlobalFree( url );
}
@@ -4951,13 +4947,13 @@ static void test_WinHttpGetIEProxyConfigForCurrentUser(void)
ret = WinHttpGetIEProxyConfigForCurrentUser( NULL );
error = GetLastError();
ok( !ret, "expected failure\n" );
- ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
+ ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
SetLastError(0xdeadbeef);
ret = WinHttpGetIEProxyConfigForCurrentUser( &cfg );
error = GetLastError();
ok( ret, "expected success\n" );
- ok( error == ERROR_SUCCESS || broken(error == ERROR_NO_TOKEN) /* < win7 */, "got %u\n", error );
+ ok( error == ERROR_SUCCESS || broken(error == ERROR_NO_TOKEN) /* < win7 */, "got %lu\n", error );
trace("IEProxy.AutoDetect=%d\n", cfg.fAutoDetect);
trace("IEProxy.AutoConfigUrl=%s\n", wine_dbgstr_w(cfg.lpszAutoConfigUrl));
@@ -4982,34 +4978,34 @@ static void test_WinHttpGetProxyForUrl(void)
ret = WinHttpGetProxyForUrl( NULL, NULL, NULL, NULL );
error = GetLastError();
ok( !ret, "expected failure\n" );
- ok( error == ERROR_INVALID_HANDLE, "got %u\n", error );
+ ok( error == ERROR_INVALID_HANDLE, "got %lu\n", error );
session = WinHttpOpen( L"winetest", 0, NULL, NULL, 0 );
- ok( session != NULL, "failed to open session %u\n", GetLastError() );
+ ok( session != NULL, "failed to open session %lu\n", GetLastError() );
SetLastError(0xdeadbeef);
ret = WinHttpGetProxyForUrl( session, NULL, NULL, NULL );
error = GetLastError();
ok( !ret, "expected failure\n" );
- ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
+ ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
SetLastError(0xdeadbeef);
ret = WinHttpGetProxyForUrl( session, L"", NULL, NULL );
error = GetLastError();
ok( !ret, "expected failure\n" );
- ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
+ ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
SetLastError(0xdeadbeef);
ret = WinHttpGetProxyForUrl( session, L"http://winehq.org", NULL, NULL );
error = GetLastError();
ok( !ret, "expected failure\n" );
- ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
+ ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
SetLastError(0xdeadbeef);
ret = WinHttpGetProxyForUrl( session, L"http://winehq.org", &options, &info );
error = GetLastError();
ok( !ret, "expected failure\n" );
- ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
+ ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
options.dwFlags = WINHTTP_AUTOPROXY_AUTO_DETECT;
options.dwAutoDetectFlags = WINHTTP_AUTO_DETECT_TYPE_DNS_A;
@@ -5018,7 +5014,7 @@ static void test_WinHttpGetProxyForUrl(void)
ret = WinHttpGetProxyForUrl( session, L"http://winehq.org", &options, NULL );
error = GetLastError();
ok( !ret, "expected failure\n" );
- ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
+ ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
options.dwFlags = WINHTTP_AUTOPROXY_AUTO_DETECT;
options.dwAutoDetectFlags = 0;
@@ -5027,7 +5023,7 @@ static void test_WinHttpGetProxyForUrl(void)
ret = WinHttpGetProxyForUrl( session, L"http://winehq.org", &options, &info );
error = GetLastError();
ok( !ret, "expected failure\n" );
- ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
+ ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
options.dwFlags = WINHTTP_AUTOPROXY_AUTO_DETECT | WINHTTP_AUTOPROXY_CONFIG_URL;
options.dwAutoDetectFlags = WINHTTP_AUTO_DETECT_TYPE_DNS_A;
@@ -5036,7 +5032,7 @@ static void test_WinHttpGetProxyForUrl(void)
ret = WinHttpGetProxyForUrl( session, L"http://winehq.org", &options, &info );
error = GetLastError();
ok( !ret, "expected failure\n" );
- ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
+ ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
options.dwFlags = WINHTTP_AUTOPROXY_AUTO_DETECT;
options.dwAutoDetectFlags = WINHTTP_AUTO_DETECT_TYPE_DNS_A;
@@ -5047,8 +5043,8 @@ static void test_WinHttpGetProxyForUrl(void)
error = GetLastError();
if (ret)
{
- ok( error == ERROR_SUCCESS, "got %u\n", error );
- trace("Proxy.AccessType=%u\n", info.dwAccessType);
+ ok( error == ERROR_SUCCESS, "got %lu\n", error );
+ trace("Proxy.AccessType=%lu\n", info.dwAccessType);
trace("Proxy.Proxy=%s\n", wine_dbgstr_w(info.lpszProxy));
trace("Proxy.ProxyBypass=%s\n", wine_dbgstr_w(info.lpszProxyBypass));
GlobalFree( info.lpszProxy );
@@ -5066,7 +5062,7 @@ static void test_WinHttpGetProxyForUrl(void)
ret = WinHttpGetProxyForUrl( session, L"http://winehq.org", &options, &info );
if (ret)
{
- trace("Proxy.AccessType=%u\n", info.dwAccessType);
+ trace("Proxy.AccessType=%lu\n", info.dwAccessType);
trace("Proxy.Proxy=%s\n", wine_dbgstr_w(info.lpszProxy));
trace("Proxy.ProxyBypass=%s\n", wine_dbgstr_w(info.lpszProxyBypass));
GlobalFree( info.lpszProxy );
@@ -5092,15 +5088,15 @@ static void test_chunked_read(void)
trace( "starting chunked read test\n" );
ses = WinHttpOpen( L"winetest", 0, NULL, NULL, 0 );
- ok( ses != NULL, "WinHttpOpen failed with error %u\n", GetLastError() );
+ ok( ses != NULL, "WinHttpOpen failed with error %lu\n", GetLastError() );
if (!ses) goto done;
con = WinHttpConnect( ses, L"test.winehq.org", 0, 0 );
- ok( con != NULL, "WinHttpConnect failed with error %u\n", GetLastError() );
+ ok( con != NULL, "WinHttpConnect failed with error %lu\n", GetLastError() );
if (!con) goto done;
req = WinHttpOpenRequest( con, NULL, L"/tests/chunked", NULL, NULL, NULL, 0 );
- ok( req != NULL, "WinHttpOpenRequest failed with error %u\n", GetLastError() );
+ ok( req != NULL, "WinHttpOpenRequest failed with error %lu\n", GetLastError() );
if (!req) goto done;
ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 );
@@ -5110,17 +5106,17 @@ static void test_chunked_read(void)
skip("connection failed, skipping\n");
goto done;
}
- ok( ret, "WinHttpSendRequest failed with error %u\n", GetLastError() );
+ ok( ret, "WinHttpSendRequest failed with error %lu\n", GetLastError() );
if (!ret) goto done;
ret = WinHttpReceiveResponse( req, NULL );
- ok( ret, "WinHttpReceiveResponse failed with error %u\n", GetLastError() );
+ ok( ret, "WinHttpReceiveResponse failed with error %lu\n", GetLastError() );
if (!ret) goto done;
header[0] = 0;
len = sizeof(header);
ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_TRANSFER_ENCODING, NULL, header, &len, 0 );
- ok( ret, "failed to get TRANSFER_ENCODING header (error %u)\n", GetLastError() );
+ ok( ret, "failed to get TRANSFER_ENCODING header (error %lu\n", GetLastError() );
ok( !lstrcmpW( header, L"chunked" ), "wrong transfer encoding %s\n", wine_dbgstr_w(header) );
trace( "transfer encoding: %s\n", wine_dbgstr_w(header) );
@@ -5129,27 +5125,27 @@ static void test_chunked_read(void)
SetLastError( 0xdeadbeef );
ret = WinHttpQueryHeaders( req, WINHTTP_QUERY_CONTENT_LENGTH, NULL, &header, &len, 0 );
ok( !ret, "unexpected CONTENT_LENGTH header %s\n", wine_dbgstr_w(header) );
- ok( GetLastError() == ERROR_WINHTTP_HEADER_NOT_FOUND, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_WINHTTP_HEADER_NOT_FOUND, "wrong error %lu\n", GetLastError() );
trace( "entering query loop\n" );
for (;;)
{
len = 0xdeadbeef;
ret = WinHttpQueryDataAvailable( req, &len );
- ok( ret, "WinHttpQueryDataAvailable failed with error %u\n", GetLastError() );
+ ok( ret, "WinHttpQueryDataAvailable failed with error %lu\n", GetLastError() );
if (ret) ok( len != 0xdeadbeef, "WinHttpQueryDataAvailable return wrong length\n" );
- trace( "got %u available\n", len );
+ trace( "got %lu available\n", len );
if (len)
{
DWORD bytes_read;
char *buf = HeapAlloc( GetProcessHeap(), 0, len + 1 );
ret = WinHttpReadData( req, buf, len, &bytes_read );
- ok(ret, "WinHttpReadData failed: %u.\n", GetLastError());
+ ok(ret, "WinHttpReadData failed: %lu\n", GetLastError());
buf[bytes_read] = 0;
- trace( "WinHttpReadData -> %d %u\n", ret, bytes_read );
- ok( len == bytes_read, "only got %u of %u available\n", bytes_read, len );
+ trace( "WinHttpReadData -> %d %lu\n", ret, bytes_read );
+ ok( len == bytes_read, "only got %lu of %lu available\n", bytes_read, len );
ok( buf[bytes_read - 1] == '\n', "received partial line '%s'\n", buf );
HeapFree( GetProcessHeap(), 0, buf );
@@ -5176,7 +5172,7 @@ static void test_max_http_automatic_redirects (void)
ok(session != NULL, "WinHttpOpen failed to open session.\n");
connection = WinHttpConnect (session, L"test.winehq.org", INTERNET_DEFAULT_HTTP_PORT, 0);
- ok(connection != NULL, "WinHttpConnect failed to open a connection, error: %u.\n", GetLastError());
+ ok(connection != NULL, "WinHttpConnect failed to open a connection, error: %lu\n", GetLastError());
/* Test with 2 redirects (page will try to redirect 3 times) */
request = WinHttpOpenRequest(connection, L"GET", L"tests/redirecttest.php?max=3", NULL, WINHTTP_NO_REFERER,
@@ -5186,12 +5182,12 @@ static void test_max_http_automatic_redirects (void)
skip("Network unreachable, skipping.\n");
goto done;
}
- ok(request != NULL, "WinHttpOpenRequest failed to open a request, error: %u.\n", GetLastError());
+ ok(request != NULL, "WinHttpOpenRequest failed to open a request, error: %lu\n", GetLastError());
if (!request) goto done;
max_redirects = 2;
ret = WinHttpSetOption(request, WINHTTP_OPTION_MAX_HTTP_AUTOMATIC_REDIRECTS, &max_redirects, sizeof(max_redirects));
- ok(ret, "WinHttpSetOption failed: %u\n", GetLastError());
+ ok(ret, "WinHttpSetOption failed: %lu\n", GetLastError());
ret = WinHttpSendRequest(request, WINHTTP_NO_ADDITIONAL_HEADERS, 0, WINHTTP_NO_REQUEST_DATA, 0, 0, 0);
err = GetLastError();
@@ -5200,12 +5196,12 @@ static void test_max_http_automatic_redirects (void)
skip("connection failed, skipping\n");
goto done;
}
- ok(ret == TRUE, "WinHttpSendRequest failed: %u\n", GetLastError());
+ ok(ret == TRUE, "WinHttpSendRequest failed: %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WinHttpReceiveResponse(request, NULL);
ok(!ret, "WinHttpReceiveResponse succeeded, expected failure\n");
- ok(GetLastError() == ERROR_WINHTTP_REDIRECT_FAILED, "Expected ERROR_WINHTTP_REDIRECT_FAILED, got %u.\n", GetLastError());
+ ok(GetLastError() == ERROR_WINHTTP_REDIRECT_FAILED, "Expected ERROR_WINHTTP_REDIRECT_FAILED, got %lu\n", GetLastError());
done:
ret = WinHttpCloseHandle(request);
@@ -5468,7 +5464,7 @@ static void test_client_cert_authentication(void)
const CERT_CONTEXT *cert;
ses = WinHttpOpen( L"winetest", WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0 );
- ok( ses != NULL, "failed to open session %u\n", GetLastError() );
+ ok( ses != NULL, "failed to open session %lu\n", GetLastError() );
protocols = WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_1;
ret = WinHttpSetOption( ses, WINHTTP_OPTION_SECURE_PROTOCOLS, &protocols, sizeof(protocols) );
@@ -5478,38 +5474,38 @@ static void test_client_cert_authentication(void)
WinHttpCloseHandle( ses );
return;
}
- ok( ret, "failed to set protocols %u\n", GetLastError() );
+ ok( ret, "failed to set protocols %lu\n", GetLastError() );
con = WinHttpConnect( ses, L"test.winehq.org", 443, 0 );
- ok( con != NULL, "failed to open a connection %u\n", GetLastError() );
+ ok( con != NULL, "failed to open a connection %lu\n", GetLastError() );
req = WinHttpOpenRequest( con, NULL, L"/tests/clientcert/", NULL, NULL, NULL, WINHTTP_FLAG_SECURE );
- ok( req != NULL, "failed to open a request %u\n", GetLastError() );
+ ok( req != NULL, "failed to open a request %lu\n", GetLastError() );
ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 );
- ok( ret, "failed to send request %u\n", GetLastError() );
+ ok( ret, "failed to send request %lu\n", GetLastError() );
SetLastError( 0xdeadbeef );
ret = WinHttpReceiveResponse( req, NULL );
ok( !ret, "unexpected success\n" );
- ok( GetLastError() == ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED, "got %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED, "got %lu\n", GetLastError() );
pfx.pbData = (BYTE *)pfxdata;
pfx.cbData = sizeof(pfxdata);
store = PFXImportCertStore( &pfx, NULL, CRYPT_EXPORTABLE|CRYPT_USER_KEYSET|PKCS12_NO_PERSIST_KEY );
- ok( store != NULL, "got %u\n", GetLastError() );
+ ok( store != NULL, "got %lu\n", GetLastError() );
cert = CertFindCertificateInStore( store, X509_ASN_ENCODING, 0, CERT_FIND_ANY, NULL, NULL );
- ok( cert != NULL, "got %u\n", GetLastError() );
+ ok( cert != NULL, "got %lu\n", GetLastError() );
ret = WinHttpSetOption( req, WINHTTP_OPTION_CLIENT_CERT_CONTEXT, (void *)cert, sizeof(*cert) );
- ok( ret, "failed to set client cert %u\n", GetLastError() );
+ ok( ret, "failed to set client cert %lu\n", GetLastError() );
ret = WinHttpSendRequest( req, NULL, 0, NULL, 0, 0, 0 );
- ok( ret, "failed to send request %u\n", GetLastError() );
+ ok( ret, "failed to send request %lu\n", GetLastError() );
ret = WinHttpReceiveResponse( req, NULL );
- ok( ret, "failed to receive response %u\n", GetLastError() );
+ ok( ret, "failed to receive response %lu\n", GetLastError() );
CertFreeCertificateContext( cert );
CertCloseStore( store, 0 );
@@ -5557,10 +5553,10 @@ START_TEST (winhttp)
si.port = 7532;
thread = CreateThread(NULL, 0, server_thread, &si, 0, NULL);
- ok(thread != NULL, "failed to create thread %u\n", GetLastError());
+ ok(thread != NULL, "failed to create thread %lu\n", GetLastError());
ret = WaitForSingleObject(si.event, 10000);
- ok(ret == WAIT_OBJECT_0, "failed to start winhttp test server %u\n", GetLastError());
+ ok(ret == WAIT_OBJECT_0, "failed to start winhttp test server %lu\n", GetLastError());
if (ret != WAIT_OBJECT_0)
{
CloseHandle(thread);
--
2.30.2
1
0
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/msi/tests/action.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c
index 7de4fb7c52c..224637eb286 100644
--- a/dlls/msi/tests/action.c
+++ b/dlls/msi/tests/action.c
@@ -3022,7 +3022,7 @@ error:
DeleteFileA(msifile);
DeleteFileA("msitest\\maximus");
RemoveDirectoryA("msitest");
- free(usersid);
+ LocalFree(usersid);
}
static void test_publish_product(void)
@@ -3259,7 +3259,7 @@ error:
DeleteFileA(msifile);
DeleteFileA("msitest\\maximus");
RemoveDirectoryA("msitest");
- free(usersid);
+ LocalFree(usersid);
}
static void test_publish_features(void)
@@ -3384,7 +3384,7 @@ error:
DeleteFileA(msifile);
DeleteFileA("msitest\\maximus");
RemoveDirectoryA("msitest");
- free(usersid);
+ LocalFree(usersid);
}
static LPSTR reg_get_val_str(HKEY hkey, LPCSTR name)
--
2.30.2
1
0
Feb. 8, 2022
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
dlls/dinput/ansi.c | 54 ++++++++---------
dlls/dinput/device.c | 4 +-
dlls/dinput/device_private.h | 4 +-
dlls/dinput/dinput_main.c | 111 +++++++++++++++++------------------
dlls/dinput/dinput_private.h | 29 +++++----
dlls/dinput/joystick_hid.c | 2 +-
dlls/dinput/keyboard.c | 2 +-
dlls/dinput/mouse.c | 2 +-
8 files changed, 103 insertions(+), 105 deletions(-)
diff --git a/dlls/dinput/ansi.c b/dlls/dinput/ansi.c
index b7ec426b2e0..99ec3c73327 100644
--- a/dlls/dinput/ansi.c
+++ b/dlls/dinput/ansi.c
@@ -54,22 +54,22 @@ static inline IDirectInputDeviceA *IDirectInputDeviceA_from_IDirectInputDeviceW(
return (IDirectInputDeviceA *)IDirectInputDevice8A_from_IDirectInputDevice8W( (IDirectInputDevice8W *)iface );
}
-static IDirectInputImpl *impl_from_IDirectInput7A( IDirectInput7A *iface )
+static struct dinput *impl_from_IDirectInput7A( IDirectInput7A *iface )
{
- return CONTAINING_RECORD( iface, IDirectInputImpl, IDirectInput7A_iface );
+ return CONTAINING_RECORD( iface, struct dinput, IDirectInput7A_iface );
}
-static IDirectInput7W *IDirectInput7W_from_impl( IDirectInputImpl *impl )
+static IDirectInput7W *IDirectInput7W_from_impl( struct dinput *impl )
{
return &impl->IDirectInput7W_iface;
}
-static IDirectInputImpl *impl_from_IDirectInput8A( IDirectInput8A *iface )
+static struct dinput *impl_from_IDirectInput8A( IDirectInput8A *iface )
{
- return CONTAINING_RECORD( iface, IDirectInputImpl, IDirectInput8A_iface );
+ return CONTAINING_RECORD( iface, struct dinput, IDirectInput8A_iface );
}
-static IDirectInput8W *IDirectInput8W_from_impl( IDirectInputImpl *impl )
+static IDirectInput8W *IDirectInput8W_from_impl( struct dinput *impl )
{
return &impl->IDirectInput8W_iface;
}
@@ -678,28 +678,28 @@ const IDirectInputDevice8AVtbl dinput_device_a_vtbl =
static HRESULT WINAPI dinput8_a_QueryInterface( IDirectInput8A *iface_a, REFIID iid, void **out )
{
- IDirectInputImpl *impl = impl_from_IDirectInput8A( iface_a );
+ struct dinput *impl = impl_from_IDirectInput8A( iface_a );
IDirectInput8W *iface_w = IDirectInput8W_from_impl( impl );
return IDirectInput8_QueryInterface( iface_w, iid, out );
}
static ULONG WINAPI dinput8_a_AddRef( IDirectInput8A *iface_a )
{
- IDirectInputImpl *impl = impl_from_IDirectInput8A( iface_a );
+ struct dinput *impl = impl_from_IDirectInput8A( iface_a );
IDirectInput8W *iface_w = IDirectInput8W_from_impl( impl );
return IDirectInput8_AddRef( iface_w );
}
static ULONG WINAPI dinput8_a_Release( IDirectInput8A *iface_a )
{
- IDirectInputImpl *impl = impl_from_IDirectInput8A( iface_a );
+ struct dinput *impl = impl_from_IDirectInput8A( iface_a );
IDirectInput8W *iface_w = IDirectInput8W_from_impl( impl );
return IDirectInput8_Release( iface_w );
}
static HRESULT WINAPI dinput8_a_CreateDevice( IDirectInput8A *iface_a, REFGUID guid, IDirectInputDevice8A **out, IUnknown *outer )
{
- IDirectInputImpl *impl = impl_from_IDirectInput8A( iface_a );
+ struct dinput *impl = impl_from_IDirectInput8A( iface_a );
IDirectInput8W *iface_w = IDirectInput8W_from_impl( impl );
IDirectInputDevice8W *outw;
HRESULT hr;
@@ -730,7 +730,7 @@ static HRESULT WINAPI dinput8_a_EnumDevices( IDirectInput8A *iface_a, DWORD type
void *ref, DWORD flags )
{
struct enum_devices_wtoa_params params = {callback, ref};
- IDirectInputImpl *impl = impl_from_IDirectInput8A( iface_a );
+ struct dinput *impl = impl_from_IDirectInput8A( iface_a );
IDirectInput8W *iface_w = IDirectInput8W_from_impl( impl );
if (!callback) return DIERR_INVALIDPARAM;
@@ -740,28 +740,28 @@ static HRESULT WINAPI dinput8_a_EnumDevices( IDirectInput8A *iface_a, DWORD type
static HRESULT WINAPI dinput8_a_GetDeviceStatus( IDirectInput8A *iface_a, REFGUID instance_guid )
{
- IDirectInputImpl *impl = impl_from_IDirectInput8A( iface_a );
+ struct dinput *impl = impl_from_IDirectInput8A( iface_a );
IDirectInput8W *iface_w = IDirectInput8W_from_impl( impl );
return IDirectInput8_GetDeviceStatus( iface_w, instance_guid );
}
static HRESULT WINAPI dinput8_a_RunControlPanel( IDirectInput8A *iface_a, HWND owner, DWORD flags )
{
- IDirectInputImpl *impl = impl_from_IDirectInput8A( iface_a );
+ struct dinput *impl = impl_from_IDirectInput8A( iface_a );
IDirectInput8W *iface_w = IDirectInput8W_from_impl( impl );
return IDirectInput8_RunControlPanel( iface_w, owner, flags );
}
static HRESULT WINAPI dinput8_a_Initialize( IDirectInput8A *iface_a, HINSTANCE instance, DWORD version )
{
- IDirectInputImpl *impl = impl_from_IDirectInput8A( iface_a );
+ struct dinput *impl = impl_from_IDirectInput8A( iface_a );
IDirectInput8W *iface_w = IDirectInput8W_from_impl( impl );
return IDirectInput8_Initialize( iface_w, instance, version );
}
static HRESULT WINAPI dinput8_a_FindDevice( IDirectInput8A *iface_a, REFGUID guid, const char *name_a, GUID *instance_guid )
{
- IDirectInputImpl *impl = impl_from_IDirectInput8A( iface_a );
+ struct dinput *impl = impl_from_IDirectInput8A( iface_a );
IDirectInput8W *iface_w = IDirectInput8W_from_impl( impl );
HRESULT hr;
WCHAR *name_w;
@@ -794,7 +794,7 @@ static HRESULT WINAPI dinput8_a_EnumDevicesBySemantics( IDirectInput8A *iface_a,
LPDIENUMDEVICESBYSEMANTICSCBA callback, void *ref, DWORD flags )
{
struct enum_devices_by_semantics_wtoa_params params = {callback, ref};
- IDirectInputImpl *impl = impl_from_IDirectInput8A( iface_a );
+ struct dinput *impl = impl_from_IDirectInput8A( iface_a );
DIACTIONFORMATW format_w = {sizeof(format_w), sizeof(DIACTIONW)};
IDirectInput8W *iface_w = IDirectInput8W_from_impl( impl );
HRESULT hr;
@@ -821,7 +821,7 @@ static HRESULT WINAPI dinput8_a_EnumDevicesBySemantics( IDirectInput8A *iface_a,
static HRESULT WINAPI dinput8_a_ConfigureDevices( IDirectInput8A *iface_a, LPDICONFIGUREDEVICESCALLBACK callback,
DICONFIGUREDEVICESPARAMSA *params_a, DWORD flags, void *ref )
{
- IDirectInputImpl *impl = impl_from_IDirectInput8A( iface_a );
+ struct dinput *impl = impl_from_IDirectInput8A( iface_a );
IDirectInput8W *iface_w = IDirectInput8W_from_impl( impl );
DICONFIGUREDEVICESPARAMSW params_w = {sizeof(params_w)};
DIACTIONFORMATA *format_a = params_a->lprgFormats;
@@ -873,28 +873,28 @@ const IDirectInput8AVtbl dinput8_a_vtbl =
static HRESULT WINAPI dinput7_a_QueryInterface( IDirectInput7A *iface_a, REFIID iid, void **out )
{
- IDirectInputImpl *impl = impl_from_IDirectInput7A( iface_a );
+ struct dinput *impl = impl_from_IDirectInput7A( iface_a );
IDirectInput7W *iface_w = IDirectInput7W_from_impl( impl );
return IDirectInput7_QueryInterface( iface_w, iid, out );
}
static ULONG WINAPI dinput7_a_AddRef( IDirectInput7A *iface_a )
{
- IDirectInputImpl *impl = impl_from_IDirectInput7A( iface_a );
+ struct dinput *impl = impl_from_IDirectInput7A( iface_a );
IDirectInput7W *iface_w = IDirectInput7W_from_impl( impl );
return IDirectInput7_AddRef( iface_w );
}
static ULONG WINAPI dinput7_a_Release( IDirectInput7A *iface_a )
{
- IDirectInputImpl *impl = impl_from_IDirectInput7A( iface_a );
+ struct dinput *impl = impl_from_IDirectInput7A( iface_a );
IDirectInput7W *iface_w = IDirectInput7W_from_impl( impl );
return IDirectInput7_Release( iface_w );
}
static HRESULT WINAPI dinput7_a_CreateDevice( IDirectInput7A *iface_a, REFGUID guid, IDirectInputDeviceA **out_a, IUnknown *outer )
{
- IDirectInputImpl *impl = impl_from_IDirectInput7A( iface_a );
+ struct dinput *impl = impl_from_IDirectInput7A( iface_a );
IDirectInput7W *iface_w = IDirectInput7W_from_impl( impl );
IDirectInputDeviceW *out_w;
HRESULT hr;
@@ -910,7 +910,7 @@ static HRESULT WINAPI dinput7_a_EnumDevices( IDirectInput7A *iface_a, DWORD type
void *ref, DWORD flags )
{
struct enum_devices_wtoa_params params = {callback, ref};
- IDirectInputImpl *impl = impl_from_IDirectInput7A( iface_a );
+ struct dinput *impl = impl_from_IDirectInput7A( iface_a );
IDirectInput7W *iface_w = IDirectInput7W_from_impl( impl );
if (!callback) return DIERR_INVALIDPARAM;
@@ -920,28 +920,28 @@ static HRESULT WINAPI dinput7_a_EnumDevices( IDirectInput7A *iface_a, DWORD type
static HRESULT WINAPI dinput7_a_GetDeviceStatus( IDirectInput7A *iface_a, REFGUID instance_guid )
{
- IDirectInputImpl *impl = impl_from_IDirectInput7A( iface_a );
+ struct dinput *impl = impl_from_IDirectInput7A( iface_a );
IDirectInput7W *iface_w = IDirectInput7W_from_impl( impl );
return IDirectInput7_GetDeviceStatus( iface_w, instance_guid );
}
static HRESULT WINAPI dinput7_a_RunControlPanel( IDirectInput7A *iface_a, HWND owner, DWORD flags )
{
- IDirectInputImpl *impl = impl_from_IDirectInput7A( iface_a );
+ struct dinput *impl = impl_from_IDirectInput7A( iface_a );
IDirectInput7W *iface_w = IDirectInput7W_from_impl( impl );
return IDirectInput7_RunControlPanel( iface_w, owner, flags );
}
static HRESULT WINAPI dinput7_a_Initialize( IDirectInput7A *iface_a, HINSTANCE instance, DWORD version )
{
- IDirectInputImpl *impl = impl_from_IDirectInput7A( iface_a );
+ struct dinput *impl = impl_from_IDirectInput7A( iface_a );
IDirectInput7W *iface_w = IDirectInput7W_from_impl( impl );
return IDirectInput7_Initialize( iface_w, instance, version );
}
static HRESULT WINAPI dinput7_a_FindDevice( IDirectInput7A *iface_a, REFGUID guid, const char *name_a, GUID *instance_guid )
{
- IDirectInputImpl *impl = impl_from_IDirectInput7A( iface_a );
+ struct dinput *impl = impl_from_IDirectInput7A( iface_a );
IDirectInput7W *iface_w = IDirectInput7W_from_impl( impl );
HRESULT hr;
WCHAR *name_w;
@@ -955,7 +955,7 @@ static HRESULT WINAPI dinput7_a_FindDevice( IDirectInput7A *iface_a, REFGUID gui
static HRESULT WINAPI dinput7_a_CreateDeviceEx( IDirectInput7A *iface_a, REFGUID guid, REFIID iid, void **out, IUnknown *outer )
{
- IDirectInputImpl *impl = impl_from_IDirectInput7A( iface_a );
+ struct dinput *impl = impl_from_IDirectInput7A( iface_a );
IDirectInput7W *iface_w = IDirectInput7W_from_impl( impl );
return IDirectInput7_CreateDeviceEx( iface_w, guid, iid, out, outer );
}
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
index ff8e2252a40..8c48fa7b53b 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -2153,8 +2153,8 @@ static const IDirectInputDevice8WVtbl dinput_device_w_vtbl =
dinput_device_GetImageInfo,
};
-HRESULT dinput_device_alloc( SIZE_T size, const struct dinput_device_vtbl *vtbl,
- const GUID *guid, IDirectInputImpl *dinput, void **out )
+HRESULT dinput_device_alloc( SIZE_T size, const struct dinput_device_vtbl *vtbl, const GUID *guid,
+ struct dinput *dinput, void **out )
{
struct dinput_device *This;
DIDATAFORMAT *format;
diff --git a/dlls/dinput/device_private.h b/dlls/dinput/device_private.h
index 15a8a6f83b5..4e76d1ba738 100644
--- a/dlls/dinput/device_private.h
+++ b/dlls/dinput/device_private.h
@@ -84,7 +84,7 @@ struct dinput_device
LONG ref;
GUID guid;
CRITICAL_SECTION crit;
- IDirectInputImpl *dinput;
+ struct dinput *dinput;
struct list entry; /* entry into acquired device list */
HANDLE hEvent;
DIDEVICEINSTANCEW instance;
@@ -124,7 +124,7 @@ struct dinput_device
};
extern HRESULT dinput_device_alloc( SIZE_T size, const struct dinput_device_vtbl *vtbl, const GUID *guid,
- IDirectInputImpl *dinput, void **out ) DECLSPEC_HIDDEN;
+ struct dinput *dinput, void **out ) DECLSPEC_HIDDEN;
extern HRESULT dinput_device_init( IDirectInputDevice8W *iface );
extern void dinput_device_destroy( IDirectInputDevice8W *iface );
diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c
index d3d5206a1e4..b9d44f140c8 100644
--- a/dlls/dinput/dinput_main.c
+++ b/dlls/dinput/dinput_main.c
@@ -59,14 +59,14 @@ static const IDirectInput7WVtbl dinput7_vtbl;
static const IDirectInput8WVtbl dinput8_vtbl;
static const IDirectInputJoyConfig8Vtbl joy_config_vtbl;
-static inline IDirectInputImpl *impl_from_IDirectInput7W( IDirectInput7W *iface )
+static inline struct dinput *impl_from_IDirectInput7W( IDirectInput7W *iface )
{
- return CONTAINING_RECORD( iface, IDirectInputImpl, IDirectInput7W_iface );
+ return CONTAINING_RECORD( iface, struct dinput, IDirectInput7W_iface );
}
-static inline IDirectInputImpl *impl_from_IDirectInput8W( IDirectInput8W *iface )
+static inline struct dinput *impl_from_IDirectInput8W( IDirectInput8W *iface )
{
- return CONTAINING_RECORD( iface, IDirectInputImpl, IDirectInput8W_iface );
+ return CONTAINING_RECORD( iface, struct dinput, IDirectInput8W_iface );
}
static inline struct dinput_device *impl_from_IDirectInputDevice8W( IDirectInputDevice8W *iface )
@@ -95,8 +95,8 @@ static struct list acquired_rawmouse_list = LIST_INIT( acquired_rawmouse_list );
static struct list acquired_keyboard_list = LIST_INIT( acquired_keyboard_list );
static struct list acquired_device_list = LIST_INIT( acquired_device_list );
-static HRESULT initialize_directinput_instance(IDirectInputImpl *This, DWORD dwVersion);
-static void uninitialize_directinput_instance(IDirectInputImpl *This);
+static HRESULT initialize_directinput_instance( struct dinput *impl, DWORD version );
+static void uninitialize_directinput_instance( struct dinput *impl );
void dinput_hooks_acquire_device( IDirectInputDevice8W *iface )
{
@@ -137,28 +137,27 @@ static void dinput_device_internal_unacquire( IDirectInputDevice8W *iface )
LeaveCriticalSection( &impl->crit );
}
-static HRESULT create_directinput_instance(REFIID riid, LPVOID *ppDI, IDirectInputImpl **out)
+static HRESULT dinput_create( REFIID riid, LPVOID *ppDI, struct dinput **out )
{
- IDirectInputImpl *This = calloc( 1, sizeof(IDirectInputImpl) );
+ struct dinput *impl = calloc( 1, sizeof(struct dinput) );
HRESULT hr;
- if (!This)
- return E_OUTOFMEMORY;
+ if (!impl) return E_OUTOFMEMORY;
- This->IDirectInput7A_iface.lpVtbl = &dinput7_a_vtbl;
- This->IDirectInput7W_iface.lpVtbl = &dinput7_vtbl;
- This->IDirectInput8A_iface.lpVtbl = &dinput8_a_vtbl;
- This->IDirectInput8W_iface.lpVtbl = &dinput8_vtbl;
- This->IDirectInputJoyConfig8_iface.lpVtbl = &joy_config_vtbl;
+ impl->IDirectInput7A_iface.lpVtbl = &dinput7_a_vtbl;
+ impl->IDirectInput7W_iface.lpVtbl = &dinput7_vtbl;
+ impl->IDirectInput8A_iface.lpVtbl = &dinput8_a_vtbl;
+ impl->IDirectInput8W_iface.lpVtbl = &dinput8_vtbl;
+ impl->IDirectInputJoyConfig8_iface.lpVtbl = &joy_config_vtbl;
- hr = IDirectInput_QueryInterface( &This->IDirectInput7A_iface, riid, ppDI );
+ hr = IDirectInput_QueryInterface( &impl->IDirectInput7A_iface, riid, ppDI );
if (FAILED(hr))
{
- free( This );
+ free( impl );
return hr;
}
- if (out) *out = This;
+ if (out) *out = impl;
return DI_OK;
}
@@ -169,7 +168,7 @@ HRESULT WINAPI DirectInputCreateEx(
HINSTANCE hinst, DWORD dwVersion, REFIID riid, LPVOID *ppDI,
LPUNKNOWN punkOuter)
{
- IDirectInputImpl *This;
+ struct dinput *impl;
HRESULT hr;
TRACE("(%p,%04x,%s,%p,%p)\n", hinst, dwVersion, debugstr_guid(riid), ppDI, punkOuter);
@@ -181,17 +180,17 @@ HRESULT WINAPI DirectInputCreateEx(
IsEqualGUID( &IID_IDirectInput2W, riid ) ||
IsEqualGUID( &IID_IDirectInput7W, riid ))
{
- hr = create_directinput_instance(riid, ppDI, &This);
+ hr = dinput_create( riid, ppDI, &impl );
if (FAILED(hr))
return hr;
}
else
return DIERR_NOINTERFACE;
- hr = IDirectInput_Initialize( &This->IDirectInput7A_iface, hinst, dwVersion );
+ hr = IDirectInput_Initialize( &impl->IDirectInput7A_iface, hinst, dwVersion );
if (FAILED(hr))
{
- IDirectInput_Release( &This->IDirectInput7A_iface );
+ IDirectInput_Release( &impl->IDirectInput7A_iface );
*ppDI = NULL;
return hr;
}
@@ -205,7 +204,7 @@ HRESULT WINAPI DirectInputCreateEx(
HRESULT WINAPI DECLSPEC_HOTPATCH DirectInput8Create(HINSTANCE hinst,
DWORD version, REFIID iid, void **out, IUnknown *outer)
{
- IDirectInputImpl *This;
+ struct dinput *impl;
HRESULT hr;
TRACE("hinst %p, version %#x, iid %s, out %p, outer %p.\n",
@@ -222,7 +221,7 @@ HRESULT WINAPI DECLSPEC_HOTPATCH DirectInput8Create(HINSTANCE hinst,
return DIERR_NOINTERFACE;
}
- hr = create_directinput_instance(iid, out, &This);
+ hr = dinput_create( iid, out, &impl );
if (FAILED(hr))
{
@@ -233,10 +232,10 @@ HRESULT WINAPI DECLSPEC_HOTPATCH DirectInput8Create(HINSTANCE hinst,
/* When aggregation is used, the application needs to manually call Initialize(). */
if (!outer && IsEqualGUID(&IID_IDirectInput8A, iid))
{
- hr = IDirectInput8_Initialize(&This->IDirectInput8A_iface, hinst, version);
+ hr = IDirectInput8_Initialize( &impl->IDirectInput8A_iface, hinst, version );
if (FAILED(hr))
{
- IDirectInput8_Release(&This->IDirectInput8A_iface);
+ IDirectInput8_Release( &impl->IDirectInput8A_iface );
*out = NULL;
return hr;
}
@@ -244,10 +243,10 @@ HRESULT WINAPI DECLSPEC_HOTPATCH DirectInput8Create(HINSTANCE hinst,
if (!outer && IsEqualGUID(&IID_IDirectInput8W, iid))
{
- hr = IDirectInput8_Initialize(&This->IDirectInput8W_iface, hinst, version);
+ hr = IDirectInput8_Initialize( &impl->IDirectInput8W_iface, hinst, version );
if (FAILED(hr))
{
- IDirectInput8_Release(&This->IDirectInput8W_iface);
+ IDirectInput8_Release( &impl->IDirectInput8W_iface );
*out = NULL;
return hr;
}
@@ -324,7 +323,7 @@ __ASM_GLOBAL_FUNC( enum_callback_wrapper,
static HRESULT WINAPI dinput7_EnumDevices( IDirectInput7W *iface, DWORD type, LPDIENUMDEVICESCALLBACKW callback,
void *context, DWORD flags )
{
- IDirectInputImpl *impl = impl_from_IDirectInput7W( iface );
+ struct dinput *impl = impl_from_IDirectInput7W( iface );
TRACE( "iface %p, type %#x, callback %p, context %p, flags %#x.\n", iface, type, callback, context, flags );
@@ -339,7 +338,7 @@ static HRESULT WINAPI dinput7_EnumDevices( IDirectInput7W *iface, DWORD type, LP
static ULONG WINAPI dinput7_AddRef( IDirectInput7W *iface )
{
- IDirectInputImpl *impl = impl_from_IDirectInput7W( iface );
+ struct dinput *impl = impl_from_IDirectInput7W( iface );
ULONG ref = InterlockedIncrement( &impl->ref );
TRACE( "iface %p increasing refcount to %u.\n", iface, ref );
return ref;
@@ -347,7 +346,7 @@ static ULONG WINAPI dinput7_AddRef( IDirectInput7W *iface )
static ULONG WINAPI dinput7_Release( IDirectInput7W *iface )
{
- IDirectInputImpl *impl = impl_from_IDirectInput7W( iface );
+ struct dinput *impl = impl_from_IDirectInput7W( iface );
ULONG ref = InterlockedDecrement( &impl->ref );
TRACE( "iface %p decreasing refcount to %u.\n", iface, ref );
@@ -363,7 +362,7 @@ static ULONG WINAPI dinput7_Release( IDirectInput7W *iface )
static HRESULT WINAPI dinput7_QueryInterface( IDirectInput7W *iface, REFIID iid, void **out )
{
- IDirectInputImpl *impl = impl_from_IDirectInput7W( iface );
+ struct dinput *impl = impl_from_IDirectInput7W( iface );
TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out );
@@ -450,7 +449,7 @@ static void unregister_di_em_win_class(void)
WARN( "Unable to unregister message window class\n" );
}
-static HRESULT initialize_directinput_instance( IDirectInputImpl *impl, DWORD version )
+static HRESULT initialize_directinput_instance( struct dinput *impl, DWORD version )
{
if (!impl->initialized)
{
@@ -465,7 +464,7 @@ static HRESULT initialize_directinput_instance( IDirectInputImpl *impl, DWORD ve
return DI_OK;
}
-static void uninitialize_directinput_instance( IDirectInputImpl *impl )
+static void uninitialize_directinput_instance( struct dinput *impl )
{
if (impl->initialized)
{
@@ -491,7 +490,7 @@ enum directinput_versions
static HRESULT WINAPI dinput7_Initialize( IDirectInput7W *iface, HINSTANCE hinst, DWORD version )
{
- IDirectInputImpl *impl = impl_from_IDirectInput7W( iface );
+ struct dinput *impl = impl_from_IDirectInput7W( iface );
TRACE( "iface %p, hinst %p, version %#x.\n", iface, hinst, version );
@@ -512,7 +511,7 @@ static HRESULT WINAPI dinput7_Initialize( IDirectInput7W *iface, HINSTANCE hinst
static HRESULT WINAPI dinput7_GetDeviceStatus( IDirectInput7W *iface, const GUID *guid )
{
- IDirectInputImpl *impl = impl_from_IDirectInput7W( iface );
+ struct dinput *impl = impl_from_IDirectInput7W( iface );
HRESULT hr;
IDirectInputDeviceW *device;
@@ -531,7 +530,7 @@ static HRESULT WINAPI dinput7_GetDeviceStatus( IDirectInput7W *iface, const GUID
static HRESULT WINAPI dinput7_RunControlPanel( IDirectInput7W *iface, HWND owner, DWORD flags )
{
- IDirectInputImpl *impl = impl_from_IDirectInput7W( iface );
+ struct dinput *impl = impl_from_IDirectInput7W( iface );
WCHAR control_exe[] = {L"control.exe"};
STARTUPINFOW si = {0};
PROCESS_INFORMATION pi;
@@ -558,7 +557,7 @@ static HRESULT WINAPI dinput7_FindDevice( IDirectInput7W *iface, const GUID *gui
static HRESULT WINAPI dinput7_CreateDeviceEx( IDirectInput7W *iface, const GUID *guid,
REFIID iid, void **out, IUnknown *outer )
{
- IDirectInputImpl *impl = impl_from_IDirectInput7W( iface );
+ struct dinput *impl = impl_from_IDirectInput7W( iface );
IDirectInputDevice8W *device;
HRESULT hr;
@@ -593,26 +592,26 @@ static HRESULT WINAPI dinput7_CreateDevice( IDirectInput7W *iface, const GUID *g
static ULONG WINAPI dinput8_AddRef( IDirectInput8W *iface )
{
- IDirectInputImpl *impl = impl_from_IDirectInput8W( iface );
+ struct dinput *impl = impl_from_IDirectInput8W( iface );
return IDirectInput7_AddRef( &impl->IDirectInput7W_iface );
}
static HRESULT WINAPI dinput8_QueryInterface( IDirectInput8W *iface, REFIID iid, void **out )
{
- IDirectInputImpl *impl = impl_from_IDirectInput8W( iface );
+ struct dinput *impl = impl_from_IDirectInput8W( iface );
return IDirectInput7_QueryInterface( &impl->IDirectInput7W_iface, iid, out );
}
static ULONG WINAPI dinput8_Release( IDirectInput8W *iface )
{
- IDirectInputImpl *impl = impl_from_IDirectInput8W( iface );
+ struct dinput *impl = impl_from_IDirectInput8W( iface );
return IDirectInput7_Release( &impl->IDirectInput7W_iface );
}
static HRESULT WINAPI dinput8_CreateDevice( IDirectInput8W *iface, const GUID *guid,
IDirectInputDevice8W **out, IUnknown *outer )
{
- IDirectInputImpl *impl = impl_from_IDirectInput8W( iface );
+ struct dinput *impl = impl_from_IDirectInput8W( iface );
return IDirectInput7_CreateDeviceEx( &impl->IDirectInput7W_iface, guid,
&IID_IDirectInputDevice8W, (void **)out, outer );
}
@@ -630,7 +629,7 @@ static HRESULT WINAPI dinput8_EnumDevices( IDirectInput8W *iface, DWORD type, LP
DWORD flags )
{
DIDEVICEINSTANCEW instance = {.dwSize = sizeof(DIDEVICEINSTANCEW)};
- IDirectInputImpl *impl = impl_from_IDirectInput8W( iface );
+ struct dinput *impl = impl_from_IDirectInput8W( iface );
DWORD device_class = 0, device_type = 0;
unsigned int i = 0;
HRESULT hr;
@@ -679,19 +678,19 @@ static HRESULT WINAPI dinput8_EnumDevices( IDirectInput8W *iface, DWORD type, LP
static HRESULT WINAPI dinput8_GetDeviceStatus( IDirectInput8W *iface, const GUID *guid )
{
- IDirectInputImpl *impl = impl_from_IDirectInput8W( iface );
+ struct dinput *impl = impl_from_IDirectInput8W( iface );
return IDirectInput7_GetDeviceStatus( &impl->IDirectInput7W_iface, guid );
}
static HRESULT WINAPI dinput8_RunControlPanel( IDirectInput8W *iface, HWND owner, DWORD flags )
{
- IDirectInputImpl *impl = impl_from_IDirectInput8W( iface );
+ struct dinput *impl = impl_from_IDirectInput8W( iface );
return IDirectInput7_RunControlPanel( &impl->IDirectInput7W_iface, owner, flags );
}
static HRESULT WINAPI dinput8_Initialize( IDirectInput8W *iface, HINSTANCE hinst, DWORD version )
{
- IDirectInputImpl *impl = impl_from_IDirectInput8W( iface );
+ struct dinput *impl = impl_from_IDirectInput8W( iface );
TRACE( "iface %p, hinst %p, version %#x.\n", iface, hinst, version );
@@ -709,7 +708,7 @@ static HRESULT WINAPI dinput8_Initialize( IDirectInput8W *iface, HINSTANCE hinst
static HRESULT WINAPI dinput8_FindDevice( IDirectInput8W *iface, const GUID *guid, const WCHAR *name, GUID *instance_guid )
{
- IDirectInputImpl *impl = impl_from_IDirectInput8W( iface );
+ struct dinput *impl = impl_from_IDirectInput8W( iface );
return IDirectInput7_FindDevice( &impl->IDirectInput7W_iface, guid, name, instance_guid );
}
@@ -767,7 +766,7 @@ struct enum_device_by_semantics_params
static BOOL CALLBACK enum_device_by_semantics( const DIDEVICEINSTANCEW *instance, void *context )
{
struct enum_device_by_semantics_params *params = context;
- IDirectInputImpl *impl = impl_from_IDirectInput8W( params->iface );
+ struct dinput *impl = impl_from_IDirectInput8W( params->iface );
if (should_enumerate_device( params->username, params->flags, &impl->device_players, &instance->guidInstance ))
{
@@ -786,7 +785,7 @@ static HRESULT WINAPI dinput8_EnumDevicesBySemantics( IDirectInput8W *iface, con
DWORD callbackFlags, enum_flags = DIEDFL_ATTACHEDONLY | (flags & DIEDFL_FORCEFEEDBACK);
static const GUID *guids[2] = {&GUID_SysKeyboard, &GUID_SysMouse};
static const DWORD actionMasks[] = { DIKEYBOARD_MASK, DIMOUSE_MASK };
- IDirectInputImpl *impl = impl_from_IDirectInput8W( iface );
+ struct dinput *impl = impl_from_IDirectInput8W( iface );
DIDEVICEINSTANCEW didevi;
IDirectInputDevice8W *lpdid;
unsigned int i = 0;
@@ -870,26 +869,26 @@ static HRESULT WINAPI dinput8_ConfigureDevices( IDirectInput8W *iface, LPDICONFI
* IDirectInputJoyConfig8 interface
*/
-static inline IDirectInputImpl *impl_from_IDirectInputJoyConfig8(IDirectInputJoyConfig8 *iface)
+static inline struct dinput *impl_from_IDirectInputJoyConfig8( IDirectInputJoyConfig8 *iface )
{
- return CONTAINING_RECORD( iface, IDirectInputImpl, IDirectInputJoyConfig8_iface );
+ return CONTAINING_RECORD( iface, struct dinput, IDirectInputJoyConfig8_iface );
}
static HRESULT WINAPI joy_config_QueryInterface( IDirectInputJoyConfig8 *iface, REFIID iid, void **out )
{
- IDirectInputImpl *impl = impl_from_IDirectInputJoyConfig8( iface );
+ struct dinput *impl = impl_from_IDirectInputJoyConfig8( iface );
return IDirectInput7_QueryInterface( &impl->IDirectInput7W_iface, iid, out );
}
static ULONG WINAPI joy_config_AddRef( IDirectInputJoyConfig8 *iface )
{
- IDirectInputImpl *impl = impl_from_IDirectInputJoyConfig8( iface );
+ struct dinput *impl = impl_from_IDirectInputJoyConfig8( iface );
return IDirectInput7_AddRef( &impl->IDirectInput7W_iface );
}
static ULONG WINAPI joy_config_Release( IDirectInputJoyConfig8 *iface )
{
- IDirectInputImpl *impl = impl_from_IDirectInputJoyConfig8( iface );
+ struct dinput *impl = impl_from_IDirectInputJoyConfig8( iface );
return IDirectInput7_Release( &impl->IDirectInput7W_iface );
}
@@ -960,7 +959,7 @@ static BOOL CALLBACK find_device_from_index( const DIDEVICEINSTANCEW *instance,
static HRESULT WINAPI joy_config_GetConfig( IDirectInputJoyConfig8 *iface, UINT id, DIJOYCONFIG *info, DWORD flags )
{
- IDirectInputImpl *impl = impl_from_IDirectInputJoyConfig8( iface );
+ struct dinput *impl = impl_from_IDirectInputJoyConfig8( iface );
struct find_device_from_index_params params = {.index = id};
HRESULT hr;
@@ -1124,7 +1123,7 @@ static HRESULT WINAPI class_factory_CreateInstance( IClassFactory *iface, IUnkno
if (outer) return CLASS_E_NOAGGREGATION;
- if (FAILED(hr = create_directinput_instance( &IID_IUnknown, (void **)&unknown, NULL ))) return hr;
+ if (FAILED(hr = dinput_create( &IID_IUnknown, (void **)&unknown, NULL ))) return hr;
hr = IUnknown_QueryInterface( unknown, iid, out );
IUnknown_Release( unknown );
diff --git a/dlls/dinput/dinput_private.h b/dlls/dinput/dinput_private.h
index 4b36a69c0e1..de48c4c5298 100644
--- a/dlls/dinput/dinput_private.h
+++ b/dlls/dinput/dinput_private.h
@@ -30,31 +30,30 @@
extern HINSTANCE DINPUT_instance;
/* Implementation specification */
-typedef struct IDirectInputImpl IDirectInputImpl;
-struct IDirectInputImpl
+struct dinput
{
- IDirectInput7A IDirectInput7A_iface;
- IDirectInput7W IDirectInput7W_iface;
- IDirectInput8A IDirectInput8A_iface;
- IDirectInput8W IDirectInput8W_iface;
- IDirectInputJoyConfig8 IDirectInputJoyConfig8_iface;
+ IDirectInput7A IDirectInput7A_iface;
+ IDirectInput7W IDirectInput7W_iface;
+ IDirectInput8A IDirectInput8A_iface;
+ IDirectInput8W IDirectInput8W_iface;
+ IDirectInputJoyConfig8 IDirectInputJoyConfig8_iface;
+ LONG ref;
- LONG ref;
- BOOL initialized;
- DWORD evsequence; /* unique sequence number for events */
- DWORD dwVersion; /* direct input version number */
- struct list device_players; /* device instance guid to player name */
+ BOOL initialized;
+ DWORD dwVersion; /* direct input version number */
+ DWORD evsequence; /* unique sequence number for events */
+ struct list device_players; /* device instance guid to player name */
};
extern const IDirectInput7AVtbl dinput7_a_vtbl DECLSPEC_HIDDEN;
extern const IDirectInput8AVtbl dinput8_a_vtbl DECLSPEC_HIDDEN;
extern HRESULT mouse_enum_device( DWORD type, DWORD flags, DIDEVICEINSTANCEW *instance, DWORD version );
-extern HRESULT mouse_create_device( IDirectInputImpl *dinput, const GUID *guid, IDirectInputDevice8W **out );
+extern HRESULT mouse_create_device( struct dinput *dinput, const GUID *guid, IDirectInputDevice8W **out );
extern HRESULT keyboard_enum_device( DWORD type, DWORD flags, DIDEVICEINSTANCEW *instance, DWORD version );
-extern HRESULT keyboard_create_device( IDirectInputImpl *dinput, const GUID *guid, IDirectInputDevice8W **out );
+extern HRESULT keyboard_create_device( struct dinput *dinput, const GUID *guid, IDirectInputDevice8W **out );
extern HRESULT hid_joystick_enum_device( DWORD type, DWORD flags, DIDEVICEINSTANCEW *instance, DWORD version, int index );
-extern HRESULT hid_joystick_create_device( IDirectInputImpl *dinput, const GUID *guid, IDirectInputDevice8W **out );
+extern HRESULT hid_joystick_create_device( struct dinput *dinput, const GUID *guid, IDirectInputDevice8W **out );
struct DevicePlayer {
GUID instance_guid;
diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c
index 597a3da4ef8..067ffabaaa9 100644
--- a/dlls/dinput/joystick_hid.c
+++ b/dlls/dinput/joystick_hid.c
@@ -1964,7 +1964,7 @@ static BOOL init_pid_caps( struct hid_joystick *impl, struct hid_value_caps *cap
return DIENUM_CONTINUE;
}
-HRESULT hid_joystick_create_device( IDirectInputImpl *dinput, const GUID *guid, IDirectInputDevice8W **out )
+HRESULT hid_joystick_create_device( struct dinput *dinput, const GUID *guid, IDirectInputDevice8W **out )
{
static const DIPROPHEADER filter =
{
diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c
index 1421e56ac3a..c483fb6e66a 100644
--- a/dlls/dinput/keyboard.c
+++ b/dlls/dinput/keyboard.c
@@ -164,7 +164,7 @@ HRESULT keyboard_enum_device( DWORD type, DWORD flags, DIDEVICEINSTANCEW *instan
return DI_OK;
}
-HRESULT keyboard_create_device( IDirectInputImpl *dinput, const GUID *guid, IDirectInputDevice8W **out )
+HRESULT keyboard_create_device( struct dinput *dinput, const GUID *guid, IDirectInputDevice8W **out )
{
struct keyboard *impl;
HRESULT hr;
diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c
index 64b2c30008d..43f3a6ad334 100644
--- a/dlls/dinput/mouse.c
+++ b/dlls/dinput/mouse.c
@@ -91,7 +91,7 @@ HRESULT mouse_enum_device( DWORD type, DWORD flags, DIDEVICEINSTANCEW *instance,
return DI_OK;
}
-HRESULT mouse_create_device( IDirectInputImpl *dinput, const GUID *guid, IDirectInputDevice8W **out )
+HRESULT mouse_create_device( struct dinput *dinput, const GUID *guid, IDirectInputDevice8W **out )
{
struct mouse *impl;
HKEY hkey, appkey;
--
2.34.1
1
4
Feb. 8, 2022
Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com>
---
dlls/kernel32/console.c | 7 -------
dlls/kernel32/kernel32.spec | 2 +-
dlls/kernel32/tests/console.c | 30 +++++++++++++-------------
dlls/kernelbase/console.c | 37 +++++++++++++++++++++++++++++++++
dlls/kernelbase/kernelbase.spec | 1 +
include/wine/condrv.h | 6 ++++++
programs/conhost/conhost.c | 9 +++++++-
programs/conhost/conhost.h | 14 ++++++++-----
programs/conhost/window.c | 5 +++--
9 files changed, 80 insertions(+), 31 deletions(-)
diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c
index 80f3419cd7a..58bd18d2a5f 100644
--- a/dlls/kernel32/console.c
+++ b/dlls/kernel32/console.c
@@ -480,10 +480,3 @@ BOOL WINAPI GetConsoleFontInfo(HANDLE hConsole, BOOL maximize, DWORD numfonts, C
SetLastError(LOWORD(E_NOTIMPL) /* win10 1709+ */);
return FALSE;
}
-
-BOOL WINAPI SetCurrentConsoleFontEx(HANDLE hConsole, BOOL maxwindow, CONSOLE_FONT_INFOEX *cfix)
-{
- FIXME("(%p %d %p): stub!\n", hConsole, maxwindow, cfix);
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index 87fa0c39381..6e063bfaa7b 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -1390,7 +1390,7 @@
@ stdcall -import SetConsoleTitleW(wstr)
@ stdcall -import SetConsoleWindowInfo(long long ptr)
@ stdcall SetCriticalSectionSpinCount(ptr long) NTDLL.RtlSetCriticalSectionSpinCount
-@ stdcall SetCurrentConsoleFontEx(long long ptr)
+@ stdcall -import SetCurrentConsoleFontEx(long long ptr)
@ stdcall -import SetCurrentDirectoryA(str)
@ stdcall -import SetCurrentDirectoryW(wstr)
@ stub SetDaylightFlag
diff --git a/dlls/kernel32/tests/console.c b/dlls/kernel32/tests/console.c
index e4d9d43f4c4..0943a318f6a 100644
--- a/dlls/kernel32/tests/console.c
+++ b/dlls/kernel32/tests/console.c
@@ -3576,18 +3576,18 @@ static void test_SetCurrentConsoleFontEx(HANDLE std_output)
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(NULL, FALSE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(NULL, TRUE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
CreatePipe(&pipe1, &pipe2, NULL, 0);
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(pipe1, FALSE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
CloseHandle(pipe1);
CloseHandle(pipe2);
@@ -3595,36 +3595,36 @@ static void test_SetCurrentConsoleFontEx(HANDLE std_output)
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(pipe1, TRUE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
CloseHandle(pipe1);
CloseHandle(pipe2);
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_input, FALSE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_input, TRUE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_output, FALSE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_output, TRUE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
cfix = orig_cfix;
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(NULL, FALSE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(NULL, TRUE, &cfix);
@@ -3635,7 +3635,7 @@ static void test_SetCurrentConsoleFontEx(HANDLE std_output)
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(pipe1, FALSE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
CloseHandle(pipe1);
CloseHandle(pipe2);
@@ -3650,7 +3650,7 @@ static void test_SetCurrentConsoleFontEx(HANDLE std_output)
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_input, FALSE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_input, TRUE, &cfix);
@@ -3659,8 +3659,8 @@ static void test_SetCurrentConsoleFontEx(HANDLE std_output)
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_output, FALSE, &cfix);
- todo_wine ok(ret, "got %d, expected non-zero\n", ret);
- todo_wine ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError());
+ ok(ret, "got %d, expected non-zero\n", ret);
+ ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError());
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_output, TRUE, &cfix);
@@ -3670,8 +3670,8 @@ static void test_SetCurrentConsoleFontEx(HANDLE std_output)
/* Restore original console font parameters */
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_output, FALSE, &orig_cfix);
- todo_wine ok(ret, "got %d, expected non-zero\n", ret);
- todo_wine ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError());
+ ok(ret, "got %d, expected non-zero\n", ret);
+ ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError());
}
static void test_GetConsoleFontSize(HANDLE std_output)
diff --git a/dlls/kernelbase/console.c b/dlls/kernelbase/console.c
index a7eeb439232..0501e140a03 100644
--- a/dlls/kernelbase/console.c
+++ b/dlls/kernelbase/console.c
@@ -1303,6 +1303,43 @@ BOOL WINAPI DECLSPEC_HOTPATCH SetConsoleWindowInfo( HANDLE handle, BOOL absolute
}
+/******************************************************************************
+ * SetCurrentConsoleFontEx (kernelbase.@)
+ */
+BOOL WINAPI SetCurrentConsoleFontEx(HANDLE hConsole, BOOL maxwindow, CONSOLE_FONT_INFOEX *cfix)
+{
+ struct condrv_output_info_params_font data;
+
+ TRACE( "(%p %d %p)\n", hConsole, maxwindow, cfix );
+
+ if (cfix->cbSize != sizeof(CONSOLE_FONT_INFOEX))
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ if (maxwindow)
+ {
+ FIXME( "(%p %d %p): semi-stub\n", hConsole, maxwindow, cfix);
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return FALSE;
+ }
+
+ data.params.mask = SET_CONSOLE_OUTPUT_INFO_FONT;
+
+ data.params.info.font_width = cfix->dwFontSize.X;
+ data.params.info.font_height = cfix->dwFontSize.Y;
+ data.params.info.font_pitch_family = cfix->FontFamily;
+ data.params.info.font_weight = cfix->FontWeight;
+
+ memcpy( data.face_name, cfix->FaceName, sizeof(cfix->FaceName) );
+ data.face_name[ LF_FACESIZE - 1 ] = 0;
+
+ return console_ioctl( hConsole, IOCTL_CONDRV_SET_OUTPUT_INFO,
+ &data, sizeof(data), NULL, 0, NULL );
+}
+
+
/***********************************************************************
* ReadConsoleInputA (kernelbase.@)
*/
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
index 01135d6250a..91c4909e006 100644
--- a/dlls/kernelbase/kernelbase.spec
+++ b/dlls/kernelbase/kernelbase.spec
@@ -1422,6 +1422,7 @@
@ stdcall SetConsoleTitleW(wstr)
@ stdcall SetConsoleWindowInfo(long long ptr)
@ stdcall SetCriticalSectionSpinCount(ptr long) ntdll.RtlSetCriticalSectionSpinCount
+@ stdcall SetCurrentConsoleFontEx(long long ptr)
@ stdcall SetCurrentDirectoryA(str)
@ stdcall SetCurrentDirectoryW(wstr)
@ stdcall SetDefaultDllDirectories(long)
diff --git a/include/wine/condrv.h b/include/wine/condrv.h
index 4d2332a1ee9..605e6f2c2fe 100644
--- a/include/wine/condrv.h
+++ b/include/wine/condrv.h
@@ -148,6 +148,11 @@ struct condrv_output_info_params
struct condrv_output_info info; /* output info */
};
+struct condrv_output_info_params_font {
+ struct condrv_output_info_params params;
+ WCHAR face_name[LF_FACESIZE];
+};
+
#define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x0001
#define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x0002
#define SET_CONSOLE_OUTPUT_INFO_SIZE 0x0004
@@ -155,6 +160,7 @@ struct condrv_output_info_params
#define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x0010
#define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x0020
#define SET_CONSOLE_OUTPUT_INFO_POPUP_ATTR 0x0040
+#define SET_CONSOLE_OUTPUT_INFO_FONT 0x0080
/* IOCTL_CONDRV_FILL_OUTPUT params */
struct condrv_fill_output_params
diff --git a/programs/conhost/conhost.c b/programs/conhost/conhost.c
index 78f6e345170..456f3a4889e 100644
--- a/programs/conhost/conhost.c
+++ b/programs/conhost/conhost.c
@@ -1913,6 +1913,13 @@ static NTSTATUS set_output_info( struct screen_buffer *screen_buffer,
screen_buffer->max_width = info->max_width;
screen_buffer->max_height = info->max_height;
}
+ if (params->mask & SET_CONSOLE_OUTPUT_INFO_FONT)
+ {
+ WCHAR *face_name = (WCHAR *)(params + 1);
+
+ update_console_font( screen_buffer->console, face_name,
+ info->font_height, info->font_weight );
+ }
if (is_active( screen_buffer ))
{
@@ -2425,7 +2432,7 @@ static NTSTATUS screen_buffer_ioctl( struct screen_buffer *screen_buffer, unsign
return get_output_info( screen_buffer, out_size );
case IOCTL_CONDRV_SET_OUTPUT_INFO:
- if (in_size != sizeof(struct condrv_output_info_params) || *out_size) return STATUS_INVALID_PARAMETER;
+ if (in_size < sizeof(struct condrv_output_info) || *out_size) return STATUS_INVALID_PARAMETER;
return set_output_info( screen_buffer, in_data );
case IOCTL_CONDRV_FILL_OUTPUT:
diff --git a/programs/conhost/conhost.h b/programs/conhost/conhost.h
index 5e9b999380c..88a26f70fd0 100644
--- a/programs/conhost/conhost.h
+++ b/programs/conhost/conhost.h
@@ -130,17 +130,21 @@ struct screen_buffer
struct wine_rb_entry entry; /* map entry */
};
-BOOL init_window( struct console *console );
-void init_message_window( struct console *console );
-void update_window_region( struct console *console, const RECT *update );
-void update_window_config( struct console *console, BOOL delay );
-
+/* conhost.c */
NTSTATUS write_console_input( struct console *console, const INPUT_RECORD *records,
unsigned int count, BOOL flush );
void notify_screen_buffer_size( struct screen_buffer *screen_buffer );
NTSTATUS change_screen_buffer_size( struct screen_buffer *screen_buffer, int new_width, int new_height );
+/* window.c */
+void update_console_font( struct console *console, const WCHAR *font,
+ unsigned int height, unsigned int weight );
+BOOL init_window( struct console *console );
+void init_message_window( struct console *console );
+void update_window_region( struct console *console, const RECT *update );
+void update_window_config( struct console *console, BOOL delay );
+
static inline void empty_update_rect( struct screen_buffer *screen_buffer, RECT *rect )
{
SetRect( rect, screen_buffer->width, screen_buffer->height, 0, 0 );
diff --git a/programs/conhost/window.c b/programs/conhost/window.c
index 7ad0d48effd..0d450774d23 100644
--- a/programs/conhost/window.c
+++ b/programs/conhost/window.c
@@ -705,6 +705,7 @@ static BOOL set_console_font( struct console *console, const LOGFONTW *logfont )
font_info->width = tm.tmAveCharWidth;
font_info->height = tm.tmHeight + tm.tmExternalLeading;
+ font_info->pitch_family = tm.tmPitchAndFamily;
font_info->weight = tm.tmWeight;
free( font_info->face_name );
@@ -851,8 +852,8 @@ static int WINAPI get_first_font_enum( const LOGFONTW *lf, const TEXTMETRICW *tm
/* sets logfont as the new font for the console */
-static void update_console_font( struct console *console, const WCHAR *font,
- unsigned int height, unsigned int weight )
+void update_console_font( struct console *console, const WCHAR *font,
+ unsigned int height, unsigned int weight )
{
struct font_chooser fc;
LOGFONTW lf;
--
2.34.1
2
2
[PATCH] comctl32: Send EVENT_OBJECT_STATECHANGE when checking a checkbox
by Alex Henrie Feb. 8, 2022
by Alex Henrie Feb. 8, 2022
Feb. 8, 2022
The NVDA screen reader needs this.
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com>
---
dlls/comctl32/button.c | 1 +
dlls/user32/tests/msg.c | 18 +++++++++---------
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c
index 88b48a4a5c0..faf0212b256 100644
--- a/dlls/comctl32/button.c
+++ b/dlls/comctl32/button.c
@@ -656,6 +656,7 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L
break;
}
SendMessageW( hWnd, BM_SETSTATE, FALSE, 0 );
+ NotifyWinEvent( EVENT_OBJECT_STATECHANGE, hWnd, OBJID_CLIENT, 0 );
GetClientRect( hWnd, &rect );
if (uMsg == WM_KEYUP || PtInRect( &rect, pt ))
{
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index f0e0d0fba76..cb8d4f07fe7 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -1774,7 +1774,7 @@ static const struct message WmModalDialogSeq[] = {
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_KILLFOCUS, sent|parent },
{ WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 },
- { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 },
+ { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_ENABLE, sent|parent|wparam, 0 },
{ HCBT_CREATEWND, hook },
{ EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam|optional, 0, 0 }, /* Not sent on Win10. */
@@ -1829,7 +1829,7 @@ static const struct message WmModalDialogSeq[] = {
{ WM_ENTERIDLE, sent|parent|optional },
{ WM_ENTERIDLE, sent|parent|optional },
{ WM_TIMER, sent },
- { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 },
+ { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_ENABLE, sent|parent|wparam, 1 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE },
{ EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 },
@@ -1860,14 +1860,14 @@ static const struct message WmModalDialogSeq_2[] = {
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_KILLFOCUS, sent },
{ WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 },
- { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 },
+ { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_ENABLE, sent|wparam, 0 },
{ HCBT_CREATEWND, hook },
{ EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam|optional, 0, 0 },
{ EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 },
{ WM_SETFONT, sent },
{ WM_INITDIALOG, sent },
- { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 },
+ { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_CHANGEUISTATE, sent|optional },
{ WM_UPDATEUISTATE, sent|optional },
{ WM_ENABLE, sent|wparam, 1 },
@@ -7297,24 +7297,24 @@ static const struct message auto_radio_button_VK_DOWN_dialog[] =
{ EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 },
{ BM_SETSTATE, sent|wparam|lparam|defwinproc, BST_CHECKED, ID_RADIO1 },
{ WM_CTLCOLORSTATIC, sent|parent },
- { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_LBUTTONUP, sent|wparam|lparam|defwinproc, 0, 0 },
{ BM_SETSTATE, sent|wparam|lparam|defwinproc, BST_UNCHECKED, ID_RADIO1 },
{ WM_CTLCOLORSTATIC, sent|parent },
- { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_GETDLGCODE, sent|wparam|lparam|defwinproc, ID_RADIO1, 0 },
{ BM_SETCHECK, sent|wparam|lparam|defwinproc, BST_CHECKED, ID_RADIO1 },
{ WM_CTLCOLORSTATIC, sent|parent },
- { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_GETDLGCODE, sent|wparam|lparam|defwinproc, ID_RADIO3, 0 },
{ BM_SETCHECK, sent|wparam|lparam|defwinproc, BST_UNCHECKED, ID_RADIO3 },
{ WM_CTLCOLORSTATIC, sent|parent },
- { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ WM_GETDLGCODE, sent|wparam|lparam|defwinproc, ID_TEXT, 0 },
{ WM_GETDLGCODE, sent|wparam|lparam|defwinproc, ID_RADIO2, 0 },
{ BM_SETCHECK, sent|wparam|lparam|defwinproc, BST_UNCHECKED, ID_RADIO2 },
{ WM_CTLCOLORSTATIC, sent|parent },
- { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
+ { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
{ EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 },
{ WM_CAPTURECHANGED, sent|wparam|lparam|defwinproc, 0, 0 },
{ WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_RADIO1, BN_CLICKED) },
--
2.35.1
3
6
Feb. 8, 2022
Some update packages use both lowercase and uppercase names for
expressions.
For example, Microsoft-Windows-MediaFeaturePack-OOB-Package_x64.msu
uses both Runtime and runtime for expressions.
Signed-off-by: Mohamad Al-Jaf <mohamadaljaf(a)gmail.com>
---
programs/wusa/main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/programs/wusa/main.c b/programs/wusa/main.c
index bcb795a80fa..db745edbe5a 100644
--- a/programs/wusa/main.c
+++ b/programs/wusa/main.c
@@ -480,10 +480,10 @@ static WCHAR *lookup_expression(struct assembly_entry *assembly, const WCHAR *ke
{
WCHAR path[MAX_PATH];
- if (!wcscmp(key, L"runtime.system32"))
+ if (!wcsicmp(key, L"runtime.system32"))
{
#ifdef __x86_64__
- if (!wcscmp(assembly->identity.architecture, L"x86"))
+ if (!wcsicmp(assembly->identity.architecture, L"x86"))
{
GetSystemWow64DirectoryW(path, ARRAY_SIZE(path));
return strdupW(path);
@@ -492,7 +492,7 @@ static WCHAR *lookup_expression(struct assembly_entry *assembly, const WCHAR *ke
GetSystemDirectoryW(path, ARRAY_SIZE(path));
return strdupW(path);
}
- if (!wcscmp(key, L"runtime.windows"))
+ if (!wcsicmp(key, L"runtime.windows"))
{
GetWindowsDirectoryW(path, ARRAY_SIZE(path));
return strdupW(path);
--
2.34.1
1
1
This program is not shipped by Windows. Rather, it is a redistributable
component shipped with some drivers, which appears to be a thin wrapper over the
undocumented DriverStore* APIs exported from setupapi. Since the behaviour of
this program is much easier to determine and implement, it seems much more
worthwhile to do so despite not being an OS component.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42424
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
There is a snag, though, which is that Wine's default load order is
"native,builtin" for the main EXE when loaded with an absolute path, as will
pretty much always be the case for dpinst.exe. As such anyone who intends to
install a package that requires it will need to manually set the program to
prefer builtin. Ideally this wouldn't be necessary, but it's not clear to me how
to avoid it:
* Set *dpinst.exe to have a default override of builtin,native in the
DllOverrides key? There's no precedent for this, though.
* Introduce an analog of the --prefer-native switch? Seems excessive for
something that would so rarely useful.
configure.ac | 2 ++
loader/wine.inf.in | 1 +
programs/dpinst/Makefile.in | 4 ++++
programs/dpinst/dpinst.c | 35 +++++++++++++++++++++++++++++++++++
programs/dpinst64/Makefile.in | 5 +++++
5 files changed, 47 insertions(+)
create mode 100644 programs/dpinst/Makefile.in
create mode 100644 programs/dpinst/dpinst.c
create mode 100644 programs/dpinst64/Makefile.in
diff --git a/configure.ac b/configure.ac
index e51e114c45e..33d2ba15ebf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3547,6 +3547,8 @@ WINE_CONFIG_MAKEFILE(programs/conhost/tests)
WINE_CONFIG_MAKEFILE(programs/control)
WINE_CONFIG_MAKEFILE(programs/cscript)
WINE_CONFIG_MAKEFILE(programs/dism)
+WINE_CONFIG_MAKEFILE(programs/dpinst,,[test "x$enable_win64" = xyes])
+WINE_CONFIG_MAKEFILE(programs/dpinst64,enable_dpinst,[test "x$enable_win64" = xno])
WINE_CONFIG_MAKEFILE(programs/dplaysvr)
WINE_CONFIG_MAKEFILE(programs/dpnsvr)
WINE_CONFIG_MAKEFILE(programs/dpvsetup)
diff --git a/loader/wine.inf.in b/loader/wine.inf.in
index 0e488d87dcb..4ad9dc09efd 100644
--- a/loader/wine.inf.in
+++ b/loader/wine.inf.in
@@ -2646,6 +2646,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G"
11,,services.exe,-
11,,spoolsv.exe,-
11,,winemenubuilder.exe,-
+11,,dpinst.exe,-
; registration order matters for these
11,,msxml.dll
11,,msxml2.dll
diff --git a/programs/dpinst/Makefile.in b/programs/dpinst/Makefile.in
new file mode 100644
index 00000000000..bd97b860ce7
--- /dev/null
+++ b/programs/dpinst/Makefile.in
@@ -0,0 +1,4 @@
+MODULE = dpinst.exe
+EXTRADLLFLAGS = -mconsole -municode
+
+C_SRCS = dpinst.c
diff --git a/programs/dpinst/dpinst.c b/programs/dpinst/dpinst.c
new file mode 100644
index 00000000000..52b4119760b
--- /dev/null
+++ b/programs/dpinst/dpinst.c
@@ -0,0 +1,35 @@
+/*
+ * Driver Store installer replacement
+ *
+ * Copyright 2022 Zebediah Figura
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "windef.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(dpinst);
+
+int __cdecl wmain(int argc, WCHAR *argv[])
+{
+ int i;
+
+ for (i = 0; i < argc; i++)
+ FIXME(" %s", debugstr_w(argv[i]));
+ FIXME("\n");
+
+ return 0;
+}
diff --git a/programs/dpinst64/Makefile.in b/programs/dpinst64/Makefile.in
new file mode 100644
index 00000000000..f79ed3e0dba
--- /dev/null
+++ b/programs/dpinst64/Makefile.in
@@ -0,0 +1,5 @@
+MODULE = dpinst64.exe
+EXTRADLLFLAGS = -mconsole -municode
+PARENTSRC = ../dpinst
+
+C_SRCS = dpinst.c
--
2.34.1
1
3
[PATCH 1/5] qcap: Use CoCreateInstance() directly instead of BaseOutputPinImpl_InitAllocator().
by Zebediah Figura Feb. 8, 2022
by Zebediah Figura Feb. 8, 2022
Feb. 8, 2022
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/qcap/avimux.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/qcap/avimux.c b/dlls/qcap/avimux.c
index fe4add83b7c..45b995cc2ff 100644
--- a/dlls/qcap/avimux.c
+++ b/dlls/qcap/avimux.c
@@ -1177,9 +1177,12 @@ static HRESULT WINAPI AviMuxOut_DecideAllocator(struct strmbase_source *base,
TRACE("(%p)->(%p %p)\n", base, pPin, pAlloc);
- hr = BaseOutputPinImpl_InitAllocator(base, pAlloc);
- if(FAILED(hr))
+ if (FAILED(hr = CoCreateInstance(&CLSID_MemoryAllocator, NULL,
+ CLSCTX_INPROC_SERVER, &IID_IMemAllocator, (void **)pAlloc)))
+ {
+ ERR("Failed to create allocator, hr %#x.\n", hr);
return hr;
+ }
hr = IMemInputPin_GetAllocatorRequirements(pPin, &req);
if(FAILED(hr))
--
2.34.1
1
4
[PATCH vkd3d] vkd3d-shader/hlsl: Fix floating point literals matching.
by Nikolay Sivov Feb. 8, 2022
by Nikolay Sivov Feb. 8, 2022
Feb. 8, 2022
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
Immediate issue was that constants like 1e1 were not parsed without a suffix.
libs/vkd3d-shader/hlsl.l | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/libs/vkd3d-shader/hlsl.l b/libs/vkd3d-shader/hlsl.l
index e9281ec..60aca79 100644
--- a/libs/vkd3d-shader/hlsl.l
+++ b/libs/vkd3d-shader/hlsl.l
@@ -188,11 +188,7 @@ row_major {return KW_ROW_MAJOR; }
yylval->floatval = atof(yytext);
return C_FLOAT;
}
-[0-9]+\.([eE][+-]?[0-9]+)?[h|H|f|F]? {
- yylval->floatval = atof(yytext);
- return C_FLOAT;
- }
-[0-9]+([eE][+-]?[0-9]+)?[h|H|f|F] {
+[0-9]+(\.)?([eE][+-]?[0-9]+)?[h|H|f|F]? {
yylval->floatval = atof(yytext);
return C_FLOAT;
}
--
2.34.1
2
2
[PATCH v2] user32/tests: Expect DialogBoxParam to set ERROR_CANNOT_FIND_WND_CLASS
by Alex Henrie Feb. 8, 2022
by Alex Henrie Feb. 8, 2022
Feb. 8, 2022
Fixes a testbot failure.
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com>
---
v2: Avoid "misleading indentation" warning
---
dlls/user32/tests/dialog.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/tests/dialog.c b/dlls/user32/tests/dialog.c
index 24aced8e192..f2bc30ff921 100644
--- a/dlls/user32/tests/dialog.c
+++ b/dlls/user32/tests/dialog.c
@@ -1851,7 +1851,10 @@ static void test_DialogBoxParam(void)
SetLastError(0xdeadbeef);
ret = DialogBoxParamA(GetModuleHandleA(NULL), "TEST_DIALOG_INVALID_CLASS", 0, DestroyDlgWinProc, 0);
ok(ret == -1, "DialogBoxParamA returned %ld, expected -1\n", ret);
- ok(GetLastError() == 0, "got %d\n", GetLastError());
+ todo_wine
+ ok(GetLastError() == ERROR_CANNOT_FIND_WND_CLASS ||
+ broken(GetLastError() == ERROR_SUCCESS) /* < win10 21H1 */,
+ "got %u, expected ERROR_CANNOT_FIND_WND_CLASS\n", GetLastError());
SetLastError(0xdeadbeef);
ret = DefDlgProcA(0, WM_ERASEBKGND, 0, 0);
--
2.35.1
1
0
Feb. 7, 2022
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/dmsynth/tests/dmsynth.c | 69 ++++++++++++++++++++++++++++++++++++
1 file changed, 69 insertions(+)
diff --git a/dlls/dmsynth/tests/dmsynth.c b/dlls/dmsynth/tests/dmsynth.c
index 5f2e9e95364..93212c0ae9f 100644
--- a/dlls/dmsynth/tests/dmsynth.c
+++ b/dlls/dmsynth/tests/dmsynth.c
@@ -65,6 +65,9 @@ static void test_dmsynth(void)
ULONG value;
ULONG bytes;
DMUS_PORTCAPS caps;
+ DMUS_PORTPARAMS params;
+ const DWORD all_params = DMUS_PORTPARAMS_VOICES|DMUS_PORTPARAMS_CHANNELGROUPS|DMUS_PORTPARAMS_AUDIOCHANNELS|
+ DMUS_PORTPARAMS_SAMPLERATE|DMUS_PORTPARAMS_EFFECTS|DMUS_PORTPARAMS_SHARE|DMUS_PORTPARAMS_FEATURES;
hr = CoCreateInstance(&CLSID_DirectMusicSynth, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicSynth, (LPVOID*)&dmsynth);
ok(hr == S_OK, "CoCreateInstance returned: %#lx\n", hr);
@@ -121,6 +124,72 @@ static void test_dmsynth(void)
hr = IDirectMusicSynth_Activate(dmsynth, TRUE);
ok(hr == DMUS_E_NOSYNTHSINK, "IDirectMusicSynth_Activate returned: %#lx\n", hr);
+ /* Open / Close */
+ hr = IDirectMusicSynth_Open(dmsynth, NULL);
+ ok(hr == S_OK, "Open failed: %#lx\n", hr);
+ hr = IDirectMusicSynth_Open(dmsynth, NULL);
+ ok(hr == DMUS_E_ALREADYOPEN, "Open failed: %#lx\n", hr);
+ hr = IDirectMusicSynth_Close(dmsynth);
+ ok(hr == S_OK, "Close failed: %#lx\n", hr);
+ hr = IDirectMusicSynth_Close(dmsynth);
+ ok(hr == DMUS_E_ALREADYCLOSED, "Close failed: %#lx\n", hr);
+ memset(¶ms, 0, sizeof(params));
+ hr = IDirectMusicSynth_Open(dmsynth, ¶ms);
+ ok(hr == E_INVALIDARG, "Open failed: %#lx\n", hr);
+ params.dwSize = sizeof(DMUS_PORTPARAMS7);
+ hr = IDirectMusicSynth_Open(dmsynth, ¶ms);
+ ok(hr == S_OK, "Open failed: %#lx\n", hr);
+ IDirectMusicSynth_Close(dmsynth);
+ /* All params supported and set to 0 */
+ params.dwSize = sizeof(params);
+ params.dwValidParams = all_params;
+ hr = IDirectMusicSynth_Open(dmsynth, ¶ms);
+ ok(hr == S_OK, "Open failed: %#lx\n", hr);
+ ok(params.dwSize == sizeof(params), "dwSize: %ld\n", params.dwSize);
+ ok(params.dwValidParams == all_params, "dwValidParams: %#lx\n", params.dwValidParams);
+ ok(params.dwVoices == 32, "dwVoices: %ld\n", params.dwVoices);
+ ok(params.dwChannelGroups == 2, "dwChannelGroups: %ld\n", params.dwChannelGroups);
+ ok(params.dwAudioChannels == 2, "dwAudioChannels: %ld\n", params.dwAudioChannels);
+ ok(params.dwSampleRate == 22050, "dwSampleRate: %ld\n", params.dwSampleRate);
+ ok(params.dwEffectFlags == DMUS_EFFECT_REVERB, "params.dwEffectFlags: %#lx\n", params.dwEffectFlags);
+ ok(params.fShare == FALSE, "fShare: %d\n", params.fShare);
+ ok(params.dwFeatures == 0, "dwFeatures: %#lx\n", params.dwFeatures);
+ IDirectMusicSynth_Close(dmsynth);
+ /* Requesting more than supported */
+ params.dwValidParams = DMUS_PORTPARAMS_SAMPLERATE;
+ params.dwSampleRate = 100003;
+ hr = IDirectMusicSynth_Open(dmsynth, ¶ms);
+ ok(hr == S_FALSE, "Open failed: %#lx\n", hr);
+ ok(params.dwValidParams == all_params, "dwValidParams: %#lx\n", params.dwValidParams);
+ ok(params.dwSampleRate == 96000, "dwSampleRate: %ld\n", params.dwSampleRate);
+ IDirectMusicSynth_Close(dmsynth);
+ /* Minimums */
+ params.dwValidParams = DMUS_PORTPARAMS_VOICES|DMUS_PORTPARAMS_CHANNELGROUPS|DMUS_PORTPARAMS_AUDIOCHANNELS|
+ DMUS_PORTPARAMS_SAMPLERATE;
+ params.dwVoices = 1;
+ params.dwChannelGroups = 1;
+ params.dwAudioChannels = 1;
+ params.dwSampleRate = 1;
+ hr = IDirectMusicSynth_Open(dmsynth, ¶ms);
+ ok(hr == S_FALSE, "Open failed: %#lx\n", hr);
+ ok(params.dwValidParams == all_params, "dwValidParams: %#lx\n", params.dwValidParams);
+ ok(params.dwVoices == 1, "dwVoices: %ld\n", params.dwVoices);
+ ok(params.dwChannelGroups == 1, "dwChannelGroups: %ld\n", params.dwChannelGroups);
+ ok(params.dwAudioChannels == 1, "dwAudioChannels: %ld\n", params.dwAudioChannels);
+ ok(params.dwSampleRate == 11025, "dwSampleRate: %ld\n", params.dwSampleRate);
+ IDirectMusicSynth_Close(dmsynth);
+ /* Test share and features */
+ params.dwValidParams = DMUS_PORTPARAMS_SHARE|DMUS_PORTPARAMS_FEATURES;
+ params.fShare = TRUE;
+ params.dwFeatures = DMUS_PORT_FEATURE_AUDIOPATH|DMUS_PORT_FEATURE_STREAMING;
+ hr = IDirectMusicSynth_Open(dmsynth, ¶ms);
+ ok(hr == S_FALSE, "Open failed: %#lx\n", hr);
+ ok(params.dwValidParams == all_params, "dwValidParams: %#lx\n", params.dwValidParams);
+ ok(params.fShare == FALSE, "fShare: %d\n", params.fShare);
+ ok(params.dwFeatures == (DMUS_PORT_FEATURE_AUDIOPATH|DMUS_PORT_FEATURE_STREAMING),
+ "dwFeatures: %#lx\n", params.dwFeatures);
+ IDirectMusicSynth_Close(dmsynth);
+
/* Synth has no default clock */
hr = IDirectMusicSynth_GetLatencyClock(dmsynth, &clock_synth);
ok(hr == DMUS_E_NOSYNTHSINK, "IDirectMusicSynth_GetLatencyClock returned: %#lx\n", hr);
--
2.34.1
1
0
Feb. 7, 2022
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/dmime/tests/performance.c | 4 +-
dlls/dmsynth/dmsynth_private.h | 5 +-
dlls/dmsynth/synth.c | 91 ++++++++++++++++++++++++++++++++--
3 files changed, 90 insertions(+), 10 deletions(-)
diff --git a/dlls/dmime/tests/performance.c b/dlls/dmime/tests/performance.c
index cec89ca80aa..d09d0120023 100644
--- a/dlls/dmime/tests/performance.c
+++ b/dlls/dmime/tests/performance.c
@@ -286,7 +286,7 @@ static void test_createport(void)
hr = IDirectMusic_CreatePort(music, &CLSID_DirectMusicSynth, &portparams, &port, NULL);
ok(hr == S_OK, "CreatePort failed: %08x\n", hr);
ok(port != NULL, "Didn't get IDirectMusicPort pointer\n");
- todo_wine ok(portparams.dwValidParams, "portparams struct was not filled in\n");
+ ok(portparams.dwValidParams, "portparams struct was not filled in\n");
IDirectMusicPort_Release(port);
port = NULL;
@@ -312,7 +312,7 @@ static void test_createport(void)
hr = IDirectMusic_CreatePort(music, &GUID_NULL, &portparams, &port, NULL);
ok(hr == S_OK, "CreatePort failed: %08x\n", hr);
ok(port != NULL, "Didn't get IDirectMusicPort pointer\n");
- todo_wine ok(portparams.dwValidParams, "portparams struct was not filled in\n");
+ ok(portparams.dwValidParams, "portparams struct was not filled in\n");
IDirectMusicPort_Release(port);
port = NULL;
diff --git a/dlls/dmsynth/dmsynth_private.h b/dlls/dmsynth/dmsynth_private.h
index aabf1f56904..0058ce04d3a 100644
--- a/dlls/dmsynth/dmsynth_private.h
+++ b/dlls/dmsynth/dmsynth_private.h
@@ -56,14 +56,13 @@ extern HRESULT WINAPI DMUSIC_CreateDirectMusicSynthSinkImpl(REFIID riid, void **
* IDirectMusicSynth8Impl implementation structure
*/
struct IDirectMusicSynth8Impl {
- /* IUnknown fields */
IDirectMusicSynth8 IDirectMusicSynth8_iface;
IKsControl IKsControl_iface;
LONG ref;
-
- /* IDirectMusicSynth8 fields */
DMUS_PORTCAPS caps;
+ DMUS_PORTPARAMS params;
BOOL active;
+ BOOL open;
IReferenceClock *latency_clock;
IDirectMusicSynthSink *sink;
};
diff --git a/dlls/dmsynth/synth.c b/dlls/dmsynth/synth.c
index c69d7a340b1..2db80726408 100644
--- a/dlls/dmsynth/synth.c
+++ b/dlls/dmsynth/synth.c
@@ -94,21 +94,102 @@ static ULONG WINAPI IDirectMusicSynth8Impl_Release(IDirectMusicSynth8 *iface)
}
/* IDirectMusicSynth8Impl IDirectMusicSynth part: */
-static HRESULT WINAPI IDirectMusicSynth8Impl_Open(IDirectMusicSynth8 *iface,
- DMUS_PORTPARAMS *pPortParams)
+static HRESULT WINAPI IDirectMusicSynth8Impl_Open(IDirectMusicSynth8 *iface, DMUS_PORTPARAMS *params)
{
IDirectMusicSynth8Impl *This = impl_from_IDirectMusicSynth8(iface);
+ BOOL modified = FALSE;
+ const DMUS_PORTPARAMS def = {
+ .dwValidParams = DMUS_PORTPARAMS_VOICES|DMUS_PORTPARAMS_CHANNELGROUPS|
+ DMUS_PORTPARAMS_AUDIOCHANNELS|DMUS_PORTPARAMS_SAMPLERATE|DMUS_PORTPARAMS_EFFECTS|
+ DMUS_PORTPARAMS_SHARE|DMUS_PORTPARAMS_FEATURES,
+ .dwSize = sizeof(def), .dwVoices = 32, .dwChannelGroups = 2, .dwAudioChannels = 2,
+ .dwSampleRate = 22050, .dwEffectFlags = DMUS_EFFECT_REVERB
+ };
+
+ TRACE("(%p, %p)\n", This, params);
+
+ if (This->open)
+ return DMUS_E_ALREADYOPEN;
+ if (params && params->dwSize < sizeof(DMUS_PORTPARAMS7))
+ return E_INVALIDARG;
- FIXME("(%p)->(%p): stub\n", This, pPortParams);
+ This->open = TRUE;
- return S_OK;
+ if (!params) {
+ memcpy(&This->params, &def, sizeof(This->params));
+ return S_OK;
+ }
+
+ if (params->dwValidParams & DMUS_PORTPARAMS_VOICES && params->dwVoices) {
+ if (params->dwVoices > This->caps.dwMaxVoices) {
+ modified = TRUE;
+ params->dwVoices = This->caps.dwMaxVoices;
+ }
+ } else
+ params->dwVoices = def.dwVoices;
+
+ if (params->dwValidParams & DMUS_PORTPARAMS_CHANNELGROUPS && params->dwChannelGroups) {
+ if (params->dwChannelGroups > This->caps.dwMaxChannelGroups) {
+ modified = TRUE;
+ params->dwChannelGroups = This->caps.dwMaxChannelGroups;
+ }
+ } else
+ params->dwChannelGroups = def.dwChannelGroups;
+
+ if (params->dwValidParams & DMUS_PORTPARAMS_AUDIOCHANNELS && params->dwAudioChannels) {
+ if (params->dwAudioChannels > This->caps.dwMaxAudioChannels) {
+ modified = TRUE;
+ params->dwAudioChannels = This->caps.dwMaxAudioChannels;
+ }
+ } else
+ params->dwAudioChannels = def.dwAudioChannels;
+
+ if (params->dwValidParams & DMUS_PORTPARAMS_SAMPLERATE && params->dwSampleRate) {
+ if (params->dwSampleRate > 96000) {
+ modified = TRUE;
+ params->dwSampleRate = 96000;
+ } else if (params->dwSampleRate < 11025) {
+ modified = TRUE;
+ params->dwSampleRate = 11025;
+ }
+ } else
+ params->dwSampleRate = def.dwSampleRate;
+
+ if (params->dwValidParams & DMUS_PORTPARAMS_EFFECTS && params->dwEffectFlags != def.dwEffectFlags)
+ modified = TRUE;
+ params->dwEffectFlags = def.dwEffectFlags;
+
+ if (params->dwValidParams & DMUS_PORTPARAMS_SHARE && params->fShare)
+ modified = TRUE;
+ params->fShare = FALSE;
+
+ if (params->dwSize >= sizeof(params)) {
+ if (params->dwValidParams & DMUS_PORTPARAMS_FEATURES && params->dwFeatures) {
+ if (params->dwFeatures & ~(DMUS_PORT_FEATURE_AUDIOPATH|DMUS_PORT_FEATURE_STREAMING)) {
+ modified = TRUE;
+ params->dwFeatures &= DMUS_PORT_FEATURE_AUDIOPATH|DMUS_PORT_FEATURE_STREAMING;
+ }
+ } else
+ params->dwFeatures = def.dwFeatures;
+ params->dwValidParams = def.dwValidParams;
+ } else
+ params->dwValidParams = def.dwValidParams & ~DMUS_PORTPARAMS_FEATURES;
+
+ memcpy(&This->params, params, min(params->dwSize, sizeof(This->params)));
+
+ return modified ? S_FALSE : S_OK;
}
static HRESULT WINAPI IDirectMusicSynth8Impl_Close(IDirectMusicSynth8 *iface)
{
IDirectMusicSynth8Impl *This = impl_from_IDirectMusicSynth8(iface);
- FIXME("(%p)->(): stub\n", This);
+ TRACE("(%p)\n", This);
+
+ if (!This->open)
+ return DMUS_E_ALREADYCLOSED;
+
+ This->open = FALSE;
return S_OK;
}
--
2.34.1
1
0
[PATCH 2/4] dmime: The soft synth doesn't supports sharing the channel groups
by Michael Stefaniuc Feb. 7, 2022
by Michael Stefaniuc Feb. 7, 2022
Feb. 7, 2022
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/dmime/performance.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c
index 554518c5d5b..58d16de234d 100644
--- a/dlls/dmime/performance.c
+++ b/dlls/dmime/performance.c
@@ -643,9 +643,6 @@ static HRESULT perf_dmport_create(IDirectMusicPerformance8Impl *perf, DMUS_PORTP
if (FAILED(hr = IDirectMusic8_GetDefaultPort(perf->dmusic, &guid)))
return hr;
- params->dwValidParams |= DMUS_PORTPARAMS_SHARE;
- params->fShare = TRUE;
-
if (FAILED(hr = IDirectMusic8_CreatePort(perf->dmusic, &guid, params, &port, NULL)))
return hr;
if (FAILED(hr = IDirectMusicPort_Activate(port, TRUE))) {
--
2.34.1
1
0
Feb. 7, 2022
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
Used pointer instead of struct size.
dlls/dmime/performance.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c
index 8b38e12eb28..554518c5d5b 100644
--- a/dlls/dmime/performance.c
+++ b/dlls/dmime/performance.c
@@ -643,7 +643,6 @@ static HRESULT perf_dmport_create(IDirectMusicPerformance8Impl *perf, DMUS_PORTP
if (FAILED(hr = IDirectMusic8_GetDefaultPort(perf->dmusic, &guid)))
return hr;
- params->dwSize = sizeof(params);
params->dwValidParams |= DMUS_PORTPARAMS_SHARE;
params->fShare = TRUE;
@@ -671,6 +670,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_AddPort(IDirectMusicPerforman
if (!port) {
DMUS_PORTPARAMS params = {
+ .dwSize = sizeof(params),
.dwValidParams = DMUS_PORTPARAMS_CHANNELGROUPS,
.dwChannelGroups = 1
};
@@ -1148,6 +1148,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CreateStandardAudioPath(IDire
}
/* Create a port */
+ params.dwSize = sizeof(params);
params.dwValidParams = DMUS_PORTPARAMS_CHANNELGROUPS | DMUS_PORTPARAMS_AUDIOCHANNELS;
params.dwChannelGroups = (pchannel_count + 15) / 16;
params.dwAudioChannels = format.nChannels;
--
2.34.1
1
0
[PATCH] winegstreamer: Release stream_cs on error in stream_thread().
by Zebediah Figura Feb. 7, 2022
by Zebediah Figura Feb. 7, 2022
Feb. 7, 2022
This fixes a deadlock when trying to skip video in Persona 4 Golden.
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/winegstreamer/wm_asyncreader.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/winegstreamer/wm_asyncreader.c b/dlls/winegstreamer/wm_asyncreader.c
index fc919ef2c49..9dfe2380284 100644
--- a/dlls/winegstreamer/wm_asyncreader.c
+++ b/dlls/winegstreamer/wm_asyncreader.c
@@ -146,6 +146,7 @@ static DWORD WINAPI stream_thread(void *arg)
else if (hr != NS_E_NO_MORE_SAMPLES)
{
ERR("Failed to get sample, hr %#lx.\n", hr);
+ LeaveCriticalSection(&reader->stream_cs);
return 0;
}
}
--
2.34.1
1
0
Feb. 7, 2022
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/mshtml/htmlevent.c | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c
index 50ca4cbb168..327bb1f915c 100644
--- a/dlls/mshtml/htmlevent.c
+++ b/dlls/mshtml/htmlevent.c
@@ -1685,15 +1685,33 @@ static HRESULT WINAPI DOMMouseEvent_get_pageY(IDOMMouseEvent *iface, LONG *p)
static HRESULT WINAPI DOMMouseEvent_get_layerX(IDOMMouseEvent *iface, LONG *p)
{
DOMEvent *This = impl_from_IDOMMouseEvent(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ nsresult nsres;
+ LONG r;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ nsres = nsIDOMMouseEvent_GetLayerX(This->mouse_event, &r);
+ if(NS_FAILED(nsres))
+ return E_FAIL;
+
+ *p = r;
+ return S_OK;
}
static HRESULT WINAPI DOMMouseEvent_get_layerY(IDOMMouseEvent *iface, LONG *p)
{
DOMEvent *This = impl_from_IDOMMouseEvent(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ nsresult nsres;
+ LONG r;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ nsres = nsIDOMMouseEvent_GetLayerY(This->mouse_event, &r);
+ if(NS_FAILED(nsres))
+ return E_FAIL;
+
+ *p = r;
+ return S_OK;
}
static HRESULT WINAPI DOMMouseEvent_get_which(IDOMMouseEvent *iface, USHORT *p)
--
2.34.1
2
1
Feb. 7, 2022
Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com>
---
dlls/evr/mixer.c | 3 +-
dlls/mf/copier.c | 3 +-
dlls/winegstreamer/audioconvert.c | 3 +-
dlls/winegstreamer/mfplat.c | 3 +-
dlls/winegstreamer/wma_decoder.c | 3 +-
include/wine/mfdebug.h | 178 ++++++++++++++++++++++++++++++
6 files changed, 188 insertions(+), 5 deletions(-)
create mode 100644 include/wine/mfdebug.h
diff --git a/dlls/evr/mixer.c b/dlls/evr/mixer.c
index 0b957e7b6bd..e8488d6cf1a 100644
--- a/dlls/evr/mixer.c
+++ b/dlls/evr/mixer.c
@@ -32,6 +32,7 @@
#include "evcode.h"
#include "wine/debug.h"
+#include "wine/mfdebug.h"
WINE_DEFAULT_DEBUG_CHANNEL(evr);
@@ -853,7 +854,7 @@ static HRESULT WINAPI video_mixer_transform_SetInputType(IMFTransform *iface, DW
unsigned int count;
GUID *guids;
- TRACE("%p, %lu, %p, %#lx.\n", iface, id, media_type, flags);
+ TRACE("%p, %lu, %p %s, %#lx.\n", iface, id, media_type, wine_dbgstr_mfmediatype(media_type), flags);
EnterCriticalSection(&mixer->cs);
diff --git a/dlls/mf/copier.c b/dlls/mf/copier.c
index 4972c9f9c44..857de34cb91 100644
--- a/dlls/mf/copier.c
+++ b/dlls/mf/copier.c
@@ -23,6 +23,7 @@
#include "mf_private.h"
#include "wine/debug.h"
+#include "wine/mfdebug.h"
WINE_DEFAULT_DEBUG_CHANNEL(mfplat);
@@ -326,7 +327,7 @@ static HRESULT WINAPI sample_copier_transform_SetInputType(IMFTransform *iface,
{
struct sample_copier *transform = impl_from_IMFTransform(iface);
- TRACE("%p, %u, %p, %#x.\n", iface, id, type, flags);
+ TRACE("%p, %u, %p %s, %#x.\n", iface, id, type, wine_dbgstr_mfmediatype(type), flags);
return sample_copier_set_media_type(transform, TRUE, id, type, flags);
}
diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c
index d5723cdf58f..0d812af6500 100644
--- a/dlls/winegstreamer/audioconvert.c
+++ b/dlls/winegstreamer/audioconvert.c
@@ -25,6 +25,7 @@
#include "ksmedia.h"
#include "wine/debug.h"
+#include "wine/mfdebug.h"
WINE_DEFAULT_DEBUG_CHANNEL(mfplat);
@@ -277,7 +278,7 @@ static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id
struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface);
- TRACE("%p, %lu, %p, %#lx.\n", iface, id, type, flags);
+ TRACE("%p, %lu, %p %s, %#lx.\n", iface, id, type, wine_dbgstr_mfmediatype(type), flags);
if (id != 0)
return MF_E_INVALIDSTREAMNUMBER;
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
index a111bbe196d..cf4fbd5b04a 100644
--- a/dlls/winegstreamer/mfplat.c
+++ b/dlls/winegstreamer/mfplat.c
@@ -26,6 +26,7 @@
#include "mfapi.h"
#include "wine/debug.h"
+#include "wine/mfdebug.h"
WINE_DEFAULT_DEBUG_CHANNEL(mfplat);
@@ -186,7 +187,7 @@ static HRESULT WINAPI video_processor_GetOutputAvailableType(IMFTransform *iface
static HRESULT WINAPI video_processor_SetInputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags)
{
- FIXME("%p, %lu, %p, %#lx.\n", iface, id, type, flags);
+ FIXME("%p, %lu, %p %s, %#lx.\n", iface, id, type, wine_dbgstr_mfmediatype(type), flags);
return E_NOTIMPL;
}
diff --git a/dlls/winegstreamer/wma_decoder.c b/dlls/winegstreamer/wma_decoder.c
index 78316059052..aca9c50953d 100644
--- a/dlls/winegstreamer/wma_decoder.c
+++ b/dlls/winegstreamer/wma_decoder.c
@@ -26,6 +26,7 @@
#include "wmcodecdsp.h"
#include "wine/debug.h"
+#include "wine/mfdebug.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL(wmadec);
@@ -330,7 +331,7 @@ static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFM
HRESULT hr;
ULONG i;
- TRACE("iface %p, id %lu, type %p, flags %#lx.\n", iface, id, type, flags);
+ TRACE("iface %p, id %lu, type %p %s, flags %#lx.\n", iface, id, type, wine_dbgstr_mfmediatype(type), flags);
if (FAILED(hr = IMFMediaType_GetGUID(type, &MF_MT_MAJOR_TYPE, &major)) ||
FAILED(hr = IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype)))
diff --git a/include/wine/mfdebug.h b/include/wine/mfdebug.h
new file mode 100644
index 00000000000..503d89dc9a8
--- /dev/null
+++ b/include/wine/mfdebug.h
@@ -0,0 +1,178 @@
+/*
+ * Copyright 2022 Andrew Eikum for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef __WINE_WINE_MFDEBUG_H
+#define __WINE_WINE_MFDEBUG_H
+
+static const char *wine_dbgstr_mfmediatype_guid( const GUID *guid )
+{
+#define X(x) if (IsEqualGUID( guid, &x )) return #x;
+ X(MFMediaType_Audio)
+ X(MFMediaType_Video)
+
+ X(MFVideoFormat_Base)
+ X(MFVideoFormat_RGB8)
+ X(MFVideoFormat_RGB555)
+ X(MFVideoFormat_RGB565)
+ X(MFVideoFormat_RGB24)
+ X(MFVideoFormat_RGB32)
+ X(MFVideoFormat_ARGB32)
+ X(MFVideoFormat_A2R10G10B10)
+ X(MFVideoFormat_A16B16G16R16F)
+ X(MFVideoFormat_L8)
+ X(MFVideoFormat_L16)
+ X(MFVideoFormat_D16)
+
+ X(MFVideoFormat_420O)
+ X(MFVideoFormat_DVSL)
+ X(MFVideoFormat_DVSD)
+ X(MFVideoFormat_DVHD)
+ X(MFVideoFormat_DV25)
+ X(MFVideoFormat_DV50)
+ X(MFVideoFormat_DVH1)
+ X(MFVideoFormat_DVC)
+ X(MFVideoFormat_v210)
+ X(MFVideoFormat_v216)
+ X(MFVideoFormat_v410)
+ X(MFVideoFormat_AI44)
+ X(MFVideoFormat_AV1)
+ X(MFVideoFormat_AYUV)
+ X(MFVideoFormat_H263)
+ X(MFVideoFormat_H264)
+ X(MFVideoFormat_H265)
+ X(MFVideoFormat_HEVC)
+ X(MFVideoFormat_HEVC_ES)
+ X(MFVideoFormat_I420)
+ X(MFVideoFormat_IYUV)
+ X(MFVideoFormat_M4S2)
+ X(MFVideoFormat_MJPG)
+ X(MFVideoFormat_MP43)
+ X(MFVideoFormat_MP4S)
+ X(MFVideoFormat_MP4V)
+ X(MFVideoFormat_MPG1)
+ X(MFVideoFormat_MSS1)
+ X(MFVideoFormat_MSS2)
+ X(MFVideoFormat_NV11)
+ X(MFVideoFormat_NV12)
+ X(MFVideoFormat_ORAW)
+ X(MFVideoFormat_P010)
+ X(MFVideoFormat_P016)
+ X(MFVideoFormat_P210)
+ X(MFVideoFormat_P216)
+ X(MFVideoFormat_UYVY)
+ X(MFVideoFormat_VP10)
+ X(MFVideoFormat_VP80)
+ X(MFVideoFormat_VP90)
+ X(MFVideoFormat_Y210)
+ X(MFVideoFormat_Y216)
+ X(MFVideoFormat_Y410)
+ X(MFVideoFormat_Y416)
+ X(MFVideoFormat_Y41P)
+ X(MFVideoFormat_Y41T)
+ X(MFVideoFormat_Y42T)
+ X(MFVideoFormat_YUY2)
+ X(MFVideoFormat_YV12)
+ X(MFVideoFormat_YVYU)
+ X(MFVideoFormat_YVU9)
+ X(MFVideoFormat_WMV1)
+ X(MFVideoFormat_WMV2)
+ X(MFVideoFormat_WMV3)
+ X(MFVideoFormat_WVC1)
+
+ X(MFVideoFormat_Base_HDCP)
+ X(MFVideoFormat_H264_ES)
+ X(MFVideoFormat_H264_HDCP)
+ X(MFVideoFormat_HEVC_HDCP)
+ X(MFVideoFormat_MPEG2)
+
+ X(MFAudioFormat_Base)
+ X(MFAudioFormat_AAC)
+ X(MFAudioFormat_ADTS)
+ X(MFAudioFormat_ALAC)
+ X(MFAudioFormat_AMR_NB)
+ X(MFAudioFormat_AMR_WB)
+ X(MFAudioFormat_AMR_WP)
+ X(MFAudioFormat_Dolby_AC3_SPDIF)
+ X(MFAudioFormat_DRM)
+ X(MFAudioFormat_DTS)
+ X(MFAudioFormat_Float)
+ X(MFAudioFormat_FLAC)
+ X(MFAudioFormat_MP3)
+ X(MFAudioFormat_MPEG)
+ X(MFAudioFormat_MSP1)
+ X(MFAudioFormat_Opus)
+ X(MFAudioFormat_PCM)
+ X(MFAudioFormat_WMAudioV8)
+ X(MFAudioFormat_WMAudioV9)
+ X(MFAudioFormat_WMAudio_Lossless)
+ X(MFAudioFormat_WMASPDIF)
+
+ X(MFAudioFormat_AAC_HDCP)
+ X(MFAudioFormat_ADTS_HDCP)
+ X(MFAudioFormat_Base_HDCP)
+ X(MFAudioFormat_Dolby_AC3)
+ X(MFAudioFormat_Dolby_AC3_HDCP)
+ X(MFAudioFormat_Dolby_DDPlus)
+ X(MFAudioFormat_Float_SpatialObjects)
+ X(MFAudioFormat_LPCM)
+ X(MFAudioFormat_PCM_HDCP)
+ X(MFAudioFormat_Vorbis)
+
+ X(MFMediaType_Binary)
+ X(MFMediaType_Default)
+ X(MFMediaType_FileTransfer)
+ X(MFMediaType_HTML)
+ X(MFMediaType_Image)
+ X(MFMediaType_MultiplexedFrames)
+ X(MFMediaType_Perception)
+ X(MFMediaType_Protected)
+ X(MFMediaType_SAMI)
+ X(MFMediaType_Script)
+ X(MFMediaType_Stream)
+ X(MFMediaType_Subtitle)
+#undef X
+ return NULL;
+}
+
+static const char *wine_dbgstr_mfmediatype( IMFMediaType *type )
+{
+ GUID major, minor;
+ const char *major_s = "none", *minor_s = "none";
+
+ if (!type) return "{null}";
+
+ if (SUCCEEDED( IMFMediaType_GetMajorType( type, &major ) ))
+ {
+ major_s = wine_dbgstr_mfmediatype_guid( &major );
+
+ if (!major_s)
+ major_s = wine_dbgstr_guid( &major );
+ }
+
+ if (SUCCEEDED( IMFMediaType_GetGUID( type, &MF_MT_SUBTYPE, &minor ) ))
+ {
+ minor_s = wine_dbgstr_mfmediatype_guid( &minor );
+
+ if (!minor_s)
+ minor_s = wine_dbgstr_guid( &minor );
+ }
+
+ return wine_dbg_sprintf( "{%s, %s}", major_s, minor_s );
+}
+
+#endif /* __WINE_WINE_MFDEBUG_H */
--
2.35.1
4
6
Feb. 7, 2022
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/msi/tests/Makefile.in | 1 -
dlls/msi/tests/action.c | 472 +++----
dlls/msi/tests/automation.c | 397 +++---
dlls/msi/tests/custom.c | 2 +-
dlls/msi/tests/db.c | 164 +--
dlls/msi/tests/format.c | 207 ++-
dlls/msi/tests/install.c | 102 +-
dlls/msi/tests/msi.c | 2651 +++++++++++++++++------------------
dlls/msi/tests/package.c | 454 +++---
dlls/msi/tests/patch.c | 25 +-
dlls/msi/tests/record.c | 22 +-
dlls/msi/tests/source.c | 654 ++++-----
dlls/msi/tests/suminfo.c | 2 +-
13 files changed, 2577 insertions(+), 2576 deletions(-)
diff --git a/dlls/msi/tests/Makefile.in b/dlls/msi/tests/Makefile.in
index 3970a211d77..5c99e67a68a 100644
--- a/dlls/msi/tests/Makefile.in
+++ b/dlls/msi/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = msi.dll
IMPORTS = secur32 cabinet msi shell32 ole32 oleaut32 user32 advapi32 version odbccp32
diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c
index 1889e39195b..224637eb286 100644
--- a/dlls/msi/tests/action.c
+++ b/dlls/msi/tests/action.c
@@ -2472,7 +2472,7 @@ static void remove_restore_point(DWORD seq_number)
res = pSRRemoveRestorePoint(seq_number);
if (res != ERROR_SUCCESS)
- trace("Failed to remove the restore point : %08x\n", res);
+ trace("Failed to remove the restore point : %#lx\n", res);
}
static LONG delete_key( HKEY key, LPCSTR subkey, REGSAM access )
@@ -2513,8 +2513,8 @@ static void check_reg_str(HKEY prodkey, LPCSTR name, LPCSTR expected, BOOL bcase
size = MAX_PATH;
val[0] = '\0';
res = RegQueryValueExA(prodkey, name, NULL, &type, (BYTE *)val, &size);
- ok_(__FILE__, line)(!res, "Failed to query value, error %u\n", res);
- ok_(__FILE__, line)(type == REG_SZ || type == REG_EXPAND_SZ, "Got wrong type %u\n", type);
+ ok_(__FILE__, line)(!res, "Failed to query value, error %ld\n", res);
+ ok_(__FILE__, line)(type == REG_SZ || type == REG_EXPAND_SZ, "Got wrong type %lu\n", type);
todo_wine_if (todo)
{
if (bcase)
@@ -2538,9 +2538,9 @@ static void check_reg_multi(HKEY prodkey, const char *name, const char *expect,
size = MAX_PATH;
val[0] = '\0';
res = RegQueryValueExA(prodkey, name, NULL, &type, (BYTE *)val, &size);
- ok_(__FILE__, line)(!res, "Failed to query value, error %u\n", res);
- ok_(__FILE__, line)(type == REG_MULTI_SZ, "Got wrong type %u\n", type);
- ok_(__FILE__, line)(size == expect_size, "expected size %u, got %u\n", expect_size, size);
+ ok_(__FILE__, line)(!res, "Failed to query value, error %ld\n", res);
+ ok_(__FILE__, line)(type == REG_MULTI_SZ, "Got wrong type %lu\n", type);
+ ok_(__FILE__, line)(size == expect_size, "expected size %lu, got %lu\n", expect_size, size);
ok_(__FILE__, line)(!memcmp(val, expect, size), "got %s\n", debugstr_an(val, size));
}
@@ -2551,10 +2551,10 @@ static void check_reg_dword(HKEY prodkey, LPCSTR name, DWORD expected, BOOL todo
size = sizeof(DWORD);
res = RegQueryValueExA(prodkey, name, NULL, &type, (BYTE *)&val, &size);
- ok_(__FILE__, line)(!res, "Failed to query value, error %u\n", res);
- ok_(__FILE__, line)(type == REG_DWORD, "Got wrong type %u\n", type);
+ ok_(__FILE__, line)(!res, "Failed to query value, error %ld\n", res);
+ ok_(__FILE__, line)(type == REG_DWORD, "Got wrong type %lu\n", type);
todo_wine_if (todo)
- ok_(__FILE__, line)(val == expected, "Expected %d, got %d\n", expected, val);
+ ok_(__FILE__, line)(val == expected, "Expected %lu, got %lu\n", expected, val);
}
#define CHECK_REG_STR(prodkey, name, expected) \
@@ -2641,7 +2641,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 %lu\n", path, GetLastError());
res = FindResourceA(NULL, name, type);
ok( res != 0, "couldn't find resource\n" );
@@ -2700,10 +2700,10 @@ static void test_register_product(void)
ok(delete_pf("msitest", FALSE), "Directory not created\n");
res = RegOpenKeyA(HKEY_CURRENT_USER, userugkey, &hkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall, 0, KEY_READ | KEY_WOW64_32KEY, &hkey);
- ok(!res, "got %d\n", res);
+ ok(!res, "got %ld\n", res);
CHECK_DEL_REG_STR(hkey, "DisplayName", "MSITEST");
CHECK_DEL_REG_STR(hkey, "DisplayVersion", "1.1.1");
@@ -2731,15 +2731,15 @@ static void test_register_product(void)
CHECK_DEL_REG_DWORD_TODO(hkey, "EstimatedSize", get_estimated_size());
res = RegDeleteKeyA(hkey, "");
- ok(!res, "got %d\n", res);
+ ok(!res, "got %ld\n", res);
RegCloseKey(hkey);
sprintf(keypath, userdata, usersid);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, KEY_ALL_ACCESS | KEY_WOW64_64KEY, &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegOpenKeyExA(hkey, "InstallProperties", 0, KEY_READ, &props);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
size = sizeof(path);
RegQueryValueExA(props, "LocalPackage", NULL, &type, (LPBYTE)path, &size);
@@ -2772,43 +2772,43 @@ static void test_register_product(void)
CHECK_DEL_REG_DWORD_TODO(props, "EstimatedSize", get_estimated_size());
res = RegDeleteKeyA(props, "");
- ok(!res, "got %d\n", res);
+ ok(!res, "got %ld\n", res);
RegCloseKey(props);
res = RegOpenKeyExA(hkey, "Usage", 0, KEY_READ, &usage);
todo_wine
{
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
}
res = RegDeleteKeyA(usage, "");
todo_wine
- ok(!res, "got %d\n", res);
+ ok(!res, "got %ld\n", res);
RegCloseKey(usage);
res = RegDeleteKeyA(hkey, "");
- ok(!res, "got %d\n", res);
+ ok(!res, "got %ld\n", res);
RegCloseKey(hkey);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ugkey, 0, KEY_READ | KEY_WOW64_64KEY, &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", "");
res = RegDeleteKeyA(hkey, "");
- ok(!res, "got %d\n", res);
+ ok(!res, "got %ld\n", res);
RegCloseKey(hkey);
/* RegisterProduct, machine */
r = MsiInstallProductA(msifile, "REGISTER_PRODUCT=1 ALLUSERS=1");
- ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
+ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
ok(delete_pf("msitest", FALSE), "Directory not created\n");
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, userugkey, 0, KEY_READ | KEY_WOW64_64KEY, &hkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall, 0, KEY_READ | KEY_WOW64_32KEY, &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_DEL_REG_STR(hkey, "DisplayName", "MSITEST");
CHECK_DEL_REG_STR(hkey, "DisplayVersion", "1.1.1");
@@ -2836,15 +2836,15 @@ static void test_register_product(void)
CHECK_DEL_REG_DWORD_TODO(hkey, "EstimatedSize", get_estimated_size());
res = RegDeleteKeyA(hkey, "");
- ok(!res, "got %d\n", res);
+ ok(!res, "got %ld\n", res);
RegCloseKey(hkey);
sprintf(keypath, userdata, "S-1-5-18");
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, KEY_READ | KEY_WOW64_64KEY, &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegOpenKeyExA(hkey, "InstallProperties", 0, KEY_READ, &props);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
size = sizeof(path);
RegQueryValueExA(props, "LocalPackage", NULL, &type, (LPBYTE)path, &size);
@@ -2877,30 +2877,30 @@ static void test_register_product(void)
CHECK_DEL_REG_DWORD_TODO(props, "EstimatedSize", get_estimated_size());
res = RegDeleteKeyA(props, "");
- ok(!res, "got %d\n", res);
+ ok(!res, "got %ld\n", res);
RegCloseKey(props);
res = RegOpenKeyExA(hkey, "Usage", 0, KEY_READ, &usage);
todo_wine
{
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
}
res = RegDeleteKeyA(usage, "");
todo_wine
- ok(!res, "got %d\n", res);
+ ok(!res, "got %ld\n", res);
RegCloseKey(usage);
res = RegDeleteKeyA(hkey, "");
- ok(!res, "got %d\n", res);
+ ok(!res, "got %ld\n", res);
RegCloseKey(hkey);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ugkey, 0, KEY_READ | KEY_WOW64_64KEY, &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", "");
res = RegDeleteKeyA(hkey, "");
- ok(!res, "got %d\n", res);
+ ok(!res, "got %ld\n", res);
RegCloseKey(hkey);
if (is_wow64 || is_64bit)
@@ -2914,13 +2914,13 @@ static void test_register_product(void)
ok(delete_pf("msitest", FALSE), "Directory not created\n");
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, userugkey, 0, KEY_READ | KEY_WOW64_64KEY, &hkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall, 0, KEY_READ | KEY_WOW64_32KEY, &hkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall, 0, KEY_READ | KEY_WOW64_64KEY, &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_DEL_REG_STR(hkey, "DisplayName", "MSITEST");
CHECK_DEL_REG_STR(hkey, "DisplayVersion", "1.1.1");
@@ -2948,15 +2948,15 @@ static void test_register_product(void)
CHECK_DEL_REG_DWORD_TODO(hkey, "EstimatedSize", get_estimated_size());
res = RegDeleteKeyA(hkey, "");
- ok(!res, "got %d\n", res);
+ ok(!res, "got %ld\n", res);
RegCloseKey(hkey);
sprintf(keypath, userdata, "S-1-5-18");
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, KEY_READ | KEY_WOW64_64KEY, &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegOpenKeyExA(hkey, "InstallProperties", 0, KEY_READ, &props);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
size = sizeof(path);
RegQueryValueExA(props, "LocalPackage", NULL, &type, (LPBYTE)path, &size);
@@ -2989,30 +2989,30 @@ static void test_register_product(void)
CHECK_DEL_REG_DWORD_TODO(props, "EstimatedSize", get_estimated_size());
res = RegDeleteKeyA(props, "");
- ok(!res, "got %d\n", res);
+ ok(!res, "got %ld\n", res);
RegCloseKey(props);
res = RegOpenKeyExA(hkey, "Usage", 0, KEY_READ, &usage);
todo_wine
{
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
}
res = RegDeleteKeyA(usage, "");
todo_wine
- ok(!res, "got %d\n", res);
+ ok(!res, "got %ld\n", res);
RegCloseKey(usage);
res = RegDeleteKeyA(hkey, "");
- ok(!res, "got %d\n", res);
+ ok(!res, "got %ld\n", res);
RegCloseKey(hkey);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ugkey, 0, KEY_READ | KEY_WOW64_64KEY, &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", "");
res = RegDeleteKeyA(hkey, "");
- ok(!res, "got %d\n", res);
+ ok(!res, "got %ld\n", res);
RegCloseKey(hkey);
}
else
@@ -3085,7 +3085,7 @@ static void test_publish_product(void)
ok(delete_pf("msitest", FALSE), "Directory not created\n");
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, badprod, 0, access, &hkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
sprintf(keypath, prodpath, usersid);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey);
@@ -3105,13 +3105,13 @@ static void test_publish_product(void)
return;
}
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegOpenKeyExA(hkey, "InstallProperties", 0, access, &props);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegOpenKeyExA(hkey, "Patches", 0, access, &patches);
- todo_wine ok(!res, "Expected ERROR_SUCCESS, got %d\n", res);
+ todo_wine ok(!res, "Expected ERROR_SUCCESS, got %ld\n", res);
if (!res)
CHECK_DEL_REG_STR(patches, "AllPatches", "");
@@ -3122,7 +3122,7 @@ static void test_publish_product(void)
currentuser:
res = RegOpenKeyA(HKEY_CURRENT_USER, cuprodpath, &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_DEL_REG_STR(hkey, "ProductName", "MSITEST");
CHECK_DEL_REG_STR(hkey, "PackageCode", "AC75740029052C94DA02821EECD05F2F");
@@ -3136,7 +3136,7 @@ currentuser:
CHECK_DEL_REG_MULTI(hkey, "Clients", ":\0");
res = RegOpenKeyA(hkey, "SourceList", &sourcelist);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
lstrcpyA(path, "n;1;");
lstrcatA(path, temp);
@@ -3144,7 +3144,7 @@ currentuser:
CHECK_DEL_REG_STR(sourcelist, "PackageName", "msitest.msi");
res = RegOpenKeyA(sourcelist, "Net", &net);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_DEL_REG_STR(net, "1", temp);
@@ -3152,7 +3152,7 @@ currentuser:
RegCloseKey(net);
res = RegOpenKeyA(sourcelist, "Media", &media);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_DEL_REG_STR(media, "1", "DISK1;");
@@ -3164,7 +3164,7 @@ currentuser:
RegCloseKey(hkey);
res = RegOpenKeyA(HKEY_CURRENT_USER, cuupgrades, &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", "");
@@ -3180,17 +3180,17 @@ currentuser:
ok(delete_pf("msitest", FALSE), "Directory not created\n");
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, badprod, 0, access, &hkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
sprintf(keypath, prodpath, "S-1-5-18");
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegOpenKeyExA(hkey, "InstallProperties", 0, access, &props);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegOpenKeyExA(hkey, "Patches", 0, access, &patches);
- todo_wine ok(!res, "Expected ERROR_SUCCESS, got %d\n", res);
+ todo_wine ok(!res, "Expected ERROR_SUCCESS, got %ld\n", res);
if (!res)
CHECK_DEL_REG_STR(patches, "AllPatches", "");
@@ -3201,7 +3201,7 @@ currentuser:
machprod:
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, machprod, 0, access, &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_DEL_REG_STR(hkey, "ProductName", "MSITEST");
CHECK_DEL_REG_STR(hkey, "PackageCode", "AC75740029052C94DA02821EECD05F2F");
@@ -3215,7 +3215,7 @@ machprod:
CHECK_DEL_REG_MULTI(hkey, "Clients", ":\0");
res = RegOpenKeyExA(hkey, "SourceList", 0, access, &sourcelist);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
lstrcpyA(path, "n;1;");
lstrcatA(path, temp);
@@ -3223,36 +3223,36 @@ machprod:
CHECK_DEL_REG_STR(sourcelist, "PackageName", "msitest.msi");
res = RegOpenKeyExA(sourcelist, "Net", 0, access, &net);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_DEL_REG_STR(net, "1", temp);
res = delete_key(net, "", access);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
RegCloseKey(net);
res = RegOpenKeyExA(sourcelist, "Media", 0, access, &media);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_DEL_REG_STR(media, "1", "DISK1;");
res = delete_key(media, "", access);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
RegCloseKey(media);
res = delete_key(sourcelist, "", access);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
RegCloseKey(sourcelist);
res = delete_key(hkey, "", access);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
RegCloseKey(hkey);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, machup, 0, access, &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", "");
res = delete_key(hkey, "", access);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
RegCloseKey(hkey);
error:
@@ -3314,13 +3314,13 @@ static void test_publish_features(void)
ok(delete_pf("msitest", FALSE), "Directory not created\n");
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, featkey, 0, access, &hkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, classfeat, 0, access, &hkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegOpenKeyA(HKEY_CURRENT_USER, cupath, &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_STR(hkey, "feature", "");
CHECK_REG_STR(hkey, "montecristo", "");
@@ -3332,7 +3332,7 @@ static void test_publish_features(void)
sprintf(keypath, udfeatpath, usersid);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_STR(hkey, "feature", "VGtfp^p+,?82(a)JU1j_KE");
CHECK_REG_STR(hkey, "montecristo", "VGtfp^p+,?82(a)JU1j_KE");
@@ -3351,12 +3351,12 @@ static void test_publish_features(void)
ok(delete_pf("msitest", FALSE), "Directory not created\n");
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, featkey, 0, access, &hkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegOpenKeyA(HKEY_CURRENT_USER, cupath, &hkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, classfeat, 0, access, &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_STR(hkey, "feature", "");
CHECK_REG_STR(hkey, "montecristo", "");
@@ -3368,7 +3368,7 @@ static void test_publish_features(void)
sprintf(keypath, udfeatpath, "S-1-5-18");
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_STR(hkey, "feature", "VGtfp^p+,?82(a)JU1j_KE");
CHECK_REG_STR(hkey, "montecristo", "VGtfp^p+,?82(a)JU1j_KE");
@@ -3501,7 +3501,7 @@ static void test_register_user(void)
sprintf(keypath, keypropsfmt, usersid);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &props);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_STR(props, "ProductID", "none");
CHECK_REG_STR(props, "RegCompany", company);
@@ -3523,7 +3523,7 @@ static void test_register_user(void)
sprintf(keypath, keypropsfmt, "S-1-5-18");
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &props);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_STR(props, "ProductID", "none");
CHECK_REG_STR(props, "RegCompany", company);
@@ -3595,12 +3595,12 @@ static void test_process_components(void)
sprintf(keypath, keyfmt, usersid, "CBABC2FDCCB35E749A8944D8C1C098B5");
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &comp);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
size = MAX_PATH;
res = RegQueryValueExA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB",
NULL, NULL, (LPBYTE)val, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
lstrcpyA(program_files_maximus,PROG_FILES_DIR);
lstrcatA(program_files_maximus,"\\msitest\\maximus");
@@ -3609,7 +3609,7 @@ static void test_process_components(void)
"Expected \"%s\", got \"%s\"\n", program_files_maximus, val);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, compkey, 0, access, &hkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
RegDeleteValueA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB");
delete_key(comp, "", access);
@@ -3617,17 +3617,17 @@ static void test_process_components(void)
sprintf(keypath, keyfmt, usersid, "241C3DA58FECD0945B9687D408766058");
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &comp);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
size = MAX_PATH;
res = RegQueryValueExA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB",
NULL, NULL, (LPBYTE)val, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(val, "01\\msitest\\augustus"),
"Expected \"01\\msitest\\augustus\", got \"%s\"\n", val);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, compkey, 0, access, &hkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
RegDeleteValueA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB");
delete_key(comp, "", access);
@@ -3641,17 +3641,17 @@ static void test_process_components(void)
sprintf(keypath, keyfmt, "S-1-5-18", "CBABC2FDCCB35E749A8944D8C1C098B5");
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &comp);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
size = MAX_PATH;
res = RegQueryValueExA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB",
NULL, NULL, (LPBYTE)val, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpiA(val, program_files_maximus),
"Expected \"%s\", got \"%s\"\n", program_files_maximus, val);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, compkey, 0, access, &hkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
RegDeleteValueA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB");
delete_key(comp, "", access);
@@ -3659,17 +3659,17 @@ static void test_process_components(void)
sprintf(keypath, keyfmt, "S-1-5-18", "241C3DA58FECD0945B9687D408766058");
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &comp);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
size = MAX_PATH;
res = RegQueryValueExA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB",
NULL, NULL, (LPBYTE)val, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(val, "01\\msitest\\augustus"),
"Expected \"01\\msitest\\augustus\", got \"%s\"\n", val);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, compkey, 0, access, &hkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
RegDeleteValueA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB");
delete_key(comp, "", access);
@@ -3712,12 +3712,12 @@ static void test_publish(void)
access |= KEY_WOW64_64KEY;
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, subkey, 0, KEY_ALL_ACCESS, &uninstall);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
if (is_64bit)
{
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, subkey_32node, 0, KEY_ALL_ACCESS, &uninstall_32node);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
}
CreateDirectoryA("msitest", NULL);
@@ -3739,7 +3739,7 @@ static void test_publish(void)
error = GetLastError();
ok(r == ERROR_UNKNOWN_PRODUCT, "got %u\n", r);
ok(state == 0xdead, "got %d\n", state);
- ok(error == 0xdeadbeef, "got %u\n", error);
+ ok(error == 0xdeadbeef, "got %lu\n", error);
state = 0xdead;
SetLastError(0xdeadbeef);
@@ -3747,7 +3747,7 @@ static void test_publish(void)
error = GetLastError();
ok(r == ERROR_UNKNOWN_PRODUCT, "got %u\n", r);
ok(state == 0xdead, "got %d\n", state);
- ok(error == ERROR_SUCCESS, "got %u\n", error);
+ ok(error == ERROR_SUCCESS, "got %lu\n", error);
state = 0xdead;
SetLastError(0xdeadbeef);
@@ -3755,7 +3755,7 @@ static void test_publish(void)
error = GetLastError();
ok(r == ERROR_UNKNOWN_PRODUCT, "got %u\n", r);
ok(state == 0xdead, "got %d\n", state);
- ok(error == ERROR_SUCCESS, "got %u\n", error);
+ ok(error == ERROR_SUCCESS, "got %lu\n", error);
state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
@@ -3769,7 +3769,7 @@ static void test_publish(void)
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
res = RegOpenKeyExA(uninstall, prodcode, 0, access, &prodkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
/* nothing published */
r = MsiInstallProductA(msifile, NULL);
@@ -3797,7 +3797,7 @@ static void test_publish(void)
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
res = RegOpenKeyExA(uninstall, prodcode, 0, access, &prodkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
/* PublishProduct and RegisterProduct */
r = MsiInstallProductA(msifile, "REGISTER_PRODUCT=1 PUBLISH_PRODUCT=1");
@@ -3822,14 +3822,14 @@ static void test_publish(void)
if (is_64bit)
{
res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
}
else
{
res = RegOpenKeyExA(uninstall, prodcode, 0, access, &prodkey);
if (is_wow64 && res == ERROR_FILE_NOT_FOUND) /* XP - Vista, Wow64 */
res = RegOpenKeyExA(uninstall, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
}
CHECK_REG_STR(prodkey, "DisplayName", "MSITEST");
@@ -3879,7 +3879,7 @@ static void test_publish(void)
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
res = RegOpenKeyExA(uninstall, prodcode, 0, access, &prodkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
/* complete install */
r = MsiInstallProductA(msifile, "FULL=1");
@@ -3899,7 +3899,7 @@ static void test_publish(void)
error = GetLastError();
ok(r == ERROR_UNKNOWN_PRODUCT, "got %u\n", r);
ok(state == 0xdead, "got %d\n", state);
- ok(error == 0xdeadbeef, "got %u\n", error);
+ ok(error == 0xdeadbeef, "got %lu\n", error);
state = 0xdead;
SetLastError(0xdeadbeef);
@@ -3907,7 +3907,7 @@ static void test_publish(void)
error = GetLastError();
ok(r == ERROR_UNKNOWN_PRODUCT, "got %u\n", r);
ok(state == 0xdead, "got %d\n", state);
- ok(error == ERROR_SUCCESS, "got %u\n", error);
+ ok(error == ERROR_SUCCESS, "got %lu\n", error);
state = 0xdead;
SetLastError(0xdeadbeef);
@@ -3915,7 +3915,7 @@ static void test_publish(void)
error = GetLastError();
ok(r == ERROR_SUCCESS, "got %u\n", r);
ok(state == INSTALLSTATE_LOCAL, "got %d\n", state);
- ok(error == ERROR_SUCCESS, "got %u\n", error);
+ ok(error == ERROR_SUCCESS, "got %lu\n", error);
state = MsiQueryFeatureStateA(prodcode, "montecristo");
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
@@ -3928,12 +3928,12 @@ static void test_publish(void)
if (is_64bit)
{
res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
}
else
{
res = RegOpenKeyExA(uninstall, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
}
CHECK_REG_STR(prodkey, "DisplayName", "MSITEST");
@@ -3984,7 +3984,7 @@ static void test_publish(void)
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
res = RegOpenKeyExA(uninstall, prodcode, 0, access, &prodkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
/* complete install */
r = MsiInstallProductA(msifile, "FULL=1");
@@ -4009,12 +4009,12 @@ static void test_publish(void)
if (is_64bit)
{
res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
}
else
{
res = RegOpenKeyExA(uninstall, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
}
CHECK_REG_STR(prodkey, "DisplayName", "MSITEST");
@@ -4067,12 +4067,12 @@ static void test_publish(void)
if (is_64bit)
{
res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
}
else
{
res = RegOpenKeyExA(uninstall, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
}
CHECK_REG_STR(prodkey, "DisplayName", "MSITEST");
@@ -4125,12 +4125,12 @@ static void test_publish(void)
if (is_64bit)
{
res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
}
else
{
res = RegOpenKeyExA(uninstall, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
}
CHECK_REG_STR(prodkey, "DisplayName", "MSITEST");
@@ -4181,7 +4181,7 @@ static void test_publish(void)
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
res = RegOpenKeyExA(uninstall, prodcode, 0, access, &prodkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
/* complete install */
r = MsiInstallProductA(msifile, "FULL=1");
@@ -4206,12 +4206,12 @@ static void test_publish(void)
if (is_64bit)
{
res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
}
else
{
res = RegOpenKeyExA(uninstall, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
}
CHECK_REG_STR(prodkey, "DisplayName", "MSITEST");
@@ -4262,7 +4262,7 @@ static void test_publish(void)
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
res = RegOpenKeyExA(uninstall, prodcode, 0, access, &prodkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
/* make sure 'Program Files\msitest' is removed */
delete_pfmsitest_files();
@@ -4317,7 +4317,7 @@ static void test_publish_sourcelist(void)
r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAMEA, value, &size);
ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
- ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size);
+ ok(size == MAX_PATH, "got %lu\n", size);
ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value);
size = MAX_PATH;
@@ -4325,7 +4325,7 @@ static void test_publish_sourcelist(void)
r = pMsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
- ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size);
+ ok(size == MAX_PATH, "got %lu\n", size);
ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value);
r = MsiInstallProductA(msifile, "REGISTER_PRODUCT=1");
@@ -4339,7 +4339,7 @@ static void test_publish_sourcelist(void)
r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAMEA, value, &size);
ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
- ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size);
+ ok(size == MAX_PATH, "got %lu\n", size);
ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value);
size = MAX_PATH;
@@ -4347,7 +4347,7 @@ static void test_publish_sourcelist(void)
r = pMsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
- ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size);
+ ok(size == MAX_PATH, "got %lu\n", size);
ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value);
r = MsiInstallProductA(msifile, "PROCESS_COMPONENTS=1");
@@ -4361,7 +4361,7 @@ static void test_publish_sourcelist(void)
r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAMEA, value, &size);
ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
- ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size);
+ ok(size == MAX_PATH, "got %lu\n", size);
ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value);
size = MAX_PATH;
@@ -4369,7 +4369,7 @@ static void test_publish_sourcelist(void)
r = pMsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
- ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size);
+ ok(size == MAX_PATH, "got %lu\n", size);
ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value);
r = MsiInstallProductA(msifile, "PUBLISH_FEATURES=1");
@@ -4383,7 +4383,7 @@ static void test_publish_sourcelist(void)
r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAMEA, value, &size);
ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
- ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size);
+ ok(size == MAX_PATH, "got %lu\n", size);
ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value);
size = MAX_PATH;
@@ -4391,7 +4391,7 @@ static void test_publish_sourcelist(void)
r = pMsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
- ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size);
+ ok(size == MAX_PATH, "got %lu\n", size);
ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value);
r = MsiInstallProductA(msifile, "PUBLISH_PRODUCT=1");
@@ -4406,7 +4406,7 @@ static void test_publish_sourcelist(void)
MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAMEA, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, "msitest.msi"), "Expected 'msitest.msi', got %s\n", value);
- ok(size == 11, "Expected 11, got %d\n", size);
+ ok(size == 11, "Expected 11, got %lu\n", size);
size = MAX_PATH;
lstrcpyA(value, "aaa");
@@ -4414,7 +4414,7 @@ static void test_publish_sourcelist(void)
MSICODE_PRODUCT, INSTALLPROPERTY_MEDIAPACKAGEPATHA, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, ""), "Expected \"\", got \"%s\"\n", value);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
size = MAX_PATH;
lstrcpyA(value, "aaa");
@@ -4422,7 +4422,7 @@ static void test_publish_sourcelist(void)
MSICODE_PRODUCT, INSTALLPROPERTY_DISKPROMPTA, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, ""), "Expected \"\", got \"%s\"\n", value);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
lstrcpyA(path, CURR_DIR);
lstrcatA(path, "\\");
@@ -4433,7 +4433,7 @@ static void test_publish_sourcelist(void)
MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCEA, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, path), "Expected \"%s\", got \"%s\"\n", path, value);
- ok(size == lstrlenA(path), "Expected %d, got %d\n", lstrlenA(path), size);
+ ok(size == lstrlenA(path), "Expected %d, got %lu\n", lstrlenA(path), size);
size = MAX_PATH;
lstrcpyA(value, "aaa");
@@ -4441,7 +4441,7 @@ static void test_publish_sourcelist(void)
MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDTYPEA, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, "n"), "Expected \"n\", got \"%s\"\n", value);
- ok(size == 1, "Expected 1, got %d\n", size);
+ ok(size == 1, "Expected 1, got %lu\n", size);
size = MAX_PATH;
lstrcpyA(value, "aaa");
@@ -4449,7 +4449,7 @@ static void test_publish_sourcelist(void)
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
size = MAX_PATH;
lstrcpyA(value, "aaa");
@@ -4457,7 +4457,7 @@ static void test_publish_sourcelist(void)
MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, path), "Expected \"%s\", got \"%s\"\n", path, value);
- ok(size == lstrlenA(path), "Expected %d, got %d\n", lstrlenA(path), size);
+ ok(size == lstrlenA(path), "Expected %d, got %lu\n", lstrlenA(path), size);
size = MAX_PATH;
lstrcpyA(value, "aaa");
@@ -4465,7 +4465,7 @@ static void test_publish_sourcelist(void)
MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 1, value, &size);
ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
/* complete uninstall */
r = MsiInstallProductA(msifile, "FULL=1 REMOVE=ALL");
@@ -4823,28 +4823,28 @@ static void test_write_registry_values(void)
MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
res = RegCreateKeyA(HKEY_CURRENT_USER, "msitest", &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(hkey, "Value1", 0, REG_MULTI_SZ, (const BYTE *)"two\0", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(hkey, "Value2", 0, REG_MULTI_SZ, (const BYTE *)"one\0", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(hkey, "Value3", 0, REG_MULTI_SZ, (const BYTE *)"two\0", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(hkey, "Value4", 0, REG_MULTI_SZ, (const BYTE *)"one\0", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(hkey, "Value5", 0, REG_MULTI_SZ, (const BYTE *)"one\0two\0", 9);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(hkey, "Value6", 0, REG_MULTI_SZ, (const BYTE *)"one\0", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(hkey, "Value7", 0, REG_SZ, (const BYTE *)"one", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(hkey, "instremove", 0, REG_SZ, (const BYTE *)"val", 3);
- ok(!res, "got %u\n", res);
+ ok(!res, "got %ld\n", res);
res = RegCreateKeyA(hkey, "instremove", &subkey);
- ok(!res, "got %u\n", res);
+ ok(!res, "got %ld\n", res);
RegCloseKey(subkey);
r = MsiInstallProductA(msifile, NULL);
@@ -4861,21 +4861,21 @@ static void test_write_registry_values(void)
size = sizeof(buf);
res = RegQueryValueExA(hkey, "expandsz", NULL, &type, (BYTE *)buf, &size);
- ok(!res, "got %u\n", res);
- ok(type == REG_EXPAND_SZ, "got %d\n", type);
+ ok(!res, "got %ld\n", res);
+ ok(type == REG_EXPAND_SZ, "got %ld\n", type);
ok(!strcmp(buf, "string"), "got %s\n", buf);
size = sizeof(buf);
res = RegQueryValueExA(hkey, "binary", NULL, &type, (BYTE *)buf, &size);
- ok(!res, "got %u\n", res);
- ok(type == REG_BINARY, "got %d\n", type);
- ok(size == 4, "got size %u\n", size);
+ ok(!res, "got %ld\n", res);
+ ok(type == REG_BINARY, "got %ld\n", type);
+ ok(size == 4, "got size %lu\n", size);
ok(!memcmp(buf, "\x01\x23\x45\x67", 4), "wrong data\n");
CHECK_REG_STR(hkey, "", "default");
res = RegOpenKeyA(hkey, "VisualStudio", &subkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
RegCloseKey(subkey);
CHECK_REG_MULTI(hkey, "Value1", "one\0");
@@ -4890,55 +4890,55 @@ static void test_write_registry_values(void)
CHECK_REG_DWORD(hkey, "source", 1);
res = RegOpenKeyA(hkey, "subkey", &subkey);
- ok(!res, "got %u\n", res);
+ ok(!res, "got %ld\n", res);
res = RegQueryValueExA(subkey, "", NULL, NULL, NULL, NULL);
- ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
RegCloseKey(subkey);
res = RegOpenKeyA(hkey, "create", &subkey);
- ok(!res, "got %u\n", res);
+ ok(!res, "got %ld\n", res);
RegCloseKey(subkey);
res = RegOpenKeyA(hkey, "delete", &subkey);
- ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
res = RegCreateKeyA(hkey, "delete", &subkey);
- ok(!res, "got %u\n", res);
+ ok(!res, "got %ld\n", res);
RegCloseKey(subkey);
res = RegQueryValueExA(hkey, "instremove", NULL, NULL, NULL, NULL);
- ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
res = RegOpenKeyA(hkey, "instremove", &subkey);
- ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
r = MsiInstallProductA(msifile, "REMOVE=ALL");
ok(!r, "got %u\n", r);
res = RegQueryValueExA(hkey, "sz", NULL, NULL, NULL, NULL);
- ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
res = RegQueryValueExA(hkey, "multisz", NULL, NULL, NULL, NULL);
- ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
res = RegQueryValueExA(hkey, "dword", NULL, NULL, NULL, NULL);
- ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
res = RegQueryValueExA(hkey, "expandsz", NULL, NULL, NULL, NULL);
- ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
res = RegQueryValueExA(hkey, "binary", NULL, NULL, NULL, NULL);
- ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
res = RegQueryValueExA(hkey, "", NULL, NULL, NULL, NULL);
- ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
res = RegOpenKeyA(hkey, "VisualStudio", &subkey);
- ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
res = RegQueryValueExA(hkey, "Value1", NULL, NULL, NULL, NULL);
- ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
res = RegQueryValueExA(hkey, "Value4", NULL, NULL, NULL, NULL);
- ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
res = RegQueryValueExA(hkey, "Value5", NULL, NULL, NULL, NULL);
- ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
res = RegQueryValueExA(hkey, "Value6", NULL, NULL, NULL, NULL);
- ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
res = RegQueryValueExA(hkey, "Value7", NULL, NULL, NULL, NULL);
- ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
todo_wine {
CHECK_REG_MULTI(hkey, "Value2", "one\0");
@@ -4946,25 +4946,25 @@ todo_wine {
}
res = RegQueryValueExA(hkey, "format", NULL, NULL, NULL, NULL);
- ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
res = RegQueryValueExA(hkey, "source", NULL, NULL, NULL, NULL);
- ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
res = RegOpenKeyA(hkey, "subkey", &subkey);
- ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
res = RegOpenKeyA(hkey, "create", &subkey);
- ok(!res, "got %u\n", res);
+ ok(!res, "got %ld\n", res);
RegCloseKey(subkey);
res = RegDeleteKeyA(hkey, "create");
- ok(!res, "got %u\n", res);
+ ok(!res, "got %ld\n", res);
res = RegOpenKeyA(hkey, "delete", &subkey);
- ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
RegCloseKey(hkey);
res = RegDeleteKeyA(HKEY_CURRENT_USER, "msitest");
- ok(!res, "got %u\n", res);
+ ok(!res, "got %ld\n", res);
error:
DeleteFileA(msifile);
@@ -4987,20 +4987,20 @@ static void test_envvar(void)
create_database(msifile, env_tables, ARRAY_SIZE(env_tables));
res = RegCreateKeyExA(HKEY_CURRENT_USER, "Environment", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &env, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "System\\CurrentControlSet\\Control\\Session Manager\\Environment",
0, NULL, 0, KEY_ALL_ACCESS, NULL, &env2, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(env, "MSITESTVAR1", 0, REG_SZ, (const BYTE *)"0", 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(env, "MSITESTVAR2", 0, REG_SZ, (const BYTE *)"0", 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(env, "MSITESTVAR21", 0, REG_SZ, (const BYTE *)"1", 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
@@ -5018,22 +5018,22 @@ static void test_envvar(void)
CHECK_REG_STR(env, "MSITESTVAR4", "1");
res = RegDeleteValueA(env, "MSITESTVAR5");
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegDeleteValueA(env, "MSITESTVAR6");
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegDeleteValueA(env, "MSITESTVAR7");
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegDeleteValueA(env, "MSITESTVAR8");
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegDeleteValueA(env, "MSITESTVAR9");
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegDeleteValueA(env, "MSITESTVAR10");
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
CHECK_REG_STR(env, "MSITESTVAR11", "1;2");
CHECK_REG_STR(env, "MSITESTVAR12", "1");
@@ -5050,13 +5050,13 @@ static void test_envvar(void)
CHECK_REG_STR(env2, "MSITESTVAR100", "1");
res = RegSetValueExA(env, "MSITESTVAR22", 0, REG_SZ, (const BYTE *)"1", 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(env, "MSITESTVAR23", 0, REG_SZ, (const BYTE *)"1", 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegDeleteValueA(env, "MSITESTVAR25");
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
r = MsiInstallProductA(msifile, "REMOVE=ALL");
ok(!r, "got %u\n", r);
@@ -5073,11 +5073,11 @@ static void test_envvar(void)
{
sprintf(buffer, "MSITESTVAR%i", i);
res = RegDeleteValueA(env, buffer);
- ok(res == ERROR_FILE_NOT_FOUND, "[%d] got %u\n", i, res);
+ ok(res == ERROR_FILE_NOT_FOUND, "[%d] got %ld\n", i, res);
}
res = RegDeleteValueA(env2, "MSITESTVAR100");
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
error:
RegDeleteValueA(env, "MSITESTVAR1");
@@ -5165,7 +5165,7 @@ static void test_start_stop_services(void)
CloseServiceHandle(scm);
return;
}
- ok(service != NULL, "Failed to open Spooler, error %d\n", GetLastError());
+ ok(service != NULL, "Failed to open Spooler, error %lu\n", GetLastError());
if (!service) {
CloseServiceHandle(scm);
return;
@@ -5199,7 +5199,7 @@ static void test_start_stop_services(void)
service = OpenServiceA(scm, "Spooler", SC_MANAGER_ALL_ACCESS);
ret = ControlService(service, SERVICE_CONTROL_STOP, &status);
- ok(ret, "ControlService failed %u\n", GetLastError());
+ ok(ret, "ControlService failed %lu\n", GetLastError());
CloseServiceHandle(service);
CloseServiceHandle(scm);
@@ -5230,7 +5230,7 @@ static void test_start_stop_services(void)
service = OpenServiceA(scm, "Spooler", SC_MANAGER_ALL_ACCESS);
ret = ControlService(service, SERVICE_CONTROL_STOP, &status);
- ok(ret, "ControlService failed %u\n", GetLastError());
+ ok(ret, "ControlService failed %lu\n", GetLastError());
CloseServiceHandle(service);
CloseServiceHandle(scm);
@@ -5253,7 +5253,7 @@ static void delete_test_service(const char *name)
if (service)
{
ret = DeleteService( service );
- ok( ret, "failed to delete service %u\n", GetLastError() );
+ ok( ret, "failed to delete service %lu\n", GetLastError() );
CloseServiceHandle(service);
}
CloseServiceHandle(manager);
@@ -5272,13 +5272,13 @@ static void test_delete_services(void)
}
manager = OpenSCManagerA(NULL, NULL, SC_MANAGER_ALL_ACCESS);
- ok(manager != NULL, "can't open service manager %u\n", GetLastError());
+ ok(manager != NULL, "can't open service manager %lu\n", GetLastError());
if (!manager) return;
service = CreateServiceA(manager, "TestService3", "TestService3",
SERVICE_ALL_ACCESS, SERVICE_WIN32_OWN_PROCESS, SERVICE_DEMAND_START,
SERVICE_ERROR_NORMAL, "C:\\doesnt_exist.exe", NULL, NULL, NULL, NULL, NULL);
- ok(service != NULL, "can't create service %u\n", GetLastError());
+ ok(service != NULL, "can't create service %lu\n", GetLastError());
CloseServiceHandle(service);
CloseServiceHandle(manager);
if (!service) return;
@@ -5303,7 +5303,7 @@ static void test_delete_services(void)
service = OpenServiceA(manager, "TestService3", GENERIC_ALL);
error = GetLastError();
ok(service == NULL, "TestService3 not deleted\n");
- ok(error == ERROR_SERVICE_DOES_NOT_EXIST, "wrong error %u\n", error);
+ ok(error == ERROR_SERVICE_DOES_NOT_EXIST, "wrong error %lu\n", error);
CloseServiceHandle(manager);
r = MsiInstallProductA(msifile, "REMOVE=ALL");
@@ -5370,7 +5370,7 @@ static void test_install_services(void)
ok(service == NULL, "TestService4 installed\n");
res = RegOpenKeyA(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Services\\TestService", &hKey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
if (res == ERROR_SUCCESS)
{
@@ -5378,7 +5378,7 @@ static void test_install_services(void)
err_controltype = REG_DWORD;
err_controlsize = sizeof(err_control);
res = RegQueryValueExA(hKey, "ErrorControl", NULL, &err_controltype, (LPBYTE)&err_control, &err_controlsize);
- ok(err_control == 0, "TestService.ErrorControl wrong, expected 0, got %u\n", err_control);
+ ok(err_control == 0, "TestService.ErrorControl wrong, expected 0, got %lu\n", err_control);
RegCloseKey(hKey);
}
@@ -5491,7 +5491,7 @@ static void test_register_font(void)
RegOpenKeyExA(HKEY_LOCAL_MACHINE, regfont2, 0, access, &key);
ret = RegQueryValueExA(key, "msi test font", NULL, NULL, NULL, NULL);
- ok(ret != ERROR_FILE_NOT_FOUND, "unexpected result %d\n", ret);
+ ok(ret != ERROR_FILE_NOT_FOUND, "unexpected result %ld\n", ret);
r = MsiInstallProductA(msifile, "REMOVE=ALL");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
@@ -5499,7 +5499,7 @@ static void test_register_font(void)
ok(!delete_pf("msitest", FALSE), "directory not removed\n");
ret = RegQueryValueExA(key, "msi test font", NULL, NULL, NULL, NULL);
- ok(ret == ERROR_FILE_NOT_FOUND, "unexpected result %d\n", ret);
+ ok(ret == ERROR_FILE_NOT_FOUND, "unexpected result %ld\n", ret);
RegDeleteValueA(key, "msi test font");
RegCloseKey(key);
@@ -5679,14 +5679,14 @@ static void test_register_typelib(void)
ok(r == ERROR_SUCCESS, "got %u\n", r);
hr = LoadRegTypeLib(&LIBID_register_test, 7, 1, 0, &tlb);
- ok(hr == S_OK, "got %#x\n", hr);
+ ok(hr == S_OK, "got %#lx\n", hr);
ITypeLib_Release(tlb);
r = MsiInstallProductA(msifile, "REMOVE=ALL");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
hr = LoadRegTypeLib(&LIBID_register_test, 7, 1, 0, &tlb);
- ok(hr == TYPE_E_LIBNOTREGISTERED, "got %#x\n", hr);
+ ok(hr == TYPE_E_LIBNOTREGISTERED, "got %#lx\n", hr);
ok(!delete_pf("msitest\\typelib.dll", TRUE), "file not removed\n");
ok(!delete_pf("msitest", FALSE), "directory not removed\n");
@@ -5776,24 +5776,24 @@ static void test_publish_components(void)
ok(r == ERROR_SUCCESS, "MsiProvideQualifiedComponent returned %d\n", r);
res = RegOpenKeyA(HKEY_CURRENT_USER, keypath, &key);
- ok(res == ERROR_SUCCESS, "components key not created %d\n", res);
+ ok(res == ERROR_SUCCESS, "components key not created %ld\n", res);
res = RegQueryValueExA(key, "english.txt", NULL, NULL, NULL, &size);
- ok(res == ERROR_SUCCESS, "value not found %d\n", res);
+ ok(res == ERROR_SUCCESS, "value not found %ld\n", res);
data = malloc(size);
res = RegQueryValueExA(key, "english.txt", NULL, NULL, data, &size);
- ok(res == ERROR_SUCCESS, "value not found %d\n", res);
+ ok(res == ERROR_SUCCESS, "value not found %ld\n", res);
RegCloseKey(key);
res = RegDeleteKeyA(HKEY_CURRENT_USER, keypath);
- ok(res == ERROR_SUCCESS, "RegDeleteKey failed %d\n", res);
+ ok(res == ERROR_SUCCESS, "RegDeleteKey failed %ld\n", res);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath2, 0, NULL, REG_OPTION_NON_VOLATILE,
MAXIMUM_ALLOWED | KEY_WOW64_64KEY, NULL, &key, NULL );
- ok(res == ERROR_SUCCESS, "RegCreateKeyEx failed %d\n", res);
+ ok(res == ERROR_SUCCESS, "RegCreateKeyEx failed %ld\n", res);
res = RegSetValueExA(key, "english.txt", 0, REG_MULTI_SZ, data, size);
- ok(res == ERROR_SUCCESS, "RegSetValueEx failed %d\n", res);
+ ok(res == ERROR_SUCCESS, "RegSetValueEx failed %ld\n", res);
RegCloseKey(key);
size = 0;
@@ -5805,13 +5805,13 @@ static void test_publish_components(void)
res = pRegDeleteKeyExA(HKEY_LOCAL_MACHINE, keypath2, KEY_WOW64_64KEY, 0);
else
res = RegDeleteKeyA(HKEY_LOCAL_MACHINE, keypath2);
- ok(res == ERROR_SUCCESS, "RegDeleteKey failed %d\n", res);
+ ok(res == ERROR_SUCCESS, "RegDeleteKey failed %ld\n", res);
res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &key);
- ok(res == ERROR_SUCCESS, "RegCreateKey failed %d\n", res);
+ ok(res == ERROR_SUCCESS, "RegCreateKey failed %ld\n", res);
res = RegSetValueExA(key, "english.txt", 0, REG_MULTI_SZ, data, size);
- ok(res == ERROR_SUCCESS, "RegSetValueEx failed %d\n", res);
+ ok(res == ERROR_SUCCESS, "RegSetValueEx failed %ld\n", res);
free(data);
RegCloseKey(key);
@@ -5819,7 +5819,7 @@ static void test_publish_components(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
res = RegOpenKeyA(HKEY_CURRENT_USER, keypath, &key);
- ok(res == ERROR_FILE_NOT_FOUND, "unexpected result %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "unexpected result %ld\n", res);
ok(!delete_pf("msitest\\english.txt", TRUE), "file not removed\n");
ok(!delete_pf("msitest", FALSE), "directory not removed\n");
@@ -5951,7 +5951,7 @@ static void test_ini_values(void)
CloseHandle(file);
ret = WritePrivateProfileStringA("sectionA", "keyA", "valueA", inifile);
- ok(ret, "failed to write profile string %u\n", GetLastError());
+ ok(ret, "failed to write profile string %lu\n", GetLastError());
MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
@@ -5959,19 +5959,19 @@ static void test_ini_values(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
len = GetPrivateProfileStringA("section1", "key1", NULL, buf, sizeof(buf), inifile);
- ok(len == 6, "got %u expected 6\n", len);
+ ok(len == 6, "got %lu expected 6\n", len);
len = GetPrivateProfileStringA("sectionA", "keyA", NULL, buf, sizeof(buf), inifile);
- ok(!len, "got %u expected 0\n", len);
+ ok(!len, "got %lu expected 0\n", len);
r = MsiInstallProductA(msifile, "REMOVE=ALL");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
len = GetPrivateProfileStringA("section1", "key1", NULL, buf, sizeof(buf), inifile);
- ok(!len, "got %u expected 0\n", len);
+ ok(!len, "got %lu expected 0\n", len);
len = GetPrivateProfileStringA("sectionA", "keyA", NULL, buf, sizeof(buf), inifile);
- ok(!len, "got %u expected 0\n", len);
+ ok(!len, "got %lu expected 0\n", len);
todo_wine ok(!delete_pf("msitest\\test.ini", TRUE), "file removed\n");
ok(!delete_pf("msitest\\inifile.txt", TRUE), "file not removed\n");
@@ -6360,31 +6360,31 @@ static void test_publish_assemblies(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
res = RegOpenKeyA(HKEY_CURRENT_USER, path_dotnet, &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_MULTI(hkey, name_dotnet, "rcHQPHq?CA(a)Uv-XqMI1e>Z'q,T*76M@=YEg6My?~]\0");
RegCloseKey(hkey);
path = (is_wow64 || is_64bit) ? path_dotnet_local_wow64 : path_dotnet_local;
res = RegOpenKeyA(HKEY_CURRENT_USER, path, &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_MULTI(hkey, name_dotnet_local, "rcHQPHq?CA(a)Uv-XqMI1e>LF,8A?0d.AW(a)vcZ$Cgox\0");
RegCloseKey(hkey);
res = RegOpenKeyA(HKEY_CURRENT_USER, path_win32, &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_MULTI(hkey, name_win32, "rcHQPHq?CA(a)Uv-XqMI1e>}NJjwR'%D9v1p!v{WV(%\0");
RegCloseKey(hkey);
path = (is_wow64 || is_64bit) ? path_win32_local_wow64 : path_win32_local;
res = RegOpenKeyA(HKEY_CURRENT_USER, path, &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_MULTI(hkey, name_win32_local, "rcHQPHq?CA(a)Uv-XqMI1e>C)Uvlj*53A)u(QQ9=)X!\0");
RegCloseKey(hkey);
/* No registration is done for a local assembly with no matching file */
path = (is_wow64 || is_64bit) ? path_fake_local_wow64 : path_fake_local;
res = RegOpenKeyA(HKEY_CURRENT_USER, path, &hkey);
- ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
r = MsiInstallProductA(msifile, "REMOVE=ALL");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
@@ -6393,25 +6393,25 @@ static void test_publish_assemblies(void)
if (res == ERROR_SUCCESS)
{
res = RegDeleteValueA(hkey, name_dotnet);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
RegCloseKey(hkey);
}
path = (is_wow64 || is_64bit) ? path_dotnet_local_wow64 : path_dotnet_local;
res = RegOpenKeyA(HKEY_CURRENT_USER, path, &hkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegOpenKeyA(HKEY_CURRENT_USER, path_win32, &hkey);
if (res == ERROR_SUCCESS)
{
res = RegDeleteValueA(hkey, name_win32);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
RegCloseKey(hkey);
}
path = (is_wow64 || is_64bit) ? path_win32_local_wow64 : path_win32_local;
res = RegOpenKeyA(HKEY_CURRENT_USER, path, &hkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
r = MsiInstallProductA(msifile, "ALLUSERS=1");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
@@ -6424,31 +6424,31 @@ static void test_publish_assemblies(void)
access = KEY_QUERY_VALUE | KEY_WOW64_64KEY;
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, classes_path_dotnet, 0, access, &hkey);
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_MULTI(hkey, name_dotnet, "rcHQPHq?CA(a)Uv-XqMI1e>Z'q,T*76M@=YEg6My?~]\0");
RegCloseKey(hkey);
path = (is_wow64 || is_64bit) ? classes_path_dotnet_local_wow64 : classes_path_dotnet_local;
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, path, 0, access, &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_MULTI(hkey, name_dotnet_local, "rcHQPHq?CA(a)Uv-XqMI1e>LF,8A?0d.AW(a)vcZ$Cgox\0");
RegCloseKey(hkey);
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, classes_path_win32, 0, access, &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_MULTI(hkey, name_win32, "rcHQPHq?CA(a)Uv-XqMI1e>}NJjwR'%D9v1p!v{WV(%\0");
RegCloseKey(hkey);
path = (is_wow64 || is_64bit) ? classes_path_win32_local_wow64 : classes_path_win32_local;
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, path, 0, access, &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_MULTI(hkey, name_win32_local, "rcHQPHq?CA(a)Uv-XqMI1e>C)Uvlj*53A)u(QQ9=)X!\0");
RegCloseKey(hkey);
/* No registration is done for a local assembly with no matching file */
path = (is_wow64 || is_64bit) ? classes_path_fake_local_wow64 : classes_path_fake_local;
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, path, 0, access, &hkey);
- ok(res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
r = MsiInstallProductA(msifile, "REMOVE=ALL ALLUSERS=1");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
@@ -6457,25 +6457,25 @@ static void test_publish_assemblies(void)
if (res == ERROR_SUCCESS)
{
res = RegDeleteValueA(hkey, name_dotnet);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
RegCloseKey(hkey);
}
path = (is_wow64 || is_64bit) ? classes_path_dotnet_local_wow64 : classes_path_dotnet_local;
res = RegOpenKeyA(HKEY_CLASSES_ROOT, path, &hkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
res = RegOpenKeyA(HKEY_CLASSES_ROOT, classes_path_win32, &hkey);
if (res == ERROR_SUCCESS)
{
res = RegDeleteValueA(hkey, name_win32);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
RegCloseKey(hkey);
}
path = (is_wow64 || is_64bit) ? classes_path_win32_local_wow64 : classes_path_win32_local;
res = RegOpenKeyA(HKEY_CLASSES_ROOT, path, &hkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
done:
DeleteFileA("msitest\\win32.txt");
diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c
index 5d0126e6ac4..45354cc2bb2 100644
--- a/dlls/msi/tests/automation.c
+++ b/dlls/msi/tests/automation.c
@@ -343,7 +343,7 @@ static BOOL create_package(LPWSTR path)
len = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED,
CURR_DIR, -1, path, MAX_PATH);
- ok(len, "MultiByteToWideChar returned error %d\n", GetLastError());
+ ok(len, "MultiByteToWideChar returned error %lu\n", GetLastError());
if (!len)
return FALSE;
@@ -581,32 +581,32 @@ static void test_dispid(void)
{
dispid = get_dispid(pInstaller, ptr->name);
todo_wine_if (ptr->todo)
- ok(dispid == ptr->did, "%s: expected %d, got %d\n", ptr->name, ptr->did, dispid);
+ ok(dispid == ptr->did, "%s: expected %ld, got %ld\n", ptr->name, ptr->did, dispid);
ptr++;
}
dispid = get_dispid(pInstaller, "RemovePatches");
- ok(dispid == 49 || dispid == -1, "Expected 49 or -1, got %d\n", dispid);
+ ok(dispid == 49 || dispid == -1, "Expected 49 or -1, got %ld\n", dispid);
dispid = get_dispid(pInstaller, "ApplyMultiplePatches");
- ok(dispid == 51 || dispid == -1, "Expected 51 or -1, got %d\n", dispid);
+ ok(dispid == 51 || dispid == -1, "Expected 51 or -1, got %ld\n", dispid);
dispid = get_dispid(pInstaller, "ProductsEx");
- ok(dispid == 52 || dispid == -1, "Expected 52 or -1, got %d\n", dispid);
+ ok(dispid == 52 || dispid == -1, "Expected 52 or -1, got %ld\n", dispid);
dispid = get_dispid(pInstaller, "PatchesEx");
- ok(dispid == 55 || dispid == -1, "Expected 55 or -1, got %d\n", dispid);
+ ok(dispid == 55 || dispid == -1, "Expected 55 or -1, got %ld\n", dispid);
dispid = get_dispid(pInstaller, "ExtractPatchXMLData");
- ok(dispid == 57 || dispid == -1, "Expected 57 or -1, got %d\n", dispid);
+ ok(dispid == 57 || dispid == -1, "Expected 57 or -1, got %ld\n", dispid);
dispid = get_dispid( pInstaller, "ProductElevated" );
- ok(dispid == 59 || dispid == -1, "Expected 59 or -1, got %d\n", dispid);
+ ok(dispid == 59 || dispid == -1, "Expected 59 or -1, got %ld\n", dispid);
dispid = get_dispid( pInstaller, "ProvideAssembly" );
- ok(dispid == 60 || dispid == -1, "Expected 60 or -1, got %d\n", dispid);
+ ok(dispid == 60 || dispid == -1, "Expected 60 or -1, got %ld\n", dispid);
dispid = get_dispid( pInstaller, "ProductInfoFromScript" );
- ok(dispid == 61 || dispid == -1, "Expected 61 or -1, got %d\n", dispid);
+ ok(dispid == 61 || dispid == -1, "Expected 61 or -1, got %ld\n", dispid);
dispid = get_dispid( pInstaller, "AdvertiseProduct" );
- ok(dispid == 62 || dispid == -1, "Expected 62 or -1, got %d\n", dispid);
+ ok(dispid == 62 || dispid == -1, "Expected 62 or -1, got %ld\n", dispid);
dispid = get_dispid( pInstaller, "CreateAdvertiseScript" );
- ok(dispid == 63 || dispid == -1, "Expected 63 or -1, got %d\n", dispid);
+ ok(dispid == 63 || dispid == -1, "Expected 63 or -1, got %ld\n", dispid);
dispid = get_dispid( pInstaller, "PatchFiles" );
- ok(dispid == 65 || dispid == -1, "Expected 65 or -1, got %d\n", dispid);
+ ok(dispid == 65 || dispid == -1, "Expected 65 or -1, got %ld\n", dispid);
}
/* Test basic IDispatch functions */
@@ -623,16 +623,16 @@ static void test_dispatch(void)
/* Test getting ID of a function name that does not exist */
name = (WCHAR *)L"winetest-automation.msi";
hr = IDispatch_GetIDsOfNames(pInstaller, &IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &dispid);
- ok(hr == DISP_E_UNKNOWNNAME, "IDispatch::GetIDsOfNames returned 0x%08x\n", hr);
+ ok(hr == DISP_E_UNKNOWNNAME, "IDispatch::GetIDsOfNames returned %#lx\n", hr);
/* Test invoking this function */
hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, NULL, NULL, NULL, NULL);
- ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr);
+ ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned %#lx\n", hr);
/* Test getting ID of a function name that does exist */
name = (WCHAR *)L"OpenPackage";
hr = IDispatch_GetIDsOfNames(pInstaller, &IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &dispid);
- ok(hr == S_OK, "IDispatch::GetIDsOfNames returned 0x%08x\n", hr);
+ ok(hr == S_OK, "IDispatch::GetIDsOfNames returned %#lx\n", hr);
/* Test invoking this function (without parameters passed) */
if (0) /* All of these crash MSI on Windows XP */
@@ -645,21 +645,21 @@ static void test_dispatch(void)
/* Try with NULL params */
hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
- ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned 0x%08x\n", hr);
+ ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned %#lx\n", hr);
/* Try one empty parameter */
dispparams.rgvarg = vararg;
dispparams.cArgs = 1;
VariantInit(&vararg[0]);
hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
- ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned 0x%08x\n", hr);
+ ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned %#lx\n", hr);
/* Try two empty parameters */
dispparams.cArgs = 2;
VariantInit(&vararg[0]);
VariantInit(&vararg[1]);
hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
- ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned 0x%08x\n", hr);
+ ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned %#lx\n", hr);
/* Try one parameter, the required BSTR. Second parameter is optional.
* NOTE: The specified package does not exist, which is why the call fails.
@@ -669,7 +669,7 @@ static void test_dispatch(void)
V_VT(&vararg[0]) = VT_BSTR;
V_BSTR(&vararg[0]) = SysAllocString(L"winetest-automation.msi");
hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
- ok(hr == DISP_E_EXCEPTION, "IDispatch::Invoke returned 0x%08x\n", hr);
+ ok(hr == DISP_E_EXCEPTION, "IDispatch::Invoke returned %#lx\n", hr);
ok_exception(hr, L"OpenPackage,PackagePath,Options");
VariantClear(&vararg[0]);
@@ -682,7 +682,7 @@ static void test_dispatch(void)
V_BSTR(&vararg[1]) = SysAllocString(L"winetest-automation.msi");
VariantInit(&vararg[0]);
hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
- ok(hr == DISP_E_EXCEPTION, "IDispatch::Invoke returned 0x%08x\n", hr);
+ ok(hr == DISP_E_EXCEPTION, "IDispatch::Invoke returned %#lx\n", hr);
ok_exception(hr, L"OpenPackage,PackagePath,Options");
VariantClear(&vararg[1]);
@@ -696,7 +696,7 @@ static void test_dispatch(void)
VariantInit(&vararg[1]);
VariantInit(&vararg[0]);
hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
- ok(hr == DISP_E_EXCEPTION, "IDispatch::Invoke returned 0x%08x\n", hr);
+ ok(hr == DISP_E_EXCEPTION, "IDispatch::Invoke returned %#lx\n", hr);
ok_exception(hr, L"OpenPackage,PackagePath,Options");
VariantClear(&vararg[2]);
@@ -709,7 +709,7 @@ static void test_dispatch(void)
V_VT(&vararg[0]) = VT_BSTR;
V_BSTR(&vararg[0]) = SysAllocString(L"winetest-automation.msi");
hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
- ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned 0x%08x\n", hr);
+ ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned %#lx\n", hr);
VariantClear(&vararg[0]);
VariantClear(&vararg[1]);
@@ -724,7 +724,7 @@ static void test_dispatch(void)
V_VT(&vararg[0]) = VT_BSTR;
V_BSTR(&vararg[0]) = SysAllocString(L"winetest-automation.msi");
hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
- todo_wine ok(hr == DISP_E_EXCEPTION, "IDispatch::Invoke returned 0x%08x\n", hr);
+ todo_wine ok(hr == DISP_E_EXCEPTION, "IDispatch::Invoke returned %#lx\n", hr);
ok_exception(hr, L"OpenPackage,PackagePath,Options");
VariantClear(&vararg[0]);
if (hr != DISP_E_EXCEPTION)
@@ -744,7 +744,7 @@ static void test_dispatch(void)
DeleteFileW(path);
return;
}
- ok(hr == S_OK, "IDispatch::Invoke returned 0x%08x\n", hr);
+ ok(hr == S_OK, "IDispatch::Invoke returned %#lx\n", hr);
VariantClear(&vararg[0]);
VariantClear(&varresult);
@@ -757,7 +757,7 @@ static void test_dispatch(void)
V_BSTR(&vararg[1]) = SysAllocString(path);
VariantInit(&vararg[0]);
hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
- ok(hr == S_OK, "IDispatch::Invoke returned 0x%08x\n", hr);
+ ok(hr == S_OK, "IDispatch::Invoke returned %#lx\n", hr);
VariantClear(&vararg[1]);
VariantClear(&varresult);
@@ -771,7 +771,7 @@ static void test_dispatch(void)
VariantInit(&vararg[1]);
VariantInit(&vararg[0]);
hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
- ok(hr == S_OK, "IDispatch::Invoke returned 0x%08x\n", hr);
+ ok(hr == S_OK, "IDispatch::Invoke returned %#lx\n", hr);
VariantClear(&vararg[2]);
VariantClear(&varresult);
@@ -784,7 +784,7 @@ static void test_dispatch(void)
V_VT(&vararg[0]) = VT_BSTR;
V_BSTR(&vararg[0]) = SysAllocString(path);
hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
- ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned 0x%08x\n", hr);
+ ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned %#lx\n", hr);
VariantClear(&vararg[0]);
VariantClear(&vararg[1]);
@@ -799,7 +799,7 @@ static void test_dispatch(void)
V_VT(&vararg[0]) = VT_I2;
V_BSTR(&vararg[0]) = 0;
hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
- ok(hr == S_OK, "IDispatch::Invoke returned 0x%08x\n", hr);
+ ok(hr == S_OK, "IDispatch::Invoke returned %#lx\n", hr);
VariantClear(&vararg[1]);
VariantClear(&varresult);
@@ -808,26 +808,26 @@ static void test_dispatch(void)
/* Test invoking a method as a DISPATCH_PROPERTYGET or DISPATCH_PROPERTYPUT */
VariantInit(&vararg[0]);
hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL);
- ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr);
+ ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned %#lx\n", hr);
VariantInit(&vararg[0]);
hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL);
- ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr);
+ ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned %#lx\n", hr);
/* Test invoking a read-only property as DISPATCH_PROPERTYPUT or as a DISPATCH_METHOD */
name = (WCHAR *)L"ProductState";
hr = IDispatch_GetIDsOfNames(pInstaller, &IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &dispid);
- ok(hr == S_OK, "IDispatch::GetIDsOfNames returned 0x%08x\n", hr);
+ ok(hr == S_OK, "IDispatch::GetIDsOfNames returned %#lx\n", hr);
dispparams.rgvarg = NULL;
dispparams.cArgs = 0;
hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL);
- ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr);
+ ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned %#lx\n", hr);
dispparams.rgvarg = NULL;
dispparams.cArgs = 0;
hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
- ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr);
+ ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned %#lx\n", hr);
}
/* invocation helper function */
@@ -850,7 +850,7 @@ static HRESULT invoke(IDispatch *pDispatch, LPCSTR szName, WORD wFlags, DISPPARA
MultiByteToWideChar(CP_ACP, 0, szName, -1, name, len );
hr = IDispatch_GetIDsOfNames(pDispatch, &IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &dispid);
free(name);
- ok(hr == S_OK, "IDispatch::GetIDsOfNames returned 0x%08x\n", hr);
+ ok(hr == S_OK, "IDispatch::GetIDsOfNames returned %#lx\n", hr);
if (hr != S_OK) return hr;
memset(&excepinfo, 0, sizeof(excepinfo));
@@ -863,7 +863,7 @@ static HRESULT invoke(IDispatch *pDispatch, LPCSTR szName, WORD wFlags, DISPPARA
if (vtResult != VT_EMPTY)
{
hr = VariantChangeTypeEx(pVarResult, pVarResult, LOCALE_NEUTRAL, 0, vtResult);
- ok(hr == S_OK, "VariantChangeTypeEx returned 0x%08x\n", hr);
+ ok(hr == S_OK, "VariantChangeTypeEx returned %#lx\n", hr);
}
}
@@ -1584,7 +1584,7 @@ static void test_SummaryInfo(IDispatch *pSummaryInfo, const msi_summary_info *in
/* SummaryInfo::PropertyCount */
hr = SummaryInfo_PropertyCountGet(pSummaryInfo, &j);
- ok(hr == S_OK, "SummaryInfo_PropertyCount failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "SummaryInfo_PropertyCount failed, hresult %#lx\n", hr);
ok(j == num_info, "SummaryInfo_PropertyCount returned %d, expected %d\n", j, num_info);
/* SummaryInfo::Property, get for properties we have set */
@@ -1598,11 +1598,11 @@ static void test_SummaryInfo(IDispatch *pSummaryInfo, const msi_summary_info *in
else if (vt == VT_I2) vt = VT_I4;
hr = SummaryInfo_PropertyGet(pSummaryInfo, entry->property, &varresult, vt);
- ok(hr == S_OK, "SummaryInfo_Property (pid %d) failed, hresult 0x%08x\n", entry->property, hr);
+ ok(hr == S_OK, "SummaryInfo_Property (pid %d) failed, hresult %#lx\n", entry->property, hr);
if (V_VT(&varresult) != vt)
skip("Skipping property tests due to type mismatch\n");
else if (vt == VT_I4)
- ok(V_I4(&varresult) == entry->iValue, "SummaryInfo_Property (pid %d) I4 result expected to be %d, but was %d\n",
+ ok(V_I4(&varresult) == entry->iValue, "SummaryInfo_Property (pid %d) I4 result expected to be %d, but was %ld\n",
entry->property, entry->iValue, V_I4(&varresult));
else if (vt == VT_DATE)
{
@@ -1628,32 +1628,32 @@ static void test_SummaryInfo(IDispatch *pSummaryInfo, const msi_summary_info *in
/* Invalid pids */
hr = SummaryInfo_PropertyGet(pSummaryInfo, -1, &varresult, VT_EMPTY);
- ok(hr == DISP_E_EXCEPTION, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr);
+ ok(hr == DISP_E_EXCEPTION, "SummaryInfo_PropertyGet failed, hresult %#lx\n", hr);
ok_exception(hr, L"Property,Pid");
hr = SummaryInfo_PropertyGet(pSummaryInfo, 1000, &varresult, VT_EMPTY);
- ok(hr == DISP_E_EXCEPTION, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr);
+ ok(hr == DISP_E_EXCEPTION, "SummaryInfo_PropertyGet failed, hresult %#lx\n", hr);
ok_exception(hr, L"Property,Pid");
/* Unsupported pids */
hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_DICTIONARY, &varresult, VT_EMPTY);
- ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult %#lx\n", hr);
hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_THUMBNAIL, &varresult, VT_EMPTY);
- ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult %#lx\n", hr);
/* Pids we have not set, one for each type */
hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_CODEPAGE, &varresult, VT_EMPTY);
- ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult %#lx\n", hr);
hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_TITLE, &varresult, VT_EMPTY);
- ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult %#lx\n", hr);
hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_EDITTIME, &varresult, VT_EMPTY);
- ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult %#lx\n", hr);
hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_CHARCOUNT, &varresult, VT_EMPTY);
- ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult %#lx\n", hr);
if (!readonly)
{
@@ -1664,10 +1664,10 @@ static void test_SummaryInfo(IDispatch *pSummaryInfo, const msi_summary_info *in
V_VT(&var) = VT_I2;
V_I2(&var) = 1;
hr = SummaryInfo_PropertyPut(pSummaryInfo, PID_CODEPAGE, &var);
- ok(hr == S_OK, "SummaryInfo_PropertyPut failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "SummaryInfo_PropertyPut failed, hresult %#lx\n", hr);
hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_CODEPAGE, &varresult, VT_I4 /* NOT VT_I2 */);
- ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult %#lx\n", hr);
ok(V_I2(&var) == V_I2(&varresult), "SummaryInfo_PropertyGet expected %d, but returned %d\n", V_I2(&var), V_I2(&varresult));
VariantClear(&varresult);
VariantClear(&var);
@@ -1676,10 +1676,10 @@ static void test_SummaryInfo(IDispatch *pSummaryInfo, const msi_summary_info *in
V_VT(&var) = VT_BSTR;
V_BSTR(&var) = SysAllocString(L"Title");
hr = SummaryInfo_PropertyPut(pSummaryInfo, PID_TITLE, &var);
- ok(hr == S_OK, "SummaryInfo_PropertyPut failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "SummaryInfo_PropertyPut failed, hresult %#lx\n", hr);
hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_TITLE, &varresult, V_VT(&var));
- ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult %#lx\n", hr);
ok_w2("SummaryInfo_PropertyGet expected %s, but returned %s\n", V_BSTR(&var), V_BSTR(&varresult));
VariantClear(&varresult);
VariantClear(&var);
@@ -1689,10 +1689,10 @@ static void test_SummaryInfo(IDispatch *pSummaryInfo, const msi_summary_info *in
FileTimeToSystemTime(&systemtime, &st);
SystemTimeToVariantTime(&st, &V_DATE(&var));
hr = SummaryInfo_PropertyPut(pSummaryInfo, PID_LASTSAVE_DTM, &var);
- ok(hr == S_OK, "SummaryInfo_PropertyPut failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "SummaryInfo_PropertyPut failed, hresult %#lx\n", hr);
hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_LASTSAVE_DTM, &varresult, V_VT(&var));
- ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult %#lx\n", hr);
ok(V_DATE(&var) == V_DATE(&varresult), "SummaryInfo_PropertyGet expected %lf, but returned %lf\n", V_DATE(&var), V_DATE(&varresult));
VariantClear(&varresult);
VariantClear(&var);
@@ -1701,17 +1701,17 @@ static void test_SummaryInfo(IDispatch *pSummaryInfo, const msi_summary_info *in
V_VT(&var) = VT_I4;
V_I4(&var) = 1000;
hr = SummaryInfo_PropertyPut(pSummaryInfo, PID_CHARCOUNT, &var);
- ok(hr == S_OK, "SummaryInfo_PropertyPut failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "SummaryInfo_PropertyPut failed, hresult %#lx\n", hr);
hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_CHARCOUNT, &varresult, V_VT(&var));
- ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr);
- ok(V_I4(&var) == V_I4(&varresult), "SummaryInfo_PropertyGet expected %d, but returned %d\n", V_I4(&var), V_I4(&varresult));
+ ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult %#lx\n", hr);
+ ok(V_I4(&var) == V_I4(&varresult), "SummaryInfo_PropertyGet expected %ld, but returned %ld\n", V_I4(&var), V_I4(&varresult));
VariantClear(&varresult);
VariantClear(&var);
/* SummaryInfo::PropertyCount */
hr = SummaryInfo_PropertyCountGet(pSummaryInfo, &j);
- ok(hr == S_OK, "SummaryInfo_PropertyCount failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "SummaryInfo_PropertyCount failed, hresult %#lx\n", hr);
ok(j == num_info+4, "SummaryInfo_PropertyCount returned %d, expected %d\n", j, num_info);
}
}
@@ -1722,7 +1722,7 @@ static void test_Database(IDispatch *pDatabase, BOOL readonly)
HRESULT hr;
hr = Database_OpenView(pDatabase, L"SELECT `Feature` FROM `Feature` WHERE `Feature_Parent`='One'", &pView);
- ok(hr == S_OK, "Database_OpenView failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Database_OpenView failed, hresult %#lx\n", hr);
if (hr == S_OK)
{
IDispatch *pRecord = NULL;
@@ -1730,55 +1730,55 @@ static void test_Database(IDispatch *pDatabase, BOOL readonly)
/* View::Execute */
hr = View_Execute(pView, NULL);
- ok(hr == S_OK, "View_Execute failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "View_Execute failed, hresult %#lx\n", hr);
/* View::Fetch */
hr = View_Fetch(pView, &pRecord);
- ok(hr == S_OK, "View_Fetch failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "View_Fetch failed, hresult %#lx\n", hr);
ok(pRecord != NULL, "View_Fetch should not have returned NULL record\n");
if (pRecord)
{
/* Record::StringDataGet */
memset(szString, 0, sizeof(szString));
hr = Record_StringDataGet(pRecord, 1, szString);
- ok(hr == S_OK, "Record_StringDataGet failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Record_StringDataGet failed, hresult %#lx\n", hr);
ok_w2("Record_StringDataGet result was %s but expected %s\n", szString, L"Three");
/* Record::StringDataPut with correct index */
hr = Record_StringDataPut(pRecord, 1, L"Two");
- ok(hr == S_OK, "Record_StringDataPut failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Record_StringDataPut failed, hresult %#lx\n", hr);
/* Record::StringDataGet */
memset(szString, 0, sizeof(szString));
hr = Record_StringDataGet(pRecord, 1, szString);
- ok(hr == S_OK, "Record_StringDataGet failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Record_StringDataGet failed, hresult %#lx\n", hr);
ok_w2("Record_StringDataGet result was %s but expected %s\n", szString, L"Two");
/* Record::StringDataPut with incorrect index */
hr = Record_StringDataPut(pRecord, -1, szString);
- ok(hr == DISP_E_EXCEPTION, "Record_StringDataPut failed, hresult 0x%08x\n", hr);
+ ok(hr == DISP_E_EXCEPTION, "Record_StringDataPut failed, hresult %#lx\n", hr);
ok_exception(hr, L"StringData,Field");
/* View::Modify with incorrect parameters */
hr = View_Modify(pView, -5, NULL);
- ok(hr == DISP_E_EXCEPTION, "View_Modify failed, hresult 0x%08x\n", hr);
+ ok(hr == DISP_E_EXCEPTION, "View_Modify failed, hresult %#lx\n", hr);
ok_exception(hr, L"Modify,Mode,Record");
hr = View_Modify(pView, -5, pRecord);
- ok(hr == DISP_E_EXCEPTION, "View_Modify failed, hresult 0x%08x\n", hr);
+ ok(hr == DISP_E_EXCEPTION, "View_Modify failed, hresult %#lx\n", hr);
ok_exception(hr, L"Modify,Mode,Record");
hr = View_Modify(pView, MSIMODIFY_REFRESH, NULL);
- ok(hr == DISP_E_EXCEPTION, "View_Modify failed, hresult 0x%08x\n", hr);
+ ok(hr == DISP_E_EXCEPTION, "View_Modify failed, hresult %#lx\n", hr);
ok_exception(hr, L"Modify,Mode,Record");
hr = View_Modify(pView, MSIMODIFY_REFRESH, pRecord);
- ok(hr == S_OK, "View_Modify failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "View_Modify failed, hresult %#lx\n", hr);
/* Record::StringDataGet, confirm that the record is back to its unmodified value */
memset(szString, 0, sizeof(szString));
hr = Record_StringDataGet(pRecord, 1, szString);
- ok(hr == S_OK, "Record_StringDataGet failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Record_StringDataGet failed, hresult %#lx\n", hr);
todo_wine ok_w2("Record_StringDataGet result was %s but expected %s\n", szString, L"Three");
IDispatch_Release(pRecord);
@@ -1786,14 +1786,14 @@ static void test_Database(IDispatch *pDatabase, BOOL readonly)
/* View::Fetch */
hr = View_Fetch(pView, &pRecord);
- ok(hr == S_OK, "View_Fetch failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "View_Fetch failed, hresult %#lx\n", hr);
ok(pRecord != NULL, "View_Fetch should not have returned NULL record\n");
if (pRecord)
{
/* Record::StringDataGet */
memset(szString, 0, sizeof(szString));
hr = Record_StringDataGet(pRecord, 1, szString);
- ok(hr == S_OK, "Record_StringDataGet failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Record_StringDataGet failed, hresult %#lx\n", hr);
ok_w2("Record_StringDataGet result was %s but expected %s\n", szString, L"Two");
IDispatch_Release(pRecord);
@@ -1801,21 +1801,21 @@ static void test_Database(IDispatch *pDatabase, BOOL readonly)
/* View::Fetch */
hr = View_Fetch(pView, &pRecord);
- ok(hr == S_OK, "View_Fetch failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "View_Fetch failed, hresult %#lx\n", hr);
ok(pRecord == NULL, "View_Fetch should have returned NULL record\n");
if (pRecord)
IDispatch_Release(pRecord);
/* View::Close */
hr = View_Close(pView);
- ok(hr == S_OK, "View_Close failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "View_Close failed, hresult %#lx\n", hr);
IDispatch_Release(pView);
}
/* Database::SummaryInformation */
hr = Database_SummaryInformation(pDatabase, TEST_SUMMARYINFO_PROPERTIES_MODIFIED, &pSummaryInfo);
- ok(hr == S_OK, "Database_SummaryInformation failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Database_SummaryInformation failed, hresult %#lx\n", hr);
ok(pSummaryInfo != NULL, "Database_SummaryInformation should not have returned NULL record\n");
if (pSummaryInfo)
{
@@ -1837,93 +1837,93 @@ static void test_Session(IDispatch *pSession)
/* Session::Installer */
hr = Session_Installer(pSession, &pInst);
- ok(hr == S_OK, "Session_Installer failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_Installer failed, hresult %#lx\n", hr);
ok(pInst != NULL, "Session_Installer returned NULL IDispatch pointer\n");
ok(pInst == pInstaller, "Session_Installer does not match Installer instance from CoCreateInstance\n");
refs_before = IDispatch_AddRef(pInst);
hr = Session_Installer(pSession, &pInst);
- ok(hr == S_OK, "Session_Installer failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_Installer failed, hresult %#lx\n", hr);
ok(pInst != NULL, "Session_Installer returned NULL IDispatch pointer\n");
ok(pInst == pInstaller, "Session_Installer does not match Installer instance from CoCreateInstance\n");
refs_after = IDispatch_Release(pInst);
- ok(refs_before == refs_after, "got %u and %u\n", refs_before, refs_after);
+ ok(refs_before == refs_after, "got %lu and %lu\n", refs_before, refs_after);
/* Session::Property, get */
memset(stringw, 0, sizeof(stringw));
hr = Session_PropertyGet(pSession, L"ProductName", stringw);
- ok(hr == S_OK, "Session_PropertyGet failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_PropertyGet failed, hresult %#lx\n", hr);
if (lstrcmpW(stringw, L"MSITEST") != 0)
{
len = WideCharToMultiByte(CP_ACP, 0, stringw, -1, string, MAX_PATH, NULL, NULL);
- ok(len, "WideCharToMultiByteChar returned error %d\n", GetLastError());
+ ok(len, "WideCharToMultiByteChar returned error %lu\n", GetLastError());
ok(0, "Property \"ProductName\" expected to be \"MSITEST\" but was \"%s\"\n", string);
}
/* Session::Property, put */
hr = Session_PropertyPut(pSession, L"ProductName", L"ProductName");
- ok(hr == S_OK, "Session_PropertyPut failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_PropertyPut failed, hresult %#lx\n", hr);
memset(stringw, 0, sizeof(stringw));
hr = Session_PropertyGet(pSession, L"ProductName", stringw);
- ok(hr == S_OK, "Session_PropertyGet failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_PropertyGet failed, hresult %#lx\n", hr);
if (lstrcmpW(stringw, L"ProductName") != 0)
{
len = WideCharToMultiByte(CP_ACP, 0, stringw, -1, string, MAX_PATH, NULL, NULL);
- ok(len, "WideCharToMultiByteChar returned error %d\n", GetLastError());
+ ok(len, "WideCharToMultiByteChar returned error %lu\n", GetLastError());
ok(0, "Property \"ProductName\" expected to be \"ProductName\" but was \"%s\"\n", string);
}
/* Try putting a property using empty property identifier */
hr = Session_PropertyPut(pSession, L"", L"ProductName");
- ok(hr == DISP_E_EXCEPTION, "Session_PropertyPut failed, hresult 0x%08x\n", hr);
+ ok(hr == DISP_E_EXCEPTION, "Session_PropertyPut failed, hresult %#lx\n", hr);
ok_exception(hr, L"Property,Name");
/* Try putting a property using illegal property identifier */
hr = Session_PropertyPut(pSession, L"=", L"ProductName");
- ok(hr == S_OK, "Session_PropertyPut failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_PropertyPut failed, hresult %#lx\n", hr);
/* Session::Language, get */
hr = Session_LanguageGet(pSession, &len);
- ok(hr == S_OK, "Session_LanguageGet failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_LanguageGet failed, hresult %#lx\n", hr);
/* Not sure how to check the language is correct */
/* Session::Mode, get */
hr = Session_ModeGet(pSession, MSIRUNMODE_REBOOTATEND, &bool);
- ok(hr == S_OK, "Session_ModeGet failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_ModeGet failed, hresult %#lx\n", hr);
ok(!bool, "Reboot at end session mode is %d\n", bool);
hr = Session_ModeGet(pSession, MSIRUNMODE_MAINTENANCE, &bool);
- ok(hr == S_OK, "Session_ModeGet failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_ModeGet failed, hresult %#lx\n", hr);
ok(!bool, "Maintenance mode is %d\n", bool);
/* Session::Mode, put */
hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTATEND, VARIANT_TRUE);
- ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_ModePut failed, hresult %#lx\n", hr);
hr = Session_ModeGet(pSession, MSIRUNMODE_REBOOTATEND, &bool);
- ok(hr == S_OK, "Session_ModeGet failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_ModeGet failed, hresult %#lx\n", hr);
ok(bool, "Reboot at end session mode is %d, expected 1\n", bool);
hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTATEND, VARIANT_FALSE); /* set it again so we don't reboot */
- ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_ModePut failed, hresult %#lx\n", hr);
hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTNOW, VARIANT_TRUE);
- ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_ModePut failed, hresult %#lx\n", hr);
ok_exception(hr, L"Mode,Flag");
hr = Session_ModeGet(pSession, MSIRUNMODE_REBOOTNOW, &bool);
- ok(hr == S_OK, "Session_ModeGet failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_ModeGet failed, hresult %#lx\n", hr);
ok(bool, "Reboot now mode is %d, expected 1\n", bool);
hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTNOW, VARIANT_FALSE); /* set it again so we don't reboot */
- ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_ModePut failed, hresult %#lx\n", hr);
ok_exception(hr, L"Mode,Flag");
hr = Session_ModePut(pSession, MSIRUNMODE_MAINTENANCE, VARIANT_TRUE);
- ok(hr == DISP_E_EXCEPTION, "Session_ModePut failed, hresult 0x%08x\n", hr);
+ ok(hr == DISP_E_EXCEPTION, "Session_ModePut failed, hresult %#lx\n", hr);
ok_exception(hr, L"Mode,Flag");
/* Session::Database, get */
hr = Session_Database(pSession, &pDatabase);
- ok(hr == S_OK, "Session_Database failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_Database failed, hresult %#lx\n", hr);
if (hr == S_OK)
{
test_Database(pDatabase, TRUE);
@@ -1932,61 +1932,61 @@ static void test_Session(IDispatch *pSession)
/* Session::EvaluateCondition */
hr = Session_EvaluateCondition(pSession, NULL, &myint);
- ok(hr == S_OK, "Session_EvaluateCondition failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_EvaluateCondition failed, hresult %#lx\n", hr);
ok(myint == MSICONDITION_NONE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN);
hr = Session_EvaluateCondition(pSession, L"", &myint);
- ok(hr == S_OK, "Session_EvaluateCondition failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_EvaluateCondition failed, hresult %#lx\n", hr);
ok(myint == MSICONDITION_NONE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN);
hr = Session_EvaluateCondition(pSession, L"=", &myint);
- ok(hr == S_OK, "Session_EvaluateCondition failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_EvaluateCondition failed, hresult %#lx\n", hr);
ok(myint == MSICONDITION_ERROR, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN);
/* Session::DoAction(CostInitialize) must occur before the next statements */
hr = Session_DoAction(pSession, L"CostInitialize", &myint);
- ok(hr == S_OK, "Session_DoAction failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_DoAction failed, hresult %#lx\n", hr);
ok(myint == IDOK, "DoAction(CostInitialize) returned %d, %d expected\n", myint, IDOK);
/* Session::SetInstallLevel */
hr = Session_SetInstallLevel(pSession, INSTALLLEVEL_MINIMUM);
- ok(hr == S_OK, "Session_SetInstallLevel failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_SetInstallLevel failed, hresult %#lx\n", hr);
/* Session::FeatureCurrentState, get */
hr = Session_FeatureCurrentState(pSession, L"One", &myint);
- ok(hr == S_OK, "Session_FeatureCurrentState failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_FeatureCurrentState failed, hresult %#lx\n", hr);
ok(myint == INSTALLSTATE_UNKNOWN, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN);
/* Session::Message */
hr = Installer_CreateRecord(0, &record);
- ok(hr == S_OK, "Installer_CreateRecord failed: %08x\n", hr);
+ ok(hr == S_OK, "Installer_CreateRecord failed: %#lx\n", hr);
hr = Session_Message(pSession, INSTALLMESSAGE_INFO, record, &myint);
- ok(hr == S_OK, "Session_Message failed: %08x\n", hr);
+ ok(hr == S_OK, "Session_Message failed: %#lx\n", hr);
ok(myint == 0, "Session_Message returned %x\n", myint);
/* Session::EvaluateCondition */
hr = Session_EvaluateCondition(pSession, L"!One>0", &myint);
- ok(hr == S_OK, "Session_EvaluateCondition failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_EvaluateCondition failed, hresult %#lx\n", hr);
ok(myint == MSICONDITION_FALSE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN);
hr = Session_EvaluateCondition(pSession, L"!One=-1", &myint);
- ok(hr == S_OK, "Session_EvaluateCondition failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_EvaluateCondition failed, hresult %#lx\n", hr);
ok(myint == MSICONDITION_TRUE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN);
/* Session::FeatureRequestState, put */
hr = Session_FeatureRequestStatePut(pSession, L"One", INSTALLSTATE_ADVERTISED);
- ok(hr == S_OK, "Session_FeatureRequestStatePut failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_FeatureRequestStatePut failed, hresult %#lx\n", hr);
hr = Session_FeatureRequestStateGet(pSession, L"One", &myint);
- ok(hr == S_OK, "Session_FeatureRequestStateGet failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_FeatureRequestStateGet failed, hresult %#lx\n", hr);
ok(myint == INSTALLSTATE_ADVERTISED, "Feature request state was %d but expected %d\n", myint, INSTALLSTATE_ADVERTISED);
/* Session::EvaluateCondition */
hr = Session_EvaluateCondition(pSession, L"$One=-1", &myint);
- ok(hr == S_OK, "Session_EvaluateCondition failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_EvaluateCondition failed, hresult %#lx\n", hr);
ok(myint == MSICONDITION_FALSE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN);
hr = Session_EvaluateCondition(pSession, L"$One>0", &myint);
- ok(hr == S_OK, "Session_EvaluateCondition failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Session_EvaluateCondition failed, hresult %#lx\n", hr);
ok(myint == MSICONDITION_TRUE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN);
}
@@ -2036,16 +2036,16 @@ static void test_Installer_RegistryValue(void)
/* Does our key exist? Shouldn't; check with all three possible value parameter types */
hr = Installer_RegistryValueE(curr_user, L"Software\\Wine\\Test", &bRet);
- ok(hr == S_OK, "Installer_RegistryValueE failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_RegistryValueE failed, hresult %#lx\n", hr);
ok(!bRet, "Registry key expected to not exist, but Installer_RegistryValue claims it does\n");
memset(szString, 0, sizeof(szString));
hr = Installer_RegistryValueW(curr_user, L"Software\\Wine\\Test", NULL, szString);
- ok(hr == DISP_E_BADINDEX, "Installer_RegistryValueW failed, hresult 0x%08x\n", hr);
+ ok(hr == DISP_E_BADINDEX, "Installer_RegistryValueW failed, hresult %#lx\n", hr);
memset(szString, 0, sizeof(szString));
hr = Installer_RegistryValueI(curr_user, L"Software\\Wine\\Test", 0, szString, VT_BSTR);
- ok(hr == DISP_E_BADINDEX, "Installer_RegistryValueI failed, hresult 0x%08x\n", hr);
+ ok(hr == DISP_E_BADINDEX, "Installer_RegistryValueI failed, hresult %#lx\n", hr);
/* Create key */
ok(!RegCreateKeyW( HKEY_CURRENT_USER, L"Software\\Wine\\Test", &hkey ), "RegCreateKeyW failed\n");
@@ -2057,7 +2057,7 @@ static void test_Installer_RegistryValue(void)
ok(!RegSetValueExW(hkey, L"Three", 0, REG_BINARY, (const BYTE *)qw, 4),
"RegSetValueExW failed\n");
bRet = SetEnvironmentVariableA("MSITEST", "Four");
- ok(bRet, "SetEnvironmentVariableA failed %d\n", GetLastError());
+ ok(bRet, "SetEnvironmentVariableA failed %lu\n", GetLastError());
ok(!RegSetValueExW(hkey, L"Four", 0, REG_EXPAND_SZ, (const BYTE *)L"%MSITEST%", sizeof(L"%MSITEST%")),
"RegSetValueExW failed\n");
ok(!RegSetValueExW(hkey, L"Five\0Hi\0", 0, REG_MULTI_SZ, (const BYTE *)L"Five\0Hi\0", sizeof(L"Five\0Hi\0")),
@@ -2075,53 +2075,53 @@ static void test_Installer_RegistryValue(void)
/* Does our key exist? It should, and make sure we retrieve the correct default value */
bRet = FALSE;
hr = Installer_RegistryValueE(curr_user, L"Software\\Wine\\Test", &bRet);
- ok(hr == S_OK, "Installer_RegistryValueE failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_RegistryValueE failed, hresult %#lx\n", hr);
ok(bRet, "Registry key expected to exist, but Installer_RegistryValue claims it does not\n");
memset(szString, 0, sizeof(szString));
hr = Installer_RegistryValueW(curr_user, L"Software\\Wine\\Test", NULL, szString);
- ok(hr == S_OK, "Installer_RegistryValueW failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_RegistryValueW failed, hresult %#lx\n", hr);
ok_w2("Default registry value \"%s\" does not match expected \"%s\"\n", szString, L"One");
/* Ask for the value of a nonexistent key */
memset(szString, 0, sizeof(szString));
hr = Installer_RegistryValueW(curr_user, L"Software\\Wine\\Test", L"%MSITEST%", szString);
- ok(hr == DISP_E_BADINDEX, "Installer_RegistryValueW failed, hresult 0x%08x\n", hr);
+ ok(hr == DISP_E_BADINDEX, "Installer_RegistryValueW failed, hresult %#lx\n", hr);
/* Get values of keys */
memset(szString, 0, sizeof(szString));
hr = Installer_RegistryValueW(curr_user, L"Software\\Wine\\Test", L"One", szString);
- ok(hr == S_OK, "Installer_RegistryValueW failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_RegistryValueW failed, hresult %#lx\n", hr);
ok_w2("Registry value \"%s\" does not match expected \"%s\"\n", szString, L"One");
VariantInit(&vararg);
V_VT(&vararg) = VT_BSTR;
V_BSTR(&vararg) = SysAllocString(L"Two");
hr = Installer_RegistryValue(curr_user, L"Software\\Wine\\Test", vararg, &varresult, VT_I4);
- ok(hr == S_OK, "Installer_RegistryValue failed, hresult 0x%08x\n", hr);
- ok(V_I4(&varresult) == 305419896, "Registry value %d does not match expected value\n", V_I4(&varresult));
+ ok(hr == S_OK, "Installer_RegistryValue failed, hresult %#lx\n", hr);
+ ok(V_I4(&varresult) == 305419896, "Registry value %ld does not match expected value\n", V_I4(&varresult));
VariantClear(&varresult);
memset(szString, 0, sizeof(szString));
hr = Installer_RegistryValueW(curr_user, L"Software\\Wine\\Test", L"Three", szString);
- ok(hr == S_OK, "Installer_RegistryValueW failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_RegistryValueW failed, hresult %#lx\n", hr);
ok_w2("Registry value \"%s\" does not match expected \"%s\"\n", szString, L"(REG_BINARY)");
memset(szString, 0, sizeof(szString));
hr = Installer_RegistryValueW(curr_user, L"Software\\Wine\\Test", L"Four", szString);
- ok(hr == S_OK, "Installer_RegistryValueW failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_RegistryValueW failed, hresult %#lx\n", hr);
ok_w2("Registry value \"%s\" does not match expected \"%s\"\n", szString, L"Four");
/* Vista does not NULL-terminate this case */
memset(szString, 0, sizeof(szString));
hr = Installer_RegistryValueW(curr_user, L"Software\\Wine\\Test", L"Five\0Hi\0", szString);
- ok(hr == S_OK, "Installer_RegistryValueW failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_RegistryValueW failed, hresult %#lx\n", hr);
ok_w2n("Registry value \"%s\" does not match expected \"%s\"\n",
szString, L"Five\nHi", lstrlenW(L"Five\nHi"));
memset(szString, 0, sizeof(szString));
hr = Installer_RegistryValueW(curr_user, L"Software\\Wine\\Test", L"Six", szString);
- ok(hr == S_OK, "Installer_RegistryValueW failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_RegistryValueW failed, hresult %#lx\n", hr);
ok(!lstrcmpW(szString, L"(REG_\?\?)") || broken(!lstrcmpW(szString, L"(REG_]")),
"Registry value does not match\n");
@@ -2129,36 +2129,36 @@ static void test_Installer_RegistryValue(void)
V_VT(&vararg) = VT_BSTR;
V_BSTR(&vararg) = SysAllocString(L"Seven");
hr = Installer_RegistryValue(curr_user, L"Software\\Wine\\Test", vararg, &varresult, VT_EMPTY);
- ok(hr == S_OK, "Installer_RegistryValue failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_RegistryValue failed, hresult %#lx\n", hr);
/* Get string class name for the key */
memset(szString, 0, sizeof(szString));
hr = Installer_RegistryValueI(curr_user, L"Software\\Wine\\Test", 0, szString, VT_BSTR);
- ok(hr == S_OK, "Installer_RegistryValueI failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_RegistryValueI failed, hresult %#lx\n", hr);
ok_w2("Registry name \"%s\" does not match expected \"%s\"\n", szString, L"");
/* Get name of a value by positive number (RegEnumValue like), valid index */
memset(szString, 0, sizeof(szString));
hr = Installer_RegistryValueI(curr_user, L"Software\\Wine\\Test", 2, szString, VT_BSTR);
- ok(hr == S_OK, "Installer_RegistryValueI failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_RegistryValueI failed, hresult %#lx\n", hr);
/* RegEnumValue order seems different on wine */
todo_wine ok_w2("Registry name \"%s\" does not match expected \"%s\"\n", szString, L"Two");
/* Get name of a value by positive number (RegEnumValue like), invalid index */
memset(szString, 0, sizeof(szString));
hr = Installer_RegistryValueI(curr_user, L"Software\\Wine\\Test", 10, szString, VT_EMPTY);
- ok(hr == S_OK, "Installer_RegistryValueI failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_RegistryValueI failed, hresult %#lx\n", hr);
/* Get name of a subkey by negative number (RegEnumValue like), valid index */
memset(szString, 0, sizeof(szString));
hr = Installer_RegistryValueI(curr_user, L"Software\\Wine\\Test", -1, szString, VT_BSTR);
- ok(hr == S_OK, "Installer_RegistryValueI failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_RegistryValueI failed, hresult %#lx\n", hr);
ok_w2("Registry name \"%s\" does not match expected \"%s\"\n", szString, L"Eight");
/* Get name of a subkey by negative number (RegEnumValue like), invalid index */
memset(szString, 0, sizeof(szString));
hr = Installer_RegistryValueI(curr_user, L"Software\\Wine\\Test", -10, szString, VT_EMPTY);
- ok(hr == S_OK, "Installer_RegistryValueI failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_RegistryValueI failed, hresult %#lx\n", hr);
/* clean up */
delete_key(hkey);
@@ -2179,38 +2179,39 @@ static void test_Installer_Products(BOOL bProductInstalled)
/* Installer::Products */
hr = Installer_Products(&pStringList);
- ok(hr == S_OK, "Installer_Products failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_Products failed, hresult %#lx\n", hr);
if (hr == S_OK)
{
/* StringList::_NewEnum */
hr = StringList__NewEnum(pStringList, &pUnk);
- ok(hr == S_OK, "StringList_NewEnum failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "StringList_NewEnum failed, hresult %#lx\n", hr);
if (hr == S_OK)
{
hr = IUnknown_QueryInterface(pUnk, &IID_IEnumVARIANT, (void **)&pEnum);
- ok (hr == S_OK, "IUnknown::QueryInterface returned 0x%08x\n", hr);
+ ok (hr == S_OK, "IUnknown::QueryInterface returned %#lx\n", hr);
}
if (!pEnum)
skip("IEnumVARIANT tests\n");
/* StringList::Count */
hr = StringList_Count(pStringList, &iCount);
- ok(hr == S_OK, "StringList_Count failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "StringList_Count failed, hresult %#lx\n", hr);
for (idx=0; idx<iCount; idx++)
{
/* StringList::Item */
memset(szString, 0, sizeof(szString));
hr = StringList_Item(pStringList, idx, szString);
- ok(hr == S_OK, "StringList_Item failed (idx %d, count %d), hresult 0x%08x\n", idx, iCount, hr);
+ ok(hr == S_OK, "StringList_Item failed (idx %d, count %d), hresult %#lx\n", idx, iCount, hr);
if (hr == S_OK)
{
/* Installer::ProductState */
hr = Installer_ProductState(szString, &iValue);
- ok(hr == S_OK, "Installer_ProductState failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_ProductState failed, hresult %#lx\n", hr);
if (hr == S_OK)
- ok(iValue == INSTALLSTATE_DEFAULT || iValue == INSTALLSTATE_ADVERTISED, "Installer_ProductState returned %d, expected %d or %d\n", iValue, INSTALLSTATE_DEFAULT, INSTALLSTATE_ADVERTISED);
+ ok(iValue == INSTALLSTATE_DEFAULT || iValue == INSTALLSTATE_ADVERTISED,
+ "Installer_ProductState returned %d, expected %d or %d\n", iValue, INSTALLSTATE_DEFAULT, INSTALLSTATE_ADVERTISED);
/* Not found our product code yet? Check */
if (!bProductFound && !lstrcmpW(szString, L"{837450fa-a39b-4bc8-b321-08b393f784b3}"))
@@ -2220,8 +2221,8 @@ static void test_Installer_Products(BOOL bProductInstalled)
if (pEnum)
{
hr = IEnumVARIANT_Next(pEnum, 1, &var, &celt);
- ok(hr == S_OK, "IEnumVARIANT_Next failed (idx %d, count %d), hresult 0x%08x\n", idx, iCount, hr);
- ok(celt == 1, "%d items were retrieved, expected 1\n", celt);
+ ok(hr == S_OK, "IEnumVARIANT_Next failed (idx %d, count %d), hresult %#lx\n", idx, iCount, hr);
+ ok(celt == 1, "%lu items were retrieved, expected 1\n", celt);
ok(V_VT(&var) == VT_BSTR, "IEnumVARIANT_Next returned variant of type %d, expected %d\n", V_VT(&var), VT_BSTR);
ok_w2("%s returned by StringList_Item does not match %s returned by IEnumVARIANT_Next\n", szString, V_BSTR(&var));
VariantClear(&var);
@@ -2248,7 +2249,7 @@ static void test_Installer_Products(BOOL bProductInstalled)
/* IEnumVARIANT::Clone */
hr = IEnumVARIANT_Clone(pEnum, &pEnum2);
- ok(hr == S_OK, "IEnumVARIANT_Clone failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "IEnumVARIANT_Clone failed, hresult %#lx\n", hr);
if (hr == S_OK)
{
/* IEnumVARIANT::Clone is supposed to save the position, but it actually just goes back to the beginning */
@@ -2257,8 +2258,8 @@ static void test_Installer_Products(BOOL bProductInstalled)
if (iCount)
{
hr = IEnumVARIANT_Next(pEnum2, 1, &var, &celt);
- ok(hr == S_OK, "IEnumVARIANT_Next failed, hresult 0x%08x\n", hr);
- ok(celt == 1, "%d items were retrieved, expected 0\n", celt);
+ ok(hr == S_OK, "IEnumVARIANT_Next failed, hresult %#lx\n", hr);
+ ok(celt == 1, "%lu items were retrieved, expected 0\n", celt);
ok(V_VT(&var) == VT_BSTR, "IEnumVARIANT_Next returned variant of type %d, expected %d\n", V_VT(&var), VT_BSTR);
VariantClear(&var);
}
@@ -2270,33 +2271,33 @@ static void test_Installer_Products(BOOL bProductInstalled)
/* IEnumVARIANT::Skip should fail */
hr = IEnumVARIANT_Skip(pEnum, 1);
- ok(hr == S_FALSE, "IEnumVARIANT_Skip failed, hresult 0x%08x\n", hr);
+ ok(hr == S_FALSE, "IEnumVARIANT_Skip failed, hresult %#lx\n", hr);
/* IEnumVARIANT::Next, NULL variant pointer */
hr = IEnumVARIANT_Next(pEnum, 1, NULL, &celt);
- ok(hr == S_FALSE, "IEnumVARIANT_Next failed, hresult 0x%08x\n", hr);
- ok(celt == 0, "%d items were retrieved, expected 0\n", celt);
+ ok(hr == S_FALSE, "IEnumVARIANT_Next failed, hresult %#lx\n", hr);
+ ok(celt == 0, "%lu items were retrieved, expected 0\n", celt);
/* IEnumVARIANT::Next, should not return any more items */
hr = IEnumVARIANT_Next(pEnum, 1, &var, &celt);
- ok(hr == S_FALSE, "IEnumVARIANT_Next failed, hresult 0x%08x\n", hr);
- ok(celt == 0, "%d items were retrieved, expected 0\n", celt);
+ ok(hr == S_FALSE, "IEnumVARIANT_Next failed, hresult %#lx\n", hr);
+ ok(celt == 0, "%lu items were retrieved, expected 0\n", celt);
VariantClear(&var);
/* IEnumVARIANT::Reset */
hr = IEnumVARIANT_Reset(pEnum);
- ok(hr == S_OK, "IEnumVARIANT_Reset failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "IEnumVARIANT_Reset failed, hresult %#lx\n", hr);
if (iCount)
{
/* IEnumVARIANT::Skip to the last product */
hr = IEnumVARIANT_Skip(pEnum, iCount-1);
- ok(hr == S_OK, "IEnumVARIANT_Skip failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "IEnumVARIANT_Skip failed, hresult %#lx\n", hr);
/* IEnumVARIANT::Next should match the very last retrieved value, also makes sure it works with
* NULL celt pointer. */
hr = IEnumVARIANT_Next(pEnum, 1, &var, NULL);
- ok(hr == S_OK, "IEnumVARIANT_Next failed (idx %d, count %d), hresult 0x%08x\n", idx, iCount, hr);
+ ok(hr == S_OK, "IEnumVARIANT_Next failed (idx %d, count %d), hresult %#lx\n", idx, iCount, hr);
ok(V_VT(&var) == VT_BSTR, "IEnumVARIANT_Next returned variant of type %d, expected %d\n", V_VT(&var), VT_BSTR);
ok_w2("%s returned by StringList_Item does not match %s returned by IEnumVARIANT_Next\n", szString, V_BSTR(&var));
VariantClear(&var);
@@ -2308,7 +2309,7 @@ static void test_Installer_Products(BOOL bProductInstalled)
/* StringList::Item using an invalid index */
memset(szString, 0, sizeof(szString));
hr = StringList_Item(pStringList, iCount, szString);
- ok(hr == DISP_E_BADINDEX, "StringList_Item for an invalid index did not return DISP_E_BADINDEX, hresult 0x%08x\n", hr);
+ ok(hr == DISP_E_BADINDEX, "StringList_Item for an invalid index did not return DISP_E_BADINDEX, hresult %#lx\n", hr);
if (pEnum) IEnumVARIANT_Release(pEnum);
if (pUnk) IUnknown_Release(pUnk);
@@ -2402,7 +2403,7 @@ static void test_Installer_InstallProduct(void)
/* Avoid an interactive dialog in case of insufficient privileges. */
hr = Installer_UILevelPut(INSTALLUILEVEL_NONE);
- ok(hr == S_OK, "Expected UILevel property put invoke to return S_OK, got 0x%08x\n", hr);
+ ok(hr == S_OK, "Expected UILevel property put invoke to return S_OK, got %#lx\n", hr);
/* Installer::InstallProduct */
hr = Installer_InstallProduct(L"winetest-automation.msi", NULL);
@@ -2412,11 +2413,11 @@ static void test_Installer_InstallProduct(void)
delete_test_files();
return;
}
- ok(hr == S_OK, "Installer_InstallProduct failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_InstallProduct failed, hresult %#lx\n", hr);
/* Installer::ProductState for our product code, which has been installed */
hr = Installer_ProductState(L"{837450fa-a39b-4bc8-b321-08b393f784b3}", &iValue);
- ok(hr == S_OK, "Installer_ProductState failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_ProductState failed, hresult %#lx\n", hr);
ok(iValue == INSTALLSTATE_DEFAULT, "Installer_ProductState returned %d, expected %d\n", iValue, INSTALLSTATE_DEFAULT);
/* Installer::ProductInfo for our product code */
@@ -2424,25 +2425,25 @@ static void test_Installer_InstallProduct(void)
/* NULL attribute */
memset(szString, 0, sizeof(szString));
hr = Installer_ProductInfo(L"{837450fa-a39b-4bc8-b321-08b393f784b3}", NULL, szString);
- ok(hr == DISP_E_EXCEPTION, "Installer_ProductInfo failed, hresult 0x%08x\n", hr);
+ ok(hr == DISP_E_EXCEPTION, "Installer_ProductInfo failed, hresult %#lx\n", hr);
ok_exception(hr, L"ProductInfo,Product,Attribute");
/* Nonexistent attribute */
memset(szString, 0, sizeof(szString));
hr = Installer_ProductInfo(L"{837450fa-a39b-4bc8-b321-08b393f784b3}", L"winetest-automation.msi", szString);
- ok(hr == DISP_E_EXCEPTION, "Installer_ProductInfo failed, hresult 0x%08x\n", hr);
+ ok(hr == DISP_E_EXCEPTION, "Installer_ProductInfo failed, hresult %#lx\n", hr);
ok_exception(hr, L"ProductInfo,Product,Attribute");
/* Package name */
memset(szString, 0, sizeof(szString));
hr = Installer_ProductInfo(L"{837450fa-a39b-4bc8-b321-08b393f784b3}", L"PackageName", szString);
- ok(hr == S_OK, "Installer_ProductInfo failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_ProductInfo failed, hresult %#lx\n", hr);
todo_wine ok_w2("Installer_ProductInfo returned %s but expected %s\n", szString, L"winetest-automation.msi");
/* Product name */
memset(szString, 0, sizeof(szString));
hr = Installer_ProductInfo(L"{837450fa-a39b-4bc8-b321-08b393f784b3}", L"ProductName", szString);
- ok(hr == S_OK, "Installer_ProductInfo failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_ProductInfo failed, hresult %#lx\n", hr);
todo_wine ok_w2("Installer_ProductInfo returned %s but expected %s\n", szString, L"MSITEST");
/* Installer::Products */
@@ -2450,25 +2451,25 @@ static void test_Installer_InstallProduct(void)
/* Installer::RelatedProducts for our upgrade code */
hr = Installer_RelatedProducts(L"{CE067E8D-2E1A-4367-B734-4EB2BDAD6565}", &pStringList);
- ok(hr == S_OK, "Installer_RelatedProducts failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_RelatedProducts failed, hresult %#lx\n", hr);
if (hr == S_OK)
{
/* StringList::Count */
hr = StringList_Count(pStringList, &iCount);
- ok(hr == S_OK, "StringList_Count failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "StringList_Count failed, hresult %#lx\n", hr);
ok(iCount == 1, "Expected one related product but found %d\n", iCount);
/* StringList::Item */
memset(szString, 0, sizeof(szString));
hr = StringList_Item(pStringList, 0, szString);
- ok(hr == S_OK, "StringList_Item failed (idx 0, count %d), hresult 0x%08x\n", iCount, hr);
+ ok(hr == S_OK, "StringList_Item failed (idx 0, count %d), hresult %#lx\n", iCount, hr);
ok_w2("StringList_Item returned %s but expected %s\n", szString, L"{837450fa-a39b-4bc8-b321-08b393f784b3}");
IDispatch_Release(pStringList);
}
hr = Installer_ProductInfo(L"{837450fa-a39b-4bc8-b321-08b393f784b3}", L"LocalPackage", szString);
- ok(hr == S_OK, "Installer_ProductInfo failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_ProductInfo failed, hresult %#lx\n", hr);
DeleteFileW( szString );
/* Check & clean up installed files & registry keys */
@@ -2485,67 +2486,67 @@ static void test_Installer_InstallProduct(void)
ok(delete_pf("msitest", FALSE), "Directory not created\n");
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
size = MAX_PATH;
type = REG_SZ;
res = RegQueryValueExA(hkey, "Name", NULL, &type, (LPBYTE)path, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(path, "imaname"), "Expected imaname, got %s\n", path);
size = MAX_PATH;
type = REG_SZ;
res = RegQueryValueExA(hkey, "blah", NULL, &type, (LPBYTE)path, &size);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
size = sizeof(num);
type = REG_DWORD;
res = RegQueryValueExA(hkey, "number", NULL, &type, (LPBYTE)&num, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
- ok(num == 314, "Expected 314, got %d\n", num);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
+ ok(num == 314, "Expected 314, got %lu\n", num);
size = MAX_PATH;
type = REG_SZ;
res = RegQueryValueExA(hkey, "OrderTestName", NULL, &type, (LPBYTE)path, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(path, "OrderTestValue"), "Expected imaname, got %s\n", path);
RegCloseKey(hkey);
res = RegDeleteKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest");
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Remove registry keys written by RegisterProduct standard action */
res = delete_key_portable(HKEY_LOCAL_MACHINE,
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{837450fa-a39b-4bc8-b321-08b393f784b3}",
KEY_WOW64_32KEY);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = delete_key_portable(HKEY_LOCAL_MACHINE,
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Installer\\UpgradeCodes\\D8E760ECA1E276347B43E42BDBDA5656", access);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = find_registry_key(HKEY_LOCAL_MACHINE,
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData", "af054738b93a8cb43b12803b397f483b", access, &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = delete_registry_key(hkey, "af054738b93a8cb43b12803b397f483b", access);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
RegCloseKey(hkey);
res = delete_key_portable(HKEY_LOCAL_MACHINE,
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Installer\\Products\\af054738b93a8cb43b12803b397f483b", access);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
/* Remove registry keys written by PublishProduct standard action */
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Installer", &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = delete_registry_key(hkey, "Products\\af054738b93a8cb43b12803b397f483b", KEY_ALL_ACCESS);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegDeleteKeyA(hkey, "UpgradeCodes\\D8E760ECA1E276347B43E42BDBDA5656");
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
RegCloseKey(hkey);
@@ -2566,42 +2567,42 @@ static void test_Installer(void)
/* Test for error */
hr = Installer_CreateRecord(-1, &pRecord);
- ok(hr == DISP_E_EXCEPTION, "Installer_CreateRecord failed, hresult 0x%08x\n", hr);
+ ok(hr == DISP_E_EXCEPTION, "Installer_CreateRecord failed, hresult %#lx\n", hr);
ok_exception(hr, L"CreateRecord,Count");
/* Test for success */
hr = Installer_CreateRecord(1, &pRecord);
- ok(hr == S_OK, "Installer_CreateRecord failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_CreateRecord failed, hresult %#lx\n", hr);
ok(pRecord != NULL, "Installer_CreateRecord should not have returned NULL record\n");
if (pRecord)
{
/* Record::FieldCountGet */
hr = Record_FieldCountGet(pRecord, &iValue);
- ok(hr == S_OK, "Record_FiledCountGet failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Record_FiledCountGet failed, hresult %#lx\n", hr);
ok(iValue == 1, "Record_FieldCountGet result was %d but expected 1\n", iValue);
/* Record::IntegerDataGet */
hr = Record_IntegerDataGet(pRecord, 1, &iValue);
- ok(hr == S_OK, "Record_IntegerDataGet failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Record_IntegerDataGet failed, hresult %#lx\n", hr);
ok(iValue == MSI_NULL_INTEGER, "Record_IntegerDataGet result was %d but expected %d\n", iValue, MSI_NULL_INTEGER);
/* Record::IntegerDataGet, bad index */
hr = Record_IntegerDataGet(pRecord, 10, &iValue);
- ok(hr == S_OK, "Record_IntegerDataGet failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Record_IntegerDataGet failed, hresult %#lx\n", hr);
ok(iValue == MSI_NULL_INTEGER, "Record_IntegerDataGet result was %d but expected %d\n", iValue, MSI_NULL_INTEGER);
/* Record::IntegerDataPut */
hr = Record_IntegerDataPut(pRecord, 1, 100);
- ok(hr == S_OK, "Record_IntegerDataPut failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Record_IntegerDataPut failed, hresult %#lx\n", hr);
/* Record::IntegerDataPut, bad index */
hr = Record_IntegerDataPut(pRecord, 10, 100);
- ok(hr == DISP_E_EXCEPTION, "Record_IntegerDataPut failed, hresult 0x%08x\n", hr);
+ ok(hr == DISP_E_EXCEPTION, "Record_IntegerDataPut failed, hresult %#lx\n", hr);
ok_exception(hr, L"IntegerData,Field");
/* Record::IntegerDataGet */
hr = Record_IntegerDataGet(pRecord, 1, &iValue);
- ok(hr == S_OK, "Record_IntegerDataGet failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Record_IntegerDataGet failed, hresult %#lx\n", hr);
ok(iValue == 100, "Record_IntegerDataGet result was %d but expected 100\n", iValue);
IDispatch_Release(pRecord);
@@ -2617,7 +2618,7 @@ static void test_Installer(void)
DeleteFileW(szPath);
return;
}
- ok(hr == S_OK, "Installer_OpenPackage failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_OpenPackage failed, hresult %#lx\n", hr);
if (hr == S_OK)
{
test_Session(pSession);
@@ -2626,7 +2627,7 @@ static void test_Installer(void)
/* Installer::OpenDatabase */
hr = Installer_OpenDatabase(szPath, (INT_PTR)MSIDBOPEN_TRANSACT, &pDatabase);
- ok(hr == S_OK, "Installer_OpenDatabase failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_OpenDatabase failed, hresult %#lx\n", hr);
if (hr == S_OK)
{
test_Database(pDatabase, FALSE);
@@ -2635,7 +2636,7 @@ static void test_Installer(void)
/* Installer::SummaryInformation */
hr = Installer_SummaryInformation(szPath, 0, &pSumInfo);
- ok(hr == S_OK, "Installer_SummaryInformation failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_SummaryInformation failed, hresult %#lx\n", hr);
if (hr == S_OK)
{
test_SummaryInfo(pSumInfo, summary_info, ARRAY_SIZE(summary_info), TRUE);
@@ -2643,14 +2644,14 @@ static void test_Installer(void)
}
hr = Installer_SummaryInformation(NULL, 0, &pSumInfo);
- ok(hr == DISP_E_EXCEPTION, "Installer_SummaryInformation failed, hresult 0x%08x\n", hr);
+ ok(hr == DISP_E_EXCEPTION, "Installer_SummaryInformation failed, hresult %#lx\n", hr);
/* Installer::RegistryValue */
test_Installer_RegistryValue();
/* Installer::ProductState for our product code, which should not be installed */
hr = Installer_ProductState(L"{837450fa-a39b-4bc8-b321-08b393f784b3}", &iValue);
- ok(hr == S_OK, "Installer_ProductState failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_ProductState failed, hresult %#lx\n", hr);
ok(iValue == INSTALLSTATE_UNKNOWN, "Installer_ProductState returned %d, expected %d\n", iValue, INSTALLSTATE_UNKNOWN);
/* Installer::ProductInfo for our product code, which should not be installed */
@@ -2658,13 +2659,13 @@ static void test_Installer(void)
/* Package name */
memset(szPath, 0, sizeof(szPath));
hr = Installer_ProductInfo(L"{837450fa-a39b-4bc8-b321-08b393f784b3}", L"PackageName", szPath);
- ok(hr == DISP_E_EXCEPTION, "Installer_ProductInfo failed, hresult 0x%08x\n", hr);
+ ok(hr == DISP_E_EXCEPTION, "Installer_ProductInfo failed, hresult %#lx\n", hr);
ok_exception(hr, L"ProductInfo,Product,Attribute");
/* NULL attribute and NULL product code */
memset(szPath, 0, sizeof(szPath));
hr = Installer_ProductInfo(NULL, NULL, szPath);
- ok(hr == DISP_E_EXCEPTION, "Installer_ProductInfo failed, hresult 0x%08x\n", hr);
+ ok(hr == DISP_E_EXCEPTION, "Installer_ProductInfo failed, hresult %#lx\n", hr);
ok_exception(hr, L"ProductInfo,Product,Attribute");
/* Installer::Products */
@@ -2672,12 +2673,12 @@ static void test_Installer(void)
/* Installer::RelatedProducts for our upgrade code, should not find anything */
hr = Installer_RelatedProducts(L"{CE067E8D-2E1A-4367-B734-4EB2BDAD6565}", &pStringList);
- ok(hr == S_OK, "Installer_RelatedProducts failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_RelatedProducts failed, hresult %#lx\n", hr);
if (hr == S_OK)
{
/* StringList::Count */
hr = StringList_Count(pStringList, &iCount);
- ok(hr == S_OK, "StringList_Count failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "StringList_Count failed, hresult %#lx\n", hr);
ok(!iCount, "Expected no related products but found %d\n", iCount);
IDispatch_Release(pStringList);
@@ -2686,7 +2687,7 @@ static void test_Installer(void)
/* Installer::Version */
memset(szPath, 0, sizeof(szPath));
hr = Installer_VersionGet(szPath);
- ok(hr == S_OK, "Installer_VersionGet failed, hresult 0x%08x\n", hr);
+ ok(hr == S_OK, "Installer_VersionGet failed, hresult %#lx\n", hr);
/* Installer::InstallProduct and other tests that depend on our product being installed */
test_Installer_InstallProduct();
@@ -2720,16 +2721,16 @@ START_TEST(automation)
get_program_files_dir(PROG_FILES_DIR);
hr = OleInitialize(NULL);
- ok (hr == S_OK, "OleInitialize returned 0x%08x\n", hr);
+ ok (hr == S_OK, "OleInitialize returned %#lx\n", hr);
hr = CLSIDFromProgID(L"WindowsInstaller.Installer", &clsid);
- ok (hr == S_OK, "CLSIDFromProgID returned 0x%08x\n", hr);
+ ok (hr == S_OK, "CLSIDFromProgID returned %#lx\n", hr);
hr = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&pUnk);
- ok(hr == S_OK, "CoCreateInstance returned 0x%08x\n", hr);
+ ok(hr == S_OK, "CoCreateInstance returned %#lx\n", hr);
if (pUnk)
{
hr = IUnknown_QueryInterface(pUnk, &IID_IDispatch, (void **)&pInstaller);
- ok (hr == S_OK, "IUnknown::QueryInterface returned 0x%08x\n", hr);
+ ok (hr == S_OK, "IUnknown::QueryInterface returned %#lx\n", hr);
test_dispid();
test_dispatch();
diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c
index 75e234c6583..c1b011c8871 100644
--- a/dlls/msi/tests/custom.c
+++ b/dlls/msi/tests/custom.c
@@ -1141,7 +1141,7 @@ static void test_invalid_functions(MSIHANDLE hinst)
r = MsiEnableUIPreview(db, &preview);
ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
- sprintf(package_name, "#%u", db);
+ sprintf(package_name, "#%lu", db);
r = MsiOpenPackageA(package_name, &package);
ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
diff --git a/dlls/msi/tests/db.c b/dlls/msi/tests/db.c
index b2a60f5b304..59dcf87a47c 100644
--- a/dlls/msi/tests/db.c
+++ b/dlls/msi/tests/db.c
@@ -548,7 +548,7 @@ static void test_msidecomposedesc(void)
comp[0] = 0x55;
r = pMsiDecomposeDescriptorA(desc, prod, feature, comp, &len);
ok(r == ERROR_SUCCESS, "returned an error\n");
- ok(len == 41, "got %u\n", len);
+ ok(len == 41, "got %lu\n", len);
ok(!strcmp(prod,"{90110409-6000-11D3-8CFE-0150048383C9}"), "got '%s'\n", prod);
ok(!strcmp(feature,"FollowTheWhiteRabbit"), "got '%s'\n", feature);
ok(!comp[0], "got '%s'\n", comp);
@@ -558,7 +558,7 @@ static void test_msidecomposedesc(void)
comp[0] = 0x55;
r = pMsiDecomposeDescriptorA("yh1BVN)8A$!!!!!MKKSkAlwaysInstalledIntl_1033<", prod, feature, comp, &len);
ok(r == ERROR_SUCCESS, "got %u\n", r);
- ok(len == 45, "got %u\n", len);
+ ok(len == 45, "got %lu\n", len);
ok(!strcmp(prod, "{90150000-006E-0409-0000-0000000FF1CE}"), "got '%s'\n", prod);
ok(!strcmp(feature, "AlwaysInstalledIntl_1033"), "got '%s'\n", feature);
ok(!comp[0], "got '%s'\n", comp);
@@ -907,7 +907,7 @@ static void test_viewmodify(void)
err = MsiViewGetErrorA( hview, buffer, &sz );
ok(err == MSIDBERROR_NOERROR, "got %d\n", err);
ok(!buffer[0], "got \"%s\"\n", buffer);
- ok(sz == 0, "got size %u\n", sz);
+ ok(sz == 0, "got size %lu\n", sz);
r = MsiViewExecute(hview, 0);
ok(r == ERROR_SUCCESS, "MsiViewExecute failed\n");
@@ -928,7 +928,7 @@ static void test_viewmodify(void)
err = MsiViewGetErrorA( hview, buffer, &sz );
ok(err == MSIDBERROR_NOERROR, "got %d\n", err);
ok(!buffer[0], "got \"%s\"\n", buffer);
- ok(sz == 0, "got size %u\n", sz);
+ ok(sz == 0, "got size %lu\n", sz);
r = MsiCloseHandle(hrec);
ok(r == ERROR_SUCCESS, "failed to close record\n");
@@ -960,7 +960,7 @@ static void test_viewmodify(void)
err = MsiViewGetErrorA( hview, buffer, &sz );
ok(err == MSIDBERROR_DUPLICATEKEY, "got %d\n", err);
ok(!strcmp(buffer, "id"), "got \"%s\"\n", buffer);
- ok(sz == 2, "got size %u\n", sz);
+ ok(sz == 2, "got size %lu\n", sz);
/* insert the same thing again */
r = MsiViewExecute(hview, 0);
@@ -1809,7 +1809,7 @@ static void test_streamtable(void)
memset(buf, 0, MAX_PATH);
r = MsiRecordReadStream( rec, 2, buf, &size );
ok( r == ERROR_SUCCESS, "Failed to get stream: %d\n", r);
- ok( !lstrcmpA(buf, "test.txt\n"), "Expected 'test.txt\\n', got '%s' (%d)\n", buf, size);
+ ok( !lstrcmpA(buf, "test.txt\n"), "Expected 'test.txt\\n', got '%s' (%lu)\n", buf, size);
MsiCloseHandle( rec );
/* open a handle to the "data" stream (and keep it open during removal) */
@@ -1841,7 +1841,7 @@ static void test_streamtable(void)
memset(buf, 0, MAX_PATH);
r = MsiRecordReadStream( rec, 2, buf, &size );
ok( r == ERROR_SUCCESS, "Failed to get stream: %d\n", r);
- todo_wine ok( size == 0, "Expected empty buffer, got %d bytes\n", size);
+ todo_wine ok( size == 0, "Expected empty buffer, got %lu bytes\n", size);
MsiCloseHandle( rec );
MsiCloseHandle( hdb );
@@ -2246,7 +2246,8 @@ static void test_suminfo_import(void)
{
MSIHANDLE hdb, hsi, view = 0;
LPCSTR query;
- UINT r, count, size, type;
+ UINT r, count, type;
+ DWORD size;
char str_value[50];
INT int_value;
FILETIME ft_value;
@@ -2284,7 +2285,7 @@ static void test_suminfo_import(void)
r = MsiSummaryInfoGetPropertyA(hsi, PID_TITLE, &type, NULL, NULL, str_value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
ok(type == VT_LPSTR, "Expected VT_LPSTR, got %u\n", type);
- ok(size == 18, "Expected 18, got %u\n", size);
+ ok(size == 18, "Expected 18, got %lu\n", size);
ok(!strcmp(str_value, "Installer Database"),
"Expected \"Installer Database\", got %s\n", str_value);
@@ -2980,7 +2981,7 @@ static void generate_transform_manual(void)
STGM_WRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stm );
if (FAILED(r))
{
- ok(0, "failed to create stream %08x\n", r);
+ ok(0, "failed to create stream %#lx\n", r);
continue;
}
@@ -3068,7 +3069,7 @@ static UINT package_from_db(MSIHANDLE hdb, MSIHANDLE *handle)
CHAR szPackage[12];
MSIHANDLE hPackage;
- sprintf(szPackage, "#%u", hdb);
+ sprintf(szPackage, "#%lu", hdb);
res = MsiOpenPackageA(szPackage, &hPackage);
if (res != ERROR_SUCCESS)
return res;
@@ -3512,7 +3513,7 @@ static void test_join(void)
i++;
MsiCloseHandle(hrec);
}
- ok( i == 5, "Expected 5 rows, got %d\n", i );
+ ok( i == 5, "Expected 5 rows, got %lu\n", i );
ok( r == ERROR_NO_MORE_ITEMS, "expected no more items: %d\n", r );
MsiViewClose(hview);
@@ -3533,7 +3534,7 @@ static void test_join(void)
i++;
MsiCloseHandle(hrec);
}
- ok( i == 24, "Expected 24 rows, got %d\n", i );
+ ok( i == 24, "Expected 24 rows, got %lu\n", i );
MsiViewClose(hview);
MsiCloseHandle(hview);
@@ -3555,7 +3556,7 @@ static void test_join(void)
MsiCloseHandle(hrec);
}
- ok( i == 2, "Expected 2 rows, got %d\n", i );
+ ok( i == 2, "Expected 2 rows, got %lu\n", i );
ok( r == ERROR_NO_MORE_ITEMS, "expected no more items: %d\n", r );
MsiViewClose(hview);
@@ -3578,7 +3579,7 @@ static void test_join(void)
i++;
MsiCloseHandle(hrec);
}
- ok( i == 2, "Expected 2 rows, got %d\n", i );
+ ok( i == 2, "Expected 2 rows, got %lu\n", i );
ok( r == ERROR_NO_MORE_ITEMS, "expected no more items: %d\n", r );
MsiViewClose(hview);
@@ -3601,7 +3602,7 @@ static void test_join(void)
i++;
MsiCloseHandle(hrec);
}
- ok( i == 1, "Expected 1 rows, got %d\n", i );
+ ok( i == 1, "Expected 1 rows, got %lu\n", i );
ok( r == ERROR_NO_MORE_ITEMS, "expected no more items: %d\n", r );
MsiViewClose(hview);
@@ -3625,7 +3626,7 @@ static void test_join(void)
i++;
MsiCloseHandle(hrec);
}
- ok( i == 1, "Expected 1 rows, got %d\n", i );
+ ok( i == 1, "Expected 1 rows, got %lu\n", i );
ok( r == ERROR_NO_MORE_ITEMS, "expected no more items: %d\n", r );
MsiViewClose(hview);
@@ -3648,7 +3649,7 @@ static void test_join(void)
i++;
MsiCloseHandle(hrec);
}
- ok( i == 6, "Expected 6 rows, got %d\n", i );
+ ok( i == 6, "Expected 6 rows, got %lu\n", i );
ok( r == ERROR_NO_MORE_ITEMS, "expected no more items: %d\n", r );
MsiViewClose(hview);
@@ -3672,7 +3673,7 @@ static void test_join(void)
i++;
MsiCloseHandle(hrec);
}
- ok( i == 3, "Expected 3 rows, got %d\n", i );
+ ok( i == 3, "Expected 3 rows, got %lu\n", i );
ok( r == ERROR_NO_MORE_ITEMS, "expected no more items: %d\n", r );
MsiViewClose(hview);
@@ -3693,7 +3694,7 @@ static void test_join(void)
i++;
MsiCloseHandle(hrec);
}
- ok( i == 6, "Expected 6 rows, got %d\n", i );
+ ok( i == 6, "Expected 6 rows, got %lu\n", i );
ok( r == ERROR_NO_MORE_ITEMS, "expected no more items: %d\n", r );
MsiViewClose(hview);
@@ -3714,7 +3715,7 @@ static void test_join(void)
i++;
MsiCloseHandle(hrec);
}
- ok( i == 6, "Expected 6 rows, got %d\n", i );
+ ok( i == 6, "Expected 6 rows, got %lu\n", i );
ok( r == ERROR_NO_MORE_ITEMS, "expected no more items: %d\n", r );
MsiViewClose(hview);
@@ -3736,7 +3737,7 @@ static void test_join(void)
i++;
MsiCloseHandle(hrec);
}
- ok( i == 6, "Expected 6 rows, got %d\n", i );
+ ok( i == 6, "Expected 6 rows, got %lu\n", i );
ok( r == ERROR_NO_MORE_ITEMS, "expected no more items: %d\n", r );
MsiViewClose(hview);
@@ -4240,21 +4241,21 @@ static void test_integers(void)
ok(r == 8, "record count wrong: %d\n", r);
i = MsiRecordGetInteger(rec, 1);
- ok(i == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", i);
+ ok(i == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %lu\n", i);
i = MsiRecordGetInteger(rec, 3);
- ok(i == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", i);
+ ok(i == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %lu\n", i);
i = MsiRecordGetInteger(rec, 2);
- ok(i == 2, "Expected 2, got %d\n", i);
+ ok(i == 2, "Expected 2, got %lu\n", i);
i = MsiRecordGetInteger(rec, 4);
- ok(i == 4, "Expected 4, got %d\n", i);
+ ok(i == 4, "Expected 4, got %lu\n", i);
i = MsiRecordGetInteger(rec, 5);
- ok(i == 5, "Expected 5, got %d\n", i);
+ ok(i == 5, "Expected 5, got %lu\n", i);
i = MsiRecordGetInteger(rec, 6);
- ok(i == 6, "Expected 6, got %d\n", i);
+ ok(i == 6, "Expected 6, got %lu\n", i);
i = MsiRecordGetInteger(rec, 7);
- ok(i == 7, "Expected 7, got %d\n", i);
+ ok(i == 7, "Expected 7, got %lu\n", i);
i = MsiRecordGetInteger(rec, 8);
- ok(i == 8, "Expected 8, got %d\n", i);
+ ok(i == 8, "Expected 8, got %lu\n", i);
MsiCloseHandle(rec);
MsiViewClose(view);
@@ -5714,65 +5715,65 @@ static void test_stringtable(void)
MultiByteToWideChar(CP_ACP, 0, msifile, -1, name, 0x20);
hr = StgOpenStorage(name, NULL, mode, NULL, 0, &stg);
- ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
ok(stg != NULL, "Expected non-NULL storage\n");
hr = IStorage_OpenStream(stg, moo, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stm);
- ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
ok(stm != NULL, "Expected non-NULL stream\n");
hr = IStream_Read(stm, data, MAX_PATH, &read);
- ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
- ok(read == 4, "Expected 4, got %d\n", read);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
+ ok(read == 4, "Expected 4, got %lu\n", read);
todo_wine ok(!memcmp(data, data10, read), "Unexpected data\n");
hr = IStream_Release(stm);
- ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
hr = IStorage_OpenStream(stg, aar, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stm);
- ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
ok(stm != NULL, "Expected non-NULL stream\n");
hr = IStream_Read(stm, data, MAX_PATH, &read);
- ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
- ok(read == 8, "Expected 8, got %d\n", read);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
+ ok(read == 8, "Expected 8, got %lu\n", read);
todo_wine
{
ok(!memcmp(data, data11, read), "Unexpected data\n");
}
hr = IStream_Release(stm);
- ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
hr = IStorage_OpenStream(stg, stringdata, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stm);
- ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
ok(stm != NULL, "Expected non-NULL stream\n");
hr = IStream_Read(stm, buffer, MAX_PATH, &read);
- ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
- ok(read == 24, "Expected 24, got %d\n", read);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
+ ok(read == 24, "Expected 24, got %lu\n", read);
ok(!memcmp(buffer, data12, read), "Unexpected data\n");
hr = IStream_Release(stm);
- ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
hr = IStorage_OpenStream(stg, stringpool, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stm);
- ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
ok(stm != NULL, "Expected non-NULL stream\n");
hr = IStream_Read(stm, data, MAX_PATH, &read);
- ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
todo_wine
{
- ok(read == 64, "Expected 64, got %d\n", read);
+ ok(read == 64, "Expected 64, got %lu\n", read);
ok(!memcmp(data, data13, read), "Unexpected data\n");
}
hr = IStream_Release(stm);
- ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
hr = IStorage_Release(stg);
- ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
DeleteFileA(msifile);
}
@@ -5895,7 +5896,7 @@ static void enum_stream_names(IStorage *stg)
memset(check, 'a', MAX_PATH);
hr = IStorage_EnumElements(stg, 0, NULL, 0, &stgenum);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
n = 0;
while(TRUE)
@@ -5906,12 +5907,12 @@ static void enum_stream_names(IStorage *stg)
break;
ok(!lstrcmpW(stat.pwcsName, database_table_data[n].name),
- "Expected table %d name to match\n", n);
+ "Expected table %lu name to match\n", n);
stm = NULL;
hr = IStorage_OpenStream(stg, stat.pwcsName, NULL,
STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stm);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
ok(stm != NULL, "Expected non-NULL stream\n");
CoTaskMemFree(stat.pwcsName);
@@ -5919,22 +5920,22 @@ static void enum_stream_names(IStorage *stg)
sz = MAX_PATH;
memset(data, 'a', MAX_PATH);
hr = IStream_Read(stm, data, sz, &count);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
ok(count == database_table_data[n].size,
- "Expected %d, got %d\n", database_table_data[n].size, count);
+ "Expected %lu, got %lu\n", database_table_data[n].size, count);
if (!database_table_data[n].size)
ok(!memcmp(data, check, MAX_PATH), "data should not be changed\n");
else
ok(!memcmp(data, database_table_data[n].data, database_table_data[n].size),
- "Expected table %d data to match\n", n);
+ "Expected table %lu data to match\n", n);
IStream_Release(stm);
n++;
}
- ok(n == 3, "Expected 3, got %d\n", n);
+ ok(n == 3, "Expected 3, got %lu\n", n);
IEnumSTATSTG_Release(stgenum);
}
@@ -5957,7 +5958,7 @@ static void test_defaultdatabase(void)
MsiCloseHandle(hdb);
hr = StgOpenStorage(msifileW, NULL, STGM_READ | STGM_SHARE_DENY_WRITE, NULL, 0, &stg);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
ok(stg != NULL, "Expected non-NULL stg\n");
enum_stream_names(stg);
@@ -7188,7 +7189,7 @@ static void test_storages_table(void)
r = MsiRecordReadStream(hrec, 2, buf, &size);
ok(r == ERROR_INVALID_DATA, "Expected ERROR_INVALID_DATA, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
MsiCloseHandle(hrec);
@@ -7204,23 +7205,23 @@ static void test_storages_table(void)
MultiByteToWideChar(CP_ACP, 0, msifile, -1, name, MAX_PATH);
hr = StgOpenStorage(name, NULL, STGM_DIRECT | STGM_READ |
STGM_SHARE_DENY_WRITE, NULL, 0, &stg);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
ok(stg != NULL, "Expected non-NULL storage\n");
MultiByteToWideChar(CP_ACP, 0, "stgname", -1, name, MAX_PATH);
hr = IStorage_OpenStorage(stg, name, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE,
NULL, 0, &inner);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
ok(inner != NULL, "Expected non-NULL storage\n");
MultiByteToWideChar(CP_ACP, 0, "storage.bin", -1, name, MAX_PATH);
hr = IStorage_OpenStream(inner, name, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stm);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
ok(stm != NULL, "Expected non-NULL stream\n");
hr = IStream_Read(stm, buf, MAX_PATH, &size);
- ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
- ok(size == 8, "Expected 8, got %d\n", size);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
+ ok(size == 8, "Expected 8, got %lu\n", size);
ok(!lstrcmpA(buf, "stgdata"), "Expected \"stgdata\", got \"%s\"\n", buf);
IStream_Release(stm);
@@ -7248,7 +7249,7 @@ static void test_dbtopackage(void)
create_custom_action_table(hdb);
add_custom_action_entry(hdb, "'SetProp', 51, 'MYPROP', 'grape'");
- sprintf(package, "#%u", hdb);
+ sprintf(package, "#%lu", hdb);
r = MsiOpenPackageA(package, &hpkg);
if (r == ERROR_INSTALL_PACKAGE_REJECTED)
{
@@ -7263,7 +7264,7 @@ static void test_dbtopackage(void)
r = MsiGetPropertyA(hpkg, "MYPROP", buf, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
/* run the custom action to set the property */
r = MsiDoActionA(hpkg, "SetProp");
@@ -7275,7 +7276,7 @@ static void test_dbtopackage(void)
r = MsiGetPropertyA(hpkg, "MYPROP", buf, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "grape"), "Expected \"grape\", got \"%s\"\n", buf);
- ok(size == 5, "Expected 5, got %d\n", size);
+ ok(size == 5, "Expected 5, got %lu\n", size);
MsiCloseHandle(hpkg);
@@ -7291,7 +7292,7 @@ static void test_dbtopackage(void)
todo_wine
{
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
}
MsiCloseHandle(hdb);
@@ -7308,7 +7309,7 @@ static void test_dbtopackage(void)
create_custom_action_table(hdb);
add_custom_action_entry(hdb, "'SetProp', 51, 'MYPROP', 'grape'");
- sprintf(package, "#%u", hdb);
+ sprintf(package, "#%lu", hdb);
r = MsiOpenPackageA(package, &hpkg);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
@@ -7318,7 +7319,7 @@ static void test_dbtopackage(void)
r = MsiGetPropertyA(hpkg, "MYPROP", buf, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
/* run the custom action to set the property */
r = MsiDoActionA(hpkg, "SetProp");
@@ -7330,7 +7331,7 @@ static void test_dbtopackage(void)
r = MsiGetPropertyA(hpkg, "MYPROP", buf, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "grape"), "Expected \"grape\", got \"%s\"\n", buf);
- ok(size == 5, "Expected 5, got %d\n", size);
+ ok(size == 5, "Expected 5, got %lu\n", size);
MsiCloseHandle(hpkg);
@@ -7346,7 +7347,7 @@ static void test_dbtopackage(void)
todo_wine
{
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
}
MsiCloseHandle(hpkg);
@@ -8583,7 +8584,8 @@ static void test_embedded_nulls(void)
"s72\tL0\n"
"Control\tDialog\n"
"LicenseAgreementDlg\ttext\x11\x19text\0text";
- UINT r, sz;
+ UINT r;
+ DWORD sz;
MSIHANDLE hdb, hrec;
char buffer[32];
@@ -9208,7 +9210,7 @@ static void test_view_get_error(void)
sz = 0;
err = MsiViewGetErrorA(0, NULL, &sz);
ok(err == MSIDBERROR_INVALIDARG, "got %d\n", err);
- ok(sz == 0, "got size %u\n", sz);
+ ok(sz == 0, "got size %lu\n", sz);
err = MsiViewGetErrorA(view, NULL, NULL);
ok(err == MSIDBERROR_INVALIDARG, "got %d\n", err);
@@ -9216,21 +9218,21 @@ static void test_view_get_error(void)
sz = 0;
err = MsiViewGetErrorA(view, NULL, &sz);
ok(err == MSIDBERROR_NOERROR, "got %d\n", err);
- ok(sz == 0, "got size %u\n", sz);
+ ok(sz == 0, "got size %lu\n", sz);
sz = 0;
strcpy(buffer, "x");
err = MsiViewGetErrorA(view, buffer, &sz);
ok(err == MSIDBERROR_MOREDATA, "got %d\n", err);
ok(!strcmp(buffer, "x"), "got \"%s\"\n", buffer);
- ok(sz == 0, "got size %u\n", sz);
+ ok(sz == 0, "got size %lu\n", sz);
sz = 1;
strcpy(buffer, "x");
err = MsiViewGetErrorA(view, buffer, &sz);
ok(err == MSIDBERROR_NOERROR, "got %d\n", err);
ok(!buffer[0], "got \"%s\"\n", buffer);
- ok(sz == 0, "got size %u\n", sz);
+ ok(sz == 0, "got size %lu\n", sz);
rec = MsiCreateRecord(2);
MsiRecordSetInteger(rec, 1, 1);
@@ -9243,14 +9245,14 @@ static void test_view_get_error(void)
err = MsiViewGetErrorA(view, buffer, &sz);
ok(err == MSIDBERROR_DUPLICATEKEY, "got %d\n", err);
ok(!strcmp(buffer, "A"), "got \"%s\"\n", buffer);
- ok(sz == 1, "got size %u\n", sz);
+ ok(sz == 1, "got size %lu\n", sz);
sz = 2;
strcpy(buffer, "x");
err = MsiViewGetErrorA(view, buffer, &sz);
todo_wine ok(err == MSIDBERROR_NOERROR, "got %d\n", err);
todo_wine ok(!buffer[0], "got \"%s\"\n", buffer);
- todo_wine ok(sz == 0, "got size %u\n", sz);
+ todo_wine ok(sz == 0, "got size %lu\n", sz);
r = MsiViewModify(view, MSIMODIFY_VALIDATE_NEW, rec);
ok(r == ERROR_INVALID_DATA, "got %u\n", r);
@@ -9260,14 +9262,14 @@ static void test_view_get_error(void)
err = MsiViewGetErrorA(view, buffer, &sz);
ok(err == MSIDBERROR_MOREDATA, "got %d\n", err);
ok(!buffer[0], "got \"%s\"\n", buffer);
- ok(sz == 1, "got size %u\n", sz);
+ ok(sz == 1, "got size %lu\n", sz);
sz = 1;
strcpy(buffer, "x");
err = MsiViewGetErrorA(view, buffer, &sz);
todo_wine ok(err == MSIDBERROR_NOERROR, "got %d\n", err);
ok(!buffer[0], "got \"%s\"\n", buffer);
- todo_wine ok(sz == 0, "got size %u\n", sz);
+ todo_wine ok(sz == 0, "got size %lu\n", sz);
r = MsiViewModify(view, MSIMODIFY_VALIDATE_NEW, rec);
ok(r == ERROR_INVALID_DATA, "got %u\n", r);
@@ -9277,14 +9279,14 @@ static void test_view_get_error(void)
err = MsiViewGetErrorA(view, buffer, &sz);
ok(err == MSIDBERROR_MOREDATA, "got %d\n", err);
ok(!strcmp(buffer, "x"), "got \"%s\"\n", buffer);
- ok(sz == 1, "got size %u\n", sz);
+ ok(sz == 1, "got size %lu\n", sz);
sz = 0;
strcpy(buffer, "x");
err = MsiViewGetErrorA(view, buffer, &sz);
ok(err == MSIDBERROR_MOREDATA, "got %d\n", err);
ok(!strcmp(buffer, "x"), "got \"%s\"\n", buffer);
- todo_wine ok(sz == 0, "got size %u\n", sz);
+ todo_wine ok(sz == 0, "got size %lu\n", sz);
MsiCloseHandle(rec);
MsiCloseHandle(view);
diff --git a/dlls/msi/tests/format.c b/dlls/msi/tests/format.c
index 06f901fb84c..1cf2021214c 100644
--- a/dlls/msi/tests/format.c
+++ b/dlls/msi/tests/format.c
@@ -35,7 +35,7 @@ static UINT package_from_db(MSIHANDLE hdb, MSIHANDLE *handle)
CHAR szPackage[12];
MSIHANDLE hPackage;
- sprintf(szPackage, "#%u", hdb);
+ sprintf(szPackage, "#%lu", hdb);
res = MsiOpenPackageA(szPackage, &hPackage);
if (res != ERROR_SUCCESS)
return res;
@@ -205,7 +205,7 @@ static void test_formatrecord(void)
sz = 123;
r = MsiFormatRecordA(0, hrec, NULL, &sz);
ok( r == ERROR_SUCCESS, "format failed with empty buffer\n");
- ok( sz == 2, "size wrong (%i)\n",sz);
+ ok( sz == 2, "size wrong (%lu)\n",sz);
sz = sizeof buffer;
buffer[0] = 'x';
buffer[1] = 0;
@@ -296,7 +296,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 30, "size wrong %i\n",sz);
+ ok( sz == 30, "size wrong %lu\n",sz);
ok( 0 == strcmp(buffer,"1: boo 2: hoo 3: 4: 5: 6: "),
"wrong output(%s)\n",buffer);
@@ -308,7 +308,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 31, "size wrong %i\n",sz);
+ ok( sz == 31, "size wrong %lu\n",sz);
ok( 0 == strcmp(buffer,"1: 123 2: 4567 3: 4: 5: 6: "),
"wrong output(%s)\n",buffer);
@@ -322,7 +322,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 7, "size wrong,(%i)\n",sz);
+ ok( sz == 7, "size wrong,(%lu)\n",sz);
ok( 0 == strcmp(buffer,"hey hey"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "[[1]] [2]");
@@ -334,7 +334,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 9, "size wrong,(%i)\n",sz);
+ ok( sz == 9, "size wrong,(%lu)\n",sz);
ok( 0 == strcmp(buffer,"[[2]] hey"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "[[[3]]] [2]");
@@ -348,7 +348,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 7, "size wrong,(%i)\n",sz);
+ ok( sz == 7, "size wrong,(%lu)\n",sz);
ok( 0 == strcmp(buffer,"hey hey"), "wrong output (%s)\n",buffer);
r = MsiCloseHandle(hrec);
@@ -369,7 +369,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 7, "size wrong,(%i)\n",sz);
+ ok( sz == 7, "size wrong,(%lu)\n",sz);
ok( 0 == strcmp(buffer,"big hey"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "[[3][4][1]] [2]");
@@ -387,7 +387,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 7, "size wrong,(%i)\n",sz);
+ ok( sz == 7, "size wrong,(%lu)\n",sz);
ok( 0 == strcmp(buffer,"big hey"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "[[3][[4]][1]] [2]");
@@ -405,7 +405,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 10, "size wrong,(%i)\n",sz);
+ ok( sz == 10, "size wrong,(%lu)\n",sz);
ok( 0 == strcmp(buffer,"[1[]2] hey"), "wrong output (%s)\n",buffer);
/* incorrect formats */
@@ -424,7 +424,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 18, "size wrong,(%i)\n",sz);
+ ok( sz == 18, "size wrong,(%lu)\n",sz);
ok( 0 == strcmp(buffer,"[[[3][[4]][1]] [2]"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "[[3][[4]][1]] [2]]");
@@ -442,7 +442,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 11, "size wrong,(%i)\n",sz);
+ ok( sz == 11, "size wrong,(%lu)\n",sz);
ok( 0 == strcmp(buffer,"[1[]2] hey]"), "wrong output (%s)\n",buffer);
@@ -463,7 +463,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 6, "size wrong,(%i)\n",sz);
+ ok( sz == 6, "size wrong,(%lu)\n",sz);
ok( 0 == strcmp(buffer,"12 hey"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "[{[3][1]}] [2]");
@@ -481,10 +481,9 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 8, "size wrong,(%i)\n",sz);
+ ok( sz == 8, "size wrong,(%lu)\n",sz);
ok( 0 == strcmp(buffer,"[12] hey"), "wrong output (%s)\n",buffer);
-
r = MsiRecordSetStringA(hrec, 0, "{test} [2]");
ok( r == ERROR_SUCCESS, "set string failed\n");
r = MsiRecordSetStringA(hrec, 1, "2");
@@ -500,7 +499,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 10, "size wrong,(%i)\n",sz);
+ ok( sz == 10, "size wrong,(%lu)\n",sz);
ok( 0 == strcmp(buffer,"{test} hey"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "{[test]} [2]");
@@ -518,7 +517,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 12, "size wrong,(%i)\n",sz);
+ ok( sz == 12, "size wrong,(%lu)\n",sz);
ok( 0 == strcmp(buffer,"{[test]} hey"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "{[1][2][3][4]} [2]");
@@ -536,7 +535,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 4, "size wrong,(%i)\n",sz);
+ ok( sz == 4, "size wrong,(%lu)\n",sz);
ok( 0 == strcmp(buffer," hey"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "{[1][2][3][dummy]} [2]");
@@ -554,7 +553,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 18, "size wrong,(%i)\n",sz);
+ ok( sz == 18, "size wrong,(%lu)\n",sz);
ok( 0 == strcmp(buffer,"{2hey1[dummy]} hey"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "{[1][2][3][4][dummy]} [2]");
@@ -572,7 +571,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 18, "size wrong,(%i)\n",sz);
+ ok( sz == 18, "size wrong,(%lu)\n",sz);
ok( 0 == strcmp(buffer,"{2hey1[dummy]} hey"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "{{[1][2]}[3][4][dummy]}");
@@ -590,7 +589,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 16, "size wrong,(%i)\n",sz);
+ ok( sz == 16, "size wrong,(%lu)\n",sz);
ok( 0 == strcmp(buffer,"{{2hey}1[dummy]}"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "{{[1][2]}[3]{[4][dummy]}}");
@@ -608,7 +607,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 0, "size wrong,(%i)\n",sz);
+ ok( sz == 0, "size wrong,(%lu)\n",sz);
ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "{{[1][2]}[3]} {[1][2]}");
@@ -626,7 +625,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 12, "size wrong,(%i)\n",sz);
+ ok( sz == 12, "size wrong,(%lu)\n",sz);
ok( 0 == strcmp(buffer,"{{12}3} {12}"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "{[1][2]} {{[1][2]}[3]} {[1][2]}");
@@ -644,7 +643,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 15, "size wrong,(%i)\n",sz);
+ ok( sz == 15, "size wrong,(%lu)\n",sz);
ok( 0 == strcmp(buffer,"12 {{12}3} {12}"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "{[4]}{[1][2]} {{[1][2]}[3]} {[1][2]}");
@@ -662,7 +661,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 15, "size wrong,(%i)\n",sz);
+ ok( sz == 15, "size wrong,(%lu)\n",sz);
ok( 0 == strcmp(buffer,"12 {{12}3} {12}"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "{blah} {[4]}{[1][2]} {{[1][2]}[3]} {[1][2]}");
@@ -680,7 +679,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 22, "size wrong,(%i)\n",sz);
+ ok( sz == 22, "size wrong,(%lu)\n",sz);
ok( 0 == strcmp(buffer,"{blah} 12 {{12}3} {12}"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "{{[1]}[2]} {[4]}{[1][2]}");
@@ -698,7 +697,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 13, "size wrong,(%i)\n",sz);
+ ok( sz == 13, "size wrong,(%lu)\n",sz);
ok( 0 == strcmp(buffer,"{{1}2} {}{12}"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "{{[1]}} {[4]}{[1][2]}");
@@ -716,7 +715,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 3, "size wrong,(%i)\n",sz);
+ ok( sz == 3, "size wrong,(%lu)\n",sz);
ok( 0 == strcmp(buffer," 12"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "{{{[1]}} {[4]}{[1][2]}");
@@ -735,10 +734,10 @@ static void test_formatrecord(void)
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
todo_wine{
- ok( sz == 3, "size wrong,(%i)\n",sz);
+ ok( sz == 3, "size wrong,(%lu)\n",sz);
ok( 0 == strcmp(buffer," 12"), "wrong output (%s)\n",buffer);
}
-
+
/* now put play games with escaping */
r = MsiRecordSetStringA(hrec, 0, "[1] [2] [\\3asdf]");
ok( r == ERROR_SUCCESS, "set string failed\n");
@@ -770,7 +769,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 4, "size wrong: %d\n", sz);
+ ok( sz == 4, "size wrong: %lu\n", sz);
ok( 0 == strcmp(buffer,"[\\x]"), "wrong output: %s\n", buffer);
r = MsiRecordSetStringA(hrec, 0, "{\\x}");
@@ -778,7 +777,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 4, "size wrong: %d\n", sz);
+ ok( sz == 4, "size wrong: %lu\n", sz);
ok( 0 == strcmp(buffer,"{\\x}"), "wrong output: %s\n", buffer);
r = MsiRecordSetStringA(hrec, 0, "[abc\\x]");
@@ -786,7 +785,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 7, "size wrong: %d\n", sz);
+ ok( sz == 7, "size wrong: %lu\n", sz);
ok( 0 == strcmp(buffer,"[abc\\x]"), "wrong output: %s\n", buffer);
r = MsiRecordSetStringA(hrec, 0, "[\\[]Bracket Text[\\]]");
@@ -794,7 +793,7 @@ static void test_formatrecord(void)
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 20, "size wrong: %d\n", sz);
+ ok( sz == 20, "size wrong: %lu\n", sz);
ok( 0 == strcmp(buffer,"[\\[]Bracket Text[\\]]"), "wrong output: %s\n", buffer);
/* now try other formats without a package */
@@ -1091,7 +1090,7 @@ static void test_formatrecord(void)
sz = sizeof(buffer);
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
ok(!lstrcmpA(buffer, "[\\[]"), "Expected \"[\\[]\", got \"%s\"\n", buffer);
r = MsiRecordSetStringA(hrec, 0, "[foo]");
@@ -1329,7 +1328,7 @@ static void test_formatrecord(void)
r = MsiFormatRecordA(0, hrec, buffer, &sz);
todo_wine
{
- ok( sz == 12, "size wrong: got %u, expected 12\n", sz);
+ ok( sz == 12, "size wrong: got %lu, expected 12\n", sz);
ok( 0 == strcmp(buffer,"{[1{{boo}}]}"), "wrong output: got %s, expected [1]\n", buffer);
}
ok( r == ERROR_SUCCESS, "format failed\n");
@@ -1340,7 +1339,7 @@ static void test_formatrecord(void)
ok( r == ERROR_SUCCESS, "set string failed\n");
sz = sizeof buffer;
r = MsiFormatRecordA(0, hrec, buffer, &sz);
- ok( sz == 6, "size wrong: got %u, expected 3\n", sz);
+ ok( sz == 6, "size wrong: got %lu, expected 3\n", sz);
ok( 0 == strcmp(buffer,"{{hoo}"), "wrong output: got %s, expected [1]\n", buffer);
ok( r == ERROR_SUCCESS, "format failed\n");
@@ -1525,7 +1524,7 @@ static void test_formatrecord(void)
ok( r == ERROR_SUCCESS, "set string failed\n");
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 6, "size wrong(%i)\n",sz);
+ ok( sz == 6, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"{abcd}"), "wrong output (%s)\n",buffer);
sz = sizeof buffer;
@@ -1533,7 +1532,7 @@ static void test_formatrecord(void)
ok( r == ERROR_SUCCESS, "set string failed\n");
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 23, "size wrong(%i)\n",sz);
+ ok( sz == 23, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"{a[one]bc[two]de[one]f}"), "wrong output (%s)\n",buffer);
sz = sizeof buffer;
@@ -1541,7 +1540,7 @@ static void test_formatrecord(void)
ok( r == ERROR_SUCCESS, "set string failed\n");
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 23, "size wrong(%i)\n",sz);
+ ok( sz == 23, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"{a[one]bc[bad]de[two]f}"), "wrong output (%s)\n",buffer);
sz = sizeof buffer;
@@ -1549,7 +1548,7 @@ static void test_formatrecord(void)
ok( r == ERROR_SUCCESS, "set string failed\n");
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 7, "size wrong(%i)\n",sz);
+ ok( sz == 7, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"{[bad]}"), "wrong output (%s)\n",buffer);
sz = sizeof buffer;
@@ -1557,7 +1556,7 @@ static void test_formatrecord(void)
ok( r == ERROR_SUCCESS, "set string failed\n");
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 14, "size wrong(%i)\n",sz);
+ ok( sz == 14, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"{abc{d[one]ef}"), "wrong output (%s)\n",buffer);
sz = sizeof buffer;
@@ -1565,7 +1564,7 @@ static void test_formatrecord(void)
ok( r == ERROR_SUCCESS, "set string failed\n");
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 15, "size wrong(%i)\n",sz);
+ ok( sz == 15, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"{abc{d[one]ef}}"), "wrong output (%s)\n",buffer);
sz = sizeof buffer;
@@ -1573,7 +1572,7 @@ static void test_formatrecord(void)
ok( r == ERROR_SUCCESS, "set string failed\n");
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 5, "size wrong(%i)\n",sz);
+ ok( sz == 5, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"{abc}"), "wrong output (%s)\n",buffer);
sz = sizeof buffer;
@@ -1581,7 +1580,7 @@ static void test_formatrecord(void)
ok( r == ERROR_SUCCESS, "set string failed\n");
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 0, "size wrong(%i)\n",sz);
+ ok( sz == 0, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer);
sz = sizeof buffer;
@@ -1589,7 +1588,7 @@ static void test_formatrecord(void)
ok( r == ERROR_SUCCESS, "set string failed\n");
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 0, "size wrong(%i)\n",sz);
+ ok( sz == 0, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer);
sz = sizeof buffer;
@@ -1599,7 +1598,7 @@ static void test_formatrecord(void)
ok( r == ERROR_SUCCESS, "format failed\n");
todo_wine
{
- ok( sz == 7, "size wrong(%i)\n",sz);
+ ok( sz == 7, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"hi{jk}}"), "wrong output (%s)\n",buffer);
}
@@ -1610,7 +1609,7 @@ static void test_formatrecord(void)
ok( r == ERROR_SUCCESS, "format failed\n");
todo_wine
{
- ok( sz == 1, "size wrong(%i)\n",sz);
+ ok( sz == 1, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"}"), "wrong output (%s)\n",buffer);
}
@@ -1619,7 +1618,7 @@ static void test_formatrecord(void)
ok( r == ERROR_SUCCESS, "set string failed\n");
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 0, "size wrong(%i)\n",sz);
+ ok( sz == 0, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer);
sz = sizeof buffer;
@@ -1627,7 +1626,7 @@ static void test_formatrecord(void)
ok( r == ERROR_SUCCESS, "set string failed\n");
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 0, "size wrong(%i)\n",sz);
+ ok( sz == 0, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer);
sz = sizeof buffer;
@@ -1635,7 +1634,7 @@ static void test_formatrecord(void)
ok( r == ERROR_SUCCESS, "set string failed\n");
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 7, "size wrong(%i)\n",sz);
+ ok( sz == 7, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"{a{b}c}"), "wrong output (%s)\n",buffer);
sz = sizeof buffer;
@@ -1643,7 +1642,7 @@ static void test_formatrecord(void)
ok( r == ERROR_SUCCESS, "set string failed\n");
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 6, "size wrong(%i)\n",sz);
+ ok( sz == 6, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"{a{b}}"), "wrong output (%s)\n",buffer);
sz = sizeof buffer;
@@ -1651,7 +1650,7 @@ static void test_formatrecord(void)
ok( r == ERROR_SUCCESS, "set string failed\n");
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 6, "size wrong(%i)\n",sz);
+ ok( sz == 6, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"{{b}c}"), "wrong output (%s)\n",buffer);
sz = sizeof buffer;
@@ -1661,7 +1660,7 @@ static void test_formatrecord(void)
ok( r == ERROR_SUCCESS, "format failed\n");
todo_wine
{
- ok( sz == 2, "size wrong(%i)\n",sz);
+ ok( sz == 2, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"}}"), "wrong output (%s)\n",buffer);
}
@@ -1672,7 +1671,7 @@ static void test_formatrecord(void)
ok( r == ERROR_SUCCESS, "set string failed\n");
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 8, "size wrong(%i)\n",sz);
+ ok( sz == 8, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"100 -100"), "wrong output (%s)\n",buffer);
sz = sizeof(buffer);
@@ -1682,7 +1681,7 @@ static void test_formatrecord(void)
ok( r == ERROR_SUCCESS, "set string failed\n");
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(sz == 33, "Expected 33, got %d\n",sz);
+ ok(sz == 33, "Expected 33, got %lu\n",sz);
ok(!lstrcmpA(buffer, "one {[noprop] [twoprop]} {abcdef}"),
"Expected \"one {[noprop] [twoprop]} {abcdef}\", got \"%s\"\n", buffer);
@@ -1693,7 +1692,7 @@ static void test_formatrecord(void)
ok( r == ERROR_SUCCESS, "set string failed\n");
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(sz == 29, "Expected 29, got %d\n",sz);
+ ok(sz == 29, "Expected 29, got %lu\n",sz);
ok(!lstrcmpA(buffer, "one {[noprop] [one]} {abcdef}"),
"Expected \"one {[noprop] [one]} {abcdef}\", got \"%s\"\n", buffer);
@@ -1704,7 +1703,7 @@ static void test_formatrecord(void)
ok( r == ERROR_SUCCESS, "set string failed\n");
r = MsiFormatRecordA(0, hrec, buffer, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(sz == 20, "Expected 20, got %d\n",sz);
+ ok(sz == 20, "Expected 20, got %lu\n",sz);
ok(!lstrcmpA(buffer, "one {[one]} {abcdef}"),
"Expected \"one {[one]} {abcdef}\", got \"%s\"\n", buffer);
@@ -1766,7 +1765,7 @@ static void test_formatrecord_package(void)
sz = sizeof buffer;
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed with empty buffer (%i)\n",r);
- ok( sz == 51, "size wrong (%i)\n",sz);
+ ok( sz == 51, "size wrong (%lu)\n",sz);
ok( 0 == strcmp(buffer,"1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: "), "wrong output(%s)\n",buffer);
r = MsiSetPropertyA(package, "prop", "val");
@@ -1789,7 +1788,7 @@ static void test_formatrecord_package(void)
ok( r == ERROR_SUCCESS, "format failed with empty buffer (%i)\n",r);
todo_wine
{
- ok( sz == 66, "size wrong (%i)\n",sz);
+ ok( sz == 66, "size wrong (%lu)\n",sz);
ok( !lstrcmpA(buffer,
"1: [2] 2: stuff 3: prop 4: val 5: 6: 7: 8: 9: 10: 11: 12: "),
"wrong output(%s)\n",buffer);
@@ -1805,7 +1804,7 @@ static void test_formatrecord_package(void)
sz = sizeof buffer;
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 9, "size wrong(%i)\n",sz);
+ ok( sz == 9, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"boo hoo 3"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "[1] [2] [\\x]");
@@ -1817,77 +1816,77 @@ static void test_formatrecord_package(void)
sz = sizeof buffer;
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 9, "size wrong(%i)\n",sz);
+ ok( sz == 9, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"boo hoo x"), "wrong output (%s)\n",buffer);
MsiRecordSetStringA(hrec, 0, "[\\x]");
sz = sizeof buffer;
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 1, "size wrong: %d\n", sz);
+ ok( sz == 1, "size wrong: %lu\n", sz);
ok( 0 == strcmp(buffer,"x"), "wrong output: %s\n", buffer);
MsiRecordSetStringA(hrec, 0, "{\\x}");
sz = sizeof buffer;
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 4, "size wrong: %d\n", sz);
+ ok( sz == 4, "size wrong: %lu\n", sz);
ok( 0 == strcmp(buffer,"{\\x}"), "wrong output: %s\n", buffer);
MsiRecordSetStringA(hrec, 0, "[abc\\x]");
sz = sizeof buffer;
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 0, "size wrong: %d\n", sz);
+ ok( sz == 0, "size wrong: %lu\n", sz);
ok( 0 == strcmp(buffer,""), "wrong output: %s\n", buffer);
MsiRecordSetStringA(hrec, 0, "[abc\\xdef]");
sz = sizeof buffer;
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 0, "size wrong: %d\n", sz);
+ ok( sz == 0, "size wrong: %lu\n", sz);
ok( 0 == strcmp(buffer,""), "wrong output: %s\n", buffer);
MsiRecordSetStringA(hrec, 0, "\\x");
sz = sizeof(buffer);
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
ok(!lstrcmpA(buffer, "\\x"), "Expected \"\\x\", got \"%s\"\n", buffer);
MsiRecordSetStringA(hrec, 0, "[\\[");
sz = sizeof(buffer);
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(sz == 3, "Expected 3, got %d\n", sz);
+ ok(sz == 3, "Expected 3, got %lu\n", sz);
ok(!lstrcmpA(buffer, "[\\["), "Expected \"[\\[\", got \"%s\"\n", buffer);
MsiRecordSetStringA(hrec, 0, "[\\[]");
sz = sizeof(buffer);
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(sz == 1, "Expected 1, got %d\n", sz);
+ ok(sz == 1, "Expected 1, got %lu\n", sz);
ok(!lstrcmpA(buffer, "["), "Expected \"[\", got \"%s\"\n", buffer);
MsiRecordSetStringA(hrec, 0, "[[]");
sz = sizeof(buffer);
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(sz == 3, "Expected 3, got %d\n", sz);
+ ok(sz == 3, "Expected 3, got %lu\n", sz);
ok(!lstrcmpA(buffer, "[[]"), "Expected \"[]\", got \"%s\"\n", buffer);
MsiRecordSetStringA(hrec, 0, "[\\[]]");
sz = sizeof(buffer);
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
ok(!lstrcmpA(buffer, "[]"), "Expected \"[]\", got \"%s\"\n", buffer);
MsiRecordSetStringA(hrec, 0, "[\\[a]");
sz = sizeof(buffer);
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(sz == 1, "Expected 1, got %d\n", sz);
+ ok(sz == 1, "Expected 1, got %lu\n", sz);
ok(!lstrcmpA(buffer, "["), "Expected \"[\", got \"%s\"\n", buffer);
MsiRecordSetStringA(hrec, 0, "[\\a[]");
@@ -1896,7 +1895,7 @@ static void test_formatrecord_package(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
todo_wine
{
- ok(sz == 1, "Expected 1, got %d\n", sz);
+ ok(sz == 1, "Expected 1, got %lu\n", sz);
ok(!lstrcmpA(buffer, "a"), "Expected \"a\", got \"%s\"\n", buffer);
}
@@ -1904,14 +1903,14 @@ static void test_formatrecord_package(void)
sz = sizeof(buffer);
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(sz == 3, "Expected 3, got %d\n", sz);
+ ok(sz == 3, "Expected 3, got %lu\n", sz);
ok(!lstrcmpA(buffer, "val"), "Expected \"val\", got \"%s\"\n", buffer);
MsiRecordSetStringA(hrec, 0, "[prop] [pro\\pblah] [prop]");
sz = sizeof(buffer);
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(sz == 8, "Expected 8, got %d\n", sz);
+ ok(sz == 8, "Expected 8, got %lu\n", sz);
ok(!lstrcmpA(buffer, "val val"), "Expected \"val val\", got \"%s\"\n", buffer);
MsiSetPropertyA(package, "b", "ball");
@@ -1919,35 +1918,35 @@ static void test_formatrecord_package(void)
sz = sizeof(buffer);
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(sz == 1, "Expected 1, got %d\n", sz);
+ ok(sz == 1, "Expected 1, got %lu\n", sz);
ok(!lstrcmpA(buffer, "b"), "Expected \"b\", got \"%s\"\n", buffer);
MsiRecordSetStringA(hrec, 0, "[\\c]");
sz = sizeof(buffer);
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(sz == 1, "Expected 1, got %d\n", sz);
+ ok(sz == 1, "Expected 1, got %lu\n", sz);
ok(!lstrcmpA(buffer, "c"), "Expected \"c\", got \"%s\"\n", buffer);
MsiRecordSetStringA(hrec, 0, "[\\[]prop]");
sz = sizeof(buffer);
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(sz == 6, "Expected 6, got %d\n", sz);
+ ok(sz == 6, "Expected 6, got %lu\n", sz);
ok(!lstrcmpA(buffer, "[prop]"), "Expected \"[prop]\", got \"%s\"\n", buffer);
MsiRecordSetStringA(hrec, 0, "[\\a]prop]");
sz = sizeof(buffer);
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(sz == 6, "Expected 6, got %d\n", sz);
+ ok(sz == 6, "Expected 6, got %lu\n", sz);
ok(!lstrcmpA(buffer, "aprop]"), "Expected \"aprop]\", got \"%s\"\n", buffer);
MsiRecordSetStringA(hrec, 0, "[\\[]Bracket Text[\\]]");
sz = sizeof buffer;
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 14, "size wrong: %d\n", sz);
+ ok( sz == 14, "size wrong: %lu\n", sz);
ok( 0 == strcmp(buffer,"[Bracket Text]"), "wrong output: %s\n", buffer);
/* null characters */
@@ -1960,7 +1959,7 @@ static void test_formatrecord_package(void)
sz = sizeof buffer;
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 9, "size wrong: %d\n", sz);
+ ok( sz == 9, "size wrong: %lu\n", sz);
ok( 0 == strcmp(buffer,"boo "), "wrong output: %s\n", buffer);
ok(!lstrcmpA(&buffer[5], " hoo"),
"Expected \" hoo\", got \"%s\"\n", &buffer[5]);
@@ -1974,7 +1973,7 @@ static void test_formatrecord_package(void)
sz = sizeof(buffer);
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(sz == 8, "Expected 8, got %d\n", sz);
+ ok(sz == 8, "Expected 8, got %lu\n", sz);
ok(!lstrcmpA(buffer, "boo hoo"), "Expected \"boo hoo\", got \"%s\"\n", buffer);
/* properties */
@@ -2022,7 +2021,7 @@ static void test_formatrecord_package(void)
sz = sizeof buffer;
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 12, "size wrong(%i)\n",sz);
+ ok( sz == 12, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"foo baa whoa"), "wrong output (%s)\n",buffer);
r = MsiSetPropertyA(package,"dummya","1");
@@ -2042,7 +2041,7 @@ static void test_formatrecord_package(void)
ok( r == ERROR_SUCCESS, "format failed\n");
todo_wine
{
- ok( sz == 9, "size wrong(%i)\n",sz);
+ ok( sz == 9, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"1 [1] [2]"), "wrong output (%s)\n",buffer);
}
@@ -2065,7 +2064,7 @@ static void test_formatrecord_package(void)
sz = sizeof buffer;
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 10, "size wrong(%i)\n",sz);
+ ok( sz == 10, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"\\blath b 1"), "wrong output (%s)\n",buffer);
r = MsiRecordSetStringA(hrec, 0, "[1] [2] [[\\3asdf]]");
@@ -2081,7 +2080,7 @@ static void test_formatrecord_package(void)
ok( r == ERROR_SUCCESS, "format failed\n");
todo_wine
{
- ok( sz == 11, "size wrong(%i)\n",sz);
+ ok( sz == 11, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"boo hoo [3]"), "wrong output (%s)\n",buffer);
}
@@ -2096,7 +2095,7 @@ static void test_formatrecord_package(void)
sz = sizeof buffer;
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 9, "size wrong(%i)\n",sz);
+ ok( sz == 9, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"boo hoo h"), "wrong output (%s)\n",buffer);
/* nested properties */
@@ -2107,7 +2106,7 @@ static void test_formatrecord_package(void)
MsiRecordSetStringA(hrec, 0, "[PropC]");
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 7, "size wrong(%i)\n",sz);
+ ok( sz == 7, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"[PropB]"), "wrong output (%s)\n",buffer);
MsiSetPropertyA(package, "PropA", "surprise");
@@ -2117,7 +2116,7 @@ static void test_formatrecord_package(void)
MsiRecordSetStringA(hrec, 0, "[PropC]");
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 5, "size wrong(%i)\n",sz);
+ ok( sz == 5, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"PropB"), "wrong output (%s)\n",buffer);
MsiSetPropertyA(package, "PropA", "surprise");
@@ -2127,7 +2126,7 @@ static void test_formatrecord_package(void)
MsiRecordSetStringA(hrec, 0, "[[PropC]]");
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 0, "size wrong(%i)\n",sz);
+ ok( sz == 0, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer);
MsiSetPropertyA(package, "PropA", "surprise");
@@ -2137,7 +2136,7 @@ static void test_formatrecord_package(void)
MsiRecordSetStringA(hrec, 0, "[[PropC]]");
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 7, "size wrong(%i)\n",sz);
+ ok( sz == 7, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"[PropA]"), "wrong output (%s)\n",buffer);
MsiSetPropertyA(package, "PropA", "surprise");
@@ -2147,7 +2146,7 @@ static void test_formatrecord_package(void)
MsiRecordSetStringA(hrec, 0, "[[PropC]]");
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 5, "size wrong(%i)\n",sz);
+ ok( sz == 5, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"PropA"), "wrong output (%s)\n",buffer);
MsiSetPropertyA(package, "PropA", "surprise");
@@ -2157,7 +2156,7 @@ static void test_formatrecord_package(void)
MsiRecordSetStringA(hrec, 0, "[[[PropC]]]");
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 8, "size wrong(%i)\n",sz);
+ ok( sz == 8, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"surprise"), "wrong output (%s)\n",buffer);
/* properties inside braces */
@@ -2165,7 +2164,7 @@ static void test_formatrecord_package(void)
MsiRecordSetStringA(hrec, 0, "{abcd}");
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 6, "size wrong(%i)\n",sz);
+ ok( sz == 6, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"{abcd}"), "wrong output (%s)\n",buffer);
MsiSetPropertyA(package, "one", "mercury");
@@ -2174,7 +2173,7 @@ static void test_formatrecord_package(void)
MsiRecordSetStringA(hrec, 0, "{a[one]bc[two]de[one]f}");
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed: %d\n", r);
- ok( sz == 25, "size wrong(%i)\n",sz);
+ ok( sz == 25, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"amercurybcvenusdemercuryf"), "wrong output (%s)\n",buffer);
MsiSetPropertyA(package, "one", "mercury");
@@ -2184,7 +2183,7 @@ static void test_formatrecord_package(void)
MsiRecordSetStringA(hrec, 0, "{a[one]bc[bad]de[two]f}");
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 0, "size wrong(%i)\n",sz);
+ ok( sz == 0, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer);
MsiSetPropertyA(package, "bad", "");
@@ -2192,7 +2191,7 @@ static void test_formatrecord_package(void)
MsiRecordSetStringA(hrec, 0, "{[bad]}");
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 0, "size wrong(%i)\n",sz);
+ ok( sz == 0, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer);
MsiSetPropertyA(package, "one", "mercury");
@@ -2202,7 +2201,7 @@ static void test_formatrecord_package(void)
ok( r == ERROR_SUCCESS, "format failed\n");
todo_wine
{
- ok( sz == 14, "size wrong(%i)\n",sz);
+ ok( sz == 14, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"abc{dmercuryef"), "wrong output (%s)\n",buffer);
}
@@ -2213,7 +2212,7 @@ static void test_formatrecord_package(void)
ok( r == ERROR_SUCCESS, "format failed\n");
todo_wine
{
- ok( sz == 15, "size wrong(%i)\n",sz);
+ ok( sz == 15, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"abc{dmercuryef}"), "wrong output (%s)\n",buffer);
}
@@ -2222,7 +2221,7 @@ static void test_formatrecord_package(void)
MsiRecordSetStringA(hrec, 0, "{abc}{{def}hi{j[one]k}}");
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 5, "size wrong(%i)\n",sz);
+ ok( sz == 5, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,"{abc}"), "wrong output (%s)\n",buffer);
MsiSetPropertyA(package, "one", "mercury");
@@ -2231,7 +2230,7 @@ static void test_formatrecord_package(void)
MsiRecordSetStringA(hrec, 0, "{{def}hi{j[one]k}}");
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok( r == ERROR_SUCCESS, "format failed\n");
- ok( sz == 0, "size wrong(%i)\n",sz);
+ ok( sz == 0, "size wrong(%lu)\n",sz);
ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer);
sz = sizeof(buffer);
@@ -2239,7 +2238,7 @@ static void test_formatrecord_package(void)
MsiRecordSetStringA(hrec, 1, "one");
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(sz == 13, "Expected 13, got %d\n",sz);
+ ok(sz == 13, "Expected 13, got %lu\n",sz);
ok(!lstrcmpA(buffer, "one {abcdef}"),
"Expected \"one {abcdef}\", got \"%s\"\n", buffer);
@@ -2248,7 +2247,7 @@ static void test_formatrecord_package(void)
MsiRecordSetStringA(hrec, 1, "one");
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(sz == 13, "Expected 13, got %d\n",sz);
+ ok(sz == 13, "Expected 13, got %lu\n",sz);
ok(!lstrcmpA(buffer, "one {abcdef}"),
"Expected \"one {abcdef}\", got \"%s\"\n", buffer);
@@ -2257,7 +2256,7 @@ static void test_formatrecord_package(void)
MsiRecordSetStringA(hrec, 1, "one");
r = MsiFormatRecordA(package, hrec, buffer, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(sz == 20, "Expected 20, got %d\n",sz);
+ ok(sz == 20, "Expected 20, got %lu\n",sz);
ok(!lstrcmpA(buffer, "one mercury {abcdef}"),
"Expected \"one mercury {abcdef}\", got \"%s\"\n", buffer);
diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c
index ae5b03e248c..a7388a917d8 100644
--- a/dlls/msi/tests/install.c
+++ b/dlls/msi/tests/install.c
@@ -2640,7 +2640,7 @@ static char *load_resource(const char *name)
GetTempFileNameA(".", name, 0, path);
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 %lu\n", path, GetLastError());
res = FindResourceA(NULL, name, "TESTDLL");
ok( res != 0, "couldn't find resource\n" );
@@ -2752,7 +2752,7 @@ static void remove_restore_point(DWORD seq_number)
res = pSRRemoveRestorePoint(seq_number);
if (res != ERROR_SUCCESS)
- trace("Failed to remove the restore point : %08x\n", res);
+ trace("Failed to remove the restore point: %#lx\n", res);
}
static LONG delete_key( HKEY key, LPCSTR subkey, REGSAM access )
@@ -2811,29 +2811,29 @@ static void test_MsiInstallProduct(void)
delete_pf_files();
res = RegOpenKeyExA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", 0, access, &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
size = MAX_PATH;
type = REG_SZ;
res = RegQueryValueExA(hkey, "Name", NULL, &type, (LPBYTE)path, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(path, "imaname"), "Expected imaname, got %s\n", path);
size = MAX_PATH;
type = REG_SZ;
res = RegQueryValueExA(hkey, "blah", NULL, &type, (LPBYTE)path, &size);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
size = sizeof(num);
type = REG_DWORD;
res = RegQueryValueExA(hkey, "number", NULL, &type, (LPBYTE)&num, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
- ok(num == 314, "Expected 314, got %d\n", num);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
+ ok(num == 314, "Expected 314, got %lu\n", num);
size = MAX_PATH;
type = REG_SZ;
res = RegQueryValueExA(hkey, "OrderTestName", NULL, &type, (LPBYTE)path, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(path, "OrderTestValue"), "Expected OrderTestValue, got %s\n", path);
delete_key(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", access);
@@ -2845,7 +2845,7 @@ static void test_MsiInstallProduct(void)
delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
RegDeleteKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest");
create_database(msifile, up_tables, ARRAY_SIZE(up_tables));
@@ -2857,7 +2857,7 @@ static void test_MsiInstallProduct(void)
delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
RegDeleteKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest");
create_database(msifile, up2_tables, ARRAY_SIZE(up2_tables));
@@ -2869,7 +2869,7 @@ static void test_MsiInstallProduct(void)
delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
RegDeleteKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest");
create_database(msifile, up3_tables, ARRAY_SIZE(up3_tables));
@@ -2881,7 +2881,7 @@ static void test_MsiInstallProduct(void)
delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
RegDeleteKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest");
create_database(msifile, up4_tables, ARRAY_SIZE(up4_tables));
@@ -2893,7 +2893,7 @@ static void test_MsiInstallProduct(void)
delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
create_database(msifile, up4_tables, ARRAY_SIZE(up4_tables));
@@ -2904,7 +2904,7 @@ static void test_MsiInstallProduct(void)
delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
create_database(msifile, up5_tables, ARRAY_SIZE(up5_tables));
@@ -2915,7 +2915,7 @@ static void test_MsiInstallProduct(void)
delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
create_database(msifile, up6_tables, ARRAY_SIZE(up6_tables));
@@ -2926,7 +2926,7 @@ static void test_MsiInstallProduct(void)
delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
create_database(msifile, up7_tables, ARRAY_SIZE(up7_tables));
@@ -2937,7 +2937,7 @@ static void test_MsiInstallProduct(void)
delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
r = MsiInstallProductA(msifile, "REMOVE=ALL FULL=1");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
@@ -3789,7 +3789,7 @@ static void generate_transform_manual(void)
STGM_WRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stm);
if (FAILED(r))
{
- ok(0, "failed to create stream %08x\n", r);
+ ok(0, "failed to create stream %#lx\n", r);
continue;
}
@@ -3996,16 +3996,16 @@ static void set_admin_property_stream(LPCSTR file)
MultiByteToWideChar(CP_ACP, 0, file, -1, fileW, MAX_PATH);
hr = StgOpenStorage(fileW, NULL, mode, NULL, 0, &stg);
- ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
if (!stg)
return;
hr = IStorage_CreateStream(stg, L"\x41ca\x4330\x3e71\x44b5\x4233\x45f5\x422c\x4836",
STGM_WRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stm);
- ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
hr = IStream_Write(stm, L"MYPROP=2718 MyProp=42", sizeof(L"MYPROP=2718 MyProp=42"), &count);
- ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
IStream_Release(stm);
IStorage_Release(stg);
@@ -4725,7 +4725,7 @@ static void test_sourcepath(void)
r = MsiInstallProductA(msifile, NULL);
ok(r == spmap[i].err, "%d: Expected %d, got %d\n", i, spmap[i].err, r);
ok(get_pf_file_size("msitest\\augustus") == spmap[i].size,
- "%d: Expected %d, got %d\n", i, spmap[i].size,
+ "%u: Expected %lu, got %lu\n", i, spmap[i].size,
get_pf_file_size("msitest\\augustus"));
if (r == ERROR_SUCCESS)
@@ -5062,7 +5062,7 @@ static void test_shortcut(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
- ok(SUCCEEDED(hr), "CoInitialize failed 0x%08x\n", hr);
+ ok(SUCCEEDED(hr), "CoInitialize failed %#lx\n", hr);
r = MsiInstallProductA(msifile, NULL);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
@@ -5070,7 +5070,7 @@ static void test_shortcut(void)
CoUninitialize();
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
- ok(SUCCEEDED(hr), "CoInitialize failed 0x%08x\n", hr);
+ ok(SUCCEEDED(hr), "CoInitialize failed %#lx\n", hr);
r = MsiInstallProductA(msifile, NULL);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
@@ -5262,14 +5262,14 @@ static void process_pending_renames(HKEY hkey)
BOOL found = FALSE;
ret = RegQueryValueExA(hkey, rename_ops, NULL, NULL, NULL, &size);
- ok(!ret, "RegQueryValueExA failed %d\n", ret);
+ ok(!ret, "RegQueryValueExA failed %ld\n", ret);
buf = malloc(size + 1);
buf2ptr = buf2 = calloc(1, size + 1);
ret = RegQueryValueExA(hkey, rename_ops, NULL, NULL, (LPBYTE)buf, &size);
buf[size] = 0;
- ok(!ret, "RegQueryValueExA failed %d\n", ret);
+ ok(!ret, "RegQueryValueExA failed %ld\n", ret);
if (ret) return;
for (src = buf; *src; src = dst + strlen(dst) + 1)
@@ -5300,12 +5300,12 @@ static void process_pending_renames(HKEY hkey)
{
if (dst[0] == '\\' && dst[1] == '?' && dst[2] == '?' && dst[3] == '\\') dst += 4;
fileret = MoveFileExA(src, dst, flags);
- ok(fileret, "Failed to move file %s -> %s (%u)\n", src, dst, GetLastError());
+ ok(fileret, "Failed to move file %s -> %s (%lu)\n", src, dst, GetLastError());
}
else
{
fileret = DeleteFileA(src);
- ok(fileret || broken(!fileret) /* win2k3 */, "Failed to delete file %s (%u)\n", src, GetLastError());
+ ok(fileret || broken(!fileret) /* win2k3 */, "Failed to delete file %s (%lu)\n", src, GetLastError());
}
}
@@ -5327,7 +5327,7 @@ static BOOL file_matches_data(LPCSTR file, LPCSTR data)
char buf[128];
handle = CreateFileA(file, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
- ok(handle != INVALID_HANDLE_VALUE, "failed to open %s (%u)\n", file, GetLastError());
+ ok(handle != INVALID_HANDLE_VALUE, "failed to open %s (%lu)\n", file, GetLastError());
if (ReadFile(handle, buf, sizeof(buf), &len, NULL) && len >= data_len)
{
@@ -5872,25 +5872,25 @@ static void test_mixed_package(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Wine\\msitest", 0, KEY_ALL_ACCESS|KEY_WOW64_32KEY, &hkey);
- ok(!res, "can't open 32-bit component key, got %d\n", res);
+ ok(!res, "can't open 32-bit component key, got %ld\n", res);
res = RegQueryValueExA(hkey, "test1", NULL, NULL, NULL, NULL);
- ok(!res, "expected RegQueryValueEx to succeed, got %d\n", res);
+ ok(!res, "expected RegQueryValueEx to succeed, got %ld\n", res);
res = RegQueryValueExA(hkey, "test2", NULL, NULL, NULL, NULL);
- ok(res, "expected RegQueryValueEx to fail, got %d\n", res);
+ ok(res, "expected RegQueryValueEx to fail, got %ld\n", res);
RegCloseKey(hkey);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Wine\\msitest", 0, KEY_ALL_ACCESS|KEY_WOW64_64KEY, &hkey);
- ok(!res, "can't open 64-bit component key, got %d\n", res);
+ ok(!res, "can't open 64-bit component key, got %ld\n", res);
res = RegQueryValueExA(hkey, "test1", NULL, NULL, NULL, NULL);
- ok(res, "expected RegQueryValueEx to fail, got %d\n", res);
+ ok(res, "expected RegQueryValueEx to fail, got %ld\n", res);
res = RegQueryValueExA(hkey, "test2", NULL, NULL, NULL, NULL);
- ok(!res, "expected RegQueryValueEx to succeed, got %d\n", res);
+ ok(!res, "expected RegQueryValueEx to succeed, got %ld\n", res);
RegCloseKey(hkey);
res = RegOpenKeyExA(HKEY_CLASSES_ROOT,
"CLSID\\{8dfef911-6885-41eb-b280-8f0304728e8b}\\InProcServer32",
0, KEY_ALL_ACCESS|KEY_WOW64_32KEY, &hkey);
- ok(res == ERROR_SUCCESS, "can't open 32-bit CLSID key, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "can't open 32-bit CLSID key, got %ld\n", res);
if (res == ERROR_SUCCESS) {
size = sizeof(value);
res = RegQueryValueExA(hkey, "", NULL, NULL, (LPBYTE)value, &size);
@@ -5901,7 +5901,7 @@ static void test_mixed_package(void)
res = RegOpenKeyExA(HKEY_CLASSES_ROOT,
"CLSID\\{8dfef911-6885-41eb-b280-8f0304728e8b}\\InProcServer32",
0, KEY_ALL_ACCESS|KEY_WOW64_64KEY, &hkey);
- ok(res == ERROR_SUCCESS, "can't open 64-bit CLSID key, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "can't open 64-bit CLSID key, got %ld\n", res);
if (res == ERROR_SUCCESS) {
size = sizeof(value);
res = RegQueryValueExA(hkey, "", NULL, NULL, (LPBYTE)value, &size);
@@ -5935,25 +5935,25 @@ static void test_mixed_package(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Wine\\msitest", 0, KEY_ALL_ACCESS|KEY_WOW64_32KEY, &hkey);
- ok(!res, "can't open 32-bit component key, got %d\n", res);
+ ok(!res, "can't open 32-bit component key, got %ld\n", res);
res = RegQueryValueExA(hkey, "test1", NULL, NULL, NULL, NULL);
- ok(!res, "expected RegQueryValueEx to succeed, got %d\n", res);
+ ok(!res, "expected RegQueryValueEx to succeed, got %ld\n", res);
res = RegQueryValueExA(hkey, "test2", NULL, NULL, NULL, NULL);
- ok(res, "expected RegQueryValueEx to fail, got %d\n", res);
+ ok(res, "expected RegQueryValueEx to fail, got %ld\n", res);
RegCloseKey(hkey);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Wine\\msitest", 0, KEY_ALL_ACCESS|KEY_WOW64_64KEY, &hkey);
- ok(!res, "can't open 64-bit component key, got %d\n", res);
+ ok(!res, "can't open 64-bit component key, got %ld\n", res);
res = RegQueryValueExA(hkey, "test1", NULL, NULL, NULL, NULL);
- ok(res, "expected RegQueryValueEx to fail, got %d\n", res);
+ ok(res, "expected RegQueryValueEx to fail, got %ld\n", res);
res = RegQueryValueExA(hkey, "test2", NULL, NULL, NULL, NULL);
- ok(!res, "expected RegQueryValueEx to succeed, got %d\n", res);
+ ok(!res, "expected RegQueryValueEx to succeed, got %ld\n", res);
RegCloseKey(hkey);
res = RegOpenKeyExA(HKEY_CLASSES_ROOT,
"CLSID\\{8dfef911-6885-41eb-b280-8f0304728e8b}\\InProcServer32",
0, KEY_ALL_ACCESS|KEY_WOW64_32KEY, &hkey);
- ok(res == ERROR_SUCCESS, "can't open 32-bit CLSID key, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "can't open 32-bit CLSID key, got %ld\n", res);
if (res == ERROR_SUCCESS) {
size = sizeof(value);
res = RegQueryValueExA(hkey, "", NULL, NULL, (LPBYTE)value, &size);
@@ -5964,7 +5964,7 @@ static void test_mixed_package(void)
res = RegOpenKeyExA(HKEY_CLASSES_ROOT,
"CLSID\\{8dfef911-6885-41eb-b280-8f0304728e8b}\\InProcServer32",
0, KEY_ALL_ACCESS|KEY_WOW64_64KEY, &hkey);
- ok(res == ERROR_SUCCESS, "can't open 64-bit CLSID key, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "can't open 64-bit CLSID key, got %ld\n", res);
if (res == ERROR_SUCCESS) {
size = sizeof(value);
res = RegQueryValueExA(hkey, "", NULL, NULL, (LPBYTE)value, &size);
@@ -6092,15 +6092,15 @@ static void test_remove_upgrade_code(void)
res = RegOpenKeyExA( HKEY_LOCAL_MACHINE,
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UpgradeCodes\\51AAE0C44620A5E4788506E91F249BD2",
0, access, &hkey );
- ok( res == ERROR_SUCCESS, "got %d\n", res );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
type = 0xdeadbeef;
buf[0] = 0x55;
size = sizeof(buf);
res = RegQueryValueExA( hkey, "94A88FD7F6998CE40A22FB59F6B9C2BB", NULL, &type, (BYTE *)buf, &size );
- ok( res == ERROR_SUCCESS, "got %d\n", res );
- ok( type == REG_SZ, "got %u\n", type );
- ok( size == 1, "got %u\n", size );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
+ ok( type == REG_SZ, "got %lu\n", type );
+ ok( size == 1, "got %lu\n", size );
ok( !buf[0], "wrong data\n" );
RegCloseKey( hkey );
@@ -6110,7 +6110,7 @@ static void test_remove_upgrade_code(void)
res = RegOpenKeyExA( HKEY_LOCAL_MACHINE,
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UpgradeCodes\\51AAE0C44620A5E4788506E91F249BD2",
0, access, &hkey );
- ok( res == ERROR_FILE_NOT_FOUND, "got %d\n", res );
+ ok( res == ERROR_FILE_NOT_FOUND, "got %ld\n", res );
RemoveDirectoryA( "msitest" );
DeleteFileA( msifile );
@@ -6153,7 +6153,7 @@ static void check_file_matches(const char *filename, const char *text)
file = CreateFileA(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL);
ReadFile(file, buffer, sizeof(buffer), &size, NULL);
- ok(size == strlen(text) && !memcmp(buffer, text, size), "got %.*s\n", size, buffer);
+ ok(size == strlen(text) && !memcmp(buffer, text, size), "got %.*s\n", (int)size, buffer);
CloseHandle(file);
}
diff --git a/dlls/msi/tests/msi.c b/dlls/msi/tests/msi.c
index 7bfddee4e4e..39cbaf56b79 100644
--- a/dlls/msi/tests/msi.c
+++ b/dlls/msi/tests/msi.c
@@ -1231,7 +1231,7 @@ static void create_test_guid(LPSTR prodcode, LPSTR squashed)
int size;
hr = CoCreateGuid(&guid);
- ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
size = StringFromGUID2(&guid, guidW, ARRAY_SIZE(guidW));
ok(size == GUID_SIZE, "Expected %d, got %d.\n", GUID_SIZE, size);
@@ -1287,42 +1287,42 @@ static void test_MsiQueryProductState(void)
state = MsiQueryProductStateA(NULL);
error = GetLastError();
ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
/* empty prodcode */
SetLastError(0xdeadbeef);
state = MsiQueryProductStateA("");
error = GetLastError();
ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
/* garbage prodcode */
SetLastError(0xdeadbeef);
state = MsiQueryProductStateA("garbage");
error = GetLastError();
ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
/* guid without brackets */
SetLastError(0xdeadbeef);
state = MsiQueryProductStateA("6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D");
error = GetLastError();
ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
/* guid with brackets */
SetLastError(0xdeadbeef);
state = MsiQueryProductStateA("{6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D}");
error = GetLastError();
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
/* same length as guid, but random */
SetLastError(0xdeadbeef);
state = MsiQueryProductStateA("A938G02JF-2NF3N93-VN3-2NNF-3KGKALDNF93");
error = GetLastError();
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
/* MSIINSTALLCONTEXT_USERUNMANAGED */
@@ -1330,20 +1330,20 @@ static void test_MsiQueryProductState(void)
state = MsiQueryProductStateA(prodcode);
error = GetLastError();
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\");
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &userkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user product key exists */
SetLastError(0xdeadbeef);
state = MsiQueryProductStateA(prodcode);
error = GetLastError();
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\");
lstrcatA(keypath, prodcode);
@@ -1357,25 +1357,25 @@ static void test_MsiQueryProductState(void)
LocalFree(usersid);
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local uninstall key exists */
SetLastError(0xdeadbeef);
state = MsiQueryProductStateA(prodcode);
error = GetLastError();
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
data = 1;
res = RegSetValueExA(localkey, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&data, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* WindowsInstaller value exists */
SetLastError(0xdeadbeef);
state = MsiQueryProductStateA(prodcode);
error = GetLastError();
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
RegDeleteValueA(localkey, "WindowsInstaller");
delete_key(localkey, "", access & KEY_WOW64_64KEY);
@@ -1394,28 +1394,28 @@ static void test_MsiQueryProductState(void)
LocalFree(usersid);
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local product key exists */
SetLastError(0xdeadbeef);
state = MsiQueryProductStateA(prodcode);
error = GetLastError();
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
res = RegCreateKeyExA(localkey, "InstallProperties", 0, NULL, 0, access, NULL, &props, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* install properties key exists */
SetLastError(0xdeadbeef);
state = MsiQueryProductStateA(prodcode);
error = GetLastError();
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
data = 1;
res = RegSetValueExA(props, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&data, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* WindowsInstaller value exists */
SetLastError(0xdeadbeef);
@@ -1435,18 +1435,18 @@ static void test_MsiQueryProductState(void)
return;
}
ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
data = 2;
res = RegSetValueExA(props, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&data, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* WindowsInstaller value is not 1 */
SetLastError(0xdeadbeef);
state = MsiQueryProductStateA(prodcode);
error = GetLastError();
ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
RegDeleteKeyA(userkey, "");
@@ -1455,7 +1455,7 @@ static void test_MsiQueryProductState(void)
state = MsiQueryProductStateA(prodcode);
error = GetLastError();
ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
RegDeleteValueA(props, "WindowsInstaller");
delete_key(props, "", access & KEY_WOW64_64KEY);
@@ -1473,7 +1473,7 @@ static void test_MsiQueryProductState(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &prodkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryProductStateA(prodcode);
ok(state == INSTALLSTATE_ADVERTISED,
@@ -1485,14 +1485,14 @@ static void test_MsiQueryProductState(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &localkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryProductStateA(prodcode);
ok(state == INSTALLSTATE_ADVERTISED,
"Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
res = RegCreateKeyExA(localkey, "InstallProperties", 0, NULL, 0, access, NULL, &props, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryProductStateA(prodcode);
ok(state == INSTALLSTATE_ADVERTISED,
@@ -1500,7 +1500,7 @@ static void test_MsiQueryProductState(void)
data = 1;
res = RegSetValueExA(props, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&data, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* WindowsInstaller value exists */
state = MsiQueryProductStateA(prodcode);
@@ -1526,7 +1526,7 @@ static void test_MsiQueryProductState(void)
LocalFree( usersid );
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryProductStateA(prodcode);
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
@@ -1536,14 +1536,14 @@ static void test_MsiQueryProductState(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &localkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryProductStateA(prodcode);
ok(state == INSTALLSTATE_ADVERTISED,
"Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
res = RegCreateKeyExA(localkey, "InstallProperties", 0, NULL, 0, access, NULL, &props, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryProductStateA(prodcode);
ok(state == INSTALLSTATE_ADVERTISED,
@@ -1551,7 +1551,7 @@ static void test_MsiQueryProductState(void)
data = 1;
res = RegSetValueExA(props, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&data, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* WindowsInstaller value exists */
state = MsiQueryProductStateA(prodcode);
@@ -1608,10 +1608,10 @@ static void compose_base85_guid(LPSTR component, LPSTR comp_base85, LPSTR squash
int size;
hr = CoCreateGuid(&guid);
- ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
size = StringFromGUID2(&guid, guidW, MAX_PATH);
- ok(size == 39, "Expected 39, got %d\n", hr);
+ ok(size == 39, "Expected 39, got %d\n", size);
WideCharToMultiByte(CP_ACP, 0, guidW, size, component, MAX_PATH, NULL, NULL);
encode_base85_guid(&guid, base85W);
@@ -1648,63 +1648,63 @@ static void test_MsiQueryFeatureState(void)
state = MsiQueryFeatureStateA(NULL, "feature");
error = GetLastError();
ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
/* empty prodcode */
SetLastError(0xdeadbeef);
state = MsiQueryFeatureStateA("", "feature");
error = GetLastError();
ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
/* garbage prodcode */
SetLastError(0xdeadbeef);
state = MsiQueryFeatureStateA("garbage", "feature");
error = GetLastError();
ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
/* guid without brackets */
SetLastError(0xdeadbeef);
state = MsiQueryFeatureStateA("6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D", "feature");
error = GetLastError();
ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
/* guid with brackets */
SetLastError(0xdeadbeef);
state = MsiQueryFeatureStateA("{6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D}", "feature");
error = GetLastError();
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
/* same length as guid, but random */
SetLastError(0xdeadbeef);
state = MsiQueryFeatureStateA("A938G02JF-2NF3N93-VN3-2NNF-3KGKALDNF93", "feature");
error = GetLastError();
ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
/* NULL szFeature */
SetLastError(0xdeadbeef);
state = MsiQueryFeatureStateA(prodcode, NULL);
error = GetLastError();
ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
/* empty szFeature */
SetLastError(0xdeadbeef);
state = MsiQueryFeatureStateA(prodcode, "");
error = GetLastError();
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
/* feature key does not exist yet */
SetLastError(0xdeadbeef);
state = MsiQueryFeatureStateA(prodcode, "feature");
error = GetLastError();
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
/* MSIINSTALLCONTEXT_USERUNMANAGED */
@@ -1712,24 +1712,24 @@ static void test_MsiQueryFeatureState(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &userkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* feature key exists */
SetLastError(0xdeadbeef);
state = MsiQueryFeatureStateA(prodcode, "feature");
error = GetLastError();
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
res = RegSetValueExA(userkey, "feature", 0, REG_SZ, (const BYTE *)"", 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* feature value exists */
SetLastError(0xdeadbeef);
state = MsiQueryFeatureStateA(prodcode, "feature");
error = GetLastError();
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
lstrcatA(keypath, usersid);
@@ -1746,50 +1746,50 @@ static void test_MsiQueryFeatureState(void)
LocalFree(usersid);
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* userdata features key exists */
SetLastError(0xdeadbeef);
state = MsiQueryFeatureStateA(prodcode, "feature");
error = GetLastError();
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)"aaaaaaaaaaaaaaaaaaa", 20);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
SetLastError(0xdeadbeef);
state = MsiQueryFeatureStateA(prodcode, "feature");
error = GetLastError();
ok(state == INSTALLSTATE_BADCONFIG, "Expected INSTALLSTATE_BADCONFIG, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)"aaaaaaaaaaaaaaaaaaaa", 21);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
SetLastError(0xdeadbeef);
state = MsiQueryFeatureStateA(prodcode, "feature");
error = GetLastError();
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)"aaaaaaaaaaaaaaaaaaaaa", 22);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
SetLastError(0xdeadbeef);
state = MsiQueryFeatureStateA(prodcode, "feature");
error = GetLastError();
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)comp_base85, 41);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
SetLastError(0xdeadbeef);
state = MsiQueryFeatureStateA(prodcode, "feature");
error = GetLastError();
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
lstrcatA(keypath, usersid);
@@ -1797,7 +1797,7 @@ static void test_MsiQueryFeatureState(void)
lstrcatA(keypath, comp_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &compkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
lstrcatA(keypath, usersid);
@@ -1805,81 +1805,81 @@ static void test_MsiQueryFeatureState(void)
lstrcatA(keypath, comp_squashed2);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &compkey2, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
SetLastError(0xdeadbeef);
state = MsiQueryFeatureStateA(prodcode, "feature");
error = GetLastError();
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"", 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
SetLastError(0xdeadbeef);
state = MsiQueryFeatureStateA(prodcode, "feature");
error = GetLastError();
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"apple", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
SetLastError(0xdeadbeef);
state = MsiQueryFeatureStateA(prodcode, "feature");
error = GetLastError();
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
res = RegSetValueExA(compkey2, prod_squashed, 0, REG_SZ, (const BYTE *)"orange", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* INSTALLSTATE_LOCAL */
SetLastError(0xdeadbeef);
state = MsiQueryFeatureStateA(prodcode, "feature");
error = GetLastError();
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"01\\", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* INSTALLSTATE_SOURCE */
SetLastError(0xdeadbeef);
state = MsiQueryFeatureStateA(prodcode, "feature");
error = GetLastError();
ok(state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"01", 3);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* bad INSTALLSTATE_SOURCE */
SetLastError(0xdeadbeef);
state = MsiQueryFeatureStateA(prodcode, "feature");
error = GetLastError();
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"01a", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* INSTALLSTATE_SOURCE */
SetLastError(0xdeadbeef);
state = MsiQueryFeatureStateA(prodcode, "feature");
error = GetLastError();
ok(state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"01", 3);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* bad INSTALLSTATE_SOURCE */
SetLastError(0xdeadbeef);
state = MsiQueryFeatureStateA(prodcode, "feature");
error = GetLastError();
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
- ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error);
+ ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %lu\n", error);
RegDeleteValueA(compkey, prod_squashed);
RegDeleteValueA(compkey2, prod_squashed);
@@ -1901,14 +1901,14 @@ static void test_MsiQueryFeatureState(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &userkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* feature key exists */
state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
res = RegSetValueExA(userkey, "feature", 0, REG_SZ, (const BYTE *)"", 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* feature value exists */
state = MsiQueryFeatureStateA(prodcode, "feature");
@@ -1921,32 +1921,32 @@ static void test_MsiQueryFeatureState(void)
lstrcatA(keypath, "\\Features");
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &localkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* userdata features key exists */
state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)"aaaaaaaaaaaaaaaaaaa", 20);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_BADCONFIG, "Expected INSTALLSTATE_BADCONFIG, got %d\n", state);
res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)"aaaaaaaaaaaaaaaaaaaa", 21);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)"aaaaaaaaaaaaaaaaaaaaa", 22);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)comp_base85, 41);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
@@ -1957,7 +1957,7 @@ static void test_MsiQueryFeatureState(void)
lstrcatA(keypath, comp_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &compkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
lstrcatA(keypath, usersid);
@@ -1965,25 +1965,25 @@ static void test_MsiQueryFeatureState(void)
lstrcatA(keypath, comp_squashed2);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &compkey2, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"", 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"apple", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
res = RegSetValueExA(compkey2, prod_squashed, 0, REG_SZ, (const BYTE *)"orange", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
@@ -2012,14 +2012,14 @@ static void test_MsiQueryFeatureState(void)
LocalFree( usersid );
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* feature key exists */
state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
res = RegSetValueExA(userkey, "feature", 0, REG_SZ, (const BYTE *)"", 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* feature value exists */
state = MsiQueryFeatureStateA(prodcode, "feature");
@@ -2031,32 +2031,32 @@ static void test_MsiQueryFeatureState(void)
lstrcatA(keypath, "\\Features");
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &localkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* userdata features key exists */
state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)"aaaaaaaaaaaaaaaaaaa", 20);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_BADCONFIG, "Expected INSTALLSTATE_BADCONFIG, got %d\n", state);
res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)"aaaaaaaaaaaaaaaaaaaa", 21);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)"aaaaaaaaaaaaaaaaaaaaa", 22);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)comp_base85, 41);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
@@ -2066,32 +2066,32 @@ static void test_MsiQueryFeatureState(void)
lstrcatA(keypath, comp_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &compkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
lstrcatA(keypath, "S-1-5-18\\Components\\");
lstrcatA(keypath, comp_squashed2);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &compkey2, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"", 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"apple", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state);
res = RegSetValueExA(compkey2, prod_squashed, 0, REG_SZ, (const BYTE *)"orange", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MsiQueryFeatureStateA(prodcode, "feature");
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
@@ -2148,7 +2148,7 @@ static void test_MsiQueryComponentState(void)
error = GetLastError();
ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(state == MAGIC_ERROR, "Expected 0xdeadbeef, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
/* empty szProductCode */
state = MAGIC_ERROR;
@@ -2157,7 +2157,7 @@ static void test_MsiQueryComponentState(void)
error = GetLastError();
ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(state == MAGIC_ERROR, "Expected 0xdeadbeef, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
/* random szProductCode */
state = MAGIC_ERROR;
@@ -2166,7 +2166,7 @@ static void test_MsiQueryComponentState(void)
error = GetLastError();
ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(state == MAGIC_ERROR, "Expected 0xdeadbeef, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
/* GUID-length szProductCode */
state = MAGIC_ERROR;
@@ -2175,7 +2175,7 @@ static void test_MsiQueryComponentState(void)
error = GetLastError();
ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(state == MAGIC_ERROR, "Expected 0xdeadbeef, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
/* GUID-length with brackets */
state = MAGIC_ERROR;
@@ -2184,7 +2184,7 @@ static void test_MsiQueryComponentState(void)
error = GetLastError();
ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(state == MAGIC_ERROR, "Expected 0xdeadbeef, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
/* actual GUID */
state = MAGIC_ERROR;
@@ -2193,7 +2193,7 @@ static void test_MsiQueryComponentState(void)
error = GetLastError();
ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(state == MAGIC_ERROR, "Expected 0xdeadbeef, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
state = MAGIC_ERROR;
SetLastError(0xdeadbeef);
@@ -2201,7 +2201,7 @@ static void test_MsiQueryComponentState(void)
error = GetLastError();
ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(state == MAGIC_ERROR, "Expected 0xdeadbeef, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\");
lstrcatA(keypath, prod_squashed);
@@ -2213,7 +2213,7 @@ static void test_MsiQueryComponentState(void)
LocalFree(usersid);
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MAGIC_ERROR;
SetLastError(0xdeadbeef);
@@ -2221,7 +2221,7 @@ static void test_MsiQueryComponentState(void)
error = GetLastError();
ok(r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
delete_key(prodkey, "", access & KEY_WOW64_64KEY);
RegCloseKey(prodkey);
@@ -2238,7 +2238,7 @@ static void test_MsiQueryComponentState(void)
LocalFree(usersid);
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local system product key exists */
state = MAGIC_ERROR;
@@ -2246,10 +2246,10 @@ static void test_MsiQueryComponentState(void)
error = GetLastError();
ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(state == MAGIC_ERROR, "Expected 0xdeadbeef, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
res = RegSetValueExA(prodkey, "LocalPackage", 0, REG_SZ, (const BYTE *)"msitest.msi", 11);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* LocalPackage value exists */
state = MAGIC_ERROR;
@@ -2258,13 +2258,13 @@ static void test_MsiQueryComponentState(void)
error = GetLastError();
ok(r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\S-1-5-18\\Components\\");
lstrcatA(keypath, comp_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &compkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* component key exists */
state = MAGIC_ERROR;
@@ -2273,10 +2273,10 @@ static void test_MsiQueryComponentState(void)
error = GetLastError();
ok(r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"", 0);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* component\product exists */
state = MAGIC_ERROR;
@@ -2286,7 +2286,7 @@ static void test_MsiQueryComponentState(void)
error = GetLastError();
ok(state == INSTALLSTATE_NOTUSED || state == INSTALLSTATE_LOCAL,
"Expected INSTALLSTATE_NOTUSED or INSTALLSTATE_LOCAL, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
/* NULL component, product exists */
state = MAGIC_ERROR;
@@ -2295,10 +2295,10 @@ static void test_MsiQueryComponentState(void)
error = GetLastError();
ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(state == MAGIC_ERROR, "Expected state not changed, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"hi", 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* INSTALLSTATE_LOCAL */
state = MAGIC_ERROR;
@@ -2307,10 +2307,10 @@ static void test_MsiQueryComponentState(void)
error = GetLastError();
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"01\\", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* INSTALLSTATE_SOURCE */
state = MAGIC_ERROR;
@@ -2319,10 +2319,10 @@ static void test_MsiQueryComponentState(void)
error = GetLastError();
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"01", 3);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* bad INSTALLSTATE_SOURCE */
state = MAGIC_ERROR;
@@ -2331,10 +2331,10 @@ static void test_MsiQueryComponentState(void)
error = GetLastError();
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"01a", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* INSTALLSTATE_SOURCE */
state = MAGIC_ERROR;
@@ -2343,10 +2343,10 @@ static void test_MsiQueryComponentState(void)
error = GetLastError();
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"01:", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* registry component */
state = MAGIC_ERROR;
@@ -2355,7 +2355,7 @@ static void test_MsiQueryComponentState(void)
error = GetLastError();
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
- ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
+ ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %lu\n", error);
RegDeleteValueA(prodkey, "LocalPackage");
delete_key(prodkey, "", access & KEY_WOW64_64KEY);
@@ -2375,7 +2375,7 @@ static void test_MsiQueryComponentState(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &prodkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MAGIC_ERROR;
r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, component, &state);
@@ -2392,10 +2392,10 @@ static void test_MsiQueryComponentState(void)
lstrcatA(keypath, "\\InstallProperties");
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &prodkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(prodkey, "LocalPackage", 0, REG_SZ, (const BYTE *)"msitest.msi", 11);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
RegCloseKey(prodkey);
@@ -2410,7 +2410,7 @@ static void test_MsiQueryComponentState(void)
lstrcatA(keypath, comp_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &compkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* component key exists */
state = MAGIC_ERROR;
@@ -2419,7 +2419,7 @@ static void test_MsiQueryComponentState(void)
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"", 0);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* component\product exists */
state = MAGIC_ERROR;
@@ -2429,7 +2429,7 @@ static void test_MsiQueryComponentState(void)
"Expected INSTALLSTATE_NOTUSED or INSTALLSTATE_LOCAL, got %d\n", state);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"hi", 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MAGIC_ERROR;
r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, component, &state);
@@ -2447,7 +2447,7 @@ static void test_MsiQueryComponentState(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &prodkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MAGIC_ERROR;
r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERMANAGED, component, &state);
@@ -2463,7 +2463,7 @@ static void test_MsiQueryComponentState(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &prodkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MAGIC_ERROR;
r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERMANAGED, component, &state);
@@ -2480,10 +2480,10 @@ static void test_MsiQueryComponentState(void)
lstrcatA(keypath, "\\InstallProperties");
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &prodkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(prodkey, "ManagedLocalPackage", 0, REG_SZ, (const BYTE *)"msitest.msi", 11);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
state = MAGIC_ERROR;
r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERMANAGED, component, &state);
@@ -2527,51 +2527,51 @@ static void test_MsiGetComponentPath(void)
size = MAX_PATH;
state = MsiGetComponentPathA(NULL, component, path, &size);
ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* NULL szComponent */
size = MAX_PATH;
state = MsiGetComponentPathA(prodcode, NULL, path, &size);
ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
size = MAX_PATH;
state = MsiLocateComponentA(NULL, path, &size);
ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* NULL lpPathBuf */
size = MAX_PATH;
state = MsiGetComponentPathA(prodcode, component, NULL, &size);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
size = MAX_PATH;
state = MsiLocateComponentA(component, NULL, &size);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* NULL pcchBuf */
size = MAX_PATH;
state = MsiGetComponentPathA(prodcode, component, path, NULL);
ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
size = MAX_PATH;
state = MsiLocateComponentA(component, path, NULL);
ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* all params valid */
size = MAX_PATH;
state = MsiGetComponentPathA(prodcode, component, path, &size);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
size = MAX_PATH;
state = MsiLocateComponentA(component, path, &size);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\");
lstrcatA(keypath, "Installer\\UserData\\S-1-5-18\\Components\\");
@@ -2584,21 +2584,21 @@ static void test_MsiGetComponentPath(void)
LocalFree(usersid);
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local system component key exists */
size = MAX_PATH;
state = MsiGetComponentPathA(prodcode, component, path, &size);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
size = MAX_PATH;
state = MsiLocateComponentA(component, path, &size);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"C:\\imapath", 10);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* product value exists */
path[0] = 0;
@@ -2606,14 +2606,14 @@ static void test_MsiGetComponentPath(void)
state = MsiGetComponentPathA(prodcode, component, path, &size);
ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
path[0] = 0;
size = MAX_PATH;
state = MsiLocateComponentA(component, path, &size);
ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\");
lstrcatA(keypath, "Installer\\UserData\\S-1-5-18\\Products\\");
@@ -2621,11 +2621,11 @@ static void test_MsiGetComponentPath(void)
lstrcatA(keypath, "\\InstallProperties");
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &installprop, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
val = 1;
res = RegSetValueExA(installprop, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* install properties key exists */
path[0] = 0;
@@ -2633,14 +2633,14 @@ static void test_MsiGetComponentPath(void)
state = MsiGetComponentPathA(prodcode, component, path, &size);
ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
path[0] = 0;
size = MAX_PATH;
state = MsiLocateComponentA(component, path, &size);
ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
create_file("C:\\imapath", 11);
@@ -2650,28 +2650,28 @@ static void test_MsiGetComponentPath(void)
state = MsiGetComponentPathA(prodcode, component, path, &size);
ok(state == INSTALLSTATE_MOREDATA, "Expected INSTALLSTATE_MOREDATA, got %d\n", state);
ok(path[0] == 'a', "got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
path[0] = 0;
size = MAX_PATH;
state = MsiGetComponentPathA(prodcode, component, path, &size);
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
size = 0;
path[0] = 'a';
state = MsiLocateComponentA(component, path, &size);
ok(state == INSTALLSTATE_MOREDATA, "Expected INSTALLSTATE_MOREDATA, got %d\n", state);
ok(path[0] == 'a', "got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
path[0] = 0;
size = MAX_PATH;
state = MsiLocateComponentA(component, path, &size);
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
RegDeleteValueA(compkey, prod_squashed);
delete_key(compkey, "", access & KEY_WOW64_64KEY);
@@ -2688,21 +2688,21 @@ static void test_MsiGetComponentPath(void)
lstrcatA(keypath, comp_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &compkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user managed component key exists */
size = MAX_PATH;
state = MsiGetComponentPathA(prodcode, component, path, &size);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %ld\n", size);
size = MAX_PATH;
state = MsiLocateComponentA(component, path, &size);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %ld\n", size);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"C:\\imapath", 10);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* product value exists */
path[0] = 0;
@@ -2710,14 +2710,14 @@ static void test_MsiGetComponentPath(void)
state = MsiGetComponentPathA(prodcode, component, path, &size);
ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
path[0] = 0;
size = MAX_PATH;
state = MsiLocateComponentA(component, path, &size);
ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\");
lstrcatA(keypath, "Installer\\UserData\\S-1-5-18\\Products\\");
@@ -2725,11 +2725,11 @@ static void test_MsiGetComponentPath(void)
lstrcatA(keypath, "\\InstallProperties");
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &installprop, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
val = 1;
res = RegSetValueExA(installprop, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* install properties key exists */
path[0] = 0;
@@ -2737,14 +2737,14 @@ static void test_MsiGetComponentPath(void)
state = MsiGetComponentPathA(prodcode, component, path, &size);
ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
path[0] = 0;
size = MAX_PATH;
state = MsiLocateComponentA(component, path, &size);
ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
create_file("C:\\imapath", 11);
@@ -2754,14 +2754,14 @@ static void test_MsiGetComponentPath(void)
state = MsiGetComponentPathA(prodcode, component, path, &size);
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
path[0] = 0;
size = MAX_PATH;
state = MsiLocateComponentA(component, path, &size);
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
RegDeleteValueA(compkey, prod_squashed);
delete_key(compkey, "", access & KEY_WOW64_64KEY);
@@ -2778,18 +2778,18 @@ static void test_MsiGetComponentPath(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &prodkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user managed product key exists */
size = MAX_PATH;
state = MsiGetComponentPathA(prodcode, component, path, &size);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
size = MAX_PATH;
state = MsiLocateComponentA(component, path, &size);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\");
lstrcatA(keypath, "Installer\\UserData\\");
@@ -2798,21 +2798,21 @@ static void test_MsiGetComponentPath(void)
lstrcatA(keypath, comp_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &compkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user managed component key exists */
size = MAX_PATH;
state = MsiGetComponentPathA(prodcode, component, path, &size);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
size = MAX_PATH;
state = MsiLocateComponentA(component, path, &size);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"C:\\imapath", 10);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* product value exists */
path[0] = 0;
@@ -2820,14 +2820,14 @@ static void test_MsiGetComponentPath(void)
state = MsiGetComponentPathA(prodcode, component, path, &size);
ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
path[0] = 0;
size = MAX_PATH;
state = MsiLocateComponentA(component, path, &size);
ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\");
lstrcatA(keypath, "Installer\\UserData\\S-1-5-18\\Products\\");
@@ -2835,11 +2835,11 @@ static void test_MsiGetComponentPath(void)
lstrcatA(keypath, "\\InstallProperties");
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &installprop, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
val = 1;
res = RegSetValueExA(installprop, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* install properties key exists */
path[0] = 0;
@@ -2847,14 +2847,14 @@ static void test_MsiGetComponentPath(void)
state = MsiGetComponentPathA(prodcode, component, path, &size);
ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
path[0] = 0;
size = MAX_PATH;
state = MsiLocateComponentA(component, path, &size);
ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
create_file("C:\\imapath", 11);
@@ -2864,14 +2864,14 @@ static void test_MsiGetComponentPath(void)
state = MsiGetComponentPathA(prodcode, component, path, &size);
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
path[0] = 0;
size = MAX_PATH;
state = MsiLocateComponentA(component, path, &size);
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
RegDeleteValueA(compkey, prod_squashed);
delete_key(prodkey, "", access & KEY_WOW64_64KEY);
@@ -2887,18 +2887,18 @@ static void test_MsiGetComponentPath(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &prodkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user unmanaged product key exists */
size = MAX_PATH;
state = MsiGetComponentPathA(prodcode, component, path, &size);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
size = MAX_PATH;
state = MsiLocateComponentA(component, path, &size);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\");
lstrcatA(keypath, "Installer\\UserData\\");
@@ -2907,21 +2907,21 @@ static void test_MsiGetComponentPath(void)
lstrcatA(keypath, comp_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &compkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user unmanaged component key exists */
size = MAX_PATH;
state = MsiGetComponentPathA(prodcode, component, path, &size);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %ld\n", size);
size = MAX_PATH;
state = MsiLocateComponentA(component, path, &size);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %ld\n", size);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"C:\\imapath", 10);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* product value exists */
path[0] = 0;
@@ -2929,14 +2929,14 @@ static void test_MsiGetComponentPath(void)
state = MsiGetComponentPathA(prodcode, component, path, &size);
ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
path[0] = 0;
size = MAX_PATH;
state = MsiLocateComponentA(component, path, &size);
ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
create_file("C:\\imapath", 11);
@@ -2946,14 +2946,14 @@ static void test_MsiGetComponentPath(void)
state = MsiGetComponentPathA(prodcode, component, path, &size);
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
path[0] = 0;
size = MAX_PATH;
state = MsiLocateComponentA(component, path, &size);
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
RegDeleteValueA(compkey, prod_squashed);
RegDeleteKeyA(prodkey, "");
@@ -2972,39 +2972,39 @@ static void test_MsiGetComponentPath(void)
LocalFree( usersid );
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local classes product key exists */
size = MAX_PATH;
state = MsiGetComponentPathA(prodcode, component, path, &size);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
size = MAX_PATH;
state = MsiLocateComponentA(component, path, &size);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\");
lstrcatA(keypath, "Installer\\UserData\\S-1-5-18\\Components\\");
lstrcatA(keypath, comp_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &compkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local user component key exists */
size = MAX_PATH;
state = MsiGetComponentPathA(prodcode, component, path, &size);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %ld\n", size);
size = MAX_PATH;
state = MsiLocateComponentA(component, path, &size);
ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %ld\n", size);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"C:\\imapath", 10);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* product value exists */
path[0] = 0;
@@ -3012,14 +3012,14 @@ static void test_MsiGetComponentPath(void)
state = MsiGetComponentPathA(prodcode, component, path, &size);
ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
path[0] = 0;
size = MAX_PATH;
state = MsiLocateComponentA(component, path, &size);
ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
create_file("C:\\imapath", 11);
@@ -3029,14 +3029,14 @@ static void test_MsiGetComponentPath(void)
state = MsiGetComponentPathA(prodcode, component, path, &size);
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
path[0] = 0;
size = MAX_PATH;
state = MsiLocateComponentA(component, path, &size);
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
RegDeleteValueA(compkey, prod_squashed);
delete_key(prodkey, "", access & KEY_WOW64_64KEY);
@@ -3074,37 +3074,37 @@ static void test_MsiGetComponentPathEx(void)
size = MAX_PATH;
state = pMsiGetComponentPathExA( NULL, comp, NULL, MSIINSTALLCONTEXT_USERMANAGED, path, &size );
ok( state == INSTALLSTATE_INVALIDARG, "got %d\n", state );
- todo_wine ok( !size, "got %u\n", size );
+ todo_wine ok( !size, "got %lu\n", size );
/* NULL component */
size = MAX_PATH;
state = pMsiGetComponentPathExA( prod, NULL, NULL, MSIINSTALLCONTEXT_USERMANAGED, path, &size );
ok( state == INSTALLSTATE_INVALIDARG, "got %d\n", state );
- todo_wine ok( !size, "got %u\n", size );
+ todo_wine ok( !size, "got %lu\n", size );
/* non-NULL usersid, MSIINSTALLCONTEXT_MACHINE */
size = MAX_PATH;
state = pMsiGetComponentPathExA( prod, comp, usersid, MSIINSTALLCONTEXT_MACHINE, path, &size);
ok( state == INSTALLSTATE_INVALIDARG, "got %d\n", state );
- todo_wine ok( !size, "got %u\n", size );
+ todo_wine ok( !size, "got %lu\n", size );
/* NULL buf */
size = MAX_PATH;
state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_MACHINE, NULL, &size );
ok( state == INSTALLSTATE_UNKNOWN, "got %d\n", state );
- todo_wine ok( size == MAX_PATH * 2, "got %u\n", size );
+ todo_wine ok( size == MAX_PATH * 2, "got %lu\n", size );
/* NULL buflen */
size = MAX_PATH;
state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_MACHINE, path, NULL );
ok( state == INSTALLSTATE_INVALIDARG, "got %d\n", state );
- ok( size == MAX_PATH, "got %u\n", size );
+ ok( size == MAX_PATH, "got %lu\n", size );
/* all params valid */
size = MAX_PATH;
state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_MACHINE, path, &size );
ok( state == INSTALLSTATE_UNKNOWN, "got %d\n", state );
- todo_wine ok( !size, "got %u\n", size );
+ todo_wine ok( !size, "got %lu\n", size );
lstrcpyA( path_key, "Software\\Microsoft\\Windows\\CurrentVersion\\" );
lstrcatA( path_key, "Installer\\UserData\\S-1-5-18\\Components\\" );
@@ -3117,7 +3117,7 @@ static void test_MsiGetComponentPathEx(void)
LocalFree( usersid );
return;
}
- ok( res == ERROR_SUCCESS, "got %d\n", res );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
/* local system component key exists */
size = MAX_PATH;
@@ -3125,7 +3125,7 @@ static void test_MsiGetComponentPathEx(void)
ok( state == INSTALLSTATE_UNKNOWN, "got %d\n", state );
res = RegSetValueExA( key_comp, prod_squashed, 0, REG_SZ, (const BYTE *)"c:\\testcomponentpath", 20 );
- ok( res == ERROR_SUCCESS, "got %d\n", res );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
/* product value exists */
path[0] = 0;
@@ -3133,7 +3133,7 @@ static void test_MsiGetComponentPathEx(void)
state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_MACHINE, path, &size );
ok( state == INSTALLSTATE_ABSENT, "got %d\n", state );
ok( !lstrcmpA( path, "c:\\testcomponentpath" ), "got %s\n", path );
- ok( size == 20, "got %u\n", size );
+ ok( size == 20, "got %lu\n", size );
lstrcpyA( path_key, "Software\\Microsoft\\Windows\\CurrentVersion\\" );
lstrcatA( path_key, "Installer\\UserData\\S-1-5-18\\Products\\" );
@@ -3141,11 +3141,11 @@ static void test_MsiGetComponentPathEx(void)
lstrcatA( path_key, "\\InstallProperties" );
res = RegCreateKeyExA( HKEY_LOCAL_MACHINE, path_key, 0, NULL, 0, access, NULL, &key_installprop, NULL );
- ok( res == ERROR_SUCCESS, "got %d\n", res );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
val = 1;
res = RegSetValueExA( key_installprop, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&val, sizeof(val) );
- ok( res == ERROR_SUCCESS, "got %d\n", res );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
/* install properties key exists */
path[0] = 0;
@@ -3153,7 +3153,7 @@ static void test_MsiGetComponentPathEx(void)
state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_MACHINE, path, &size );
ok( state == INSTALLSTATE_ABSENT, "got %d\n", state );
ok( !lstrcmpA( path, "c:\\testcomponentpath"), "got %s\n", path );
- ok( size == 20, "got %u\n", size );
+ ok( size == 20, "got %lu\n", size );
create_file( "c:\\testcomponentpath", 21 );
@@ -3163,14 +3163,14 @@ static void test_MsiGetComponentPathEx(void)
state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_MACHINE, path, &size );
ok( state == INSTALLSTATE_MOREDATA, "got %d\n", state );
ok( !path[0], "got %s\n", path );
- todo_wine ok( size == 40, "got %u\n", size );
+ todo_wine ok( size == 40, "got %lu\n", size );
path[0] = 0;
size = MAX_PATH;
state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_MACHINE, path, &size );
ok( state == INSTALLSTATE_LOCAL, "got %d\n", state );
ok( !lstrcmpA( path, "c:\\testcomponentpath" ), "got %s\n", path );
- ok( size == 20, "got %d\n", size );
+ ok( size == 20, "got %lu\n", size );
RegDeleteValueA( key_comp, prod_squashed );
delete_key( key_comp, "", access & KEY_WOW64_64KEY );
@@ -3184,13 +3184,13 @@ static void test_MsiGetComponentPathEx(void)
lstrcatA( path_key, prod_squashed );
res = RegCreateKeyA( HKEY_CURRENT_USER, path_key, &key_prod );
- ok( res == ERROR_SUCCESS, "got %d\n", res );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
/* user unmanaged product key exists */
size = MAX_PATH;
state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, path, &size );
ok( state == INSTALLSTATE_UNKNOWN, "got %d\n", state );
- todo_wine ok(!size, "got %u\n", size);
+ todo_wine ok(!size, "got %lu\n", size);
lstrcpyA( path_key, "Software\\Microsoft\\Windows\\CurrentVersion\\" );
lstrcatA( path_key, "Installer\\UserData\\" );
@@ -3199,16 +3199,16 @@ static void test_MsiGetComponentPathEx(void)
lstrcatA( path_key, comp_squashed );
res = RegCreateKeyExA( HKEY_LOCAL_MACHINE, path_key, 0, NULL, 0, access, NULL, &key_comp, NULL );
- ok( res == ERROR_SUCCESS, "got %d\n", res );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
/* user unmanaged component key exists */
size = MAX_PATH;
state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, path, &size );
ok( state == INSTALLSTATE_UNKNOWN, "got %d\n", state );
- todo_wine ok(!size, "got %u\n", size);
+ todo_wine ok(!size, "got %lu\n", size);
res = RegSetValueExA( key_comp, prod_squashed, 0, REG_SZ, (const BYTE *)"c:\\testcomponentpath", 20 );
- ok( res == ERROR_SUCCESS, "got %d\n", res );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
/* product value exists */
path[0] = 0;
@@ -3216,7 +3216,7 @@ static void test_MsiGetComponentPathEx(void)
state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, path, &size );
ok( state == INSTALLSTATE_ABSENT, "got %d\n", state );
ok( !lstrcmpA( path, "c:\\testcomponentpath"), "got %s\n", path );
- ok( size == 20, "got %u\n", size );
+ ok( size == 20, "got %lu\n", size );
create_file( "c:\\testcomponentpath", 21 );
@@ -3226,7 +3226,7 @@ static void test_MsiGetComponentPathEx(void)
state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, path, &size );
ok( state == INSTALLSTATE_LOCAL, "got %d\n", state );
ok( !lstrcmpA( path, "c:\\testcomponentpath"), "got %s\n", path );
- ok( size == 20, "got %u\n", size );
+ ok( size == 20, "got %lu\n", size );
RegDeleteValueA( key_comp, prod_squashed );
RegDeleteKeyA( key_prod, "" );
@@ -3242,7 +3242,7 @@ static void test_MsiGetComponentPathEx(void)
lstrcatA( path_key, prod_squashed );
res = RegCreateKeyExA( HKEY_LOCAL_MACHINE, path_key, 0, NULL, 0, access, NULL, &key_prod, NULL );
- ok( res == ERROR_SUCCESS, "got %d\n", res );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
/* user managed product key exists */
size = MAX_PATH;
@@ -3256,7 +3256,7 @@ static void test_MsiGetComponentPathEx(void)
lstrcatA( path_key, comp_squashed );
res = RegCreateKeyExA( HKEY_LOCAL_MACHINE, path_key, 0, NULL, 0, access, NULL, &key_comp, NULL );
- ok( res == ERROR_SUCCESS, "got %d\n", res );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
/* user managed component key exists */
size = MAX_PATH;
@@ -3264,7 +3264,7 @@ static void test_MsiGetComponentPathEx(void)
ok( state == INSTALLSTATE_UNKNOWN, "got %d\n", state );
res = RegSetValueExA( key_comp, prod_squashed, 0, REG_SZ, (const BYTE *)"c:\\testcomponentpath", 20 );
- ok( res == ERROR_SUCCESS, "got %d\n", res );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
/* product value exists */
path[0] = 0;
@@ -3272,7 +3272,7 @@ static void test_MsiGetComponentPathEx(void)
state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_USERMANAGED, path, &size );
ok( state == INSTALLSTATE_ABSENT, "got %d\n", state );
ok( !lstrcmpA( path, "c:\\testcomponentpath" ), "got %s\n", path );
- ok( size == 20, "got %u\n", size );
+ ok( size == 20, "got %lu\n", size );
lstrcpyA( path_key, "Software\\Microsoft\\Windows\\CurrentVersion\\" );
lstrcatA( path_key, "Installer\\UserData\\S-1-5-18\\Products\\" );
@@ -3280,11 +3280,11 @@ static void test_MsiGetComponentPathEx(void)
lstrcatA( path_key, "\\InstallProperties" );
res = RegCreateKeyExA( HKEY_LOCAL_MACHINE, path_key, 0, NULL, 0, access, NULL, &key_installprop, NULL );
- ok( res == ERROR_SUCCESS, "got %d\n", res );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
val = 1;
res = RegSetValueExA( key_installprop, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&val, sizeof(val) );
- ok( res == ERROR_SUCCESS, "got %d\n", res );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
/* install properties key exists */
path[0] = 0;
@@ -3292,7 +3292,7 @@ static void test_MsiGetComponentPathEx(void)
state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_USERMANAGED, path, &size );
ok( state == INSTALLSTATE_ABSENT, "got %d\n", state );
ok( !lstrcmpA( path, "c:\\testcomponentpath" ), "got %s\n", path );
- ok( size == 20, "got %u\n", size );
+ ok( size == 20, "got %lu\n", size );
create_file( "c:\\testcomponentpath", 21 );
@@ -3302,7 +3302,7 @@ static void test_MsiGetComponentPathEx(void)
state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_USERMANAGED, path, &size );
ok( state == INSTALLSTATE_LOCAL, "got %d\n", state );
ok( !lstrcmpA( path, "c:\\testcomponentpath" ), "got %s\n", path );
- ok( size == 20, "got %u\n", size );
+ ok( size == 20, "got %lu\n", size );
RegDeleteValueA( key_comp, prod_squashed );
delete_key( key_prod, "", access & KEY_WOW64_64KEY );
@@ -3323,29 +3323,29 @@ static void test_MsiGetComponentPathEx(void)
LocalFree( usersid );
return;
}
- ok( res == ERROR_SUCCESS, "got %d\n", res );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
/* local classes product key exists */
size = MAX_PATH;
state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_MACHINE, path, &size );
ok( state == INSTALLSTATE_UNKNOWN, "got %d\n", state );
- todo_wine ok(!size, "got %u\n", size);
+ todo_wine ok(!size, "got %lu\n", size);
lstrcpyA( path_key, "Software\\Microsoft\\Windows\\CurrentVersion\\" );
lstrcatA( path_key, "Installer\\UserData\\S-1-5-18\\Components\\" );
lstrcatA( path_key, comp_squashed );
res = RegCreateKeyExA( HKEY_LOCAL_MACHINE, path_key, 0, NULL, 0, access, NULL, &key_comp, NULL );
- ok( res == ERROR_SUCCESS, "got %d\n", res );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
/* local user component key exists */
size = MAX_PATH;
state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_MACHINE, path, &size );
ok( state == INSTALLSTATE_UNKNOWN, "got %d\n", state );
- todo_wine ok(!size, "got %u\n", size);
+ todo_wine ok(!size, "got %lu\n", size);
res = RegSetValueExA( key_comp, prod_squashed, 0, REG_SZ, (const BYTE *)"c:\\testcomponentpath", 20 );
- ok( res == ERROR_SUCCESS, "got %d\n", res );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
/* product value exists */
path[0] = 0;
@@ -3353,7 +3353,7 @@ static void test_MsiGetComponentPathEx(void)
state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_MACHINE, path, &size );
ok( state == INSTALLSTATE_ABSENT, "got %d\n", state );
ok( !lstrcmpA( path, "c:\\testcomponentpath" ), "got %s\n", path );
- ok( size == 20, "got %u\n", size );
+ ok( size == 20, "got %lu\n", size );
create_file( "c:\\testcomponentpath", 21 );
@@ -3363,7 +3363,7 @@ static void test_MsiGetComponentPathEx(void)
state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_MACHINE, path, &size );
ok( state == INSTALLSTATE_LOCAL, "got %d\n", state );
ok( !lstrcmpA( path, "c:\\testcomponentpath" ), "got %s\n", path );
- ok( size == 20, "got %u\n", size );
+ ok( size == 20, "got %lu\n", size );
RegDeleteValueA( key_comp, prod_squashed );
delete_key( key_prod, "", access & KEY_WOW64_64KEY );
@@ -3414,21 +3414,21 @@ static void test_MsiProvideComponent(void)
INSTALLMODE_NODETECTION, buf, &len);
ok(r == ERROR_SUCCESS, "got %u\n", r);
ok(buf[0], "empty path\n");
- ok(len == lstrlenA(buf), "got %u\n", len);
+ ok(len == lstrlenA(buf), "got %lu\n", len);
len2 = 0;
r = pMsiProvideComponentA("{38847338-1BBC-4104-81AC-2FAAC7ECDDCD}", "sourcedir",
"{DD422F92-3ED8-49B5-A0B7-F266F98357DF}",
INSTALLMODE_NODETECTION, NULL, &len2);
ok(r == ERROR_SUCCESS, "got %u\n", r);
- ok(len2 == len, "got %u\n", len2);
+ ok(len2 == len, "got %lu\n", len2);
len2 = 0;
r = pMsiProvideComponentA("{38847338-1BBC-4104-81AC-2FAAC7ECDDCD}", "sourcedir",
"{DD422F92-3ED8-49B5-A0B7-F266F98357DF}",
INSTALLMODE_NODETECTION, buf, &len2);
ok(r == ERROR_MORE_DATA, "got %u\n", r);
- ok(len2 == len, "got %u\n", len2);
+ ok(len2 == len, "got %lu\n", len2);
/* wide version */
@@ -3438,19 +3438,19 @@ static void test_MsiProvideComponent(void)
L"{DD422F92-3ED8-49B5-A0B7-F266F98357DF}", INSTALLMODE_NODETECTION, bufW, &len);
ok(r == ERROR_SUCCESS, "got %u\n", r);
ok(bufW[0], "empty path\n");
- ok(len == lstrlenW(bufW), "got %u\n", len);
+ ok(len == lstrlenW(bufW), "got %lu\n", len);
len2 = 0;
r = pMsiProvideComponentW(L"{38847338-1BBC-4104-81AC-2FAAC7ECDDCD}", L"sourcedir",
L"{DD422F92-3ED8-49B5-A0B7-F266F98357DF}", INSTALLMODE_NODETECTION, NULL, &len2);
ok(r == ERROR_SUCCESS, "got %u\n", r);
- ok(len2 == len, "got %u\n", len2);
+ ok(len2 == len, "got %lu\n", len2);
len2 = 0;
r = pMsiProvideComponentW(L"{38847338-1BBC-4104-81AC-2FAAC7ECDDCD}", L"sourcedir",
L"{DD422F92-3ED8-49B5-A0B7-F266F98357DF}", INSTALLMODE_NODETECTION, bufW, &len2);
ok(r == ERROR_MORE_DATA, "got %u\n", r);
- ok(len2 == len, "got %u\n", len2);
+ ok(len2 == len, "got %lu\n", len2);
r = MsiInstallProductA(msifile, "REMOVE=ALL");
ok(r == ERROR_SUCCESS, "got %u\n", r);
@@ -3490,13 +3490,13 @@ static void test_MsiProvideQualifiedComponentEx(void)
if (is_wow64) access |= KEY_WOW64_64KEY;
res = RegCreateKeyExA( HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &hkey, NULL );
- ok( res == ERROR_SUCCESS, "got %d\n", res );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
lstrcpyA( desc, prod_base85 );
memcpy( desc + lstrlenA(desc), "feature<\0", sizeof("feature<\0") );
res = RegSetValueExA( hkey, "qualifier", 0, REG_MULTI_SZ, (const BYTE *)desc,
lstrlenA(prod_base85) + sizeof("feature<\0") );
- ok( res == ERROR_SUCCESS, "got %d\n", res );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
r = MsiProvideQualifiedComponentExA( comp, "qualifier", INSTALLMODE_EXISTING, prod, 0, 0, buf, &len );
ok( r == ERROR_UNKNOWN_PRODUCT, "got %u\n", r );
@@ -3511,7 +3511,7 @@ static void test_MsiProvideQualifiedComponentEx(void)
lstrcatA( keypath, prod_squashed );
res = RegCreateKeyExA( HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &hkey2, NULL );
- ok( res == ERROR_SUCCESS, "got %d\n", res );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
state = MsiQueryProductStateA( prod );
ok( state == INSTALLSTATE_ADVERTISED, "got %d\n", state );
@@ -3523,13 +3523,13 @@ static void test_MsiProvideQualifiedComponentEx(void)
lstrcatA( keypath, prod_squashed );
res = RegCreateKeyExA( HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &hkey3, NULL );
- ok( res == ERROR_SUCCESS, "got %d\n", res );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
state = MsiQueryFeatureStateA( prod, "feature" );
ok( state == INSTALLSTATE_UNKNOWN, "got %d\n", state );
res = RegSetValueExA( hkey3, "feature", 0, REG_SZ, (const BYTE *)"", 1 );
- ok( res == ERROR_SUCCESS, "got %d\n", res );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
state = MsiQueryFeatureStateA( prod, "feature" );
ok( state == INSTALLSTATE_ADVERTISED, "got %d\n", state );
@@ -3546,10 +3546,10 @@ static void test_MsiProvideQualifiedComponentEx(void)
lstrcatA( keypath, "\\Features" );
res = RegCreateKeyExA( HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &hkey4, NULL );
- ok( res == ERROR_SUCCESS, "got %d\n", res );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
res = RegSetValueExA( hkey4, "feature", 0, REG_SZ, (const BYTE *)comp2_base85, sizeof(comp2_base85) );
- ok( res == ERROR_SUCCESS, "got %d\n", res );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
state = MsiQueryFeatureStateA( prod, "feature" );
ok( state == INSTALLSTATE_ADVERTISED, "got %d\n", state );
@@ -3558,10 +3558,10 @@ static void test_MsiProvideQualifiedComponentEx(void)
lstrcatA( keypath, comp2_squashed );
res = RegCreateKeyExA( HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &hkey5, NULL );
- ok( res == ERROR_SUCCESS, "got %d\n", res );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
res = RegSetValueExA( hkey5, prod_squashed, 0, REG_SZ, (const BYTE *)"c:\\nosuchfile", sizeof("c:\\nosuchfile") );
- ok( res == ERROR_SUCCESS, "got %d\n", res );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
state = MsiQueryFeatureStateA( prod, "feature" );
ok( state == INSTALLSTATE_LOCAL, "got %d\n", state );
@@ -3576,13 +3576,13 @@ static void test_MsiProvideQualifiedComponentEx(void)
create_file_data( path, "test", 100 );
res = RegSetValueExA( hkey5, prod_squashed, 0, REG_SZ, (const BYTE *)path, lstrlenA(path) + 1 );
- ok( res == ERROR_SUCCESS, "got %d\n", res );
+ ok( res == ERROR_SUCCESS, "got %ld\n", res );
buf[0] = 0;
len = sizeof(buf);
r = MsiProvideQualifiedComponentExA( comp, "qualifier", INSTALLMODE_EXISTING, prod, 0, 0, buf, &len );
ok( r == ERROR_SUCCESS, "got %u\n", r );
- ok( len == lstrlenA(path), "got %u\n", len );
+ ok( len == lstrlenA(path), "got %lu\n", len );
ok( !lstrcmpA( path, buf ), "got '%s'\n", buf );
DeleteFileA( "msitest\\text.txt" );
@@ -3680,7 +3680,7 @@ static void test_MsiGetProductCode(void)
LocalFree(usersid);
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user unmanaged component key exists */
lstrcpyA(product, "prod");
@@ -3689,7 +3689,7 @@ static void test_MsiGetProductCode(void)
ok(!lstrcmpA(product, "prod"), "Expected product to be unchanged, got %s\n", product);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"C:\\imapath", 10);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* product value exists */
lstrcpyA(product, "prod");
@@ -3698,7 +3698,7 @@ static void test_MsiGetProductCode(void)
ok(!lstrcmpA(product, prodcode), "Expected %s, got %s\n", prodcode, product);
res = RegSetValueExA(compkey, prod2_squashed, 0, REG_SZ, (const BYTE *)"C:\\another", 10);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\");
lstrcatA(keypath, "Installer\\Managed\\");
@@ -3707,7 +3707,7 @@ static void test_MsiGetProductCode(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &prodkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user managed product key of first product exists */
lstrcpyA(product, "prod");
@@ -3722,7 +3722,7 @@ static void test_MsiGetProductCode(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &prodkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user unmanaged product key exists */
lstrcpyA(product, "prod");
@@ -3743,7 +3743,7 @@ static void test_MsiGetProductCode(void)
LocalFree( usersid );
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local classes product key exists */
lstrcpyA(product, "prod");
@@ -3761,7 +3761,7 @@ static void test_MsiGetProductCode(void)
lstrcatA(keypath, prod2_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &prodkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user managed product key of second product exists */
lstrcpyA(product, "prod");
@@ -3781,7 +3781,7 @@ static void test_MsiGetProductCode(void)
lstrcatA(keypath, comp_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &compkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local user component key exists */
lstrcpyA(product, "prod");
@@ -3790,7 +3790,7 @@ static void test_MsiGetProductCode(void)
ok(!lstrcmpA(product, "prod"), "Expected product to be unchanged, got %s\n", product);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"C:\\imapath", 10);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* product value exists */
lstrcpyA(product, "prod");
@@ -3799,7 +3799,7 @@ static void test_MsiGetProductCode(void)
ok(!lstrcmpA(product, prodcode), "Expected %s, got %s\n", prodcode, product);
res = RegSetValueExA(compkey, prod2_squashed, 0, REG_SZ, (const BYTE *)"C:\\another", 10);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\");
lstrcatA(keypath, "Installer\\Managed\\");
@@ -3808,7 +3808,7 @@ static void test_MsiGetProductCode(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &prodkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user managed product key of first product exists */
lstrcpyA(product, "prod");
@@ -3823,7 +3823,7 @@ static void test_MsiGetProductCode(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &prodkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user unmanaged product key exists */
lstrcpyA(product, "prod");
@@ -3844,7 +3844,7 @@ static void test_MsiGetProductCode(void)
LocalFree( usersid );
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local classes product key exists */
lstrcpyA(product, "prod");
@@ -3862,7 +3862,7 @@ static void test_MsiGetProductCode(void)
lstrcatA(keypath, prod2_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &prodkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user managed product key of second product exists */
lstrcpyA(product, "prod");
@@ -3939,7 +3939,7 @@ static void test_MsiEnumClients(void)
LocalFree(usersid);
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user unmanaged component key exists */
product[0] = '\0';
@@ -3954,7 +3954,7 @@ static void test_MsiEnumClients(void)
ok(!lstrcmpA(product, ""), "Expected product to be unchanged, got %s\n", product);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"C:\\imapath", 10);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* product value exists */
r = MsiEnumClientsA(component, 0, product);
@@ -3974,7 +3974,7 @@ static void test_MsiEnumClients(void)
ok(!lstrcmpA(product, ""), "Expected product to be unchanged, got %s\n", product);
res = RegSetValueExA(compkey, prod2_squashed, 0, REG_SZ, (const BYTE *)"C:\\another", 10);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* try index 1, second product value does exist */
product[0] = '\0';
@@ -4009,7 +4009,7 @@ static void test_MsiEnumClients(void)
lstrcatA(keypath, comp_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &compkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user local component key exists */
product[0] = '\0';
@@ -4024,7 +4024,7 @@ static void test_MsiEnumClients(void)
ok(!lstrcmpA(product, ""), "Expected product to be unchanged, got %s\n", product);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"C:\\imapath", 10);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* product value exists */
product[0] = '\0';
@@ -4044,7 +4044,7 @@ static void test_MsiEnumClients(void)
ok(!lstrcmpA(product, ""), "Expected product to be unchanged, got %s\n", product);
res = RegSetValueExA(compkey, prod2_squashed, 0, REG_SZ, (const BYTE *)"C:\\another", 10);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* try index 1, second product value does exist */
product[0] = '\0';
@@ -4082,19 +4082,20 @@ static void get_version_info(LPSTR path, LPSTR *vercheck, LPDWORD verchecksz,
LPSTR version;
VS_FIXEDFILEINFO *ffi;
DWORD size = GetFileVersionInfoSizeA(path, NULL);
+ UINT len;
USHORT *lang;
version = malloc(size);
GetFileVersionInfoA(path, 0, size, version);
- VerQueryValueA(version, "\\", (LPVOID *)&ffi, &size);
+ VerQueryValueA(version, "\\", (LPVOID *)&ffi, &len);
*vercheck = malloc(MAX_PATH);
sprintf(*vercheck, "%d.%d.%d.%d", HIWORD(ffi->dwFileVersionMS),
LOWORD(ffi->dwFileVersionMS), HIWORD(ffi->dwFileVersionLS),
LOWORD(ffi->dwFileVersionLS));
*verchecksz = lstrlenA(*vercheck);
- VerQueryValueA(version, "\\VarFileInfo\\Translation", (void **)&lang, &size);
+ VerQueryValueA(version, "\\VarFileInfo\\Translation", (void **)&lang, &len);
*langcheck = malloc(MAX_PATH);
sprintf(*langcheck, "%d", *lang);
*langchecksz = lstrlenA(*langcheck);
@@ -4125,10 +4126,10 @@ static void test_MsiGetFileVersion(void)
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(version, "version"),
"Expected version to be unchanged, got %s\n", version);
- ok(versz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, versz);
+ ok(versz == MAX_PATH, "got %lu\n", versz);
ok(!lstrcmpA(lang, "lang"),
"Expected lang to be unchanged, got %s\n", lang);
- ok(langsz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, langsz);
+ ok(langsz == MAX_PATH, "got %lu\n", langsz);
/* empty szFilePath */
r = MsiGetFileVersionA("", NULL, NULL, NULL, NULL);
@@ -4143,10 +4144,10 @@ static void test_MsiGetFileVersion(void)
"Expected ERROR_FILE_NOT_FOUND, got %d\n", r);
ok(!lstrcmpA(version, "version"),
"Expected version to be unchanged, got %s\n", version);
- ok(versz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, versz);
+ ok(versz == MAX_PATH, "got %lu\n", versz);
ok(!lstrcmpA(lang, "lang"),
"Expected lang to be unchanged, got %s\n", lang);
- ok(langsz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, langsz);
+ ok(langsz == MAX_PATH, "got %lu\n", langsz);
/* nonexistent szFilePath */
versz = MAX_PATH;
@@ -4158,10 +4159,10 @@ static void test_MsiGetFileVersion(void)
"Expected ERROR_FILE_NOT_FOUND, got %d\n", r);
ok(!lstrcmpA(version, "version"),
"Expected version to be unchanged, got %s\n", version);
- ok(versz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, versz);
+ ok(versz == MAX_PATH, "got %lu\n", versz);
ok(!lstrcmpA(lang, "lang"),
"Expected lang to be unchanged, got %s\n", lang);
- ok(langsz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, langsz);
+ ok(langsz == MAX_PATH, "got %lu\n", langsz);
/* nonexistent szFilePath, valid lpVersionBuf, NULL pcchVersionBuf */
versz = MAX_PATH;
@@ -4173,10 +4174,10 @@ static void test_MsiGetFileVersion(void)
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(version, "version"),
"Expected version to be unchanged, got %s\n", version);
- ok(versz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, versz);
+ ok(versz == MAX_PATH, "got %lu\n", versz);
ok(!lstrcmpA(lang, "lang"),
"Expected lang to be unchanged, got %s\n", lang);
- ok(langsz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, langsz);
+ ok(langsz == MAX_PATH, "got %lu\n", langsz);
/* nonexistent szFilePath, valid lpLangBuf, NULL pcchLangBuf */
versz = MAX_PATH;
@@ -4188,10 +4189,10 @@ static void test_MsiGetFileVersion(void)
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(version, "version"),
"Expected version to be unchanged, got %s\n", version);
- ok(versz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, versz);
+ ok(versz == MAX_PATH, "got %lu\n", versz);
ok(!lstrcmpA(lang, "lang"),
"Expected lang to be unchanged, got %s\n", lang);
- ok(langsz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, langsz);
+ ok(langsz == MAX_PATH, "got %lu\n", langsz);
/* nonexistent szFilePath, valid lpVersionBuf, pcchVersionBuf is zero */
versz = 0;
@@ -4203,10 +4204,10 @@ static void test_MsiGetFileVersion(void)
"Expected ERROR_FILE_NOT_FOUND, got %d\n", r);
ok(!lstrcmpA(version, "version"),
"Expected version to be unchanged, got %s\n", version);
- ok(versz == 0, "Expected 0, got %d\n", versz);
+ ok(versz == 0, "Expected 0, got %lu\n", versz);
ok(!lstrcmpA(lang, "lang"),
"Expected lang to be unchanged, got %s\n", lang);
- ok(langsz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, langsz);
+ ok(langsz == MAX_PATH, "got %lu\n", langsz);
/* nonexistent szFilePath, valid lpLangBuf, pcchLangBuf is zero */
versz = MAX_PATH;
@@ -4218,10 +4219,10 @@ static void test_MsiGetFileVersion(void)
"Expected ERROR_FILE_NOT_FOUND, got %d\n", r);
ok(!lstrcmpA(version, "version"),
"Expected version to be unchanged, got %s\n", version);
- ok(versz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, versz);
+ ok(versz == MAX_PATH, "got %lu\n", versz);
ok(!lstrcmpA(lang, "lang"),
"Expected lang to be unchanged, got %s\n", lang);
- ok(langsz == 0, "Expected 0, got %d\n", langsz);
+ ok(langsz == 0, "Expected 0, got %lu\n", langsz);
/* nonexistent szFilePath, rest NULL */
r = MsiGetFileVersionA("nonexistent", NULL, NULL, NULL, NULL);
@@ -4239,10 +4240,10 @@ static void test_MsiGetFileVersion(void)
lstrcpyA(version, "version");
lstrcpyA(lang, "lang");
r = MsiGetFileVersionA("ver.txt", version, &versz, lang, &langsz);
- ok(versz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, versz);
+ ok(versz == MAX_PATH, "got %lu\n", versz);
ok(!lstrcmpA(version, "version"),
"Expected version to be unchanged, got %s\n", version);
- ok(langsz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, langsz);
+ ok(langsz == MAX_PATH, "got %lu\n", langsz);
ok(!lstrcmpA(lang, "lang"),
"Expected lang to be unchanged, got %s\n", lang);
ok(r == ERROR_FILE_INVALID,
@@ -4262,10 +4263,10 @@ static void test_MsiGetFileVersion(void)
"Expected ERROR_FILE_NOT_FOUND, got %d\n", r);
ok(!lstrcmpA(version, "version"),
"Expected version to be unchanged, got %s\n", version);
- ok(versz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, versz);
+ ok(versz == MAX_PATH, "got %lu\n", versz);
ok(!lstrcmpA(lang, "lang"),
"Expected lang to be unchanged, got %s\n", lang);
- ok(langsz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, langsz);
+ ok(langsz == MAX_PATH, "got %lu\n", langsz);
}
GetSystemDirectoryA(path, MAX_PATH);
@@ -4287,7 +4288,7 @@ static void test_MsiGetFileVersion(void)
free(langcheck);
return;
}
- ok(versz == verchecksz, "Expected %d, got %d\n", verchecksz, versz);
+ ok(versz == verchecksz, "Expected %lu, got %lu\n", verchecksz, versz);
ok(strstr(lang, langcheck) != NULL, "Expected \"%s\" in \"%s\"\n", langcheck, lang);
ok(!lstrcmpA(version, vercheck),
"Expected %s, got %s\n", vercheck, version);
@@ -4297,9 +4298,8 @@ static void test_MsiGetFileVersion(void)
lstrcpyA(version, "version");
r = MsiGetFileVersionA(path, version, &versz, NULL, NULL);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(versz == verchecksz, "Expected %d, got %d\n", verchecksz, versz);
- ok(!lstrcmpA(version, vercheck),
- "Expected %s, got %s\n", vercheck, version);
+ ok(versz == verchecksz, "Expected %lu, got %lu\n", verchecksz, versz);
+ ok(!lstrcmpA(version, vercheck), "Expected %s, got %s\n", vercheck, version);
/* only check language */
langsz = MAX_PATH;
@@ -4316,13 +4316,13 @@ static void test_MsiGetFileVersion(void)
versz = MAX_PATH;
r = MsiGetFileVersionA(path, NULL, &versz, NULL, NULL);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(versz == verchecksz, "Expected %d, got %d\n", verchecksz, versz);
+ ok(versz == verchecksz, "Expected %lu, got %lu\n", verchecksz, versz);
/* get pcchLangBuf */
langsz = MAX_PATH;
r = MsiGetFileVersionA(path, NULL, NULL, NULL, &langsz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(langsz >= langchecksz, "Expected %d >= %d\n", langsz, langchecksz);
+ ok(langsz >= langchecksz, "Expected %lu >= %lu\n", langsz, langchecksz);
/* pcchVersionBuf not big enough */
versz = 5;
@@ -4331,7 +4331,7 @@ static void test_MsiGetFileVersion(void)
ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r);
ok(!strncmp(version, vercheck, 4),
"Expected first 4 characters of \"%s\", got \"%s\"\n", vercheck, version);
- ok(versz == verchecksz, "Expected %d, got %d\n", verchecksz, versz);
+ ok(versz == verchecksz, "Expected %lu, got %lu\n", verchecksz, versz);
/* pcchLangBuf not big enough */
langsz = 4;
@@ -4339,7 +4339,7 @@ static void test_MsiGetFileVersion(void)
r = MsiGetFileVersionA(path, NULL, NULL, lang, &langsz);
ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r);
ok(lstrcmpA(lang, "lang"), "lang not set\n");
- ok(langsz >= langchecksz, "Expected %d >= %d\n", langsz, langchecksz);
+ ok(langsz >= langchecksz, "Expected %lu >= %lu\n", langsz, langchecksz);
/* pcchVersionBuf big enough, pcchLangBuf not big enough */
versz = MAX_PATH;
@@ -4347,9 +4347,9 @@ static void test_MsiGetFileVersion(void)
lstrcpyA(version, "version");
r = MsiGetFileVersionA(path, version, &versz, NULL, &langsz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(versz == verchecksz, "Expected %d, got %d\n", verchecksz, versz);
+ ok(versz == verchecksz, "Expected %lu, got %lu\n", verchecksz, versz);
ok(!lstrcmpA(version, vercheck), "Expected \"%s\", got \"%s\"\n", vercheck, version);
- ok(langsz >= langchecksz && langsz < MAX_PATH, "Expected %d >= %d\n", langsz, langchecksz);
+ ok(langsz >= langchecksz && langsz < MAX_PATH, "Expected %lu >= %lu\n", langsz, langchecksz);
/* pcchVersionBuf not big enough, pcchLangBuf big enough */
versz = 5;
@@ -4357,8 +4357,8 @@ static void test_MsiGetFileVersion(void)
lstrcpyA(lang, "lang");
r = MsiGetFileVersionA(path, NULL, &versz, lang, &langsz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(versz == verchecksz, "Expected %d, got %d\n", verchecksz, versz);
- ok(langsz >= langchecksz && langsz < MAX_PATH, "Expected %d >= %d\n", langsz, langchecksz);
+ ok(versz == verchecksz, "Expected %lu, got %lu\n", verchecksz, versz);
+ ok(langsz >= langchecksz && langsz < MAX_PATH, "Expected %lu >= %lu\n", langsz, langchecksz);
ok(strstr(lang, langcheck) != NULL, "expected %s in %s\n", langcheck, lang);
/* NULL pcchVersionBuf and pcchLangBuf */
@@ -4403,7 +4403,7 @@ static void test_MsiGetProductInfo(void)
ok(r == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "got %lu\n", sz);
/* empty szProduct */
sz = MAX_PATH;
@@ -4412,7 +4412,7 @@ static void test_MsiGetProductInfo(void)
ok(r == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "got %lu\n", sz);
/* garbage szProduct */
sz = MAX_PATH;
@@ -4421,7 +4421,7 @@ static void test_MsiGetProductInfo(void)
ok(r == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "got %lu\n", sz);
/* guid without brackets */
sz = MAX_PATH;
@@ -4431,7 +4431,7 @@ static void test_MsiGetProductInfo(void)
ok(r == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "got %lu\n", sz);
/* guid with brackets */
sz = MAX_PATH;
@@ -4441,7 +4441,7 @@ static void test_MsiGetProductInfo(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "got %lu\n", sz);
/* same length as guid, but random */
sz = MAX_PATH;
@@ -4451,7 +4451,7 @@ static void test_MsiGetProductInfo(void)
ok(r == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "got %lu\n", sz);
/* not installed, NULL szAttribute */
sz = MAX_PATH;
@@ -4460,7 +4460,7 @@ static void test_MsiGetProductInfo(void)
ok(r == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "got %lu\n", sz);
/* not installed, NULL lpValueBuf */
sz = MAX_PATH;
@@ -4469,7 +4469,7 @@ static void test_MsiGetProductInfo(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "got %lu\n", sz);
/* not installed, NULL pcchValueBuf */
sz = MAX_PATH;
@@ -4478,7 +4478,7 @@ static void test_MsiGetProductInfo(void)
ok(r == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "got %lu\n", sz);
/* created guid cannot possibly be an installed product code */
sz = MAX_PATH;
@@ -4487,7 +4487,7 @@ static void test_MsiGetProductInfo(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "got %lu\n", sz);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\");
lstrcatA(keypath, usersid);
@@ -4501,7 +4501,7 @@ static void test_MsiGetProductInfo(void)
LocalFree(usersid);
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* managed product code exists */
sz = MAX_PATH;
@@ -4510,7 +4510,7 @@ static void test_MsiGetProductInfo(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "got %lu\n", sz);
delete_key(prodkey, "", access & KEY_WOW64_64KEY);
RegCloseKey(prodkey);
@@ -4527,7 +4527,7 @@ static void test_MsiGetProductInfo(void)
LocalFree(usersid);
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local user product code exists */
sz = MAX_PATH;
@@ -4536,7 +4536,7 @@ static void test_MsiGetProductInfo(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "got %lu\n", sz);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\");
lstrcatA(keypath, usersid);
@@ -4544,7 +4544,7 @@ static void test_MsiGetProductInfo(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &prodkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* both local and managed product code exist */
sz = MAX_PATH;
@@ -4553,10 +4553,10 @@ static void test_MsiGetProductInfo(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "%lun", sz);
res = RegCreateKeyExA(localkey, "InstallProperties", 0, NULL, 0, access, NULL, &propkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallProperties key exists */
sz = MAX_PATH;
@@ -4564,10 +4564,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINKA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
res = RegSetValueExA(propkey, "HelpLink", 0, REG_SZ, (LPBYTE)"link", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* HelpLink value exists */
sz = MAX_PATH;
@@ -4575,7 +4575,7 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINKA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "link"), "Expected \"link\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
/* pcchBuf is NULL */
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINKA, NULL, NULL);
@@ -4585,13 +4585,13 @@ static void test_MsiGetProductInfo(void)
sz = MAX_PATH;
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINKA, NULL, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
/* lpValueBuf is NULL, pcchValueBuf is too small */
sz = 2;
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINKA, NULL, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
/* lpValueBuf is non-NULL, pcchValueBuf is too small */
sz = 2;
@@ -4599,7 +4599,7 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINKA, buf, &sz);
ok(!lstrcmpA(buf, "apple"), "Expected buf to remain unchanged, got \"%s\"\n", buf);
ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
/* lpValueBuf is non-NULL, pcchValueBuf is exactly 4 */
sz = 4;
@@ -4608,10 +4608,10 @@ static void test_MsiGetProductInfo(void)
ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r);
ok(!lstrcmpA(buf, "apple"),
"Expected buf to remain unchanged, got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(propkey, "IMadeThis", 0, REG_SZ, (LPBYTE)"random", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* random property not supported by MSI, value exists */
sz = MAX_PATH;
@@ -4620,7 +4620,7 @@ static void test_MsiGetProductInfo(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
RegDeleteValueA(propkey, "IMadeThis");
RegDeleteValueA(propkey, "HelpLink");
@@ -4635,7 +4635,7 @@ static void test_MsiGetProductInfo(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &prodkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user product key exists */
sz = MAX_PATH;
@@ -4644,7 +4644,7 @@ static void test_MsiGetProductInfo(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
lstrcatA(keypath, usersid);
@@ -4652,7 +4652,7 @@ static void test_MsiGetProductInfo(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &localkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local user product key exists */
sz = MAX_PATH;
@@ -4661,10 +4661,10 @@ static void test_MsiGetProductInfo(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "got %lu\n", sz);
res = RegCreateKeyExA(localkey, "InstallProperties", 0, NULL, 0, access, NULL, &propkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallProperties key exists */
sz = MAX_PATH;
@@ -4672,10 +4672,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINKA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
res = RegSetValueExA(propkey, "HelpLink", 0, REG_SZ, (LPBYTE)"link", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* HelpLink value exists */
sz = MAX_PATH;
@@ -4683,7 +4683,7 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINKA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "link"), "Expected \"link\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
RegDeleteValueA(propkey, "HelpLink");
delete_key(propkey, "", access & KEY_WOW64_64KEY);
@@ -4703,7 +4703,7 @@ static void test_MsiGetProductInfo(void)
LocalFree( usersid );
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* classes product key exists */
sz = MAX_PATH;
@@ -4712,7 +4712,7 @@ static void test_MsiGetProductInfo(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
lstrcatA(keypath, usersid);
@@ -4720,7 +4720,7 @@ static void test_MsiGetProductInfo(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &localkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local user product key exists */
sz = MAX_PATH;
@@ -4729,10 +4729,10 @@ static void test_MsiGetProductInfo(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegCreateKeyExA(localkey, "InstallProperties", 0, NULL, 0, access, NULL, &propkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallProperties key exists */
sz = MAX_PATH;
@@ -4741,7 +4741,7 @@ static void test_MsiGetProductInfo(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
delete_key(propkey, "", access & KEY_WOW64_64KEY);
delete_key(localkey, "", access & KEY_WOW64_64KEY);
@@ -4753,7 +4753,7 @@ static void test_MsiGetProductInfo(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &localkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Local System product key exists */
sz = MAX_PATH;
@@ -4762,10 +4762,10 @@ static void test_MsiGetProductInfo(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegCreateKeyExA(localkey, "InstallProperties", 0, NULL, 0, access, NULL, &propkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallProperties key exists */
sz = MAX_PATH;
@@ -4773,10 +4773,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINKA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
res = RegSetValueExA(propkey, "HelpLink", 0, REG_SZ, (LPBYTE)"link", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* HelpLink value exists */
sz = MAX_PATH;
@@ -4784,11 +4784,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINKA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "link"), "Expected \"link\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(propkey, "HelpLink", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* HelpLink type is REG_DWORD */
sz = MAX_PATH;
@@ -4796,10 +4796,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINKA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "DisplayName", 0, REG_SZ, (LPBYTE)"name", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* DisplayName value exists */
sz = MAX_PATH;
@@ -4807,11 +4807,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTALLEDPRODUCTNAMEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "name"), "Expected \"name\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
- res = RegSetValueExA(propkey, "DisplayName", 0, REG_DWORD,
- (const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ res = RegSetValueExA(propkey, "DisplayName", 0, REG_DWORD, (const BYTE *)&val, sizeof(DWORD));
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* DisplayName type is REG_DWORD */
sz = MAX_PATH;
@@ -4819,10 +4818,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTALLEDPRODUCTNAMEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "DisplayVersion", 0, REG_SZ, (LPBYTE)"1.1.1", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* DisplayVersion value exists */
sz = MAX_PATH;
@@ -4830,11 +4829,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSIONSTRINGA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "1.1.1"), "Expected \"1.1.1\", got \"%s\"\n", buf);
- ok(sz == 5, "Expected 5, got %d\n", sz);
+ ok(sz == 5, "Expected 5, got %lu\n", sz);
res = RegSetValueExA(propkey, "DisplayVersion", 0,
REG_DWORD, (const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* DisplayVersion type is REG_DWORD */
sz = MAX_PATH;
@@ -4842,10 +4841,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSIONSTRINGA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "HelpTelephone", 0, REG_SZ, (LPBYTE)"tele", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* HelpTelephone value exists */
sz = MAX_PATH;
@@ -4853,11 +4852,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPTELEPHONEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "tele"), "Expected \"tele\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(propkey, "HelpTelephone", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* HelpTelephone type is REG_DWORD */
sz = MAX_PATH;
@@ -4865,10 +4864,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPTELEPHONEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "InstallLocation", 0, REG_SZ, (LPBYTE)"loc", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallLocation value exists */
sz = MAX_PATH;
@@ -4876,11 +4875,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTALLLOCATIONA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "loc"), "Expected \"loc\", got \"%s\"\n", buf);
- ok(sz == 3, "Expected 3, got %d\n", sz);
+ ok(sz == 3, "Expected 3, got %lu\n", sz);
res = RegSetValueExA(propkey, "InstallLocation", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallLocation type is REG_DWORD */
sz = MAX_PATH;
@@ -4888,10 +4887,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTALLLOCATIONA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "InstallSource", 0, REG_SZ, (LPBYTE)"source", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallSource value exists */
sz = MAX_PATH;
@@ -4899,11 +4898,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTALLSOURCEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "source"), "Expected \"source\", got \"%s\"\n", buf);
- ok(sz == 6, "Expected 6, got %d\n", sz);
+ ok(sz == 6, "Expected 6, got %lu\n", sz);
res = RegSetValueExA(propkey, "InstallSource", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallSource type is REG_DWORD */
sz = MAX_PATH;
@@ -4911,10 +4910,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTALLSOURCEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "InstallDate", 0, REG_SZ, (LPBYTE)"date", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallDate value exists */
sz = MAX_PATH;
@@ -4922,11 +4921,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTALLDATEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "date"), "Expected \"date\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(propkey, "InstallDate", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallDate type is REG_DWORD */
sz = MAX_PATH;
@@ -4934,10 +4933,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTALLDATEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "Publisher", 0, REG_SZ, (LPBYTE)"pub", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Publisher value exists */
sz = MAX_PATH;
@@ -4945,11 +4944,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PUBLISHERA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "pub"), "Expected \"pub\", got \"%s\"\n", buf);
- ok(sz == 3, "Expected 3, got %d\n", sz);
+ ok(sz == 3, "Expected 3, got %lu\n", sz);
res = RegSetValueExA(propkey, "Publisher", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Publisher type is REG_DWORD */
sz = MAX_PATH;
@@ -4957,10 +4956,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PUBLISHERA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "LocalPackage", 0, REG_SZ, (LPBYTE)"pack", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* LocalPackage value exists */
sz = MAX_PATH;
@@ -4968,11 +4967,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_LOCALPACKAGEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "pack"), "Expected \"pack\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(propkey, "LocalPackage", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* LocalPackage type is REG_DWORD */
sz = MAX_PATH;
@@ -4980,10 +4979,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_LOCALPACKAGEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "UrlInfoAbout", 0, REG_SZ, (LPBYTE)"about", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* UrlInfoAbout value exists */
sz = MAX_PATH;
@@ -4991,11 +4990,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_URLINFOABOUTA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "about"), "Expected \"about\", got \"%s\"\n", buf);
- ok(sz == 5, "Expected 5, got %d\n", sz);
+ ok(sz == 5, "Expected 5, got %lu\n", sz);
res = RegSetValueExA(propkey, "UrlInfoAbout", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* UrlInfoAbout type is REG_DWORD */
sz = MAX_PATH;
@@ -5003,10 +5002,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_URLINFOABOUTA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "UrlUpdateInfo", 0, REG_SZ, (LPBYTE)"info", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* UrlUpdateInfo value exists */
sz = MAX_PATH;
@@ -5014,11 +5013,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_URLUPDATEINFOA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "info"), "Expected \"info\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(propkey, "UrlUpdateInfo", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* UrlUpdateInfo type is REG_DWORD */
sz = MAX_PATH;
@@ -5026,10 +5025,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_URLUPDATEINFOA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "VersionMinor", 0, REG_SZ, (LPBYTE)"1", 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* VersionMinor value exists */
sz = MAX_PATH;
@@ -5037,11 +5036,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSIONMINORA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "1"), "Expected \"1\", got \"%s\"\n", buf);
- ok(sz == 1, "Expected 1, got %d\n", sz);
+ ok(sz == 1, "Expected 1, got %lu\n", sz);
res = RegSetValueExA(propkey, "VersionMinor", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* VersionMinor type is REG_DWORD */
sz = MAX_PATH;
@@ -5049,10 +5048,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSIONMINORA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "VersionMajor", 0, REG_SZ, (LPBYTE)"1", 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* VersionMajor value exists */
sz = MAX_PATH;
@@ -5060,11 +5059,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSIONMAJORA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "1"), "Expected \"1\", got \"%s\"\n", buf);
- ok(sz == 1, "Expected 1, got %d\n", sz);
+ ok(sz == 1, "Expected 1, got %lu\n", sz);
res = RegSetValueExA(propkey, "VersionMajor", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* VersionMajor type is REG_DWORD */
sz = MAX_PATH;
@@ -5072,10 +5071,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSIONMAJORA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "ProductID", 0, REG_SZ, (LPBYTE)"id", 3);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductID value exists */
sz = MAX_PATH;
@@ -5083,11 +5082,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTIDA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "id"), "Expected \"id\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "ProductID", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductID type is REG_DWORD */
sz = MAX_PATH;
@@ -5095,10 +5094,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTIDA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "RegCompany", 0, REG_SZ, (LPBYTE)"comp", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* RegCompany value exists */
sz = MAX_PATH;
@@ -5106,11 +5105,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_REGCOMPANYA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "comp"), "Expected \"comp\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(propkey, "RegCompany", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* RegCompany type is REG_DWORD */
sz = MAX_PATH;
@@ -5118,10 +5117,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_REGCOMPANYA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "RegOwner", 0, REG_SZ, (LPBYTE)"own", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* RegOwner value exists */
sz = MAX_PATH;
@@ -5129,11 +5128,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_REGOWNERA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "own"), "Expected \"own\", got \"%s\"\n", buf);
- ok(sz == 3, "Expected 3, got %d\n", sz);
+ ok(sz == 3, "Expected 3, got %lu\n", sz);
res = RegSetValueExA(propkey, "RegOwner", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* RegOwner type is REG_DWORD */
sz = MAX_PATH;
@@ -5141,10 +5140,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_REGOWNERA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "InstanceType", 0, REG_SZ, (LPBYTE)"type", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstanceType value exists */
sz = MAX_PATH;
@@ -5152,11 +5151,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTANCETYPEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
res = RegSetValueExA(propkey, "InstanceType", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstanceType type is REG_DWORD */
sz = MAX_PATH;
@@ -5164,10 +5163,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTANCETYPEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
res = RegSetValueExA(prodkey, "InstanceType", 0, REG_SZ, (LPBYTE)"type", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstanceType value exists */
sz = MAX_PATH;
@@ -5175,11 +5174,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTANCETYPEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "type"), "Expected \"type\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(prodkey, "InstanceType", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstanceType type is REG_DWORD */
sz = MAX_PATH;
@@ -5187,10 +5186,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTANCETYPEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "Transforms", 0, REG_SZ, (LPBYTE)"tforms", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Transforms value exists */
sz = MAX_PATH;
@@ -5198,11 +5197,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_TRANSFORMSA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
res = RegSetValueExA(propkey, "Transforms", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Transforms type is REG_DWORD */
sz = MAX_PATH;
@@ -5210,10 +5209,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_TRANSFORMSA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
res = RegSetValueExA(prodkey, "Transforms", 0, REG_SZ, (LPBYTE)"tforms", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Transforms value exists */
sz = MAX_PATH;
@@ -5221,11 +5220,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_TRANSFORMSA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "tforms"), "Expected \"tforms\", got \"%s\"\n", buf);
- ok(sz == 6, "Expected 6, got %d\n", sz);
+ ok(sz == 6, "Expected 6, got %lu\n", sz);
res = RegSetValueExA(prodkey, "Transforms", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Transforms type is REG_DWORD */
sz = MAX_PATH;
@@ -5233,10 +5232,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_TRANSFORMSA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "Language", 0, REG_SZ, (LPBYTE)"lang", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Language value exists */
sz = MAX_PATH;
@@ -5244,11 +5243,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_LANGUAGEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
res = RegSetValueExA(propkey, "Language", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Language type is REG_DWORD */
sz = MAX_PATH;
@@ -5256,10 +5255,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_LANGUAGEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
res = RegSetValueExA(prodkey, "Language", 0, REG_SZ, (LPBYTE)"lang", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Language value exists */
sz = MAX_PATH;
@@ -5267,11 +5266,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_LANGUAGEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "lang"), "Expected \"lang\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(prodkey, "Language", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Language type is REG_DWORD */
sz = MAX_PATH;
@@ -5279,10 +5278,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_LANGUAGEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "ProductName", 0, REG_SZ, (LPBYTE)"name", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductName value exists */
sz = MAX_PATH;
@@ -5290,11 +5289,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTNAMEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
res = RegSetValueExA(propkey, "ProductName", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductName type is REG_DWORD */
sz = MAX_PATH;
@@ -5302,10 +5301,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTNAMEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
res = RegSetValueExA(prodkey, "ProductName", 0, REG_SZ, (LPBYTE)"name", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductName value exists */
sz = MAX_PATH;
@@ -5313,11 +5312,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTNAMEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "name"), "Expected \"name\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(prodkey, "ProductName", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductName type is REG_DWORD */
sz = MAX_PATH;
@@ -5325,10 +5324,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTNAMEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "Assignment", 0, REG_SZ, (LPBYTE)"at", 3);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Assignment value exists */
sz = MAX_PATH;
@@ -5336,11 +5335,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_ASSIGNMENTTYPEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
res = RegSetValueExA(propkey, "Assignment", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Assignment type is REG_DWORD */
sz = MAX_PATH;
@@ -5348,10 +5347,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_ASSIGNMENTTYPEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
res = RegSetValueExA(prodkey, "Assignment", 0, REG_SZ, (LPBYTE)"at", 3);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Assignment value exists */
sz = MAX_PATH;
@@ -5359,11 +5358,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_ASSIGNMENTTYPEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "at"), "Expected \"at\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(prodkey, "Assignment", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Assignment type is REG_DWORD */
sz = MAX_PATH;
@@ -5371,10 +5370,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_ASSIGNMENTTYPEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "PackageCode", 0, REG_SZ, (LPBYTE)"code", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* PackageCode value exists */
sz = MAX_PATH;
@@ -5382,11 +5381,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PACKAGECODEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
res = RegSetValueExA(propkey, "PackageCode", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* PackageCode type is REG_DWORD */
sz = MAX_PATH;
@@ -5394,10 +5393,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PACKAGECODEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
res = RegSetValueExA(prodkey, "PackageCode", 0, REG_SZ, (LPBYTE)"code", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* PackageCode value exists */
sz = MAX_PATH;
@@ -5406,11 +5405,11 @@ static void test_MsiGetProductInfo(void)
ok(r == ERROR_BAD_CONFIGURATION,
"Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
ok(!lstrcmpA(buf, "code"), "Expected \"code\", got \"%s\"\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "PackageCode", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* PackageCode type is REG_DWORD */
sz = MAX_PATH;
@@ -5418,10 +5417,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PACKAGECODEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(prodkey, "PackageCode", 0, REG_SZ, (LPBYTE)pack_squashed, 33);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* PackageCode value exists */
sz = MAX_PATH;
@@ -5429,10 +5428,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PACKAGECODEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, packcode), "Expected \"%s\", got \"%s\"\n", packcode, buf);
- ok(sz == 38, "Expected 38, got %d\n", sz);
+ ok(sz == 38, "Expected 38, got %lu\n", sz);
res = RegSetValueExA(propkey, "Version", 0, REG_SZ, (LPBYTE)"ver", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Version value exists */
sz = MAX_PATH;
@@ -5440,11 +5439,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSIONA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
res = RegSetValueExA(propkey, "Version", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Version type is REG_DWORD */
sz = MAX_PATH;
@@ -5452,10 +5451,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSIONA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
res = RegSetValueExA(prodkey, "Version", 0, REG_SZ, (LPBYTE)"ver", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Version value exists */
sz = MAX_PATH;
@@ -5463,11 +5462,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSIONA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "ver"), "Expected \"ver\", got \"%s\"\n", buf);
- ok(sz == 3, "Expected 3, got %d\n", sz);
+ ok(sz == 3, "Expected 3, got %lu\n", sz);
res = RegSetValueExA(prodkey, "Version", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Version type is REG_DWORD */
sz = MAX_PATH;
@@ -5475,10 +5474,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSIONA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "ProductIcon", 0, REG_SZ, (LPBYTE)"ico", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductIcon value exists */
sz = MAX_PATH;
@@ -5486,11 +5485,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTICONA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
res = RegSetValueExA(propkey, "ProductIcon", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductIcon type is REG_DWORD */
sz = MAX_PATH;
@@ -5498,10 +5497,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTICONA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
res = RegSetValueExA(prodkey, "ProductIcon", 0, REG_SZ, (LPBYTE)"ico", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductIcon value exists */
sz = MAX_PATH;
@@ -5509,11 +5508,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTICONA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "ico"), "Expected \"ico\", got \"%s\"\n", buf);
- ok(sz == 3, "Expected 3, got %d\n", sz);
+ ok(sz == 3, "Expected 3, got %lu\n", sz);
res = RegSetValueExA(prodkey, "ProductIcon", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductIcon type is REG_DWORD */
sz = MAX_PATH;
@@ -5521,7 +5520,7 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTICONA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
/* SourceList key does not exist */
sz = MAX_PATH;
@@ -5531,10 +5530,10 @@ static void test_MsiGetProductInfo(void)
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"),
"Expected buf to be unchanged, got \"%s\"\n", buf);
- ok(sz == MAX_PATH, "Expected sz to be unchanged, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected sz to be unchanged, got %lu\n", sz);
res = RegCreateKeyExA(prodkey, "SourceList", 0, NULL, 0, access, NULL, &source, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* SourceList key exists, but PackageName val does not exist */
sz = MAX_PATH;
@@ -5542,10 +5541,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PACKAGENAMEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
res = RegSetValueExA(source, "PackageName", 0, REG_SZ, (LPBYTE)"packname", 9);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* PackageName val exists */
sz = MAX_PATH;
@@ -5553,11 +5552,11 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PACKAGENAMEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "packname"), "Expected \"packname\", got \"%s\"\n", buf);
- ok(sz == 8, "Expected 8, got %d\n", sz);
+ ok(sz == 8, "Expected 8, got %lu\n", sz);
res = RegSetValueExA(source, "PackageName", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* PackageName type is REG_DWORD */
sz = MAX_PATH;
@@ -5565,10 +5564,10 @@ static void test_MsiGetProductInfo(void)
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PACKAGENAMEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "AuthorizedLUAApp", 0, REG_SZ, (LPBYTE)"auth", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Authorized value exists */
sz = MAX_PATH;
@@ -5578,12 +5577,12 @@ static void test_MsiGetProductInfo(void)
{
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
}
res = RegSetValueExA(propkey, "AuthorizedLUAApp", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* AuthorizedLUAApp type is REG_DWORD */
sz = MAX_PATH;
@@ -5593,11 +5592,11 @@ static void test_MsiGetProductInfo(void)
{
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
}
res = RegSetValueExA(prodkey, "AuthorizedLUAApp", 0, REG_SZ, (LPBYTE)"auth", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Authorized value exists */
sz = MAX_PATH;
@@ -5607,12 +5606,12 @@ static void test_MsiGetProductInfo(void)
{
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "auth"), "Expected \"auth\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
}
res = RegSetValueExA(prodkey, "AuthorizedLUAApp", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* AuthorizedLUAApp type is REG_DWORD */
sz = MAX_PATH;
@@ -5622,7 +5621,7 @@ static void test_MsiGetProductInfo(void)
{
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
}
RegDeleteValueA(propkey, "HelpLink");
@@ -5708,7 +5707,7 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
/* empty szProductCode */
sz = MAX_PATH;
@@ -5718,7 +5717,7 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
/* garbage szProductCode */
sz = MAX_PATH;
@@ -5728,7 +5727,7 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
/* guid without brackets */
sz = MAX_PATH;
@@ -5739,7 +5738,7 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
/* guid with brackets */
sz = MAX_PATH;
@@ -5750,7 +5749,7 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
/* szValue is non-NULL while pcchValue is NULL */
lstrcpyA(buf, "apple");
@@ -5769,7 +5768,7 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
/* szProperty is NULL */
sz = MAX_PATH;
@@ -5780,7 +5779,7 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
/* szProperty is empty */
sz = MAX_PATH;
@@ -5791,7 +5790,7 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
/* szProperty is not a valid property */
sz = MAX_PATH;
@@ -5802,7 +5801,7 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
/* same length as guid, but random */
sz = MAX_PATH;
@@ -5813,7 +5812,7 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
/* MSIINSTALLCONTEXT_USERUNMANAGED */
@@ -5829,7 +5828,7 @@ static void test_MsiGetProductInfoEx(void)
LocalFree(usersid);
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local user product key exists */
sz = MAX_PATH;
@@ -5840,10 +5839,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegCreateKeyExA(localkey, "InstallProperties", 0, NULL, 0, access, NULL, &propkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallProperties key exists */
sz = MAX_PATH;
@@ -5854,10 +5853,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "LocalPackage", 0, REG_SZ, (LPBYTE)"local", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* LocalPackage value exists */
sz = MAX_PATH;
@@ -5867,7 +5866,7 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_PRODUCTSTATEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "5"), "Expected \"5\", got \"%s\"\n", buf);
- ok(sz == 1, "Expected 1, got %d\n", sz);
+ ok(sz == 1, "Expected 1, got %lu\n", sz);
RegDeleteValueA(propkey, "LocalPackage");
@@ -5880,10 +5879,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "LocalPackage", 0, REG_SZ, (LPBYTE)"local", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* LocalPackage exists, but HelpLink does not exist */
sz = MAX_PATH;
@@ -5893,10 +5892,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_HELPLINKA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
res = RegSetValueExA(propkey, "HelpLink", 0, REG_SZ, (LPBYTE)"link", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* HelpLink value exists */
sz = MAX_PATH;
@@ -5906,10 +5905,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_HELPLINKA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "link"), "Expected \"link\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(propkey, "HelpTelephone", 0, REG_SZ, (LPBYTE)"phone", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* HelpTelephone value exists */
sz = MAX_PATH;
@@ -5919,7 +5918,7 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_HELPTELEPHONEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "phone"), "Expected \"phone\", got \"%s\"\n", buf);
- ok(sz == 5, "Expected 5, got %d\n", sz);
+ ok(sz == 5, "Expected 5, got %lu\n", sz);
/* szValue and pcchValue are NULL */
r = pMsiGetProductInfoExA(prodcode, usersid,
@@ -5935,7 +5934,7 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_HELPTELEPHONEA, buf, &sz);
ok(r == ERROR_MORE_DATA,
"Expected ERROR_MORE_DATA, got %d\n", r);
- ok(sz == 10, "Expected 10, got %d\n", sz);
+ ok(sz == 10, "Expected 10, got %lu\n", sz);
/* szValue is NULL, pcchValue is exactly 5 */
sz = 5;
@@ -5943,7 +5942,7 @@ static void test_MsiGetProductInfoEx(void)
MSIINSTALLCONTEXT_USERUNMANAGED,
INSTALLPROPERTY_HELPTELEPHONEA, NULL, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(sz == 10, "Expected 10, got %d\n", sz);
+ ok(sz == 10, "Expected 10, got %lu\n", sz);
/* szValue is NULL, pcchValue is MAX_PATH */
sz = MAX_PATH;
@@ -5951,7 +5950,7 @@ static void test_MsiGetProductInfoEx(void)
MSIINSTALLCONTEXT_USERUNMANAGED,
INSTALLPROPERTY_HELPTELEPHONEA, NULL, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(sz == 10, "Expected 10, got %d\n", sz);
+ ok(sz == 10, "Expected 10, got %lu\n", sz);
/* pcchValue is exactly 0 */
sz = 0;
@@ -5962,10 +5961,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_MORE_DATA,
"Expected ERROR_MORE_DATA, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf);
- ok(sz == 10, "Expected 10, got %d\n", sz);
+ ok(sz == 10, "Expected 10, got %lu\n", sz);
res = RegSetValueExA(propkey, "notvalid", 0, REG_SZ, (LPBYTE)"invalid", 8);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* szProperty is not a valid property */
sz = MAX_PATH;
@@ -5976,10 +5975,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "InstallDate", 0, REG_SZ, (LPBYTE)"date", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallDate value exists */
sz = MAX_PATH;
@@ -5989,10 +5988,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_INSTALLDATEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "date"), "Expected \"date\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(propkey, "DisplayName", 0, REG_SZ, (LPBYTE)"name", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* DisplayName value exists */
sz = MAX_PATH;
@@ -6002,10 +6001,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_INSTALLEDPRODUCTNAMEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "name"), "Expected \"name\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(propkey, "InstallLocation", 0, REG_SZ, (LPBYTE)"loc", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallLocation value exists */
sz = MAX_PATH;
@@ -6015,10 +6014,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_INSTALLLOCATIONA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "loc"), "Expected \"loc\", got \"%s\"\n", buf);
- ok(sz == 3, "Expected 3, got %d\n", sz);
+ ok(sz == 3, "Expected 3, got %lu\n", sz);
res = RegSetValueExA(propkey, "InstallSource", 0, REG_SZ, (LPBYTE)"source", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallSource value exists */
sz = MAX_PATH;
@@ -6028,10 +6027,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_INSTALLSOURCEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "source"), "Expected \"source\", got \"%s\"\n", buf);
- ok(sz == 6, "Expected 6, got %d\n", sz);
+ ok(sz == 6, "Expected 6, got %lu\n", sz);
res = RegSetValueExA(propkey, "LocalPackage", 0, REG_SZ, (LPBYTE)"local", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* LocalPackage value exists */
sz = MAX_PATH;
@@ -6041,10 +6040,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_LOCALPACKAGEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "local"), "Expected \"local\", got \"%s\"\n", buf);
- ok(sz == 5, "Expected 5, got %d\n", sz);
+ ok(sz == 5, "Expected 5, got %lu\n", sz);
res = RegSetValueExA(propkey, "Publisher", 0, REG_SZ, (LPBYTE)"pub", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Publisher value exists */
sz = MAX_PATH;
@@ -6054,10 +6053,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_PUBLISHERA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "pub"), "Expected \"pub\", got \"%s\"\n", buf);
- ok(sz == 3, "Expected 3, got %d\n", sz);
+ ok(sz == 3, "Expected 3, got %lu\n", sz);
res = RegSetValueExA(propkey, "URLInfoAbout", 0, REG_SZ, (LPBYTE)"about", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* URLInfoAbout value exists */
sz = MAX_PATH;
@@ -6067,10 +6066,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_URLINFOABOUTA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "about"), "Expected \"about\", got \"%s\"\n", buf);
- ok(sz == 5, "Expected 5, got %d\n", sz);
+ ok(sz == 5, "Expected 5, got %lu\n", sz);
res = RegSetValueExA(propkey, "URLUpdateInfo", 0, REG_SZ, (LPBYTE)"update", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* URLUpdateInfo value exists */
sz = MAX_PATH;
@@ -6080,10 +6079,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_URLUPDATEINFOA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "update"), "Expected \"update\", got \"%s\"\n", buf);
- ok(sz == 6, "Expected 6, got %d\n", sz);
+ ok(sz == 6, "Expected 6, got %lu\n", sz);
res = RegSetValueExA(propkey, "VersionMinor", 0, REG_SZ, (LPBYTE)"2", 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* VersionMinor value exists */
sz = MAX_PATH;
@@ -6093,10 +6092,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_VERSIONMINORA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "2"), "Expected \"2\", got \"%s\"\n", buf);
- ok(sz == 1, "Expected 1, got %d\n", sz);
+ ok(sz == 1, "Expected 1, got %lu\n", sz);
res = RegSetValueExA(propkey, "VersionMajor", 0, REG_SZ, (LPBYTE)"3", 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* VersionMajor value exists */
sz = MAX_PATH;
@@ -6106,10 +6105,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_VERSIONMAJORA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "3"), "Expected \"3\", got \"%s\"\n", buf);
- ok(sz == 1, "Expected 1, got %d\n", sz);
+ ok(sz == 1, "Expected 1, got %lu\n", sz);
res = RegSetValueExA(propkey, "DisplayVersion", 0, REG_SZ, (LPBYTE)"3.2.1", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* DisplayVersion value exists */
sz = MAX_PATH;
@@ -6119,10 +6118,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_VERSIONSTRINGA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "3.2.1"), "Expected \"3.2.1\", got \"%s\"\n", buf);
- ok(sz == 5, "Expected 5, got %d\n", sz);
+ ok(sz == 5, "Expected 5, got %lu\n", sz);
res = RegSetValueExA(propkey, "ProductID", 0, REG_SZ, (LPBYTE)"id", 3);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductID value exists */
sz = MAX_PATH;
@@ -6132,10 +6131,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_PRODUCTIDA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "id"), "Expected \"id\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "RegCompany", 0, REG_SZ, (LPBYTE)"comp", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* RegCompany value exists */
sz = MAX_PATH;
@@ -6145,10 +6144,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_REGCOMPANYA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "comp"), "Expected \"comp\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(propkey, "RegOwner", 0, REG_SZ, (LPBYTE)"owner", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* RegOwner value exists */
sz = MAX_PATH;
@@ -6158,10 +6157,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_REGOWNERA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "owner"), "Expected \"owner\", got \"%s\"\n", buf);
- ok(sz == 5, "Expected 5, got %d\n", sz);
+ ok(sz == 5, "Expected 5, got %lu\n", sz);
res = RegSetValueExA(propkey, "Transforms", 0, REG_SZ, (LPBYTE)"trans", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Transforms value exists */
sz = MAX_PATH;
@@ -6172,10 +6171,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "Language", 0, REG_SZ, (LPBYTE)"lang", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Language value exists */
sz = MAX_PATH;
@@ -6186,10 +6185,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "ProductName", 0, REG_SZ, (LPBYTE)"name", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductName value exists */
sz = MAX_PATH;
@@ -6200,10 +6199,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "AssignmentType", 0, REG_SZ, (LPBYTE)"type", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* FIXME */
@@ -6216,10 +6215,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "PackageCode", 0, REG_SZ, (LPBYTE)"code", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* PackageCode value exists */
sz = MAX_PATH;
@@ -6230,10 +6229,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "Version", 0, REG_SZ, (LPBYTE)"ver", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Version value exists */
sz = MAX_PATH;
@@ -6244,10 +6243,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "ProductIcon", 0, REG_SZ, (LPBYTE)"icon", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductIcon value exists */
sz = MAX_PATH;
@@ -6258,10 +6257,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "PackageName", 0, REG_SZ, (LPBYTE)"name", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* PackageName value exists */
sz = MAX_PATH;
@@ -6272,10 +6271,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "AuthorizedLUAApp", 0, REG_SZ, (LPBYTE)"auth", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* AuthorizedLUAApp value exists */
sz = MAX_PATH;
@@ -6286,7 +6285,7 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
RegDeleteValueA(propkey, "AuthorizedLUAApp");
RegDeleteValueA(propkey, "PackageName");
@@ -6325,7 +6324,7 @@ static void test_MsiGetProductInfoEx(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &userkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user product key exists */
sz = MAX_PATH;
@@ -6336,7 +6335,7 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
RegDeleteKeyA(userkey, "");
RegCloseKey(userkey);
@@ -6345,7 +6344,7 @@ static void test_MsiGetProductInfoEx(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_CURRENT_USER, keypath, 0, NULL, 0, access, NULL, &prodkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
sz = MAX_PATH;
lstrcpyA(buf, "apple");
@@ -6361,10 +6360,10 @@ static void test_MsiGetProductInfoEx(void)
return;
}
ok(!lstrcmpA(buf, "1"), "Expected \"1\", got \"%s\"\n", buf);
- ok(sz == 1, "Expected 1, got %d\n", sz);
+ ok(sz == 1, "Expected 1, got %lu\n", sz);
res = RegSetValueExA(prodkey, "HelpLink", 0, REG_SZ, (LPBYTE)"link", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* HelpLink value exists */
sz = MAX_PATH;
@@ -6375,10 +6374,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "HelpTelephone", 0, REG_SZ, (LPBYTE)"phone", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* HelpTelephone value exists */
sz = MAX_PATH;
@@ -6389,10 +6388,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "InstallDate", 0, REG_SZ, (LPBYTE)"date", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallDate value exists */
sz = MAX_PATH;
@@ -6403,10 +6402,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "DisplayName", 0, REG_SZ, (LPBYTE)"name", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* DisplayName value exists */
sz = MAX_PATH;
@@ -6417,10 +6416,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "InstallLocation", 0, REG_SZ, (LPBYTE)"loc", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallLocation value exists */
sz = MAX_PATH;
@@ -6431,10 +6430,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "InstallSource", 0, REG_SZ, (LPBYTE)"source", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallSource value exists */
sz = MAX_PATH;
@@ -6445,10 +6444,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "LocalPackage", 0, REG_SZ, (LPBYTE)"local", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* LocalPackage value exists */
sz = MAX_PATH;
@@ -6459,10 +6458,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "Publisher", 0, REG_SZ, (LPBYTE)"pub", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Publisher value exists */
sz = MAX_PATH;
@@ -6473,10 +6472,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "URLInfoAbout", 0, REG_SZ, (LPBYTE)"about", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* URLInfoAbout value exists */
sz = MAX_PATH;
@@ -6487,10 +6486,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "URLUpdateInfo", 0, REG_SZ, (LPBYTE)"update", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* URLUpdateInfo value exists */
sz = MAX_PATH;
@@ -6501,10 +6500,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "VersionMinor", 0, REG_SZ, (LPBYTE)"2", 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* VersionMinor value exists */
sz = MAX_PATH;
@@ -6515,10 +6514,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "VersionMajor", 0, REG_SZ, (LPBYTE)"3", 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* VersionMajor value exists */
sz = MAX_PATH;
@@ -6529,10 +6528,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "DisplayVersion", 0, REG_SZ, (LPBYTE)"3.2.1", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* DisplayVersion value exists */
sz = MAX_PATH;
@@ -6543,10 +6542,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "ProductID", 0, REG_SZ, (LPBYTE)"id", 3);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductID value exists */
sz = MAX_PATH;
@@ -6557,10 +6556,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "RegCompany", 0, REG_SZ, (LPBYTE)"comp", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* RegCompany value exists */
sz = MAX_PATH;
@@ -6571,10 +6570,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "RegOwner", 0, REG_SZ, (LPBYTE)"owner", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* RegOwner value exists */
sz = MAX_PATH;
@@ -6585,10 +6584,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "Transforms", 0, REG_SZ, (LPBYTE)"trans", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Transforms value exists */
sz = MAX_PATH;
@@ -6598,10 +6597,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_TRANSFORMSA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "trans"), "Expected \"trans\", got \"%s\"\n", buf);
- ok(sz == 5, "Expected 5, got %d\n", sz);
+ ok(sz == 5, "Expected 5, got %lu\n", sz);
res = RegSetValueExA(prodkey, "Language", 0, REG_SZ, (LPBYTE)"lang", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Language value exists */
sz = MAX_PATH;
@@ -6611,10 +6610,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_LANGUAGEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "lang"), "Expected \"lang\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(prodkey, "ProductName", 0, REG_SZ, (LPBYTE)"name", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductName value exists */
sz = MAX_PATH;
@@ -6624,10 +6623,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_PRODUCTNAMEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "name"), "Expected \"name\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(prodkey, "AssignmentType", 0, REG_SZ, (LPBYTE)"type", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* FIXME */
@@ -6639,10 +6638,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_ASSIGNMENTTYPEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
res = RegSetValueExA(prodkey, "PackageCode", 0, REG_SZ, (LPBYTE)"code", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* FIXME */
@@ -6657,11 +6656,11 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_BAD_CONFIGURATION,
"Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
}
res = RegSetValueExA(prodkey, "Version", 0, REG_SZ, (LPBYTE)"ver", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Version value exists */
sz = MAX_PATH;
@@ -6671,10 +6670,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_VERSIONA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "ver"), "Expected \"ver\", got \"%s\"\n", buf);
- ok(sz == 3, "Expected 3, got %d\n", sz);
+ ok(sz == 3, "Expected 3, got %lu\n", sz);
res = RegSetValueExA(prodkey, "ProductIcon", 0, REG_SZ, (LPBYTE)"icon", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductIcon value exists */
sz = MAX_PATH;
@@ -6684,10 +6683,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_PRODUCTICONA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "icon"), "Expected \"icon\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(prodkey, "PackageName", 0, REG_SZ, (LPBYTE)"name", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* PackageName value exists */
sz = MAX_PATH;
@@ -6700,11 +6699,11 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
}
res = RegSetValueExA(prodkey, "AuthorizedLUAApp", 0, REG_SZ, (LPBYTE)"auth", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* AuthorizedLUAApp value exists */
sz = MAX_PATH;
@@ -6714,7 +6713,7 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_AUTHORIZED_LUA_APPA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "auth"), "Expected \"auth\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
RegDeleteValueA(prodkey, "AuthorizedLUAApp");
RegDeleteValueA(prodkey, "PackageName");
@@ -6753,7 +6752,7 @@ static void test_MsiGetProductInfoEx(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &localkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local user product key exists */
sz = MAX_PATH;
@@ -6764,10 +6763,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegCreateKeyExA(localkey, "InstallProperties", 0, NULL, 0, access, NULL, &propkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallProperties key exists */
sz = MAX_PATH;
@@ -6778,10 +6777,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "ManagedLocalPackage", 0, REG_SZ, (LPBYTE)"local", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ManagedLocalPackage value exists */
sz = MAX_PATH;
@@ -6791,10 +6790,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_PRODUCTSTATEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "5"), "Expected \"5\", got \"%s\"\n", buf);
- ok(sz == 1, "Expected 1, got %d\n", sz);
+ ok(sz == 1, "Expected 1, got %lu\n", sz);
res = RegSetValueExA(propkey, "HelpLink", 0, REG_SZ, (LPBYTE)"link", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* HelpLink value exists */
sz = MAX_PATH;
@@ -6804,10 +6803,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_HELPLINKA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "link"), "Expected \"link\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(propkey, "HelpTelephone", 0, REG_SZ, (LPBYTE)"phone", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* HelpTelephone value exists */
sz = MAX_PATH;
@@ -6817,10 +6816,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_HELPTELEPHONEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "phone"), "Expected \"phone\", got \"%s\"\n", buf);
- ok(sz == 5, "Expected 5, got %d\n", sz);
+ ok(sz == 5, "Expected 5, got %lu\n", sz);
res = RegSetValueExA(propkey, "InstallDate", 0, REG_SZ, (LPBYTE)"date", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallDate value exists */
sz = MAX_PATH;
@@ -6830,10 +6829,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_INSTALLDATEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "date"), "Expected \"date\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(propkey, "DisplayName", 0, REG_SZ, (LPBYTE)"name", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* DisplayName value exists */
sz = MAX_PATH;
@@ -6843,10 +6842,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_INSTALLEDPRODUCTNAMEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "name"), "Expected \"name\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(propkey, "InstallLocation", 0, REG_SZ, (LPBYTE)"loc", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallLocation value exists */
sz = MAX_PATH;
@@ -6856,10 +6855,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_INSTALLLOCATIONA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "loc"), "Expected \"loc\", got \"%s\"\n", buf);
- ok(sz == 3, "Expected 3, got %d\n", sz);
+ ok(sz == 3, "Expected 3, got %lu\n", sz);
res = RegSetValueExA(propkey, "InstallSource", 0, REG_SZ, (LPBYTE)"source", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallSource value exists */
sz = MAX_PATH;
@@ -6869,10 +6868,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_INSTALLSOURCEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "source"), "Expected \"source\", got \"%s\"\n", buf);
- ok(sz == 6, "Expected 6, got %d\n", sz);
+ ok(sz == 6, "Expected 6, got %lu\n", sz);
res = RegSetValueExA(propkey, "LocalPackage", 0, REG_SZ, (LPBYTE)"local", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* LocalPackage value exists */
sz = MAX_PATH;
@@ -6882,10 +6881,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_LOCALPACKAGEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "local"), "Expected \"local\", got \"%s\"\n", buf);
- ok(sz == 5, "Expected 5, got %d\n", sz);
+ ok(sz == 5, "Expected 5, got %lu\n", sz);
res = RegSetValueExA(propkey, "Publisher", 0, REG_SZ, (LPBYTE)"pub", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Publisher value exists */
sz = MAX_PATH;
@@ -6895,10 +6894,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_PUBLISHERA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "pub"), "Expected \"pub\", got \"%s\"\n", buf);
- ok(sz == 3, "Expected 3, got %d\n", sz);
+ ok(sz == 3, "Expected 3, got %lu\n", sz);
res = RegSetValueExA(propkey, "URLInfoAbout", 0, REG_SZ, (LPBYTE)"about", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* URLInfoAbout value exists */
sz = MAX_PATH;
@@ -6908,10 +6907,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_URLINFOABOUTA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "about"), "Expected \"about\", got \"%s\"\n", buf);
- ok(sz == 5, "Expected 5, got %d\n", sz);
+ ok(sz == 5, "Expected 5, got %lu\n", sz);
res = RegSetValueExA(propkey, "URLUpdateInfo", 0, REG_SZ, (LPBYTE)"update", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* URLUpdateInfo value exists */
sz = MAX_PATH;
@@ -6921,10 +6920,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_URLUPDATEINFOA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "update"), "Expected \"update\", got \"%s\"\n", buf);
- ok(sz == 6, "Expected 6, got %d\n", sz);
+ ok(sz == 6, "Expected 6, got %lu\n", sz);
res = RegSetValueExA(propkey, "VersionMinor", 0, REG_SZ, (LPBYTE)"2", 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* VersionMinor value exists */
sz = MAX_PATH;
@@ -6934,10 +6933,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_VERSIONMINORA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "2"), "Expected \"2\", got \"%s\"\n", buf);
- ok(sz == 1, "Expected 1, got %d\n", sz);
+ ok(sz == 1, "Expected 1, got %lu\n", sz);
res = RegSetValueExA(propkey, "VersionMajor", 0, REG_SZ, (LPBYTE)"3", 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* VersionMajor value exists */
sz = MAX_PATH;
@@ -6947,10 +6946,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_VERSIONMAJORA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "3"), "Expected \"3\", got \"%s\"\n", buf);
- ok(sz == 1, "Expected 1, got %d\n", sz);
+ ok(sz == 1, "Expected 1, got %lu\n", sz);
res = RegSetValueExA(propkey, "DisplayVersion", 0, REG_SZ, (LPBYTE)"3.2.1", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* DisplayVersion value exists */
sz = MAX_PATH;
@@ -6960,10 +6959,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_VERSIONSTRINGA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "3.2.1"), "Expected \"3.2.1\", got \"%s\"\n", buf);
- ok(sz == 5, "Expected 5, got %d\n", sz);
+ ok(sz == 5, "Expected 5, got %lu\n", sz);
res = RegSetValueExA(propkey, "ProductID", 0, REG_SZ, (LPBYTE)"id", 3);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductID value exists */
sz = MAX_PATH;
@@ -6973,10 +6972,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_PRODUCTIDA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "id"), "Expected \"id\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "RegCompany", 0, REG_SZ, (LPBYTE)"comp", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* RegCompany value exists */
sz = MAX_PATH;
@@ -6986,10 +6985,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_REGCOMPANYA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "comp"), "Expected \"comp\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(propkey, "RegOwner", 0, REG_SZ, (LPBYTE)"owner", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* RegOwner value exists */
sz = MAX_PATH;
@@ -6999,10 +6998,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_REGOWNERA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "owner"), "Expected \"owner\", got \"%s\"\n", buf);
- ok(sz == 5, "Expected 5, got %d\n", sz);
+ ok(sz == 5, "Expected 5, got %lu\n", sz);
res = RegSetValueExA(propkey, "Transforms", 0, REG_SZ, (LPBYTE)"trans", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Transforms value exists */
sz = MAX_PATH;
@@ -7013,10 +7012,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "Language", 0, REG_SZ, (LPBYTE)"lang", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Language value exists */
sz = MAX_PATH;
@@ -7027,10 +7026,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "ProductName", 0, REG_SZ, (LPBYTE)"name", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductName value exists */
sz = MAX_PATH;
@@ -7041,10 +7040,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "AssignmentType", 0, REG_SZ, (LPBYTE)"type", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* FIXME */
@@ -7057,10 +7056,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "PackageCode", 0, REG_SZ, (LPBYTE)"code", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* PackageCode value exists */
sz = MAX_PATH;
@@ -7071,10 +7070,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "Version", 0, REG_SZ, (LPBYTE)"ver", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Version value exists */
sz = MAX_PATH;
@@ -7085,10 +7084,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "ProductIcon", 0, REG_SZ, (LPBYTE)"icon", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductIcon value exists */
sz = MAX_PATH;
@@ -7099,10 +7098,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "PackageName", 0, REG_SZ, (LPBYTE)"name", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* PackageName value exists */
sz = MAX_PATH;
@@ -7113,10 +7112,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "AuthorizedLUAApp", 0, REG_SZ, (LPBYTE)"auth", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* AuthorizedLUAApp value exists */
sz = MAX_PATH;
@@ -7127,7 +7126,7 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
RegDeleteValueA(propkey, "AuthorizedLUAApp");
RegDeleteValueA(propkey, "PackageName");
@@ -7166,7 +7165,7 @@ static void test_MsiGetProductInfoEx(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &userkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user product key exists */
sz = MAX_PATH;
@@ -7176,7 +7175,7 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_PRODUCTSTATEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "1"), "Expected \"1\", got \"%s\"\n", buf);
- ok(sz == 1, "Expected 1, got %d\n", sz);
+ ok(sz == 1, "Expected 1, got %lu\n", sz);
delete_key(userkey, "", access & KEY_WOW64_64KEY);
RegCloseKey(userkey);
@@ -7185,7 +7184,7 @@ static void test_MsiGetProductInfoEx(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &prodkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* current user product key exists */
sz = MAX_PATH;
@@ -7196,10 +7195,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "HelpLink", 0, REG_SZ, (LPBYTE)"link", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* HelpLink value exists, user product key does not exist */
sz = MAX_PATH;
@@ -7210,7 +7209,7 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\");
lstrcatA(keypath, usersid);
@@ -7218,10 +7217,10 @@ static void test_MsiGetProductInfoEx(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &userkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(userkey, "HelpLink", 0, REG_SZ, (LPBYTE)"link", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* HelpLink value exists, user product key does exist */
sz = MAX_PATH;
@@ -7232,10 +7231,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(userkey, "HelpTelephone", 0, REG_SZ, (LPBYTE)"phone", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* HelpTelephone value exists */
sz = MAX_PATH;
@@ -7246,10 +7245,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(userkey, "InstallDate", 0, REG_SZ, (LPBYTE)"date", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallDate value exists */
sz = MAX_PATH;
@@ -7260,10 +7259,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(userkey, "DisplayName", 0, REG_SZ, (LPBYTE)"name", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* DisplayName value exists */
sz = MAX_PATH;
@@ -7274,10 +7273,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(userkey, "InstallLocation", 0, REG_SZ, (LPBYTE)"loc", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallLocation value exists */
sz = MAX_PATH;
@@ -7288,10 +7287,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(userkey, "InstallSource", 0, REG_SZ, (LPBYTE)"source", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallSource value exists */
sz = MAX_PATH;
@@ -7302,10 +7301,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(userkey, "LocalPackage", 0, REG_SZ, (LPBYTE)"local", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* LocalPackage value exists */
sz = MAX_PATH;
@@ -7316,10 +7315,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(userkey, "Publisher", 0, REG_SZ, (LPBYTE)"pub", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Publisher value exists */
sz = MAX_PATH;
@@ -7330,10 +7329,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(userkey, "URLInfoAbout", 0, REG_SZ, (LPBYTE)"about", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* URLInfoAbout value exists */
sz = MAX_PATH;
@@ -7344,10 +7343,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(userkey, "URLUpdateInfo", 0, REG_SZ, (LPBYTE)"update", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* URLUpdateInfo value exists */
sz = MAX_PATH;
@@ -7358,10 +7357,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(userkey, "VersionMinor", 0, REG_SZ, (LPBYTE)"2", 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* VersionMinor value exists */
sz = MAX_PATH;
@@ -7372,10 +7371,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(userkey, "VersionMajor", 0, REG_SZ, (LPBYTE)"3", 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* VersionMajor value exists */
sz = MAX_PATH;
@@ -7386,10 +7385,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(userkey, "DisplayVersion", 0, REG_SZ, (LPBYTE)"3.2.1", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* DisplayVersion value exists */
sz = MAX_PATH;
@@ -7400,10 +7399,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(userkey, "ProductID", 0, REG_SZ, (LPBYTE)"id", 3);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductID value exists */
sz = MAX_PATH;
@@ -7414,10 +7413,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(userkey, "RegCompany", 0, REG_SZ, (LPBYTE)"comp", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* RegCompany value exists */
sz = MAX_PATH;
@@ -7428,10 +7427,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(userkey, "RegOwner", 0, REG_SZ, (LPBYTE)"owner", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* RegOwner value exists */
sz = MAX_PATH;
@@ -7442,10 +7441,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(userkey, "Transforms", 0, REG_SZ, (LPBYTE)"trans", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Transforms value exists */
sz = MAX_PATH;
@@ -7455,10 +7454,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_TRANSFORMSA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "trans"), "Expected \"trans\", got \"%s\"\n", buf);
- ok(sz == 5, "Expected 5, got %d\n", sz);
+ ok(sz == 5, "Expected 5, got %lu\n", sz);
res = RegSetValueExA(userkey, "Language", 0, REG_SZ, (LPBYTE)"lang", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Language value exists */
sz = MAX_PATH;
@@ -7468,10 +7467,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_LANGUAGEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "lang"), "Expected \"lang\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(userkey, "ProductName", 0, REG_SZ, (LPBYTE)"name", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductName value exists */
sz = MAX_PATH;
@@ -7481,10 +7480,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_PRODUCTNAMEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "name"), "Expected \"name\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(userkey, "AssignmentType", 0, REG_SZ, (LPBYTE)"type", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* FIXME */
@@ -7496,10 +7495,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_ASSIGNMENTTYPEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
res = RegSetValueExA(userkey, "PackageCode", 0, REG_SZ, (LPBYTE)"code", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* FIXME */
@@ -7514,11 +7513,11 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_BAD_CONFIGURATION,
"Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
}
res = RegSetValueExA(userkey, "Version", 0, REG_SZ, (LPBYTE)"ver", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Version value exists */
sz = MAX_PATH;
@@ -7528,10 +7527,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_VERSIONA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "ver"), "Expected \"ver\", got \"%s\"\n", buf);
- ok(sz == 3, "Expected 3, got %d\n", sz);
+ ok(sz == 3, "Expected 3, got %lu\n", sz);
res = RegSetValueExA(userkey, "ProductIcon", 0, REG_SZ, (LPBYTE)"icon", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductIcon value exists */
sz = MAX_PATH;
@@ -7541,10 +7540,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_PRODUCTICONA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "icon"), "Expected \"icon\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(userkey, "PackageName", 0, REG_SZ, (LPBYTE)"name", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* PackageName value exists */
sz = MAX_PATH;
@@ -7557,11 +7556,11 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
}
res = RegSetValueExA(userkey, "AuthorizedLUAApp", 0, REG_SZ, (LPBYTE)"auth", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* AuthorizedLUAApp value exists */
sz = MAX_PATH;
@@ -7571,7 +7570,7 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_AUTHORIZED_LUA_APPA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "auth"), "Expected \"auth\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
RegDeleteValueA(userkey, "AuthorizedLUAApp");
RegDeleteValueA(userkey, "PackageName");
@@ -7614,13 +7613,13 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\S-1-5-18\\Products\\");
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &localkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local system product key exists */
sz = MAX_PATH;
@@ -7631,10 +7630,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegCreateKeyExA(localkey, "InstallProperties", 0, NULL, 0, access, NULL, &propkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallProperties key exists */
sz = MAX_PATH;
@@ -7645,10 +7644,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "LocalPackage", 0, REG_SZ, (LPBYTE)"local", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* LocalPackage value exists */
sz = MAX_PATH;
@@ -7658,10 +7657,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_PRODUCTSTATEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "5"), "Expected \"5\", got \"%s\"\n", buf);
- ok(sz == 1, "Expected 1, got %d\n", sz);
+ ok(sz == 1, "Expected 1, got %lu\n", sz);
res = RegSetValueExA(propkey, "HelpLink", 0, REG_SZ, (LPBYTE)"link", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* HelpLink value exists */
sz = MAX_PATH;
@@ -7671,10 +7670,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_HELPLINKA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "link"), "Expected \"link\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(propkey, "HelpTelephone", 0, REG_SZ, (LPBYTE)"phone", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* HelpTelephone value exists */
sz = MAX_PATH;
@@ -7684,10 +7683,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_HELPTELEPHONEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "phone"), "Expected \"phone\", got \"%s\"\n", buf);
- ok(sz == 5, "Expected 5, got %d\n", sz);
+ ok(sz == 5, "Expected 5, got %lu\n", sz);
res = RegSetValueExA(propkey, "InstallDate", 0, REG_SZ, (LPBYTE)"date", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallDate value exists */
sz = MAX_PATH;
@@ -7697,10 +7696,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_INSTALLDATEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "date"), "Expected \"date\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(propkey, "DisplayName", 0, REG_SZ, (LPBYTE)"name", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* DisplayName value exists */
sz = MAX_PATH;
@@ -7710,10 +7709,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_INSTALLEDPRODUCTNAMEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "name"), "Expected \"name\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(propkey, "InstallLocation", 0, REG_SZ, (LPBYTE)"loc", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallLocation value exists */
sz = MAX_PATH;
@@ -7723,10 +7722,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_INSTALLLOCATIONA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "loc"), "Expected \"loc\", got \"%s\"\n", buf);
- ok(sz == 3, "Expected 3, got %d\n", sz);
+ ok(sz == 3, "Expected 3, got %lu\n", sz);
res = RegSetValueExA(propkey, "InstallSource", 0, REG_SZ, (LPBYTE)"source", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallSource value exists */
sz = MAX_PATH;
@@ -7736,10 +7735,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_INSTALLSOURCEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "source"), "Expected \"source\", got \"%s\"\n", buf);
- ok(sz == 6, "Expected 6, got %d\n", sz);
+ ok(sz == 6, "Expected 6, got %lu\n", sz);
res = RegSetValueExA(propkey, "LocalPackage", 0, REG_SZ, (LPBYTE)"local", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* LocalPackage value exists */
sz = MAX_PATH;
@@ -7749,10 +7748,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_LOCALPACKAGEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "local"), "Expected \"local\", got \"%s\"\n", buf);
- ok(sz == 5, "Expected 5, got %d\n", sz);
+ ok(sz == 5, "Expected 5, got %lu\n", sz);
res = RegSetValueExA(propkey, "Publisher", 0, REG_SZ, (LPBYTE)"pub", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Publisher value exists */
sz = MAX_PATH;
@@ -7762,10 +7761,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_PUBLISHERA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "pub"), "Expected \"pub\", got \"%s\"\n", buf);
- ok(sz == 3, "Expected 3, got %d\n", sz);
+ ok(sz == 3, "Expected 3, got %lu\n", sz);
res = RegSetValueExA(propkey, "URLInfoAbout", 0, REG_SZ, (LPBYTE)"about", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* URLInfoAbout value exists */
sz = MAX_PATH;
@@ -7775,10 +7774,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_URLINFOABOUTA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "about"), "Expected \"about\", got \"%s\"\n", buf);
- ok(sz == 5, "Expected 5, got %d\n", sz);
+ ok(sz == 5, "Expected 5, got %lu\n", sz);
res = RegSetValueExA(propkey, "URLUpdateInfo", 0, REG_SZ, (LPBYTE)"update", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* URLUpdateInfo value exists */
sz = MAX_PATH;
@@ -7788,10 +7787,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_URLUPDATEINFOA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "update"), "Expected \"update\", got \"%s\"\n", buf);
- ok(sz == 6, "Expected 6, got %d\n", sz);
+ ok(sz == 6, "Expected 6, got %lu\n", sz);
res = RegSetValueExA(propkey, "VersionMinor", 0, REG_SZ, (LPBYTE)"2", 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* VersionMinor value exists */
sz = MAX_PATH;
@@ -7801,10 +7800,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_VERSIONMINORA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "2"), "Expected \"2\", got \"%s\"\n", buf);
- ok(sz == 1, "Expected 1, got %d\n", sz);
+ ok(sz == 1, "Expected 1, got %lu\n", sz);
res = RegSetValueExA(propkey, "VersionMajor", 0, REG_SZ, (LPBYTE)"3", 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* VersionMajor value exists */
sz = MAX_PATH;
@@ -7814,10 +7813,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_VERSIONMAJORA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "3"), "Expected \"3\", got \"%s\"\n", buf);
- ok(sz == 1, "Expected 1, got %d\n", sz);
+ ok(sz == 1, "Expected 1, got %lu\n", sz);
res = RegSetValueExA(propkey, "DisplayVersion", 0, REG_SZ, (LPBYTE)"3.2.1", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* DisplayVersion value exists */
sz = MAX_PATH;
@@ -7827,10 +7826,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_VERSIONSTRINGA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "3.2.1"), "Expected \"3.2.1\", got \"%s\"\n", buf);
- ok(sz == 5, "Expected 5, got %d\n", sz);
+ ok(sz == 5, "Expected 5, got %lu\n", sz);
res = RegSetValueExA(propkey, "ProductID", 0, REG_SZ, (LPBYTE)"id", 3);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductID value exists */
sz = MAX_PATH;
@@ -7840,10 +7839,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_PRODUCTIDA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "id"), "Expected \"id\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
res = RegSetValueExA(propkey, "RegCompany", 0, REG_SZ, (LPBYTE)"comp", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* RegCompany value exists */
sz = MAX_PATH;
@@ -7853,10 +7852,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_REGCOMPANYA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "comp"), "Expected \"comp\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(propkey, "RegOwner", 0, REG_SZ, (LPBYTE)"owner", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* RegOwner value exists */
sz = MAX_PATH;
@@ -7866,10 +7865,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_REGOWNERA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "owner"), "Expected \"owner\", got \"%s\"\n", buf);
- ok(sz == 5, "Expected 5, got %d\n", sz);
+ ok(sz == 5, "Expected 5, got %lu\n", sz);
res = RegSetValueExA(propkey, "Transforms", 0, REG_SZ, (LPBYTE)"trans", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Transforms value exists */
sz = MAX_PATH;
@@ -7880,10 +7879,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "Language", 0, REG_SZ, (LPBYTE)"lang", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Language value exists */
sz = MAX_PATH;
@@ -7894,10 +7893,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "ProductName", 0, REG_SZ, (LPBYTE)"name", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductName value exists */
sz = MAX_PATH;
@@ -7908,10 +7907,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "AssignmentType", 0, REG_SZ, (LPBYTE)"type", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* FIXME */
@@ -7924,10 +7923,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "PackageCode", 0, REG_SZ, (LPBYTE)"code", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* PackageCode value exists */
sz = MAX_PATH;
@@ -7938,10 +7937,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "Version", 0, REG_SZ, (LPBYTE)"ver", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Version value exists */
sz = MAX_PATH;
@@ -7952,10 +7951,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "ProductIcon", 0, REG_SZ, (LPBYTE)"icon", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductIcon value exists */
sz = MAX_PATH;
@@ -7966,10 +7965,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "PackageName", 0, REG_SZ, (LPBYTE)"name", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* PackageName value exists */
sz = MAX_PATH;
@@ -7980,10 +7979,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(propkey, "AuthorizedLUAApp", 0, REG_SZ, (LPBYTE)"auth", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* AuthorizedLUAApp value exists */
sz = MAX_PATH;
@@ -7994,7 +7993,7 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
RegDeleteValueA(propkey, "AuthorizedLUAApp");
RegDeleteValueA(propkey, "PackageName");
@@ -8037,7 +8036,7 @@ static void test_MsiGetProductInfoEx(void)
LocalFree( usersid );
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local classes product key exists */
sz = MAX_PATH;
@@ -8047,10 +8046,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_PRODUCTSTATEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "1"), "Expected \"1\", got \"%s\"\n", buf);
- ok(sz == 1, "Expected 1, got %d\n", sz);
+ ok(sz == 1, "Expected 1, got %lu\n", sz);
res = RegSetValueExA(prodkey, "HelpLink", 0, REG_SZ, (LPBYTE)"link", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* HelpLink value exists */
sz = MAX_PATH;
@@ -8061,10 +8060,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "HelpTelephone", 0, REG_SZ, (LPBYTE)"phone", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* HelpTelephone value exists */
sz = MAX_PATH;
@@ -8075,10 +8074,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "InstallDate", 0, REG_SZ, (LPBYTE)"date", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallDate value exists */
sz = MAX_PATH;
@@ -8089,10 +8088,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "DisplayName", 0, REG_SZ, (LPBYTE)"name", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* DisplayName value exists */
sz = MAX_PATH;
@@ -8103,10 +8102,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "InstallLocation", 0, REG_SZ, (LPBYTE)"loc", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallLocation value exists */
sz = MAX_PATH;
@@ -8117,10 +8116,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "InstallSource", 0, REG_SZ, (LPBYTE)"source", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallSource value exists */
sz = MAX_PATH;
@@ -8131,10 +8130,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "LocalPackage", 0, REG_SZ, (LPBYTE)"local", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* LocalPackage value exists */
sz = MAX_PATH;
@@ -8145,10 +8144,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "Publisher", 0, REG_SZ, (LPBYTE)"pub", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Publisher value exists */
sz = MAX_PATH;
@@ -8159,10 +8158,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "URLInfoAbout", 0, REG_SZ, (LPBYTE)"about", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* URLInfoAbout value exists */
sz = MAX_PATH;
@@ -8173,10 +8172,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "URLUpdateInfo", 0, REG_SZ, (LPBYTE)"update", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* URLUpdateInfo value exists */
sz = MAX_PATH;
@@ -8187,10 +8186,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "VersionMinor", 0, REG_SZ, (LPBYTE)"2", 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* VersionMinor value exists */
sz = MAX_PATH;
@@ -8201,10 +8200,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "VersionMajor", 0, REG_SZ, (LPBYTE)"3", 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* VersionMajor value exists */
sz = MAX_PATH;
@@ -8215,10 +8214,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "DisplayVersion", 0, REG_SZ, (LPBYTE)"3.2.1", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* DisplayVersion value exists */
sz = MAX_PATH;
@@ -8229,10 +8228,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "ProductID", 0, REG_SZ, (LPBYTE)"id", 3);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductID value exists */
sz = MAX_PATH;
@@ -8243,10 +8242,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "RegCompany", 0, REG_SZ, (LPBYTE)"comp", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* RegCompany value exists */
sz = MAX_PATH;
@@ -8257,10 +8256,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "RegOwner", 0, REG_SZ, (LPBYTE)"owner", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* RegOwner value exists */
sz = MAX_PATH;
@@ -8271,10 +8270,10 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
res = RegSetValueExA(prodkey, "Transforms", 0, REG_SZ, (LPBYTE)"trans", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Transforms value exists */
sz = MAX_PATH;
@@ -8284,10 +8283,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_TRANSFORMSA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "trans"), "Expected \"trans\", got \"%s\"\n", buf);
- ok(sz == 5, "Expected 5, got %d\n", sz);
+ ok(sz == 5, "Expected 5, got %lu\n", sz);
res = RegSetValueExA(prodkey, "Language", 0, REG_SZ, (LPBYTE)"lang", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Language value exists */
sz = MAX_PATH;
@@ -8297,10 +8296,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_LANGUAGEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "lang"), "Expected \"lang\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(prodkey, "ProductName", 0, REG_SZ, (LPBYTE)"name", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductName value exists */
sz = MAX_PATH;
@@ -8310,10 +8309,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_PRODUCTNAMEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "name"), "Expected \"name\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(prodkey, "AssignmentType", 0, REG_SZ, (LPBYTE)"type", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* FIXME */
@@ -8325,10 +8324,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_ASSIGNMENTTYPEA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
res = RegSetValueExA(prodkey, "PackageCode", 0, REG_SZ, (LPBYTE)"code", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* FIXME */
@@ -8343,11 +8342,11 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_BAD_CONFIGURATION,
"Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
}
res = RegSetValueExA(prodkey, "Version", 0, REG_SZ, (LPBYTE)"ver", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Version value exists */
sz = MAX_PATH;
@@ -8357,10 +8356,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_VERSIONA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "ver"), "Expected \"ver\", got \"%s\"\n", buf);
- ok(sz == 3, "Expected 3, got %d\n", sz);
+ ok(sz == 3, "Expected 3, got %lu\n", sz);
res = RegSetValueExA(prodkey, "ProductIcon", 0, REG_SZ, (LPBYTE)"icon", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductIcon value exists */
sz = MAX_PATH;
@@ -8370,10 +8369,10 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_PRODUCTICONA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "icon"), "Expected \"icon\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
res = RegSetValueExA(prodkey, "PackageName", 0, REG_SZ, (LPBYTE)"name", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* PackageName value exists */
sz = MAX_PATH;
@@ -8386,11 +8385,11 @@ static void test_MsiGetProductInfoEx(void)
ok(r == ERROR_UNKNOWN_PRODUCT,
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf);
- ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz);
+ ok(sz == MAX_PATH, "Expected MAX_PATH, got %lu\n", sz);
}
res = RegSetValueExA(prodkey, "AuthorizedLUAApp", 0, REG_SZ, (LPBYTE)"auth", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* AuthorizedLUAApp value exists */
sz = MAX_PATH;
@@ -8400,7 +8399,7 @@ static void test_MsiGetProductInfoEx(void)
INSTALLPROPERTY_AUTHORIZED_LUA_APPA, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "auth"), "Expected \"auth\", got \"%s\"\n", buf);
- ok(sz == 4, "Expected 4, got %d\n", sz);
+ ok(sz == 4, "Expected 4, got %lu\n", sz);
RegDeleteValueA(prodkey, "AuthorizedLUAApp");
RegDeleteValueA(prodkey, "PackageName");
@@ -8467,9 +8466,9 @@ static void test_MsiGetUserInfo(void)
ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user);
ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz);
- ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz);
- ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz);
+ ok(usersz == MAX_PATH, "Expected MAX_PATH, got %lu\n", usersz);
+ ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", serialsz);
/* empty szProductCode */
INIT_USERINFO();
@@ -8479,9 +8478,9 @@ static void test_MsiGetUserInfo(void)
ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user);
ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz);
- ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz);
- ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz);
+ ok(usersz == MAX_PATH, "Expected MAX_PATH, got %lu\n", usersz);
+ ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", serialsz);
/* garbage szProductCode */
INIT_USERINFO();
@@ -8491,9 +8490,9 @@ static void test_MsiGetUserInfo(void)
ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user);
ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz);
- ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz);
- ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz);
+ ok(usersz == MAX_PATH, "Expected MAX_PATH, got %lu\n", usersz);
+ ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", serialsz);
/* guid without brackets */
INIT_USERINFO();
@@ -8504,9 +8503,9 @@ static void test_MsiGetUserInfo(void)
ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user);
ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz);
- ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz);
- ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz);
+ ok(usersz == MAX_PATH, "Expected MAX_PATH, got %lu\n", usersz);
+ ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", serialsz);
/* guid with brackets */
INIT_USERINFO();
@@ -8517,9 +8516,9 @@ static void test_MsiGetUserInfo(void)
ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user);
ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz);
- ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz);
- ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz);
+ ok(usersz == MAX_PATH, "Expected MAX_PATH, got %lu\n", usersz);
+ ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", serialsz);
/* NULL lpUserNameBuf */
INIT_USERINFO();
@@ -8528,9 +8527,9 @@ static void test_MsiGetUserInfo(void)
"Expected USERINFOSTATE_UNKNOWN, got %d\n", state);
ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz);
- ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz);
- ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz);
+ ok(usersz == MAX_PATH, "Expected MAX_PATH, got %lu\n", usersz);
+ ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", serialsz);
/* NULL pcchUserNameBuf */
INIT_USERINFO();
@@ -8540,8 +8539,8 @@ static void test_MsiGetUserInfo(void)
ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user);
ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz);
- ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz);
+ ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", serialsz);
/* both lpUserNameBuf and pcchUserNameBuf NULL */
INIT_USERINFO();
@@ -8550,8 +8549,8 @@ static void test_MsiGetUserInfo(void)
"Expected USERINFOSTATE_UNKNOWN, got %d\n", state);
ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz);
- ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz);
+ ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", serialsz);
/* NULL lpOrgNameBuf */
INIT_USERINFO();
@@ -8560,9 +8559,9 @@ static void test_MsiGetUserInfo(void)
"Expected USERINFOSTATE_UNKNOWN, got %d\n", state);
ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz);
- ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz);
- ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz);
+ ok(usersz == MAX_PATH, "Expected MAX_PATH, got %lu\n", usersz);
+ ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", serialsz);
/* NULL pcchOrgNameBuf */
INIT_USERINFO();
@@ -8572,8 +8571,8 @@ static void test_MsiGetUserInfo(void)
ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user);
ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz);
- ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz);
+ ok(usersz == MAX_PATH, "Expected MAX_PATH, got %lu\n", usersz);
+ ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", serialsz);
/* both lpOrgNameBuf and pcchOrgNameBuf NULL */
INIT_USERINFO();
@@ -8582,8 +8581,8 @@ static void test_MsiGetUserInfo(void)
"Expected USERINFOSTATE_UNKNOWN, got %d\n", state);
ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz);
- ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz);
+ ok(usersz == MAX_PATH, "Expected MAX_PATH, got %lu\n", usersz);
+ ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", serialsz);
/* NULL lpSerialBuf */
INIT_USERINFO();
@@ -8592,9 +8591,9 @@ static void test_MsiGetUserInfo(void)
"Expected USERINFOSTATE_UNKNOWN, got %d\n", state);
ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user);
ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org);
- ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz);
- ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz);
- ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz);
+ ok(usersz == MAX_PATH, "Expected MAX_PATH, got %lu\n", usersz);
+ ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", serialsz);
/* NULL pcchSerialBuf */
INIT_USERINFO();
@@ -8604,8 +8603,8 @@ static void test_MsiGetUserInfo(void)
ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user);
ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz);
- ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz);
+ ok(usersz == MAX_PATH, "Expected MAX_PATH, got %lu\n", usersz);
+ ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", orgsz);
/* both lpSerialBuf and pcchSerialBuf NULL */
INIT_USERINFO();
@@ -8614,8 +8613,8 @@ static void test_MsiGetUserInfo(void)
"Expected USERINFOSTATE_UNKNOWN, got %d\n", state);
ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user);
ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org);
- ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz);
- ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz);
+ ok(usersz == MAX_PATH, "Expected MAX_PATH, got %lu\n", usersz);
+ ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", orgsz);
/* MSIINSTALLCONTEXT_USERMANAGED */
@@ -8632,7 +8631,7 @@ static void test_MsiGetUserInfo(void)
LocalFree(usersid);
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* managed product key exists */
INIT_USERINFO();
@@ -8642,9 +8641,9 @@ static void test_MsiGetUserInfo(void)
ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user);
ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz);
- ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz);
- ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz);
+ ok(usersz == MAX_PATH, "Expected MAX_PATH, got %lu\n", usersz);
+ ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", serialsz);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\");
lstrcatA(keypath, "Installer\\UserData\\");
@@ -8659,10 +8658,10 @@ static void test_MsiGetUserInfo(void)
LocalFree(usersid);
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegCreateKeyExA(userprod, "InstallProperties", 0, NULL, 0, access, NULL, &props, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallProperties key exists */
INIT_USERINFO();
@@ -8672,9 +8671,9 @@ static void test_MsiGetUserInfo(void)
ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user);
ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(usersz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", usersz);
- ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz);
- ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz);
+ ok(usersz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %lu\n", usersz);
+ ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", serialsz);
/* RegOwner doesn't exist, lpUserNameBuf and pcchUserNameBuf are NULL */
INIT_USERINFO();
@@ -8683,8 +8682,8 @@ static void test_MsiGetUserInfo(void)
"Expected USERINFOSTATE_ABSENT, got %d\n", state);
ok(!lstrcmpA(org, ""), "Expected empty string, got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(orgsz == 0, "Expected 0, got %d\n", orgsz);
- ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", serialsz);
+ ok(orgsz == 0, "Expected 0, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %lu\n", serialsz);
/* RegOwner, RegCompany don't exist, out params are NULL */
INIT_USERINFO();
@@ -8692,10 +8691,10 @@ static void test_MsiGetUserInfo(void)
ok(state == USERINFOSTATE_ABSENT,
"Expected USERINFOSTATE_ABSENT, got %d\n", state);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", serialsz);
+ ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %lu\n", serialsz);
res = RegSetValueExA(props, "RegOwner", 0, REG_SZ, (LPBYTE)"owner", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* RegOwner value exists */
INIT_USERINFO();
@@ -8705,12 +8704,12 @@ static void test_MsiGetUserInfo(void)
ok(!lstrcmpA(user, "owner"), "Expected \"owner\", got \"%s\"\n", user);
ok(!lstrcmpA(org, ""), "Expected empty string, got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(usersz == 5, "Expected 5, got %d\n", usersz);
- ok(orgsz == 0, "Expected 0, got %d\n", orgsz);
- ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", serialsz);
+ ok(usersz == 5, "Expected 5, got %lu\n", usersz);
+ ok(orgsz == 0, "Expected 0, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %lu\n", serialsz);
res = RegSetValueExA(props, "RegCompany", 0, REG_SZ, (LPBYTE)"company", 8);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* RegCompany value exists */
INIT_USERINFO();
@@ -8720,12 +8719,12 @@ static void test_MsiGetUserInfo(void)
ok(!lstrcmpA(user, "owner"), "Expected \"owner\", got \"%s\"\n", user);
ok(!lstrcmpA(org, "company"), "Expected \"company\", got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(usersz == 5, "Expected 5, got %d\n", usersz);
- ok(orgsz == 7, "Expected 7, got %d\n", orgsz);
- ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", serialsz);
+ ok(usersz == 5, "Expected 5, got %lu\n", usersz);
+ ok(orgsz == 7, "Expected 7, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %lu\n", serialsz);
res = RegSetValueExA(props, "ProductID", 0, REG_SZ, (LPBYTE)"ID", 3);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductID value exists */
INIT_USERINFO();
@@ -8735,9 +8734,9 @@ static void test_MsiGetUserInfo(void)
ok(!lstrcmpA(user, "owner"), "Expected \"owner\", got \"%s\"\n", user);
ok(!lstrcmpA(org, "company"), "Expected \"company\", got \"%s\"\n", org);
ok(!lstrcmpA(serial, "ID"), "Expected \"ID\", got \"%s\"\n", serial);
- ok(usersz == 5, "Expected 5, got %d\n", usersz);
- ok(orgsz == 7, "Expected 7, got %d\n", orgsz);
- ok(serialsz == 2, "Expected 2, got %d\n", serialsz);
+ ok(usersz == 5, "Expected 5, got %lu\n", usersz);
+ ok(orgsz == 7, "Expected 7, got %lu\n", orgsz);
+ ok(serialsz == 2, "Expected 2, got %lu\n", serialsz);
/* pcchUserNameBuf is too small */
INIT_USERINFO();
@@ -8748,9 +8747,9 @@ static void test_MsiGetUserInfo(void)
ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user);
ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(usersz == 5, "Expected 5, got %d\n", usersz);
- ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz);
- ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz);
+ ok(usersz == 5, "Expected 5, got %lu\n", usersz);
+ ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", serialsz);
/* pcchUserNameBuf has no room for NULL terminator */
INIT_USERINFO();
@@ -8764,9 +8763,9 @@ static void test_MsiGetUserInfo(void)
}
ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(usersz == 5, "Expected 5, got %d\n", usersz);
- ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz);
- ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz);
+ ok(usersz == 5, "Expected 5, got %lu\n", usersz);
+ ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", serialsz);
/* pcchUserNameBuf is too small, lpUserNameBuf is NULL */
INIT_USERINFO();
@@ -8777,9 +8776,9 @@ static void test_MsiGetUserInfo(void)
ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user);
ok(!lstrcmpA(org, "company"), "Expected \"company\", got \"%s\"\n", org);
ok(!lstrcmpA(serial, "ID"), "Expected \"ID\", got \"%s\"\n", serial);
- ok(usersz == 5, "Expected 5, got %d\n", usersz);
- ok(orgsz == 7, "Expected 7, got %d\n", orgsz);
- ok(serialsz == 2, "Expected 2, got %d\n", serialsz);
+ ok(usersz == 5, "Expected 5, got %lu\n", usersz);
+ ok(orgsz == 7, "Expected 7, got %lu\n", orgsz);
+ ok(serialsz == 2, "Expected 2, got %lu\n", serialsz);
RegDeleteValueA(props, "ProductID");
RegDeleteValueA(props, "RegCompany");
@@ -8798,7 +8797,7 @@ static void test_MsiGetUserInfo(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &prodkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* product key exists */
INIT_USERINFO();
@@ -8808,9 +8807,9 @@ static void test_MsiGetUserInfo(void)
ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user);
ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz);
- ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz);
- ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz);
+ ok(usersz == MAX_PATH, "Expected MAX_PATH, got %lu\n", usersz);
+ ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", serialsz);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\");
lstrcatA(keypath, "Installer\\UserData\\");
@@ -8819,10 +8818,10 @@ static void test_MsiGetUserInfo(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &userprod, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegCreateKeyExA(userprod, "InstallProperties", 0, NULL, 0, access, NULL, &props, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallProperties key exists */
INIT_USERINFO();
@@ -8832,9 +8831,9 @@ static void test_MsiGetUserInfo(void)
ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user);
ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(usersz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", usersz);
- ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz);
- ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz);
+ ok(usersz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %lu\n", usersz);
+ ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", serialsz);
/* RegOwner doesn't exist, lpUserNameBuf and pcchUserNameBuf are NULL */
INIT_USERINFO();
@@ -8843,8 +8842,8 @@ static void test_MsiGetUserInfo(void)
"Expected USERINFOSTATE_ABSENT, got %d\n", state);
ok(!lstrcmpA(org, ""), "Expected empty string, got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(orgsz == 0, "Expected 0, got %d\n", orgsz);
- ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", serialsz);
+ ok(orgsz == 0, "Expected 0, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %lu\n", serialsz);
/* RegOwner, RegCompany don't exist, out params are NULL */
INIT_USERINFO();
@@ -8852,10 +8851,10 @@ static void test_MsiGetUserInfo(void)
ok(state == USERINFOSTATE_ABSENT,
"Expected USERINFOSTATE_ABSENT, got %d\n", state);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", serialsz);
+ ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %lu\n", serialsz);
res = RegSetValueExA(props, "RegOwner", 0, REG_SZ, (LPBYTE)"owner", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* RegOwner value exists */
INIT_USERINFO();
@@ -8865,12 +8864,12 @@ static void test_MsiGetUserInfo(void)
ok(!lstrcmpA(user, "owner"), "Expected \"owner\", got \"%s\"\n", user);
ok(!lstrcmpA(org, ""), "Expected empty string, got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(usersz == 5, "Expected 5, got %d\n", usersz);
- ok(orgsz == 0, "Expected 0, got %d\n", orgsz);
- ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", serialsz);
+ ok(usersz == 5, "Expected 5, got %lu\n", usersz);
+ ok(orgsz == 0, "Expected 0, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %lu\n", serialsz);
res = RegSetValueExA(props, "RegCompany", 0, REG_SZ, (LPBYTE)"company", 8);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* RegCompany value exists */
INIT_USERINFO();
@@ -8880,12 +8879,12 @@ static void test_MsiGetUserInfo(void)
ok(!lstrcmpA(user, "owner"), "Expected \"owner\", got \"%s\"\n", user);
ok(!lstrcmpA(org, "company"), "Expected \"company\", got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(usersz == 5, "Expected 5, got %d\n", usersz);
- ok(orgsz == 7, "Expected 7, got %d\n", orgsz);
- ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", serialsz);
+ ok(usersz == 5, "Expected 5, got %lu\n", usersz);
+ ok(orgsz == 7, "Expected 7, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %lu\n", serialsz);
res = RegSetValueExA(props, "ProductID", 0, REG_SZ, (LPBYTE)"ID", 3);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductID value exists */
INIT_USERINFO();
@@ -8895,9 +8894,9 @@ static void test_MsiGetUserInfo(void)
ok(!lstrcmpA(user, "owner"), "Expected \"owner\", got \"%s\"\n", user);
ok(!lstrcmpA(org, "company"), "Expected \"company\", got \"%s\"\n", org);
ok(!lstrcmpA(serial, "ID"), "Expected \"ID\", got \"%s\"\n", serial);
- ok(usersz == 5, "Expected 5, got %d\n", usersz);
- ok(orgsz == 7, "Expected 7, got %d\n", orgsz);
- ok(serialsz == 2, "Expected 2, got %d\n", serialsz);
+ ok(usersz == 5, "Expected 5, got %lu\n", usersz);
+ ok(orgsz == 7, "Expected 7, got %lu\n", orgsz);
+ ok(serialsz == 2, "Expected 2, got %lu\n", serialsz);
RegDeleteValueA(props, "ProductID");
RegDeleteValueA(props, "RegCompany");
@@ -8922,7 +8921,7 @@ static void test_MsiGetUserInfo(void)
LocalFree( usersid );
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* product key exists */
INIT_USERINFO();
@@ -8932,9 +8931,9 @@ static void test_MsiGetUserInfo(void)
ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user);
ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz);
- ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz);
- ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz);
+ ok(usersz == MAX_PATH, "Expected MAX_PATH, got %lu\n", usersz);
+ ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", serialsz);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\");
lstrcatA(keypath, "Installer\\UserData\\S-1-5-18");
@@ -8942,10 +8941,10 @@ static void test_MsiGetUserInfo(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &userprod, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegCreateKeyExA(userprod, "InstallProperties", 0, NULL, 0, access, NULL, &props, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallProperties key exists */
INIT_USERINFO();
@@ -8955,9 +8954,9 @@ static void test_MsiGetUserInfo(void)
ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user);
ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(usersz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", usersz);
- ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz);
- ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz);
+ ok(usersz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %lu\n", usersz);
+ ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", serialsz);
/* RegOwner doesn't exist, lpUserNameBuf and pcchUserNameBuf are NULL */
INIT_USERINFO();
@@ -8966,8 +8965,8 @@ static void test_MsiGetUserInfo(void)
"Expected USERINFOSTATE_ABSENT, got %d\n", state);
ok(!lstrcmpA(org, ""), "Expected empty string, got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(orgsz == 0, "Expected 0, got %d\n", orgsz);
- ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", serialsz);
+ ok(orgsz == 0, "Expected 0, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %lu\n", serialsz);
/* RegOwner, RegCompany don't exist, out params are NULL */
INIT_USERINFO();
@@ -8975,10 +8974,10 @@ static void test_MsiGetUserInfo(void)
ok(state == USERINFOSTATE_ABSENT,
"Expected USERINFOSTATE_ABSENT, got %d\n", state);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", serialsz);
+ ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %lu\n", serialsz);
res = RegSetValueExA(props, "RegOwner", 0, REG_SZ, (LPBYTE)"owner", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* RegOwner value exists */
INIT_USERINFO();
@@ -8988,12 +8987,12 @@ static void test_MsiGetUserInfo(void)
ok(!lstrcmpA(user, "owner"), "Expected \"owner\", got \"%s\"\n", user);
ok(!lstrcmpA(org, ""), "Expected empty string, got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(usersz == 5, "Expected 5, got %d\n", usersz);
- ok(orgsz == 0, "Expected 0, got %d\n", orgsz);
- ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", serialsz);
+ ok(usersz == 5, "Expected 5, got %lu\n", usersz);
+ ok(orgsz == 0, "Expected 0, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %lu\n", serialsz);
res = RegSetValueExA(props, "RegCompany", 0, REG_SZ, (LPBYTE)"company", 8);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* RegCompany value exists */
INIT_USERINFO();
@@ -9003,12 +9002,12 @@ static void test_MsiGetUserInfo(void)
ok(!lstrcmpA(user, "owner"), "Expected \"owner\", got \"%s\"\n", user);
ok(!lstrcmpA(org, "company"), "Expected \"company\", got \"%s\"\n", org);
ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial);
- ok(usersz == 5, "Expected 5, got %d\n", usersz);
- ok(orgsz == 7, "Expected 7, got %d\n", orgsz);
- ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", serialsz);
+ ok(usersz == 5, "Expected 5, got %lu\n", usersz);
+ ok(orgsz == 7, "Expected 7, got %lu\n", orgsz);
+ ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %lu\n", serialsz);
res = RegSetValueExA(props, "ProductID", 0, REG_SZ, (LPBYTE)"ID", 3);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ProductID value exists */
INIT_USERINFO();
@@ -9018,9 +9017,9 @@ static void test_MsiGetUserInfo(void)
ok(!lstrcmpA(user, "owner"), "Expected \"owner\", got \"%s\"\n", user);
ok(!lstrcmpA(org, "company"), "Expected \"company\", got \"%s\"\n", org);
ok(!lstrcmpA(serial, "ID"), "Expected \"ID\", got \"%s\"\n", serial);
- ok(usersz == 5, "Expected 5, got %d\n", usersz);
- ok(orgsz == 7, "Expected 7, got %d\n", orgsz);
- ok(serialsz == 2, "Expected 2, got %d\n", serialsz);
+ ok(usersz == 5, "Expected 5, got %lu\n", usersz);
+ ok(orgsz == 7, "Expected 7, got %lu\n", orgsz);
+ ok(serialsz == 2, "Expected 2, got %lu\n", serialsz);
RegDeleteValueA(props, "ProductID");
RegDeleteValueA(props, "RegCompany");
@@ -9127,7 +9126,7 @@ static void test_MsiOpenProduct(void)
LocalFree(usersid);
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* managed product key exists */
hprod = 0xdeadbeef;
@@ -9149,7 +9148,7 @@ static void test_MsiOpenProduct(void)
LocalFree(usersid);
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user product key exists */
hprod = 0xdeadbeef;
@@ -9159,7 +9158,7 @@ static void test_MsiOpenProduct(void)
ok(hprod == 0xdeadbeef, "Expected hprod to be unchanged\n");
res = RegCreateKeyExA(userkey, "InstallProperties", 0, NULL, 0, access, NULL, &props, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallProperties key exists */
hprod = 0xdeadbeef;
@@ -9172,7 +9171,7 @@ static void test_MsiOpenProduct(void)
lstrcatA(val, "\\winetest.msi");
res = RegSetValueExA(props, "ManagedLocalPackage", 0, REG_SZ,
(const BYTE *)val, lstrlenA(val) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ManagedLocalPackage value exists */
hprod = 0xdeadbeef;
@@ -9184,7 +9183,7 @@ static void test_MsiOpenProduct(void)
r = MsiGetPropertyA(hprod, "ProductCode", val, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(val, prodcode), "Expected \"%s\", got \"%s\"\n", prodcode, val);
- ok(size == lstrlenA(prodcode), "Expected %d, got %d\n", lstrlenA(prodcode), size);
+ ok(size == lstrlenA(prodcode), "Expected %d, got %lu\n", lstrlenA(prodcode), size);
MsiCloseHandle(hprod);
@@ -9202,7 +9201,7 @@ static void test_MsiOpenProduct(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &prodkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* unmanaged product key exists */
hprod = 0xdeadbeef;
@@ -9218,7 +9217,7 @@ static void test_MsiOpenProduct(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &userkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user product key exists */
hprod = 0xdeadbeef;
@@ -9228,7 +9227,7 @@ static void test_MsiOpenProduct(void)
ok(hprod == 0xdeadbeef, "Expected hprod to be unchanged\n");
res = RegCreateKeyExA(userkey, "InstallProperties", 0, NULL, 0, access, NULL, &props, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallProperties key exists */
hprod = 0xdeadbeef;
@@ -9241,7 +9240,7 @@ static void test_MsiOpenProduct(void)
lstrcatA(val, "\\winetest.msi");
res = RegSetValueExA(props, "LocalPackage", 0, REG_SZ,
(const BYTE *)val, lstrlenA(val) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* LocalPackage value exists */
hprod = 0xdeadbeef;
@@ -9253,7 +9252,7 @@ static void test_MsiOpenProduct(void)
r = MsiGetPropertyA(hprod, "ProductCode", val, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(val, prodcode), "Expected \"%s\", got \"%s\"\n", prodcode, val);
- ok(size == lstrlenA(prodcode), "Expected %d, got %d\n", lstrlenA(prodcode), size);
+ ok(size == lstrlenA(prodcode), "Expected %d, got %lu\n", lstrlenA(prodcode), size);
MsiCloseHandle(hprod);
@@ -9277,7 +9276,7 @@ static void test_MsiOpenProduct(void)
LocalFree( usersid );
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* managed product key exists */
hprod = 0xdeadbeef;
@@ -9291,7 +9290,7 @@ static void test_MsiOpenProduct(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &userkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user product key exists */
hprod = 0xdeadbeef;
@@ -9301,7 +9300,7 @@ static void test_MsiOpenProduct(void)
ok(hprod == 0xdeadbeef, "Expected hprod to be unchanged\n");
res = RegCreateKeyExA(userkey, "InstallProperties", 0, NULL, 0, access, NULL, &props, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallProperties key exists */
hprod = 0xdeadbeef;
@@ -9314,7 +9313,7 @@ static void test_MsiOpenProduct(void)
lstrcatA(val, "\\winetest.msi");
res = RegSetValueExA(props, "LocalPackage", 0, REG_SZ,
(const BYTE *)val, lstrlenA(val) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* LocalPackage value exists */
hprod = 0xdeadbeef;
@@ -9326,19 +9325,19 @@ static void test_MsiOpenProduct(void)
r = MsiGetPropertyA(hprod, "ProductCode", val, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(val, prodcode), "Expected \"%s\", got \"%s\"\n", prodcode, val);
- ok(size == lstrlenA(prodcode), "Expected %d, got %d\n", lstrlenA(prodcode), size);
+ ok(size == lstrlenA(prodcode), "Expected %d, got %lu\n", lstrlenA(prodcode), size);
MsiCloseHandle(hprod);
res = RegSetValueExA(props, "LocalPackage", 0, REG_SZ,
(const BYTE *)"winetest.msi", 13);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
lstrcpyA(val, path);
lstrcatA(val, "\\winetest.msi");
res = RegSetValueExA(props, "LocalPackage", 0, REG_SZ,
(const BYTE *)val, lstrlenA(val) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
DeleteFileA(msifile);
@@ -9404,7 +9403,7 @@ static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\");
lstrcatA(keypath, expectedsid);
@@ -9417,7 +9416,7 @@ static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid
skip("Not enough rights to perform tests\n");
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* managed product key exists */
lstrcpyA(patchcode, "apple");
@@ -9437,10 +9436,10 @@ static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegCreateKeyExA(prodkey, "Patches", 0, NULL, 0, access, NULL, &patches, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* patches key exists */
lstrcpyA(patchcode, "apple");
@@ -9460,12 +9459,12 @@ static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegSetValueExA(patches, "Patches", 0, REG_SZ,
(const BYTE *)patch_squashed,
lstrlenA(patch_squashed) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches value exists, is not REG_MULTI_SZ */
lstrcpyA(patchcode, "apple");
@@ -9486,11 +9485,11 @@ static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegSetValueExA(patches, "Patches", 0, REG_MULTI_SZ,
(const BYTE *)"a\0b\0c\0\0", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches value exists, is not a squashed guid */
lstrcpyA(patchcode, "apple");
@@ -9511,13 +9510,13 @@ static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
patch_squashed[lstrlenA(patch_squashed) + 1] = '\0';
res = RegSetValueExA(patches, "Patches", 0, REG_MULTI_SZ,
(const BYTE *)patch_squashed,
lstrlenA(patch_squashed) + 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches value exists */
lstrcpyA(patchcode, "apple");
@@ -9537,11 +9536,11 @@ static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegSetValueExA(patches, patch_squashed, 0, REG_SZ,
(const BYTE *)"whatever", 9);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* patch squashed value exists */
lstrcpyA(patchcode, "apple");
@@ -9562,7 +9561,7 @@ static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid
ok(!lstrcmpA(targetsid, expectedsid),
"Expected \"%s\", got \"%s\"\n", expectedsid, targetsid);
ok(size == lstrlenA(expectedsid),
- "Expected %d, got %d\n", lstrlenA(expectedsid), size);
+ "Expected %d, got %lu\n", lstrlenA(expectedsid), size);
/* increase the index */
lstrcpyA(patchcode, "apple");
@@ -9582,7 +9581,7 @@ static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* increase again */
lstrcpyA(patchcode, "apple");
@@ -9603,7 +9602,7 @@ static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* szPatchCode is NULL */
lstrcpyA(targetprod, "banana");
@@ -9621,7 +9620,7 @@ static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid
ok(!lstrcmpA(targetsid, expectedsid),
"Expected \"%s\", got \"%s\"\n", expectedsid, targetsid);
ok(size == lstrlenA(expectedsid),
- "Expected %d, got %d\n", lstrlenA(expectedsid), size);
+ "Expected %d, got %lu\n", lstrlenA(expectedsid), size);
/* szTargetProductCode is NULL */
lstrcpyA(patchcode, "apple");
@@ -9639,7 +9638,7 @@ static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid
ok(!lstrcmpA(targetsid, expectedsid),
"Expected \"%s\", got \"%s\"\n", expectedsid, targetsid);
ok(size == lstrlenA(expectedsid),
- "Expected %d, got %d\n", lstrlenA(expectedsid), size);
+ "Expected %d, got %lu\n", lstrlenA(expectedsid), size);
/* pdwTargetProductContext is NULL */
lstrcpyA(patchcode, "apple");
@@ -9657,7 +9656,7 @@ static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid
ok(!lstrcmpA(targetsid, expectedsid),
"Expected \"%s\", got \"%s\"\n", expectedsid, targetsid);
ok(size == lstrlenA(expectedsid),
- "Expected %d, got %d\n", lstrlenA(expectedsid), size);
+ "Expected %d, got %lu\n", lstrlenA(expectedsid), size);
/* szTargetUserSid is NULL */
lstrcpyA(patchcode, "apple");
@@ -9675,7 +9674,7 @@ static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid
ok(context == MSIINSTALLCONTEXT_USERMANAGED,
"Expected MSIINSTALLCONTEXT_USERMANAGED, got %d\n", context);
ok(size == lstrlenA(expectedsid) * sizeof(WCHAR),
- "Expected %d*sizeof(WCHAR), got %d\n", lstrlenA(expectedsid), size);
+ "Expected %d*sizeof(WCHAR), got %lu\n", lstrlenA(expectedsid), size);
/* pcchTargetUserSid is exactly the length of szTargetUserSid */
lstrcpyA(patchcode, "apple");
@@ -9696,7 +9695,7 @@ static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid
ok(!strncmp(targetsid, expectedsid, lstrlenA(expectedsid) - 1),
"Expected \"%s\", got \"%s\"\n", expectedsid, targetsid);
ok(size == lstrlenA(expectedsid) * sizeof(WCHAR),
- "Expected %d*sizeof(WCHAR), got %d\n", lstrlenA(expectedsid), size);
+ "Expected %d*sizeof(WCHAR), got %lu\n", lstrlenA(expectedsid), size);
/* pcchTargetUserSid has enough room for NULL terminator */
lstrcpyA(patchcode, "apple");
@@ -9717,7 +9716,7 @@ static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid
ok(!lstrcmpA(targetsid, expectedsid),
"Expected \"%s\", got \"%s\"\n", expectedsid, targetsid);
ok(size == lstrlenA(expectedsid),
- "Expected %d, got %d\n", lstrlenA(expectedsid), size);
+ "Expected %d, got %lu\n", lstrlenA(expectedsid), size);
/* both szTargetuserSid and pcchTargetUserSid are NULL */
lstrcpyA(patchcode, "apple");
@@ -9753,7 +9752,7 @@ static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
lstrcatA(keypath, expectedsid);
@@ -9766,7 +9765,7 @@ static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid
skip("Not enough rights to perform tests\n");
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* UserData product key exists */
lstrcpyA(patchcode, "apple");
@@ -9786,10 +9785,10 @@ static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegCreateKeyExA(udprod, "Patches", 0, NULL, 0, access, NULL, &udpatch, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* UserData patches key exists */
lstrcpyA(patchcode, "apple");
@@ -9809,10 +9808,10 @@ static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegCreateKeyExA(udpatch, patch_squashed, 0, NULL, 0, access, NULL, &hpatch, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* specific UserData patch key exists */
lstrcpyA(patchcode, "apple");
@@ -9833,12 +9832,12 @@ static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
data = MSIPATCHSTATE_SUPERSEDED;
res = RegSetValueExA(hpatch, "State", 0, REG_DWORD,
(const BYTE *)&data, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* State value exists */
lstrcpyA(patchcode, "apple");
@@ -9859,7 +9858,7 @@ static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid
ok(!lstrcmpA(targetsid, expectedsid),
"Expected \"%s\", got \"%s\"\n", expectedsid, targetsid);
ok(size == lstrlenA(expectedsid),
- "Expected %d, got %d\n", lstrlenA(expectedsid), size);
+ "Expected %d, got %lu\n", lstrlenA(expectedsid), size);
/* MSIPATCHSTATE_OBSOLETED */
@@ -9880,12 +9879,12 @@ static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
data = MSIPATCHSTATE_OBSOLETED;
res = RegSetValueExA(hpatch, "State", 0, REG_DWORD,
(const BYTE *)&data, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* State value is obsoleted */
lstrcpyA(patchcode, "apple");
@@ -9906,7 +9905,7 @@ static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid
ok(!lstrcmpA(targetsid, expectedsid),
"Expected \"%s\", got \"%s\"\n", expectedsid, targetsid);
ok(size == lstrlenA(expectedsid),
- "Expected %d, got %d\n", lstrlenA(expectedsid), size);
+ "Expected %d, got %lu\n", lstrlenA(expectedsid), size);
/* MSIPATCHSTATE_REGISTERED */
/* FIXME */
@@ -9932,7 +9931,7 @@ static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid
ok(!lstrcmpA(targetsid, expectedsid),
"Expected \"%s\", got \"%s\"\n", expectedsid, targetsid);
ok(size == lstrlenA(expectedsid),
- "Expected %d, got %d\n", lstrlenA(expectedsid), size);
+ "Expected %d, got %lu\n", lstrlenA(expectedsid), size);
/* same patch in multiple places, only one is enumerated */
lstrcpyA(patchcode, "apple");
@@ -9952,7 +9951,7 @@ static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
RegDeleteValueA(hpatch, "State");
delete_key(hpatch, "", access & KEY_WOW64_64KEY);
@@ -10007,13 +10006,13 @@ static void test_MsiEnumPatchesEx_userunmanaged(LPCSTR usersid, LPCSTR expecteds
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\");
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &prodkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* current user product key exists */
lstrcpyA(patchcode, "apple");
@@ -10033,10 +10032,10 @@ static void test_MsiEnumPatchesEx_userunmanaged(LPCSTR usersid, LPCSTR expecteds
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegCreateKeyA(prodkey, "Patches", &patches);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches key exists */
lstrcpyA(patchcode, "apple");
@@ -10056,12 +10055,12 @@ static void test_MsiEnumPatchesEx_userunmanaged(LPCSTR usersid, LPCSTR expecteds
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegSetValueExA(patches, "Patches", 0, REG_SZ,
(const BYTE *)patch_squashed,
lstrlenA(patch_squashed) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches value exists, is not REG_MULTI_SZ */
lstrcpyA(patchcode, "apple");
@@ -10082,11 +10081,11 @@ static void test_MsiEnumPatchesEx_userunmanaged(LPCSTR usersid, LPCSTR expecteds
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegSetValueExA(patches, "Patches", 0, REG_MULTI_SZ,
(const BYTE *)"a\0b\0c\0\0", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches value exists, is not a squashed guid */
lstrcpyA(patchcode, "apple");
@@ -10107,13 +10106,13 @@ static void test_MsiEnumPatchesEx_userunmanaged(LPCSTR usersid, LPCSTR expecteds
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
patch_squashed[lstrlenA(patch_squashed) + 1] = 0;
res = RegSetValueExA(patches, "Patches", 0, REG_MULTI_SZ,
(const BYTE *)patch_squashed,
lstrlenA(patch_squashed) + 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches value exists */
lstrcpyA(patchcode, "apple");
@@ -10135,11 +10134,11 @@ static void test_MsiEnumPatchesEx_userunmanaged(LPCSTR usersid, LPCSTR expecteds
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegSetValueExA(patches, patch_squashed, 0, REG_SZ,
(const BYTE *)"whatever", 9);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* patch code value exists */
lstrcpyA(patchcode, "apple");
@@ -10161,7 +10160,7 @@ static void test_MsiEnumPatchesEx_userunmanaged(LPCSTR usersid, LPCSTR expecteds
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
lstrcatA(keypath, expectedsid);
@@ -10174,7 +10173,7 @@ static void test_MsiEnumPatchesEx_userunmanaged(LPCSTR usersid, LPCSTR expecteds
skip("Not enough rights to perform tests\n");
goto error;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* userdata patch key exists */
lstrcpyA(patchcode, "apple");
@@ -10195,7 +10194,7 @@ static void test_MsiEnumPatchesEx_userunmanaged(LPCSTR usersid, LPCSTR expecteds
ok(!lstrcmpA(targetsid, expectedsid),
"Expected \"%s\", got \"%s\"\n", expectedsid, targetsid);
ok(size == lstrlenA(expectedsid),
- "Expected %d, got %d\n", lstrlenA(expectedsid), size);
+ "Expected %d, got %lu\n", lstrlenA(expectedsid), size);
/* MSIPATCHSTATE_SUPERSEDED */
@@ -10216,7 +10215,7 @@ static void test_MsiEnumPatchesEx_userunmanaged(LPCSTR usersid, LPCSTR expecteds
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
lstrcatA(keypath, expectedsid);
@@ -10229,7 +10228,7 @@ static void test_MsiEnumPatchesEx_userunmanaged(LPCSTR usersid, LPCSTR expecteds
skip("Not enough rights to perform tests\n");
goto error;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* UserData product key exists */
lstrcpyA(patchcode, "apple");
@@ -10249,10 +10248,10 @@ static void test_MsiEnumPatchesEx_userunmanaged(LPCSTR usersid, LPCSTR expecteds
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegCreateKeyExA(udprod, "Patches", 0, NULL, 0, access, NULL, &udpatch, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* UserData patches key exists */
lstrcpyA(patchcode, "apple");
@@ -10272,10 +10271,10 @@ static void test_MsiEnumPatchesEx_userunmanaged(LPCSTR usersid, LPCSTR expecteds
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegCreateKeyExA(udpatch, patch_squashed, 0, NULL, 0, access, NULL, &hpatch, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* specific UserData patch key exists */
lstrcpyA(patchcode, "apple");
@@ -10296,12 +10295,12 @@ static void test_MsiEnumPatchesEx_userunmanaged(LPCSTR usersid, LPCSTR expecteds
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
data = MSIPATCHSTATE_SUPERSEDED;
res = RegSetValueExA(hpatch, "State", 0, REG_DWORD,
(const BYTE *)&data, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* State value exists */
lstrcpyA(patchcode, "apple");
@@ -10322,7 +10321,7 @@ static void test_MsiEnumPatchesEx_userunmanaged(LPCSTR usersid, LPCSTR expecteds
ok(!lstrcmpA(targetsid, expectedsid),
"Expected \"%s\", got \"%s\"\n", expectedsid, targetsid);
ok(size == lstrlenA(expectedsid),
- "Expected %d, got %d\n", lstrlenA(expectedsid), size);
+ "Expected %d, got %lu\n", lstrlenA(expectedsid), size);
/* MSIPATCHSTATE_OBSOLETED */
@@ -10343,12 +10342,12 @@ static void test_MsiEnumPatchesEx_userunmanaged(LPCSTR usersid, LPCSTR expecteds
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
data = MSIPATCHSTATE_OBSOLETED;
res = RegSetValueExA(hpatch, "State", 0, REG_DWORD,
(const BYTE *)&data, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* State value is obsoleted */
lstrcpyA(patchcode, "apple");
@@ -10369,7 +10368,7 @@ static void test_MsiEnumPatchesEx_userunmanaged(LPCSTR usersid, LPCSTR expecteds
ok(!lstrcmpA(targetsid, expectedsid),
"Expected \"%s\", got \"%s\"\n", expectedsid, targetsid);
ok(size == lstrlenA(expectedsid),
- "Expected %d, got %d\n", lstrlenA(expectedsid), size);
+ "Expected %d, got %lu\n", lstrlenA(expectedsid), size);
/* MSIPATCHSTATE_REGISTERED */
/* FIXME */
@@ -10395,7 +10394,7 @@ static void test_MsiEnumPatchesEx_userunmanaged(LPCSTR usersid, LPCSTR expecteds
ok(!lstrcmpA(targetsid, expectedsid),
"Expected \"%s\", got \"%s\"\n", expectedsid, targetsid);
ok(size == lstrlenA(expectedsid),
- "Expected %d, got %d\n", lstrlenA(expectedsid), size);
+ "Expected %d, got %lu\n", lstrlenA(expectedsid), size);
/* same patch in multiple places, only one is enumerated */
lstrcpyA(patchcode, "apple");
@@ -10415,7 +10414,7 @@ static void test_MsiEnumPatchesEx_userunmanaged(LPCSTR usersid, LPCSTR expecteds
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
RegDeleteValueA(hpatch, "State");
delete_key(hpatch, "", access & KEY_WOW64_64KEY);
@@ -10475,7 +10474,7 @@ static void test_MsiEnumPatchesEx_machine(void)
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\");
lstrcatA(keypath, prod_squashed);
@@ -10486,7 +10485,7 @@ static void test_MsiEnumPatchesEx_machine(void)
skip("Not enough rights to perform tests\n");
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local product key exists */
lstrcpyA(patchcode, "apple");
@@ -10506,10 +10505,10 @@ static void test_MsiEnumPatchesEx_machine(void)
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegCreateKeyExA(prodkey, "Patches", 0, NULL, 0, access, NULL, &patches, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches key exists */
lstrcpyA(patchcode, "apple");
@@ -10529,12 +10528,12 @@ static void test_MsiEnumPatchesEx_machine(void)
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegSetValueExA(patches, "Patches", 0, REG_SZ,
(const BYTE *)patch_squashed,
lstrlenA(patch_squashed) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches value exists, is not REG_MULTI_SZ */
lstrcpyA(patchcode, "apple");
@@ -10555,11 +10554,11 @@ static void test_MsiEnumPatchesEx_machine(void)
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegSetValueExA(patches, "Patches", 0, REG_MULTI_SZ,
(const BYTE *)"a\0b\0c\0\0", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches value exists, is not a squashed guid */
lstrcpyA(patchcode, "apple");
@@ -10580,13 +10579,13 @@ static void test_MsiEnumPatchesEx_machine(void)
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
patch_squashed[lstrlenA(patch_squashed) + 1] = '\0';
res = RegSetValueExA(patches, "Patches", 0, REG_MULTI_SZ,
(const BYTE *)patch_squashed,
lstrlenA(patch_squashed) + 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches value exists */
lstrcpyA(patchcode, "apple");
@@ -10606,11 +10605,11 @@ static void test_MsiEnumPatchesEx_machine(void)
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegSetValueExA(patches, patch_squashed, 0, REG_SZ,
(const BYTE *)"whatever", 9);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* patch code value exists */
lstrcpyA(patchcode, "apple");
@@ -10629,7 +10628,7 @@ static void test_MsiEnumPatchesEx_machine(void)
ok(context == MSIINSTALLCONTEXT_MACHINE,
"Expected MSIINSTALLCONTEXT_MACHINE, got %d\n", context);
ok(!lstrcmpA(targetsid, ""), "Expected \"\", got \"%s\"\n", targetsid);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\");
lstrcatA(keypath, "Installer\\UserData\\S-1-5-18\\Products\\");
@@ -10641,7 +10640,7 @@ static void test_MsiEnumPatchesEx_machine(void)
skip("Not enough rights to perform tests\n");
goto done;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local UserData product key exists */
lstrcpyA(patchcode, "apple");
@@ -10661,10 +10660,10 @@ static void test_MsiEnumPatchesEx_machine(void)
"Expected MSIINSTALLCONTEXT_MACHINE, got %d\n", context);
ok(!lstrcmpA(targetsid, ""),
"Expected \"\", got \"%s\"\n", targetsid);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
res = RegCreateKeyExA(udprod, "Patches", 0, NULL, 0, access, NULL, &udpatch, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local UserData Patches key exists */
lstrcpyA(patchcode, "apple");
@@ -10684,10 +10683,10 @@ static void test_MsiEnumPatchesEx_machine(void)
"Expected MSIINSTALLCONTEXT_MACHINE, got %d\n", context);
ok(!lstrcmpA(targetsid, ""),
"Expected \"\", got \"%s\"\n", targetsid);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
res = RegCreateKeyExA(udpatch, patch_squashed, 0, NULL, 0, access, NULL, &hpatch, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local UserData Product patch key exists */
lstrcpyA(patchcode, "apple");
@@ -10707,12 +10706,12 @@ static void test_MsiEnumPatchesEx_machine(void)
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
data = MSIPATCHSTATE_APPLIED;
res = RegSetValueExA(hpatch, "State", 0, REG_DWORD,
(const BYTE *)&data, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* State value exists */
lstrcpyA(patchcode, "apple");
@@ -10732,7 +10731,7 @@ static void test_MsiEnumPatchesEx_machine(void)
"Expected MSIINSTALLCONTEXT_MACHINE, got %d\n", context);
ok(!lstrcmpA(targetsid, ""),
"Expected \"\", got \"%s\"\n", targetsid);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
/* MSIPATCHSTATE_SUPERSEDED */
@@ -10753,12 +10752,12 @@ static void test_MsiEnumPatchesEx_machine(void)
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
data = MSIPATCHSTATE_SUPERSEDED;
res = RegSetValueExA(hpatch, "State", 0, REG_DWORD,
(const BYTE *)&data, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* State value is MSIPATCHSTATE_SUPERSEDED */
lstrcpyA(patchcode, "apple");
@@ -10777,7 +10776,7 @@ static void test_MsiEnumPatchesEx_machine(void)
ok(context == MSIINSTALLCONTEXT_MACHINE,
"Expected MSIINSTALLCONTEXT_MACHINE, got %d\n", context);
ok(!lstrcmpA(targetsid, ""), "Expected \"\", got \"%s\"\n", targetsid);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
/* MSIPATCHSTATE_OBSOLETED */
@@ -10798,12 +10797,12 @@ static void test_MsiEnumPatchesEx_machine(void)
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
data = MSIPATCHSTATE_OBSOLETED;
res = RegSetValueExA(hpatch, "State", 0, REG_DWORD,
(const BYTE *)&data, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* State value is obsoleted */
lstrcpyA(patchcode, "apple");
@@ -10822,7 +10821,7 @@ static void test_MsiEnumPatchesEx_machine(void)
ok(context == MSIINSTALLCONTEXT_MACHINE,
"Expected MSIINSTALLCONTEXT_MACHINE, got %d\n", context);
ok(!lstrcmpA(targetsid, ""), "Expected \"\", got \"%s\"\n", targetsid);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
/* MSIPATCHSTATE_REGISTERED */
/* FIXME */
@@ -10846,7 +10845,7 @@ static void test_MsiEnumPatchesEx_machine(void)
ok(context == MSIINSTALLCONTEXT_MACHINE,
"Expected MSIINSTALLCONTEXT_MACHINE, got %d\n", context);
ok(!lstrcmpA(targetsid, ""), "Expected \"\", got \"%s\"\n", targetsid);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
/* same patch in multiple places, only one is enumerated */
lstrcpyA(patchcode, "apple");
@@ -10866,7 +10865,7 @@ static void test_MsiEnumPatchesEx_machine(void)
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
delete_key(hpatch, "", access & KEY_WOW64_64KEY);
RegDeleteValueA(hpatch, "State");
@@ -10923,7 +10922,7 @@ static void test_MsiEnumPatchesEx(void)
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* garbage szProductCode */
lstrcpyA(patchcode, "apple");
@@ -10944,7 +10943,7 @@ static void test_MsiEnumPatchesEx(void)
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* guid without brackets */
lstrcpyA(patchcode, "apple");
@@ -10966,7 +10965,7 @@ static void test_MsiEnumPatchesEx(void)
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* guid with brackets */
lstrcpyA(patchcode, "apple");
@@ -10988,7 +10987,7 @@ static void test_MsiEnumPatchesEx(void)
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* szUserSid is S-1-5-18 */
lstrcpyA(patchcode, "apple");
@@ -11010,7 +11009,7 @@ static void test_MsiEnumPatchesEx(void)
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* dwContext is MSIINSTALLCONTEXT_MACHINE, but szUserSid is non-NULL */
lstrcpyA(patchcode, "apple");
@@ -11031,7 +11030,7 @@ static void test_MsiEnumPatchesEx(void)
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* dwContext is out of bounds */
lstrcpyA(patchcode, "apple");
@@ -11052,7 +11051,7 @@ static void test_MsiEnumPatchesEx(void)
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* dwContext is out of bounds */
lstrcpyA(patchcode, "apple");
@@ -11073,7 +11072,7 @@ static void test_MsiEnumPatchesEx(void)
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* dwFilter is out of bounds */
lstrcpyA(patchcode, "apple");
@@ -11094,7 +11093,7 @@ static void test_MsiEnumPatchesEx(void)
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* dwFilter is out of bounds */
lstrcpyA(patchcode, "apple");
@@ -11115,7 +11114,7 @@ static void test_MsiEnumPatchesEx(void)
"Expected context to be unchanged, got %d\n", context);
ok(!lstrcmpA(targetsid, "kiwi"),
"Expected targetsid to be unchanged, got %s\n", targetsid);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* pcchTargetUserSid is NULL while szTargetUserSid is non-NULL */
lstrcpyA(patchcode, "apple");
@@ -11179,7 +11178,7 @@ static void test_MsiEnumPatches(void)
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* empty szProduct */
size = MAX_PATH;
@@ -11192,7 +11191,7 @@ static void test_MsiEnumPatches(void)
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* garbage szProduct */
size = MAX_PATH;
@@ -11205,7 +11204,7 @@ static void test_MsiEnumPatches(void)
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* guid without brackets */
size = MAX_PATH;
@@ -11219,7 +11218,7 @@ static void test_MsiEnumPatches(void)
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* guid with brackets */
size = MAX_PATH;
@@ -11233,7 +11232,7 @@ static void test_MsiEnumPatches(void)
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* same length as guid, but random */
size = MAX_PATH;
@@ -11247,7 +11246,7 @@ static void test_MsiEnumPatches(void)
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* MSIINSTALLCONTEXT_USERMANAGED */
@@ -11261,7 +11260,7 @@ static void test_MsiEnumPatches(void)
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\");
lstrcatA(keypath, usersid);
@@ -11275,7 +11274,7 @@ static void test_MsiEnumPatches(void)
LocalFree(usersid);
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* managed product key exists */
size = MAX_PATH;
@@ -11287,10 +11286,10 @@ static void test_MsiEnumPatches(void)
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegCreateKeyExA(prodkey, "Patches", 0, NULL, 0, access, NULL, &patches, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* patches key exists */
size = MAX_PATH;
@@ -11304,12 +11303,12 @@ static void test_MsiEnumPatches(void)
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegSetValueExA(patches, "Patches", 0, REG_SZ,
(const BYTE *)patch_squashed,
lstrlenA(patch_squashed) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches value exists, is not REG_MULTI_SZ */
size = MAX_PATH;
@@ -11323,11 +11322,11 @@ static void test_MsiEnumPatches(void)
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegSetValueExA(patches, "Patches", 0, REG_MULTI_SZ,
(const BYTE *)"a\0b\0c\0\0", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches value exists, is not a squashed guid */
size = MAX_PATH;
@@ -11340,13 +11339,13 @@ static void test_MsiEnumPatches(void)
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
patch_squashed[lstrlenA(patch_squashed) + 1] = '\0';
res = RegSetValueExA(patches, "Patches", 0, REG_MULTI_SZ,
(const BYTE *)patch_squashed,
lstrlenA(patch_squashed) + 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches value exists */
size = MAX_PATH;
@@ -11361,11 +11360,11 @@ static void test_MsiEnumPatches(void)
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegSetValueExA(patches, patch_squashed, 0, REG_SZ,
(const BYTE *)"whatever", 9);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* patch squashed value exists */
size = MAX_PATH;
@@ -11377,7 +11376,7 @@ static void test_MsiEnumPatches(void)
"Expected \"%s\", got \"%s\"\n", patchcode, patch);
ok(!lstrcmpA(transforms, "whatever"),
"Expected \"whatever\", got \"%s\"\n", transforms);
- ok(size == 8 || size == MAX_PATH, "Expected 8 or MAX_PATH, got %d\n", size);
+ ok(size == 8 || size == MAX_PATH, "Expected 8 or MAX_PATH, got %lu\n", size);
/* lpPatchBuf is NULL */
size = MAX_PATH;
@@ -11387,7 +11386,7 @@ static void test_MsiEnumPatches(void)
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* lpTransformsBuf is NULL, pcchTransformsBuf is not */
size = MAX_PATH;
@@ -11397,7 +11396,7 @@ static void test_MsiEnumPatches(void)
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(patch, "apple"),
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* pcchTransformsBuf is NULL, lpTransformsBuf is not */
lstrcpyA(patch, "apple");
@@ -11421,7 +11420,7 @@ static void test_MsiEnumPatches(void)
ok(!lstrcmpA(transforms, "whate") ||
broken(!lstrcmpA(transforms, "banana")), /* Windows Installer < 3.0 */
"Expected \"whate\", got \"%s\"\n", transforms);
- ok(size == 8 || size == 16, "Expected 8 or 16, got %d\n", size);
+ ok(size == 8 || size == 16, "Expected 8 or 16, got %lu\n", size);
/* increase the index */
size = MAX_PATH;
@@ -11433,7 +11432,7 @@ static void test_MsiEnumPatches(void)
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* increase again */
size = MAX_PATH;
@@ -11445,7 +11444,7 @@ static void test_MsiEnumPatches(void)
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
RegDeleteValueA(patches, "Patches");
delete_key(patches, "", access & KEY_WOW64_64KEY);
@@ -11465,13 +11464,13 @@ static void test_MsiEnumPatches(void)
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\");
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &prodkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* current user product key exists */
size = MAX_PATH;
@@ -11483,10 +11482,10 @@ static void test_MsiEnumPatches(void)
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegCreateKeyA(prodkey, "Patches", &patches);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches key exists */
size = MAX_PATH;
@@ -11500,12 +11499,12 @@ static void test_MsiEnumPatches(void)
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegSetValueExA(patches, "Patches", 0, REG_SZ,
(const BYTE *)patch_squashed,
lstrlenA(patch_squashed) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches value exists, is not REG_MULTI_SZ */
size = MAX_PATH;
@@ -11519,11 +11518,11 @@ static void test_MsiEnumPatches(void)
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegSetValueExA(patches, "Patches", 0, REG_MULTI_SZ,
(const BYTE *)"a\0b\0c\0\0", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches value exists, is not a squashed guid */
size = MAX_PATH;
@@ -11536,13 +11535,13 @@ static void test_MsiEnumPatches(void)
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
patch_squashed[lstrlenA(patch_squashed) + 1] = '\0';
res = RegSetValueExA(patches, "Patches", 0, REG_MULTI_SZ,
(const BYTE *)patch_squashed,
lstrlenA(patch_squashed) + 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches value exists */
size = MAX_PATH;
@@ -11557,11 +11556,11 @@ static void test_MsiEnumPatches(void)
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegSetValueExA(patches, patch_squashed, 0, REG_SZ,
(const BYTE *)"whatever", 9);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* patch code value exists */
size = MAX_PATH;
@@ -11577,7 +11576,7 @@ static void test_MsiEnumPatches(void)
ok(!lstrcmpA(transforms, "banana") ||
broken(!lstrcmpA(transforms, "whatever")), /* Windows Installer < 3.0 */
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
lstrcatA(keypath, usersid);
@@ -11585,7 +11584,7 @@ static void test_MsiEnumPatches(void)
lstrcatA(keypath, patch_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &userkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* userdata patch key exists */
size = MAX_PATH;
@@ -11597,7 +11596,7 @@ static void test_MsiEnumPatches(void)
"Expected \"%s\", got \"%s\"\n", patchcode, patch);
ok(!lstrcmpA(transforms, "whatever"),
"Expected \"whatever\", got \"%s\"\n", transforms);
- ok(size == 8 || size == MAX_PATH, "Expected 8 or MAX_PATH, got %d\n", size);
+ ok(size == 8 || size == MAX_PATH, "Expected 8 or MAX_PATH, got %lu\n", size);
delete_key(userkey, "", access & KEY_WOW64_64KEY);
RegCloseKey(userkey);
@@ -11620,7 +11619,7 @@ static void test_MsiEnumPatches(void)
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\");
lstrcatA(keypath, prod_squashed);
@@ -11632,7 +11631,7 @@ static void test_MsiEnumPatches(void)
LocalFree(usersid);
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local product key exists */
size = MAX_PATH;
@@ -11644,10 +11643,10 @@ static void test_MsiEnumPatches(void)
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegCreateKeyExA(prodkey, "Patches", 0, NULL, 0, access, NULL, &patches, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches key exists */
size = MAX_PATH;
@@ -11661,12 +11660,12 @@ static void test_MsiEnumPatches(void)
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegSetValueExA(patches, "Patches", 0, REG_SZ,
(const BYTE *)patch_squashed,
lstrlenA(patch_squashed) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches value exists, is not REG_MULTI_SZ */
size = MAX_PATH;
@@ -11680,11 +11679,11 @@ static void test_MsiEnumPatches(void)
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegSetValueExA(patches, "Patches", 0, REG_MULTI_SZ,
(const BYTE *)"a\0b\0c\0\0", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches value exists, is not a squashed guid */
size = MAX_PATH;
@@ -11697,13 +11696,13 @@ static void test_MsiEnumPatches(void)
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
patch_squashed[lstrlenA(patch_squashed) + 1] = '\0';
res = RegSetValueExA(patches, "Patches", 0, REG_MULTI_SZ,
(const BYTE *)patch_squashed,
lstrlenA(patch_squashed) + 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches value exists */
size = MAX_PATH;
@@ -11718,11 +11717,11 @@ static void test_MsiEnumPatches(void)
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
ok(!lstrcmpA(transforms, "banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegSetValueExA(patches, patch_squashed, 0, REG_SZ,
(const BYTE *)"whatever", 9);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* patch code value exists */
size = MAX_PATH;
@@ -11734,14 +11733,14 @@ static void test_MsiEnumPatches(void)
"Expected \"%s\", got \"%s\"\n", patchcode, patch);
ok(!lstrcmpA(transforms, "whatever"),
"Expected \"whatever\", got \"%s\"\n", transforms);
- ok(size == 8 || size == MAX_PATH, "Expected 8 or MAX_PATH, got %d\n", size);
+ ok(size == 8 || size == MAX_PATH, "Expected 8 or MAX_PATH, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\");
lstrcatA(keypath, "Installer\\UserData\\S-1-5-18\\Products\\");
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &udprod, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local UserData product key exists */
size = MAX_PATH;
@@ -11753,10 +11752,10 @@ static void test_MsiEnumPatches(void)
"Expected \"%s\", got \"%s\"\n", patchcode, patch);
ok(!lstrcmpA(transforms, "whatever"),
"Expected \"whatever\", got \"%s\"\n", transforms);
- ok(size == 8 || size == MAX_PATH, "Expected 8 or MAX_PATH, got %d\n", size);
+ ok(size == 8 || size == MAX_PATH, "Expected 8 or MAX_PATH, got %lu\n", size);
res = RegCreateKeyExA(udprod, "Patches", 0, NULL, 0, access, NULL, &udpatch, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local UserData Patches key exists */
size = MAX_PATH;
@@ -11768,10 +11767,10 @@ static void test_MsiEnumPatches(void)
"Expected \"%s\", got \"%s\"\n", patchcode, patch);
ok(!lstrcmpA(transforms, "whatever"),
"Expected \"whatever\", got \"%s\"\n", transforms);
- ok(size == 8 || size == MAX_PATH, "Expected 8 or MAX_PATH, got %d\n", size);
+ ok(size == 8 || size == MAX_PATH, "Expected 8 or MAX_PATH, got %lu\n", size);
res = RegCreateKeyExA(udpatch, patch_squashed, 0, NULL, 0, access, NULL, &hpatch, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local UserData Product patch key exists */
size = MAX_PATH;
@@ -11787,12 +11786,12 @@ static void test_MsiEnumPatches(void)
ok(!lstrcmpA(transforms, "banana") ||
broken(!lstrcmpA(transforms, "whatever")), /* Windows Installer < 3.0 */
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
data = MSIPATCHSTATE_APPLIED;
res = RegSetValueExA(hpatch, "State", 0, REG_DWORD,
(const BYTE *)&data, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* State value exists */
size = MAX_PATH;
@@ -11804,7 +11803,7 @@ static void test_MsiEnumPatches(void)
"Expected \"%s\", got \"%s\"\n", patchcode, patch);
ok(!lstrcmpA(transforms, "whatever"),
"Expected \"whatever\", got \"%s\"\n", transforms);
- ok(size == 8 || size == MAX_PATH, "Expected 8 or MAX_PATH, got %d\n", size);
+ ok(size == 8 || size == MAX_PATH, "Expected 8 or MAX_PATH, got %lu\n", size);
/* now duplicate some of the tests for the W version */
@@ -11822,7 +11821,7 @@ static void test_MsiEnumPatches(void)
ok(!lstrcmpA(transforms, "whate") ||
broken(!lstrcmpA(transforms, "banana")), /* Windows Installer < 3.0 */
"Expected \"whate\", got \"%s\"\n", transforms);
- ok(size == 8, "Expected 8, got %d\n", size);
+ ok(size == 8, "Expected 8, got %lu\n", size);
/* patch code value exists */
size = MAX_PATH;
@@ -11836,7 +11835,7 @@ static void test_MsiEnumPatches(void)
"Expected \"%s\", got \"%s\"\n", patchcode, patch);
ok(!lstrcmpA(transforms, "whatever"),
"Expected \"whatever\", got \"%s\"\n", transforms);
- ok(size == 8 || size == MAX_PATH, "Expected 8 or MAX_PATH, got %d\n", size);
+ ok(size == 8 || size == MAX_PATH, "Expected 8 or MAX_PATH, got %lu\n", size);
RegDeleteValueA(patches, patch_squashed);
RegDeleteValueA(patches, "Patches");
@@ -11889,7 +11888,7 @@ static void test_MsiGetPatchInfoEx(void)
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* empty szPatchCode */
size = MAX_PATH;
@@ -11900,7 +11899,7 @@ static void test_MsiGetPatchInfoEx(void)
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* garbage szPatchCode */
size = MAX_PATH;
@@ -11912,7 +11911,7 @@ static void test_MsiGetPatchInfoEx(void)
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* guid without brackets */
size = MAX_PATH;
@@ -11924,7 +11923,7 @@ static void test_MsiGetPatchInfoEx(void)
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* guid with brackets */
size = MAX_PATH;
@@ -11936,7 +11935,7 @@ static void test_MsiGetPatchInfoEx(void)
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* same length as guid, but random */
size = MAX_PATH;
@@ -11948,7 +11947,7 @@ static void test_MsiGetPatchInfoEx(void)
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* NULL szProductCode */
lstrcpyA(val, "apple");
@@ -11959,7 +11958,7 @@ static void test_MsiGetPatchInfoEx(void)
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* empty szProductCode */
size = MAX_PATH;
@@ -11970,7 +11969,7 @@ static void test_MsiGetPatchInfoEx(void)
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* garbage szProductCode */
size = MAX_PATH;
@@ -11982,7 +11981,7 @@ static void test_MsiGetPatchInfoEx(void)
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* guid without brackets */
size = MAX_PATH;
@@ -11994,7 +11993,7 @@ static void test_MsiGetPatchInfoEx(void)
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* guid with brackets */
size = MAX_PATH;
@@ -12006,7 +12005,7 @@ static void test_MsiGetPatchInfoEx(void)
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* same length as guid, but random */
size = MAX_PATH;
@@ -12018,7 +12017,7 @@ static void test_MsiGetPatchInfoEx(void)
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* szUserSid cannot be S-1-5-18 for MSIINSTALLCONTEXT_USERMANAGED */
size = MAX_PATH;
@@ -12030,7 +12029,7 @@ static void test_MsiGetPatchInfoEx(void)
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* szUserSid cannot be S-1-5-18 for MSIINSTALLCONTEXT_USERUNMANAGED */
size = MAX_PATH;
@@ -12042,7 +12041,7 @@ static void test_MsiGetPatchInfoEx(void)
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* szUserSid cannot be S-1-5-18 for MSIINSTALLCONTEXT_MACHINE */
size = MAX_PATH;
@@ -12054,7 +12053,7 @@ static void test_MsiGetPatchInfoEx(void)
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* szUserSid must be NULL for MSIINSTALLCONTEXT_MACHINE */
size = MAX_PATH;
@@ -12066,7 +12065,7 @@ static void test_MsiGetPatchInfoEx(void)
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* dwContext is out of range */
size = MAX_PATH;
@@ -12078,7 +12077,7 @@ static void test_MsiGetPatchInfoEx(void)
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* dwContext is out of range */
size = MAX_PATH;
@@ -12090,7 +12089,7 @@ static void test_MsiGetPatchInfoEx(void)
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* dwContext is invalid */
size = MAX_PATH;
@@ -12101,7 +12100,7 @@ static void test_MsiGetPatchInfoEx(void)
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* MSIINSTALLCONTEXT_USERMANAGED */
@@ -12114,7 +12113,7 @@ static void test_MsiGetPatchInfoEx(void)
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
lstrcatA(keypath, usersid);
@@ -12128,7 +12127,7 @@ static void test_MsiGetPatchInfoEx(void)
LocalFree(usersid);
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local UserData product key exists */
size = MAX_PATH;
@@ -12140,10 +12139,10 @@ static void test_MsiGetPatchInfoEx(void)
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegCreateKeyExA(udprod, "InstallProperties", 0, NULL, 0, access, NULL, &props, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallProperties key exists */
size = MAX_PATH;
@@ -12154,10 +12153,10 @@ static void test_MsiGetPatchInfoEx(void)
ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegCreateKeyExA(udprod, "Patches", 0, NULL, 0, access, NULL, &patches, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches key exists */
size = MAX_PATH;
@@ -12168,10 +12167,10 @@ static void test_MsiGetPatchInfoEx(void)
ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCHA, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegCreateKeyExA(patches, patch_squashed, 0, NULL, 0, access, NULL, &hpatch, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches key exists */
size = MAX_PATH;
@@ -12182,7 +12181,7 @@ static void test_MsiGetPatchInfoEx(void)
ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\");
lstrcatA(keypath, usersid);
@@ -12190,7 +12189,7 @@ static void test_MsiGetPatchInfoEx(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &prodkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* managed product key exists */
size = MAX_PATH;
@@ -12201,10 +12200,10 @@ static void test_MsiGetPatchInfoEx(void)
ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegCreateKeyExA(prodkey, "Patches", 0, NULL, 0, access, NULL, &prodpatches, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches key exists */
size = MAX_PATH;
@@ -12215,11 +12214,11 @@ static void test_MsiGetPatchInfoEx(void)
ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegSetValueExA(prodpatches, patch_squashed, 0, REG_SZ,
(const BYTE *)"transforms", 11);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* specific patch value exists */
size = MAX_PATH;
@@ -12230,7 +12229,7 @@ static void test_MsiGetPatchInfoEx(void)
ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
lstrcatA(keypath, usersid);
@@ -12238,7 +12237,7 @@ static void test_MsiGetPatchInfoEx(void)
lstrcatA(keypath, patch_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &udpatch, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* UserData Patches key exists */
size = MAX_PATH;
@@ -12248,11 +12247,11 @@ static void test_MsiGetPatchInfoEx(void)
INSTALLPROPERTY_LOCALPACKAGEA, val, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(val, ""), "Expected \"\", got \"%s\"\n", val);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
res = RegSetValueExA(udpatch, "ManagedLocalPackage", 0, REG_SZ,
(const BYTE *)"pack", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* ManagedLocalPatch value exists */
size = MAX_PATH;
@@ -12262,7 +12261,7 @@ static void test_MsiGetPatchInfoEx(void)
INSTALLPROPERTY_LOCALPACKAGEA, val, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(val, "pack"), "Expected \"pack\", got \"%s\"\n", val);
- ok(size == 4, "Expected 4, got %d\n", size);
+ ok(size == 4, "Expected 4, got %lu\n", size);
size = MAX_PATH;
lstrcpyA(val, "apple");
@@ -12271,11 +12270,11 @@ static void test_MsiGetPatchInfoEx(void)
INSTALLPROPERTY_TRANSFORMSA, val, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(val, "transforms"), "Expected \"transforms\", got \"%s\"\n", val);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
res = RegSetValueExA(hpatch, "Installed", 0, REG_SZ,
(const BYTE *)"mydate", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Installed value exists */
size = MAX_PATH;
@@ -12285,11 +12284,11 @@ static void test_MsiGetPatchInfoEx(void)
INSTALLPROPERTY_INSTALLDATEA, val, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(val, "mydate"), "Expected \"mydate\", got \"%s\"\n", val);
- ok(size == 6, "Expected 6, got %d\n", size);
+ ok(size == 6, "Expected 6, got %lu\n", size);
res = RegSetValueExA(hpatch, "Uninstallable", 0, REG_SZ,
(const BYTE *)"yes", 4);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Uninstallable value exists */
size = MAX_PATH;
@@ -12299,11 +12298,11 @@ static void test_MsiGetPatchInfoEx(void)
INSTALLPROPERTY_UNINSTALLABLEA, val, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(val, "yes"), "Expected \"yes\", got \"%s\"\n", val);
- ok(size == 3, "Expected 3, got %d\n", size);
+ ok(size == 3, "Expected 3, got %lu\n", size);
res = RegSetValueExA(hpatch, "State", 0, REG_SZ,
(const BYTE *)"good", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* State value exists */
size = MAX_PATH;
@@ -12313,12 +12312,12 @@ static void test_MsiGetPatchInfoEx(void)
INSTALLPROPERTY_PATCHSTATEA, val, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(val, "good"), "Expected \"good\", got \"%s\"\n", val);
- ok(size == 4, "Expected 4, got %d\n", size);
+ ok(size == 4, "Expected 4, got %lu\n", size);
size = 1;
res = RegSetValueExA(hpatch, "State", 0, REG_DWORD,
(const BYTE *)&size, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* State value exists */
size = MAX_PATH;
@@ -12328,12 +12327,12 @@ static void test_MsiGetPatchInfoEx(void)
INSTALLPROPERTY_PATCHSTATEA, val, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(val, "1"), "Expected \"1\", got \"%s\"\n", val);
- ok(size == 1, "Expected 1, got %d\n", size);
+ ok(size == 1, "Expected 1, got %lu\n", size);
size = 1;
res = RegSetValueExA(hpatch, "Uninstallable", 0, REG_DWORD,
(const BYTE *)&size, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Uninstallable value exists */
size = MAX_PATH;
@@ -12343,11 +12342,11 @@ static void test_MsiGetPatchInfoEx(void)
INSTALLPROPERTY_UNINSTALLABLEA, val, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(val, "1"), "Expected \"1\", got \"%s\"\n", val);
- ok(size == 1, "Expected 1, got %d\n", size);
+ ok(size == 1, "Expected 1, got %lu\n", size);
res = RegSetValueExA(hpatch, "DisplayName", 0, REG_SZ,
(const BYTE *)"display", 8);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* DisplayName value exists */
size = MAX_PATH;
@@ -12357,11 +12356,11 @@ static void test_MsiGetPatchInfoEx(void)
INSTALLPROPERTY_DISPLAYNAMEA, val, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(val, "display"), "Expected \"display\", got \"%s\"\n", val);
- ok(size == 7, "Expected 7, got %d\n", size);
+ ok(size == 7, "Expected 7, got %lu\n", size);
res = RegSetValueExA(hpatch, "MoreInfoURL", 0, REG_SZ,
(const BYTE *)"moreinfo", 9);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* MoreInfoURL value exists */
size = MAX_PATH;
@@ -12371,7 +12370,7 @@ static void test_MsiGetPatchInfoEx(void)
INSTALLPROPERTY_MOREINFOURLA, val, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(val, "moreinfo"), "Expected \"moreinfo\", got \"%s\"\n", val);
- ok(size == 8, "Expected 8, got %d\n", size);
+ ok(size == 8, "Expected 8, got %lu\n", size);
/* szProperty is invalid */
size = MAX_PATH;
@@ -12382,7 +12381,7 @@ static void test_MsiGetPatchInfoEx(void)
ok(r == ERROR_UNKNOWN_PROPERTY,
"Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
ok(!lstrcmpA(val, "apple"), "Expected \"apple\", got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
/* lpValue is NULL, while pcchValue is non-NULL */
size = MAX_PATH;
@@ -12390,7 +12389,7 @@ static void test_MsiGetPatchInfoEx(void)
MSIINSTALLCONTEXT_USERMANAGED,
INSTALLPROPERTY_MOREINFOURLA, NULL, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(size == 16, "Expected 16, got %d\n", size);
+ ok(size == 16, "Expected 16, got %lu\n", size);
/* pcchValue is NULL, while lpValue is non-NULL */
lstrcpyA(val, "apple");
@@ -12416,7 +12415,7 @@ static void test_MsiGetPatchInfoEx(void)
ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r);
ok(!lstrcmpA(val, "moreinf"),
"Expected \"moreinf\", got \"%s\"\n", val);
- ok(size == 16, "Expected 16, got %d\n", size);
+ ok(size == 16, "Expected 16, got %lu\n", size);
/* pcchValue has exactly enough room for NULL terminator */
size = 9;
@@ -12427,7 +12426,7 @@ static void test_MsiGetPatchInfoEx(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(val, "moreinfo"),
"Expected \"moreinfo\", got \"%s\"\n", val);
- ok(size == 8, "Expected 8, got %d\n", size);
+ ok(size == 8, "Expected 8, got %lu\n", size);
/* pcchValue is too small, lpValue is NULL */
size = 0;
@@ -12435,7 +12434,7 @@ static void test_MsiGetPatchInfoEx(void)
MSIINSTALLCONTEXT_USERMANAGED,
INSTALLPROPERTY_MOREINFOURLA, NULL, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(size == 16, "Expected 16, got %d\n", size);
+ ok(size == 16, "Expected 16, got %lu\n", size);
RegDeleteValueA(prodpatches, patch_squashed);
delete_key(prodpatches, "", access & KEY_WOW64_64KEY);
@@ -12453,7 +12452,7 @@ static void test_MsiGetPatchInfoEx(void)
INSTALLPROPERTY_LOCALPACKAGEA, val, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(val, "pack"), "Expected \"pack\", got \"%s\"\n", val);
- ok(size == 4, "Expected 4, got %d\n", size);
+ ok(size == 4, "Expected 4, got %lu\n", size);
/* UserData is sufficient for all properties
* except INSTALLPROPERTY_TRANSFORMS
@@ -12465,7 +12464,7 @@ static void test_MsiGetPatchInfoEx(void)
INSTALLPROPERTY_TRANSFORMSA, val, &size);
ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r);
ok(!lstrcmpA(val, "apple"), "Expected \"apple\", got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
RegDeleteValueA(hpatch, "MoreInfoURL");
RegDeleteValueA(hpatch, "Display");
@@ -12495,7 +12494,7 @@ static void test_MsiGetPatchInfoEx(void)
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
lstrcatA(keypath, usersid);
@@ -12503,7 +12502,7 @@ static void test_MsiGetPatchInfoEx(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &udprod, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local UserData product key exists */
size = MAX_PATH;
@@ -12515,10 +12514,10 @@ static void test_MsiGetPatchInfoEx(void)
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegCreateKeyExA(udprod, "InstallProperties", 0, NULL, 0, access, NULL, &props, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallProperties key exists */
size = MAX_PATH;
@@ -12529,10 +12528,10 @@ static void test_MsiGetPatchInfoEx(void)
ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegCreateKeyExA(udprod, "Patches", 0, NULL, 0, access, NULL, &patches, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches key exists */
size = MAX_PATH;
@@ -12543,10 +12542,10 @@ static void test_MsiGetPatchInfoEx(void)
ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegCreateKeyExA(patches, patch_squashed, 0, NULL, 0, access, NULL, &hpatch, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches key exists */
size = MAX_PATH;
@@ -12557,13 +12556,13 @@ static void test_MsiGetPatchInfoEx(void)
ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\");
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &prodkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* current user product key exists */
size = MAX_PATH;
@@ -12574,10 +12573,10 @@ static void test_MsiGetPatchInfoEx(void)
ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegCreateKeyA(prodkey, "Patches", &prodpatches);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches key exists */
size = MAX_PATH;
@@ -12588,11 +12587,11 @@ static void test_MsiGetPatchInfoEx(void)
ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegSetValueExA(prodpatches, patch_squashed, 0, REG_SZ,
(const BYTE *)"transforms", 11);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* specific patch value exists */
size = MAX_PATH;
@@ -12603,7 +12602,7 @@ static void test_MsiGetPatchInfoEx(void)
ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
lstrcatA(keypath, usersid);
@@ -12611,7 +12610,7 @@ static void test_MsiGetPatchInfoEx(void)
lstrcatA(keypath, patch_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &udpatch, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* UserData Patches key exists */
size = MAX_PATH;
@@ -12621,11 +12620,11 @@ static void test_MsiGetPatchInfoEx(void)
INSTALLPROPERTY_LOCALPACKAGEA, val, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(val, ""), "Expected \"\", got \"%s\"\n", val);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
res = RegSetValueExA(udpatch, "LocalPackage", 0, REG_SZ,
(const BYTE *)"pack", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* LocalPatch value exists */
size = MAX_PATH;
@@ -12635,7 +12634,7 @@ static void test_MsiGetPatchInfoEx(void)
INSTALLPROPERTY_LOCALPACKAGEA, val, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(val, "pack"), "Expected \"pack\", got \"%s\"\n", val);
- ok(size == 4, "Expected 4, got %d\n", size);
+ ok(size == 4, "Expected 4, got %lu\n", size);
size = MAX_PATH;
lstrcpyA(val, "apple");
@@ -12644,7 +12643,7 @@ static void test_MsiGetPatchInfoEx(void)
INSTALLPROPERTY_TRANSFORMSA, val, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(val, "transforms"), "Expected \"transforms\", got \"%s\"\n", val);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
RegDeleteValueA(prodpatches, patch_squashed);
delete_key(prodpatches, "", access & KEY_WOW64_64KEY);
@@ -12662,7 +12661,7 @@ static void test_MsiGetPatchInfoEx(void)
INSTALLPROPERTY_LOCALPACKAGEA, val, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(val, "pack"), "Expected \"pack\", got \"%s\"\n", val);
- ok(size == 4, "Expected 4, got %d\n", size);
+ ok(size == 4, "Expected 4, got %lu\n", size);
/* UserData is sufficient for all properties
* except INSTALLPROPERTY_TRANSFORMS
@@ -12674,7 +12673,7 @@ static void test_MsiGetPatchInfoEx(void)
INSTALLPROPERTY_TRANSFORMSA, val, &size);
ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r);
ok(!lstrcmpA(val, "apple"), "Expected \"apple\", got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
RegDeleteValueA(udpatch, "LocalPackage");
delete_key(udpatch, "", access & KEY_WOW64_64KEY);
@@ -12699,14 +12698,14 @@ static void test_MsiGetPatchInfoEx(void)
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer");
lstrcatA(keypath, "\\UserData\\S-1-5-18\\Products\\");
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &udprod, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local UserData product key exists */
size = MAX_PATH;
@@ -12718,10 +12717,10 @@ static void test_MsiGetPatchInfoEx(void)
"Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegCreateKeyExA(udprod, "InstallProperties", 0, NULL, 0, access, NULL, &props, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* InstallProperties key exists */
size = MAX_PATH;
@@ -12732,10 +12731,10 @@ static void test_MsiGetPatchInfoEx(void)
ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegCreateKeyExA(udprod, "Patches", 0, NULL, 0, access, NULL, &patches, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches key exists */
size = MAX_PATH;
@@ -12746,10 +12745,10 @@ static void test_MsiGetPatchInfoEx(void)
ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegCreateKeyExA(patches, patch_squashed, 0, NULL, 0, access, NULL, &hpatch, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches key exists */
size = MAX_PATH;
@@ -12760,7 +12759,7 @@ static void test_MsiGetPatchInfoEx(void)
ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\");
lstrcatA(keypath, prod_squashed);
@@ -12772,7 +12771,7 @@ static void test_MsiGetPatchInfoEx(void)
LocalFree( usersid );
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* local product key exists */
size = MAX_PATH;
@@ -12783,10 +12782,10 @@ static void test_MsiGetPatchInfoEx(void)
ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegCreateKeyExA(prodkey, "Patches", 0, NULL, 0, access, NULL, &prodpatches, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Patches key exists */
size = MAX_PATH;
@@ -12797,11 +12796,11 @@ static void test_MsiGetPatchInfoEx(void)
ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
res = RegSetValueExA(prodpatches, patch_squashed, 0, REG_SZ,
(const BYTE *)"transforms", 11);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* specific patch value exists */
size = MAX_PATH;
@@ -12812,14 +12811,14 @@ static void test_MsiGetPatchInfoEx(void)
ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer");
lstrcatA(keypath, "\\UserData\\S-1-5-18\\Patches\\");
lstrcatA(keypath, patch_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &udpatch, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* UserData Patches key exists */
size = MAX_PATH;
@@ -12829,11 +12828,11 @@ static void test_MsiGetPatchInfoEx(void)
INSTALLPROPERTY_LOCALPACKAGEA, val, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(val, ""), "Expected \"\", got \"%s\"\n", val);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
res = RegSetValueExA(udpatch, "LocalPackage", 0, REG_SZ,
(const BYTE *)"pack", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* LocalPatch value exists */
size = MAX_PATH;
@@ -12843,7 +12842,7 @@ static void test_MsiGetPatchInfoEx(void)
INSTALLPROPERTY_LOCALPACKAGEA, val, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(val, "pack"), "Expected \"pack\", got \"%s\"\n", val);
- ok(size == 4, "Expected 4, got %d\n", size);
+ ok(size == 4, "Expected 4, got %lu\n", size);
size = MAX_PATH;
lstrcpyA(val, "apple");
@@ -12852,7 +12851,7 @@ static void test_MsiGetPatchInfoEx(void)
INSTALLPROPERTY_TRANSFORMSA, val, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(val, "transforms"), "Expected \"transforms\", got \"%s\"\n", val);
- ok(size == 10, "Expected 10, got %d\n", size);
+ ok(size == 10, "Expected 10, got %lu\n", size);
RegDeleteValueA(prodpatches, patch_squashed);
delete_key(prodpatches, "", access & KEY_WOW64_64KEY);
@@ -12870,7 +12869,7 @@ static void test_MsiGetPatchInfoEx(void)
INSTALLPROPERTY_LOCALPACKAGEA, val, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(val, "pack"), "Expected \"pack\", got \"%s\"\n", val);
- ok(size == 4, "Expected 4, got %d\n", size);
+ ok(size == 4, "Expected 4, got %lu\n", size);
/* UserData is sufficient for all properties
* except INSTALLPROPERTY_TRANSFORMS
@@ -12882,7 +12881,7 @@ static void test_MsiGetPatchInfoEx(void)
INSTALLPROPERTY_TRANSFORMSA, val, &size);
ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r);
ok(!lstrcmpA(val, "apple"), "Expected \"apple\", got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
RegDeleteValueA(udpatch, "LocalPackage");
delete_key(udpatch, "", access & KEY_WOW64_64KEY);
@@ -12942,7 +12941,7 @@ static void test_MsiGetPatchInfo(void)
skip("Not enough rights to perform tests\n");
return;
}
- ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS got %d\n", res);
+ ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS got %ld\n", res);
/* product key exists */
size = MAX_PATH;
@@ -12950,10 +12949,10 @@ static void test_MsiGetPatchInfo(void)
r = MsiGetPatchInfoA(patch_code, INSTALLPROPERTY_LOCALPACKAGEA, val, &size);
ok(r == ERROR_UNKNOWN_PRODUCT, "expected ERROR_UNKNOWN_PRODUCT got %u\n", r);
ok(!lstrcmpA(val, "apple"), "expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "expected size to be unchanged got %u\n", size);
+ ok(size == MAX_PATH, "expected size to be unchanged got %lu\n", size);
res = RegCreateKeyExA(hkey_product, "Patches", 0, NULL, 0, access, NULL, &hkey_patches, NULL);
- ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS got %d\n", res);
+ ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS got %ld\n", res);
/* patches key exists */
size = MAX_PATH;
@@ -12961,10 +12960,10 @@ static void test_MsiGetPatchInfo(void)
r = MsiGetPatchInfoA(patch_code, INSTALLPROPERTY_LOCALPACKAGEA, val, &size);
ok(r == ERROR_UNKNOWN_PRODUCT, "expected ERROR_UNKNOWN_PRODUCT got %u\n", r);
ok(!lstrcmpA(val, "apple"), "expected val to be unchanged got \"%s\"\n", val);
- ok(size == MAX_PATH, "expected size to be unchanged got %u\n", size);
+ ok(size == MAX_PATH, "expected size to be unchanged got %lu\n", size);
res = RegCreateKeyExA(hkey_patches, patch_squashed, 0, NULL, 0, access, NULL, &hkey_patch, NULL);
- ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS got %d\n", res);
+ ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS got %ld\n", res);
/* patch key exists */
size = MAX_PATH;
@@ -12972,7 +12971,7 @@ static void test_MsiGetPatchInfo(void)
r = MsiGetPatchInfoA(patch_code, INSTALLPROPERTY_LOCALPACKAGEA, val, &size);
ok(r == ERROR_UNKNOWN_PRODUCT, "expected ERROR_UNKNOWN_PRODUCT got %u\n", r);
ok(!lstrcmpA(val, "apple"), "expected val to be unchanged got \"%s\"\n", val);
- ok(size == MAX_PATH, "expected size to be unchanged got %u\n", size);
+ ok(size == MAX_PATH, "expected size to be unchanged got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer");
lstrcatA(keypath, "\\UserData\\S-1-5-18\\Products\\");
@@ -12984,7 +12983,7 @@ static void test_MsiGetPatchInfo(void)
skip("Not enough rights to perform tests\n");
goto done;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS got %ld\n", res);
/* UserData product key exists */
size = MAX_PATH;
@@ -12992,10 +12991,10 @@ static void test_MsiGetPatchInfo(void)
r = MsiGetPatchInfoA(patch_code, INSTALLPROPERTY_LOCALPACKAGEA, val, &size);
ok(r == ERROR_UNKNOWN_PRODUCT, "expected ERROR_UNKNOWN_PRODUCT got %u\n", r);
ok(!lstrcmpA(val, "apple"), "expected val to be unchanged got \"%s\"\n", val);
- ok(size == MAX_PATH, "expected size to be unchanged got %u\n", size);
+ ok(size == MAX_PATH, "expected size to be unchanged got %lu\n", size);
res = RegCreateKeyExA(hkey_udproduct, "InstallProperties", 0, NULL, 0, access, NULL, &hkey_udprops, NULL);
- ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS got %d\n", res);
+ ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS got %ld\n", res);
/* InstallProperties key exists */
size = MAX_PATH;
@@ -13003,10 +13002,10 @@ static void test_MsiGetPatchInfo(void)
r = MsiGetPatchInfoA(patch_code, INSTALLPROPERTY_LOCALPACKAGEA, val, &size);
ok(r == ERROR_UNKNOWN_PRODUCT, "expected ERROR_UNKNOWN_PRODUCT got %u\n", r);
ok(!lstrcmpA(val, "apple"), "expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "expected size to be unchanged got %u\n", size);
+ ok(size == MAX_PATH, "expected size to be unchanged got %lu\n", size);
res = RegCreateKeyExA(hkey_udproduct, "Patches", 0, NULL, 0, access, NULL, &hkey_udpatches, NULL);
- ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS got %d\n", res);
+ ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS got %ld\n", res);
/* UserData Patches key exists */
size = MAX_PATH;
@@ -13014,13 +13013,13 @@ static void test_MsiGetPatchInfo(void)
r = MsiGetPatchInfoA(patch_code, INSTALLPROPERTY_LOCALPACKAGEA, val, &size);
ok(r == ERROR_UNKNOWN_PRODUCT, "expected ERROR_UNKNOWN_PRODUCT got %u\n", r);
ok(!lstrcmpA(val, "apple"), "expected val to be unchanged got \"%s\"\n", val);
- ok(size == MAX_PATH, "expected size to be unchanged got %u\n", size);
+ ok(size == MAX_PATH, "expected size to be unchanged got %lu\n", size);
res = RegCreateKeyExA(hkey_udproduct, "Patches", 0, NULL, 0, access, NULL, &hkey_udproductpatches, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegCreateKeyExA(hkey_udproductpatches, patch_squashed, 0, NULL, 0, access, NULL, &hkey_udproductpatch, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* UserData product patch key exists */
size = MAX_PATH;
@@ -13028,17 +13027,17 @@ static void test_MsiGetPatchInfo(void)
r = MsiGetPatchInfoA(patch_code, INSTALLPROPERTY_LOCALPACKAGEA, val, &size);
ok(r == ERROR_UNKNOWN_PRODUCT, "expected ERROR_UNKNOWN_PRODUCT got %u\n", r);
ok(!lstrcmpA(val, "apple"), "expected val to be unchanged got \"%s\"\n", val);
- ok(size == MAX_PATH, "expected size to be unchanged got %u\n", size);
+ ok(size == MAX_PATH, "expected size to be unchanged got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer");
lstrcatA(keypath, "\\UserData\\S-1-5-18\\Patches\\");
lstrcatA(keypath, patch_squashed);
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &hkey_udpatch, NULL);
- ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS got %d\n", res);
+ ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS got %ld\n", res);
res = RegSetValueExA(hkey_udpatch, "LocalPackage", 0, REG_SZ, (const BYTE *)"c:\\test.msp", 12);
- ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS got %d\n", res);
+ ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS got %ld\n", res);
/* UserData Patch key exists */
size = 0;
@@ -13046,28 +13045,28 @@ static void test_MsiGetPatchInfo(void)
r = MsiGetPatchInfoA(patch_code, INSTALLPROPERTY_LOCALPACKAGEA, val, &size);
ok(r == ERROR_MORE_DATA, "expected ERROR_MORE_DATA got %u\n", r);
ok(!lstrcmpA(val, "apple"), "expected \"apple\", got \"%s\"\n", val);
- ok(size == 11, "expected 11 got %u\n", size);
+ ok(size == 11, "expected 11 got %lu\n", size);
size = MAX_PATH;
lstrcpyA(val, "apple");
r = MsiGetPatchInfoA(patch_code, INSTALLPROPERTY_LOCALPACKAGEA, val, &size);
ok(r == ERROR_SUCCESS, "expected ERROR_SUCCESS got %u\n", r);
ok(!lstrcmpA(val, "c:\\test.msp"), "expected \"c:\\test.msp\", got \"%s\"\n", val);
- ok(size == 11, "expected 11 got %u\n", size);
+ ok(size == 11, "expected 11 got %lu\n", size);
size = 0;
valW[0] = 0;
r = MsiGetPatchInfoW(patch_codeW, INSTALLPROPERTY_LOCALPACKAGEW, valW, &size);
ok(r == ERROR_MORE_DATA, "expected ERROR_MORE_DATA got %u\n", r);
ok(!valW[0], "expected 0 got %u\n", valW[0]);
- ok(size == 11, "expected 11 got %u\n", size);
+ ok(size == 11, "expected 11 got %lu\n", size);
size = MAX_PATH;
valW[0] = 0;
r = MsiGetPatchInfoW(patch_codeW, INSTALLPROPERTY_LOCALPACKAGEW, valW, &size);
ok(r == ERROR_SUCCESS, "expected ERROR_SUCCESS got %u\n", r);
ok(valW[0], "expected > 0 got %u\n", valW[0]);
- ok(size == 11, "expected 11 got %u\n", size);
+ ok(size == 11, "expected 11 got %lu\n", size);
delete_key(hkey_udproductpatch, "", access & KEY_WOW64_64KEY);
RegCloseKey(hkey_udproductpatch);
@@ -13193,37 +13192,37 @@ static void test_MsiGetFileSignatureInformation(void)
DWORD len;
hr = MsiGetFileSignatureInformationA( NULL, 0, NULL, NULL, NULL );
- ok(hr == E_INVALIDARG, "expected E_INVALIDARG got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "expected E_INVALIDARG got %#lx\n", hr);
hr = MsiGetFileSignatureInformationA( NULL, 0, NULL, NULL, &len );
- ok(hr == E_INVALIDARG, "expected E_INVALIDARG got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "expected E_INVALIDARG got %#lx\n", hr);
hr = MsiGetFileSignatureInformationA( NULL, 0, &cert, NULL, &len );
- ok(hr == E_INVALIDARG, "expected E_INVALIDARG got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "expected E_INVALIDARG got %#lx\n", hr);
hr = MsiGetFileSignatureInformationA( "", 0, NULL, NULL, NULL );
- ok(hr == E_INVALIDARG, "expected E_INVALIDARG got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "expected E_INVALIDARG got %#lx\n", hr);
hr = MsiGetFileSignatureInformationA( "signature.bin", 0, NULL, NULL, NULL );
- ok(hr == E_INVALIDARG, "expected E_INVALIDARG got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "expected E_INVALIDARG got %#lx\n", hr);
hr = MsiGetFileSignatureInformationA( "signature.bin", 0, NULL, NULL, &len );
- ok(hr == E_INVALIDARG, "expected E_INVALIDARG got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "expected E_INVALIDARG got %#lx\n", hr);
hr = MsiGetFileSignatureInformationA( "signature.bin", 0, &cert, NULL, &len );
- todo_wine ok(hr == CRYPT_E_FILE_ERROR, "expected CRYPT_E_FILE_ERROR got 0x%08x\n", hr);
+ todo_wine ok(hr == CRYPT_E_FILE_ERROR, "expected CRYPT_E_FILE_ERROR got %#lx\n", hr);
create_file_data( "signature.bin", "signature", sizeof("signature") );
hr = MsiGetFileSignatureInformationA( "signature.bin", 0, NULL, NULL, NULL );
- ok(hr == E_INVALIDARG, "expected E_INVALIDARG got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "expected E_INVALIDARG got %#lx\n", hr);
hr = MsiGetFileSignatureInformationA( "signature.bin", 0, NULL, NULL, &len );
- ok(hr == E_INVALIDARG, "expected E_INVALIDARG got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "expected E_INVALIDARG got %#lx\n", hr);
cert = (const CERT_CONTEXT *)0xdeadbeef;
hr = MsiGetFileSignatureInformationA( "signature.bin", 0, &cert, NULL, &len );
- todo_wine ok(hr == HRESULT_FROM_WIN32(ERROR_FUNCTION_FAILED), "got 0x%08x\n", hr);
+ todo_wine ok(hr == HRESULT_FROM_WIN32(ERROR_FUNCTION_FAILED), "got %#lx\n", hr);
ok(cert == NULL, "got %p\n", cert);
DeleteFileA( "signature.bin" );
@@ -13292,7 +13291,7 @@ static void test_MsiEnumProductsEx(void)
len = sizeof(sid);
r = pMsiEnumProductsExA( NULL, NULL, 0, 0, NULL, NULL, NULL, &len );
ok( r == ERROR_INVALID_PARAMETER, "got %u\n", r );
- ok( len == sizeof(sid), "got %u\n", len );
+ ok( len == sizeof(sid), "got %lu\n", len );
r = pMsiEnumProductsExA( NULL, NULL, MSIINSTALLCONTEXT_ALL, 0, NULL, NULL, NULL, NULL );
ok( r == ERROR_SUCCESS, "got %u\n", r );
@@ -13301,14 +13300,14 @@ static void test_MsiEnumProductsEx(void)
len = sizeof(sid);
r = pMsiEnumProductsExA( product0, NULL, MSIINSTALLCONTEXT_ALL, 0, NULL, NULL, sid, &len );
ok( r == ERROR_NO_MORE_ITEMS, "got %u\n", r );
- ok( len == sizeof(sid), "got %u\n", len );
+ ok( len == sizeof(sid), "got %lu\n", len );
ok( !sid[0], "got %s\n", sid );
sid[0] = 0;
len = sizeof(sid);
r = pMsiEnumProductsExA( product0, usersid, MSIINSTALLCONTEXT_ALL, 0, NULL, NULL, sid, &len );
ok( r == ERROR_NO_MORE_ITEMS, "got %u\n", r );
- ok( len == sizeof(sid), "got %u\n", len );
+ ok( len == sizeof(sid), "got %lu\n", len );
ok( !sid[0], "got %s\n", sid );
sid[0] = 0;
@@ -13326,7 +13325,7 @@ static void test_MsiEnumProductsEx(void)
ok( r == ERROR_SUCCESS, "got %u\n", r );
ok( guid[0], "empty guid\n" );
ok( context != 0xdeadbeef, "context unchanged\n" );
- ok( !len, "got %u\n", len );
+ ok( !len, "got %lu\n", len );
ok( !sid[0], "got %s\n", sid );
guid[0] = 0;
@@ -13337,7 +13336,7 @@ static void test_MsiEnumProductsEx(void)
ok( r == ERROR_SUCCESS, "got %u\n", r );
ok( guid[0], "empty guid\n" );
ok( context != 0xdeadbeef, "context unchanged\n" );
- ok( !len, "got %u\n", len );
+ ok( !len, "got %lu\n", len );
ok( !sid[0], "got %s\n", sid );
guid[0] = 0;
@@ -13353,7 +13352,7 @@ static void test_MsiEnumProductsEx(void)
ok( r == ERROR_SUCCESS, "got %u\n", r );
ok( guid[0], "empty guid\n" );
ok( context != 0xdeadbeef, "context unchanged\n" );
- ok( !len, "got %u\n", len );
+ ok( !len, "got %lu\n", len );
ok( !sid[0], "got %s\n", sid );
index = 0;
@@ -13368,21 +13367,21 @@ static void test_MsiEnumProductsEx(void)
{
ok( context == MSIINSTALLCONTEXT_MACHINE, "got %u\n", context );
ok( !sid[0], "got \"%s\"\n", sid );
- ok( !len, "unexpected length %u\n", len );
+ ok( !len, "unexpected length %lu\n", len );
found1 = TRUE;
}
if (!strcmp( product2, guid ))
{
ok( context == MSIINSTALLCONTEXT_USERMANAGED, "got %u\n", context );
ok( sid[0], "empty sid\n" );
- ok( len == strlen(sid), "unexpected length %u\n", len );
+ ok( len == strlen(sid), "unexpected length %lu\n", len );
found2 = TRUE;
}
if (!strcmp( product3, guid ))
{
ok( context == MSIINSTALLCONTEXT_USERUNMANAGED, "got %u\n", context );
ok( sid[0], "empty sid\n" );
- ok( len == strlen(sid), "unexpected length %u\n", len );
+ ok( len == strlen(sid), "unexpected length %lu\n", len );
found3 = TRUE;
}
if (found1 && found2 && found3) break;
@@ -13548,7 +13547,7 @@ static void test_MsiEnumComponentsEx(void)
{
ok( context == MSIINSTALLCONTEXT_MACHINE, "got %u\n", context );
ok( !sid[0], "got \"%s\"\n", sid );
- ok( !len, "unexpected length %u\n", len );
+ ok( !len, "unexpected length %lu\n", len );
found1 = TRUE;
if (found2) break;
}
@@ -13556,7 +13555,7 @@ static void test_MsiEnumComponentsEx(void)
{
ok( context == MSIINSTALLCONTEXT_USERUNMANAGED, "got %u\n", context );
ok( sid[0], "empty sid\n" );
- ok( len == strlen(sid), "unexpected length %u\n", len );
+ ok( len == strlen(sid), "unexpected length %lu\n", len );
found2 = TRUE;
if (found1) break;
}
@@ -13749,17 +13748,17 @@ static void test_MsiConfigureProductEx(void)
lstrcatA(keypath, "83374883CBB1401418CAF2AA7CCEDDDC\\InstallProperties");
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &props);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
type = REG_SZ;
size = MAX_PATH;
res = RegQueryValueExA(props, "LocalPackage", NULL, &type,
(LPBYTE)localpackage, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(props, "LocalPackage", 0, REG_SZ,
(const BYTE *)"C:\\idontexist.msi", 18);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* LocalPackage is used to find the cached msi package */
r = MsiConfigureProductExA("{38847338-1BBC-4104-81AC-2FAAC7ECDDCD}",
@@ -13799,33 +13798,33 @@ static void test_MsiConfigureProductEx(void)
lstrcatA(keypath, "83374883CBB1401418CAF2AA7CCEDDDC\\InstallProperties");
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &props);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
type = REG_SZ;
size = MAX_PATH;
res = RegQueryValueExA(props, "LocalPackage", NULL, &type,
(LPBYTE)localpackage, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(props, "LocalPackage", 0, REG_SZ,
(const BYTE *)"C:\\idontexist.msi", 18);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
lstrcpyA(keypath, "SOFTWARE\\Classes\\Installer\\Products\\");
lstrcatA(keypath, "83374883CBB1401418CAF2AA7CCEDDDC\\SourceList");
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &source);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
type = REG_SZ;
size = MAX_PATH;
res = RegQueryValueExA(source, "PackageName", NULL, &type,
(LPBYTE)packagename, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(source, "PackageName", 0, REG_SZ,
(const BYTE *)"idontexist.msi", 15);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* SourceList is altered */
r = MsiConfigureProductExA("{38847338-1BBC-4104-81AC-2FAAC7ECDDCD}",
@@ -13841,12 +13840,12 @@ static void test_MsiConfigureProductEx(void)
/* restore PackageName */
res = RegSetValueExA(source, "PackageName", 0, REG_SZ,
(const BYTE *)packagename, lstrlenA(packagename) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* restore LocalPackage */
res = RegSetValueExA(props, "LocalPackage", 0, REG_SZ,
(const BYTE *)localpackage, lstrlenA(localpackage) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* finally remove the product */
r = MsiConfigureProductExA("{38847338-1BBC-4104-81AC-2FAAC7ECDDCD}",
@@ -13918,7 +13917,7 @@ static void test_MsiSetFeatureAttributes(void)
r = MsiGetFeatureInfoA( package, "One", &attrs, NULL, NULL, NULL, NULL );
ok(r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r);
ok(attrs == INSTALLFEATUREATTRIBUTE_FAVORLOCAL,
- "expected INSTALLFEATUREATTRIBUTE_FAVORLOCAL, got 0x%08x\n", attrs);
+ "expected INSTALLFEATUREATTRIBUTE_FAVORLOCAL, got %#lx\n", attrs);
r = MsiSetFeatureAttributesA( package, "One", INSTALLFEATUREATTRIBUTE_FAVORLOCAL );
ok(r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r);
@@ -13927,7 +13926,7 @@ static void test_MsiSetFeatureAttributes(void)
r = MsiGetFeatureInfoA( package, "One", &attrs, NULL, NULL, NULL, NULL );
ok(r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r);
ok(attrs == INSTALLFEATUREATTRIBUTE_FAVORLOCAL,
- "expected INSTALLFEATUREATTRIBUTE_FAVORLOCAL, got 0x%08x\n", attrs);
+ "expected INSTALLFEATUREATTRIBUTE_FAVORLOCAL, got %#lx\n", attrs);
r = MsiDoActionA( package, "FileCost" );
ok(r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r);
@@ -13939,7 +13938,7 @@ static void test_MsiSetFeatureAttributes(void)
r = MsiGetFeatureInfoA( package, "One", &attrs, NULL, NULL, NULL, NULL );
ok(r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r);
ok(attrs == INSTALLFEATUREATTRIBUTE_FAVORSOURCE,
- "expected INSTALLFEATUREATTRIBUTE_FAVORSOURCE, got 0x%08x\n", attrs);
+ "expected INSTALLFEATUREATTRIBUTE_FAVORSOURCE, got %#lx\n", attrs);
r = MsiDoActionA( package, "CostFinalize" );
ok(r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r);
@@ -13996,15 +13995,15 @@ static void test_MsiGetFeatureInfo(void)
title_len = help_len = 0;
r = MsiGetFeatureInfoA( package, "One", NULL, NULL, &title_len, NULL, &help_len );
ok(r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r);
- ok(title_len == 3, "expected 3, got %u\n", title_len);
- ok(help_len == 3, "expected 3, got %u\n", help_len);
+ ok(title_len == 3, "expected 3, got %lu\n", title_len);
+ ok(help_len == 3, "expected 3, got %lu\n", help_len);
title[0] = help[0] = 0;
title_len = help_len = 0;
r = MsiGetFeatureInfoA( package, "One", NULL, title, &title_len, help, &help_len );
ok(r == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %u\n", r);
- ok(title_len == 3, "expected 3, got %u\n", title_len);
- ok(help_len == 3, "expected 3, got %u\n", help_len);
+ ok(title_len == 3, "expected 3, got %lu\n", title_len);
+ ok(help_len == 3, "expected 3, got %lu\n", help_len);
attrs = 0;
title[0] = help[0] = 0;
@@ -14012,9 +14011,9 @@ static void test_MsiGetFeatureInfo(void)
help_len = sizeof(help);
r = MsiGetFeatureInfoA( package, "One", &attrs, title, &title_len, help, &help_len );
ok(r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r);
- ok(attrs == INSTALLFEATUREATTRIBUTE_FAVORLOCAL, "expected INSTALLFEATUREATTRIBUTE_FAVORLOCAL, got %u\n", attrs);
- ok(title_len == 3, "expected 3, got %u\n", title_len);
- ok(help_len == 3, "expected 3, got %u\n", help_len);
+ ok(attrs == INSTALLFEATUREATTRIBUTE_FAVORLOCAL, "expected INSTALLFEATUREATTRIBUTE_FAVORLOCAL, got %lu\n", attrs);
+ ok(title_len == 3, "expected 3, got %lu\n", title_len);
+ ok(help_len == 3, "expected 3, got %lu\n", help_len);
ok(!strcmp(title, "One"), "expected \"One\", got \"%s\"\n", title);
ok(!strcmp(help, "One"), "expected \"One\", got \"%s\"\n", help);
@@ -14024,9 +14023,9 @@ static void test_MsiGetFeatureInfo(void)
help_len = sizeof(help);
r = MsiGetFeatureInfoA( package, "Two", &attrs, title, &title_len, help, &help_len );
ok(r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r);
- ok(attrs == INSTALLFEATUREATTRIBUTE_FAVORLOCAL, "expected INSTALLFEATUREATTRIBUTE_FAVORLOCAL, got %u\n", attrs);
- ok(!title_len, "expected 0, got %u\n", title_len);
- ok(!help_len, "expected 0, got %u\n", help_len);
+ ok(attrs == INSTALLFEATUREATTRIBUTE_FAVORLOCAL, "expected INSTALLFEATUREATTRIBUTE_FAVORLOCAL, got %lu\n", attrs);
+ ok(!title_len, "expected 0, got %lu\n", title_len);
+ ok(!help_len, "expected 0, got %lu\n", help_len);
ok(!title[0], "expected \"\", got \"%s\"\n", title);
ok(!help[0], "expected \"\", got \"%s\"\n", help);
@@ -14179,7 +14178,7 @@ static void test_lastusedsource(void)
MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCEA, value, &size);
ok(r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r);
ok(!lstrcmpA(value, path), "expected \"%s\", got \"%s\"\n", path, value);
- ok(size == lstrlenA(path), "expected %d, got %d\n", lstrlenA(path), size);
+ ok(size == lstrlenA(path), "expected %d, got %lu\n", lstrlenA(path), size);
r = MsiInstallProductA("msifile0.msi", "REMOVE=ALL FULL=1");
ok(r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r);
@@ -14205,7 +14204,7 @@ static void test_lastusedsource(void)
MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCEA, value, &size);
ok(r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r);
ok(!lstrcmpA(value, path), "expected \"%s\", got \"%s\"\n", path, value);
- ok(size == lstrlenA(path), "expected %d, got %d\n", lstrlenA(path), size);
+ ok(size == lstrlenA(path), "expected %d, got %lu\n", lstrlenA(path), size);
r = MsiInstallProductA("msifile1.msi", "REMOVE=ALL FULL=1");
ok(r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r);
@@ -14230,7 +14229,7 @@ static void test_lastusedsource(void)
MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCEA, value, &size);
ok(r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r);
ok(!lstrcmpA(value, path), "expected \"%s\", got \"%s\"\n", path, value);
- ok(size == lstrlenA(path), "expected %d, got %d\n", lstrlenA(path), size);
+ ok(size == lstrlenA(path), "expected %d, got %lu\n", lstrlenA(path), size);
r = MsiInstallProductA("msifile2.msi", "REMOVE=ALL FULL=1");
ok(r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r);
diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c
index 556bc016997..05633c4b6df 100644
--- a/dlls/msi/tests/package.c
+++ b/dlls/msi/tests/package.c
@@ -250,10 +250,10 @@ static void create_test_guid(LPSTR prodcode, LPSTR squashed)
int size;
hr = CoCreateGuid(&guid);
- ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
size = StringFromGUID2(&guid, guidW, MAX_PATH);
- ok(size == 39, "Expected 39, got %d\n", hr);
+ ok(size == 39, "Expected 39, got %#lx\n", hr);
WideCharToMultiByte(CP_ACP, 0, guidW, size, prodcode, MAX_PATH, NULL, NULL);
squash_guid(guidW, squashedW);
@@ -954,7 +954,7 @@ static UINT package_from_db(MSIHANDLE hdb, MSIHANDLE *handle)
CHAR szPackage[12];
MSIHANDLE hPackage;
- sprintf(szPackage, "#%u", hdb);
+ sprintf(szPackage, "#%lu", hdb);
res = MsiOpenPackageA(szPackage, &hPackage);
if (res != ERROR_SUCCESS)
{
@@ -1075,7 +1075,7 @@ static void remove_restore_point(DWORD seq_number)
res = pSRRemoveRestorePoint(seq_number);
if (res != ERROR_SUCCESS)
- trace("Failed to remove the restore point : %08x\n", res);
+ trace("Failed to remove the restore point: %#lx\n", res);
}
static BOOL is_root(const char *path)
@@ -2143,7 +2143,7 @@ static void check_prop(MSIHANDLE hpkg, const char *prop, const char *expect, int
DWORD sz = sizeof(buffer);
UINT r = MsiGetPropertyA(hpkg, prop, buffer, &sz);
ok(!r, "'%s': got %u\n", prop, r);
- ok(sz == lstrlenA(buffer), "'%s': expected %u, got %u\n", prop, lstrlenA(buffer), sz);
+ ok(sz == lstrlenA(buffer), "'%s': expected %u, got %lu\n", prop, lstrlenA(buffer), sz);
if (match_case)
ok(!strcmp(buffer, expect), "'%s': expected '%s', got '%s'\n", prop, expect, buffer);
else
@@ -2189,21 +2189,21 @@ static void test_props(void)
sz = sizeof buffer;
r = MsiGetPropertyA( hpkg, "boo", NULL, &sz );
ok(!r, "got %u\n", r);
- ok(sz == 0, "got size %d\n", sz);
+ ok(sz == 0, "got size %lu\n", sz);
sz = 0;
strcpy(buffer,"x");
r = MsiGetPropertyA( hpkg, "boo", buffer, &sz );
ok(r == ERROR_MORE_DATA, "got %u\n", r);
ok(!strcmp(buffer,"x"), "got \"%s\"\n", buffer);
- ok(sz == 0, "got size %u\n", sz);
+ ok(sz == 0, "got size %lu\n", sz);
sz = 1;
strcpy(buffer,"x");
r = MsiGetPropertyA( hpkg, "boo", buffer, &sz );
ok(!r, "got %u\n", r);
ok(!buffer[0], "got \"%s\"\n", buffer);
- ok(sz == 0, "got size %u\n", sz);
+ ok(sz == 0, "got size %lu\n", sz);
/* set the property to something */
r = MsiSetPropertyA( 0, NULL, NULL );
@@ -2253,68 +2253,68 @@ static void test_props(void)
sz = 0;
r = MsiGetPropertyA(hpkg, "boo", NULL, &sz);
ok(!r, "got %u\n", r);
- ok(sz == 3, "got size %u\n", sz);
+ ok(sz == 3, "got size %lu\n", sz);
sz = 0;
strcpy(buffer, "q");
r = MsiGetPropertyA(hpkg, "boo", buffer, &sz);
ok(r == ERROR_MORE_DATA, "got %u\n", r);
ok(!strcmp(buffer, "q"), "got \"%s\"", buffer);
- ok(sz == 3, "got size %u\n", sz);
+ ok(sz == 3, "got size %lu\n", sz);
sz = 1;
strcpy(buffer,"x");
r = MsiGetPropertyA( hpkg, "boo", buffer, &sz );
ok(r == ERROR_MORE_DATA, "got %u\n", r);
ok(!buffer[0], "got \"%s\"\n", buffer);
- ok(sz == 3, "got size %u\n", sz);
+ ok(sz == 3, "got size %lu\n", sz);
sz = 3;
strcpy(buffer,"x");
r = MsiGetPropertyA( hpkg, "boo", buffer, &sz );
ok(r == ERROR_MORE_DATA, "got %u\n", r);
ok(!strcmp(buffer,"xy"), "got \"%s\"\n", buffer);
- ok(sz == 3, "got size %u\n", sz);
+ ok(sz == 3, "got size %lu\n", sz);
sz = 4;
strcpy(buffer,"x");
r = MsiGetPropertyA( hpkg, "boo", buffer, &sz );
ok(!r, "got %u\n", r);
ok(!strcmp(buffer,"xyz"), "got \"%s\"\n", buffer);
- ok(sz == 3, "got size %u\n", sz);
+ ok(sz == 3, "got size %lu\n", sz);
sz = 0;
r = MsiGetPropertyW(hpkg, L"boo", NULL, &sz);
ok(!r, "got %u\n", r);
- ok(sz == 3, "got size %u\n", sz);
+ ok(sz == 3, "got size %lu\n", sz);
sz = 0;
lstrcpyW(bufferW, L"boo");
r = MsiGetPropertyW(hpkg, L"boo", bufferW, &sz);
ok(r == ERROR_MORE_DATA, "got %u\n", r);
ok(!lstrcmpW(bufferW, L"boo"), "got %s\n", wine_dbgstr_w(bufferW));
- ok(sz == 3, "got size %u\n", sz);
+ ok(sz == 3, "got size %lu\n", sz);
sz = 1;
lstrcpyW(bufferW, L"boo");
r = MsiGetPropertyW(hpkg, L"boo", bufferW, &sz );
ok(r == ERROR_MORE_DATA, "got %u\n", r);
ok(!bufferW[0], "got %s\n", wine_dbgstr_w(bufferW));
- ok(sz == 3, "got size %u\n", sz);
+ ok(sz == 3, "got size %lu\n", sz);
sz = 3;
lstrcpyW(bufferW, L"boo");
r = MsiGetPropertyW(hpkg, L"boo", bufferW, &sz );
ok(r == ERROR_MORE_DATA, "got %u\n", r);
ok(!lstrcmpW(bufferW, L"xy"), "got %s\n", wine_dbgstr_w(bufferW));
- ok(sz == 3, "got size %u\n", sz);
+ ok(sz == 3, "got size %lu\n", sz);
sz = 4;
lstrcpyW(bufferW, L"boo");
r = MsiGetPropertyW(hpkg, L"boo", bufferW, &sz );
ok(!r, "got %u\n", r);
ok(!lstrcmpW(bufferW, L"xyz"), "got %s\n", wine_dbgstr_w(bufferW));
- ok(sz == 3, "got size %u\n", sz);
+ ok(sz == 3, "got size %lu\n", sz);
/* properties are case-sensitive */
check_prop(hpkg, "BOO", "", 1);
@@ -2354,7 +2354,7 @@ static BOOL find_prop_in_property(MSIHANDLE hdb, LPCSTR prop, LPCSTR val, int le
r = MsiRecordGetStringA(hrec, 2, buffer, &sz);
if (r == ERROR_SUCCESS && !memcmp(buffer, val, len) && !buffer[len])
{
- ok(sz == len, "wrong size %u\n", sz);
+ ok(sz == len, "wrong size %lu\n", sz);
found = TRUE;
}
}
@@ -2420,7 +2420,7 @@ static void test_property_table(void)
r = run_query(hdb, query);
ok(r == ERROR_SUCCESS, "failed to add column\n");
- sprintf(package, "#%i", hdb);
+ sprintf(package, "#%lu", hdb);
r = MsiOpenPackageA(package, &hpkg);
ok(r != ERROR_SUCCESS, "MsiOpenPackage succeeded\n");
if (r == ERROR_SUCCESS)
@@ -2482,7 +2482,7 @@ static void test_property_table(void)
r = MsiGetPropertyA( hpkg, "prop2", buffer, &sz );
ok( r == ERROR_SUCCESS, "get property failed: %d\n", r);
ok( !memcmp( buffer, "\0np", sizeof("\0np") ), "wrong value\n");
- ok( sz == sizeof("\0np") - 1, "got %u\n", sz );
+ ok( sz == sizeof("\0np") - 1, "got %lu\n", sz );
found = find_prop_in_property(hdb, "prop2", "\0np", 3);
ok(found == TRUE, "prop2 should be in the _Property table\n");
@@ -2602,7 +2602,7 @@ static void test_msipackage(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
/* database exists, but is empty */
- sprintf(name, "#%d", hdb);
+ sprintf(name, "#%lu", hdb);
r = MsiOpenPackageA(name, &hpack);
ok(r == ERROR_INSTALL_PACKAGE_INVALID,
"Expected ERROR_INSTALL_PACKAGE_INVALID, got %d\n", r);
@@ -2620,7 +2620,7 @@ static void test_msipackage(void)
ok(r == ERROR_SUCCESS, "failed to create InstallExecuteSequence table\n");
/* a few key tables exist */
- sprintf(name, "#%d", hdb);
+ sprintf(name, "#%lu", hdb);
r = MsiOpenPackageA(name, &hpack);
ok(r == ERROR_INSTALL_PACKAGE_INVALID,
"Expected ERROR_INSTALL_PACKAGE_INVALID, got %d\n", r);
@@ -2632,7 +2632,7 @@ static void test_msipackage(void)
r = MsiOpenDatabaseW(msifileW, MSIDBOPEN_CREATE, &hdb);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- sprintf(name, "#%d", hdb);
+ sprintf(name, "#%lu", hdb);
/* The following summary information props must exist:
* - PID_REVNUMBER
@@ -2959,7 +2959,7 @@ static void test_formatrecord_tables(void)
r = MsiGetPropertyA( hpkg, "prop", buf, &size );
ok( r == ERROR_SUCCESS, "get property failed: %d\n", r);
ok( !memcmp( buf, "\0np", sizeof("\0np") ), "wrong value\n");
- ok( size == sizeof("\0np") - 1, "got %u\n", size );
+ ok( size == sizeof("\0np") - 1, "got %lu\n", size );
r = MsiSetPropertyA( hpkg, "prop", "[~]np" );
ok( r == ERROR_SUCCESS, "cannot set property: %d\n", r);
@@ -4397,73 +4397,73 @@ static void test_appsearch_reglocator(void)
skip("Not enough rights to perform tests\n");
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(classes, "Value1", 0, REG_SZ,
(const BYTE *)"regszdata", 10);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegCreateKeyA(HKEY_CURRENT_USER, "Software\\Wine", &hkcu);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(hkcu, "Value1", 0, REG_SZ,
(const BYTE *)"regszdata", 10);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
users = 0;
res = RegCreateKeyA(HKEY_USERS, "S-1-5-18\\Software\\Wine", &users);
ok(res == ERROR_SUCCESS ||
broken(res == ERROR_INVALID_PARAMETER),
- "Expected ERROR_SUCCESS, got %d\n", res);
+ "Expected ERROR_SUCCESS, got %ld\n", res);
if (res == ERROR_SUCCESS)
{
res = RegSetValueExA(users, "Value1", 0, REG_SZ,
(const BYTE *)"regszdata", 10);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
}
res = RegCreateKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine", &hklm);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueA(hklm, NULL, REG_SZ, "defvalue", 8);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(hklm, "Value1", 0, REG_SZ,
(const BYTE *)"regszdata", 10);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
val = 42;
res = RegSetValueExA(hklm, "Value2", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
val = -42;
res = RegSetValueExA(hklm, "Value3", 0, REG_DWORD,
(const BYTE *)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(hklm, "Value4", 0, REG_EXPAND_SZ,
(const BYTE *)"%PATH%", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(hklm, "Value5", 0, REG_EXPAND_SZ,
(const BYTE *)"my%NOVAR%", 10);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(hklm, "Value6", 0, REG_MULTI_SZ,
(const BYTE *)"one\0two\0", 9);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
binary[0] = 0x1234abcd;
binary[1] = 0x567890ef;
res = RegSetValueExA(hklm, "Value7", 0, REG_BINARY,
(const BYTE *)binary, sizeof(binary));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(hklm, "Value8", 0, REG_SZ,
(const BYTE *)"#regszdata", 11);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
strcpy(expected, CURR_DIR);
if (is_root(CURR_DIR)) expected[2] = 0;
@@ -4472,50 +4472,50 @@ static void test_appsearch_reglocator(void)
sprintf(path, "%s\\FileName1", expected);
res = RegSetValueExA(hklm, "Value9", 0, REG_SZ,
(const BYTE *)path, lstrlenA(path) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
sprintf(path, "%s\\FileName2", expected);
res = RegSetValueExA(hklm, "Value10", 0, REG_SZ,
(const BYTE *)path, lstrlenA(path) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
lstrcpyA(path, expected);
res = RegSetValueExA(hklm, "Value11", 0, REG_SZ,
(const BYTE *)path, lstrlenA(path) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(hklm, "Value12", 0, REG_SZ,
(const BYTE *)"", 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
create_file_with_version("FileName3.dll", MAKELONG(2, 1), MAKELONG(4, 3));
sprintf(path, "%s\\FileName3.dll", expected);
res = RegSetValueExA(hklm, "Value13", 0, REG_SZ,
(const BYTE *)path, lstrlenA(path) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
create_file_with_version("FileName4.dll", MAKELONG(1, 2), MAKELONG(3, 4));
sprintf(path, "%s\\FileName4.dll", expected);
res = RegSetValueExA(hklm, "Value14", 0, REG_SZ,
(const BYTE *)path, lstrlenA(path) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
create_file_with_version("FileName5.dll", MAKELONG(2, 1), MAKELONG(4, 3));
sprintf(path, "%s\\FileName5.dll", expected);
res = RegSetValueExA(hklm, "Value15", 0, REG_SZ,
(const BYTE *)path, lstrlenA(path) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
sprintf(path, "\"%s\\FileName1\" -option", expected);
res = RegSetValueExA(hklm, "value16", 0, REG_SZ,
(const BYTE *)path, lstrlenA(path) + 1);
- ok( res == ERROR_SUCCESS, "Expected ERROR_SUCCESS got %d\n", res);
+ ok( res == ERROR_SUCCESS, "Expected ERROR_SUCCESS got %ld\n", res);
space = strchr(expected, ' ') != NULL;
sprintf(path, "%s\\FileName1 -option", expected);
res = RegSetValueExA(hklm, "value17", 0, REG_SZ,
(const BYTE *)path, lstrlenA(path) + 1);
- ok( res == ERROR_SUCCESS, "Expected ERROR_SUCCESS got %d\n", res);
+ ok( res == ERROR_SUCCESS, "Expected ERROR_SUCCESS got %ld\n", res);
hdb = create_package_db();
ok(hdb, "Expected a valid database handle\n");
@@ -6215,7 +6215,7 @@ static void test_MsiGetSourcePath(void)
"Expected ERROR_INVALID_HANDLE, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"),
"Expected path to be unchanged, got \"%s\"\n", path);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* NULL szFolder */
size = MAX_PATH;
@@ -6225,7 +6225,7 @@ static void test_MsiGetSourcePath(void)
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"),
"Expected path to be unchanged, got \"%s\"\n", path);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* empty szFolder */
size = MAX_PATH;
@@ -6234,7 +6234,7 @@ static void test_MsiGetSourcePath(void)
ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"),
"Expected path to be unchanged, got \"%s\"\n", path);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* try TARGETDIR */
size = MAX_PATH;
@@ -6243,21 +6243,21 @@ static void test_MsiGetSourcePath(void)
ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"),
"Expected path to be unchanged, got \"%s\"\n", path);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
size = MAX_PATH;
lstrcpyA(path, "kiwi");
r = MsiGetPropertyA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
size = MAX_PATH;
lstrcpyA(path, "kiwi");
r = MsiGetPropertyA(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
/* try SourceDir */
size = MAX_PATH;
@@ -6266,7 +6266,7 @@ static void test_MsiGetSourcePath(void)
ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"),
"Expected path to be unchanged, got \"%s\"\n", path);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* try SOURCEDIR */
size = MAX_PATH;
@@ -6275,7 +6275,7 @@ static void test_MsiGetSourcePath(void)
ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"),
"Expected path to be unchanged, got \"%s\"\n", path);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* source path does not exist, but the property exists */
size = MAX_PATH;
@@ -6283,14 +6283,14 @@ static void test_MsiGetSourcePath(void)
r = MsiGetPropertyA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
size = MAX_PATH;
lstrcpyA(path, "kiwi");
r = MsiGetPropertyA(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
/* try SubDir */
size = MAX_PATH;
@@ -6299,7 +6299,7 @@ static void test_MsiGetSourcePath(void)
ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"),
"Expected path to be unchanged, got \"%s\"\n", path);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* try SubDir2 */
size = MAX_PATH;
@@ -6308,7 +6308,7 @@ static void test_MsiGetSourcePath(void)
ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"),
"Expected path to be unchanged, got \"%s\"\n", path);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
@@ -6321,7 +6321,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "TARGETDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SourceDir after CostInitialize */
size = MAX_PATH;
@@ -6329,7 +6329,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SOURCEDIR after CostInitialize */
size = MAX_PATH;
@@ -6338,7 +6338,7 @@ static void test_MsiGetSourcePath(void)
ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"),
"Expected path to be unchanged, got \"%s\"\n", path);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* source path does not exist, but the property exists */
size = MAX_PATH;
@@ -6346,14 +6346,14 @@ static void test_MsiGetSourcePath(void)
r = MsiGetPropertyA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
size = MAX_PATH;
lstrcpyA(path, "kiwi");
r = MsiGetPropertyA(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SubDir after CostInitialize */
size = MAX_PATH;
@@ -6361,7 +6361,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "SubDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
- ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
+ ok(size == lstrlenA(subsrc), "Expected %d, got %lu\n", lstrlenA(subsrc), size);
/* try SubDir2 after CostInitialize */
size = MAX_PATH;
@@ -6369,7 +6369,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "SubDir2", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, sub2), "Expected \"%s\", got \"%s\"\n", sub2, path);
- ok(size == lstrlenA(sub2), "Expected %d, got %d\n", lstrlenA(sub2), size);
+ ok(size == lstrlenA(sub2), "Expected %d, got %lu\n", lstrlenA(sub2), size);
r = MsiDoActionA(hpkg, "ResolveSource");
ok(r == ERROR_SUCCESS, "file cost failed\n");
@@ -6380,7 +6380,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "TARGETDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SourceDir after ResolveSource */
size = MAX_PATH;
@@ -6388,7 +6388,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SOURCEDIR after ResolveSource */
size = MAX_PATH;
@@ -6397,7 +6397,7 @@ static void test_MsiGetSourcePath(void)
ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"),
"Expected path to be unchanged, got \"%s\"\n", path);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* source path does not exist, but the property exists */
size = MAX_PATH;
@@ -6405,14 +6405,14 @@ static void test_MsiGetSourcePath(void)
r = MsiGetPropertyA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
size = MAX_PATH;
lstrcpyA(path, "kiwi");
r = MsiGetPropertyA(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SubDir after ResolveSource */
size = MAX_PATH;
@@ -6420,7 +6420,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "SubDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
- ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
+ ok(size == lstrlenA(subsrc), "Expected %d, got %lu\n", lstrlenA(subsrc), size);
/* try SubDir2 after ResolveSource */
size = MAX_PATH;
@@ -6428,7 +6428,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "SubDir2", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, sub2), "Expected \"%s\", got \"%s\"\n", sub2, path);
- ok(size == lstrlenA(sub2), "Expected %d, got %d\n", lstrlenA(sub2), size);
+ ok(size == lstrlenA(sub2), "Expected %d, got %lu\n", lstrlenA(sub2), size);
r = MsiDoActionA(hpkg, "FileCost");
ok(r == ERROR_SUCCESS, "file cost failed\n");
@@ -6439,7 +6439,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "TARGETDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SourceDir after FileCost */
size = MAX_PATH;
@@ -6447,7 +6447,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SOURCEDIR after FileCost */
size = MAX_PATH;
@@ -6456,7 +6456,7 @@ static void test_MsiGetSourcePath(void)
ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"),
"Expected path to be unchanged, got \"%s\"\n", path);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* source path does not exist, but the property exists */
size = MAX_PATH;
@@ -6464,14 +6464,14 @@ static void test_MsiGetSourcePath(void)
r = MsiGetPropertyA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
size = MAX_PATH;
lstrcpyA(path, "kiwi");
r = MsiGetPropertyA(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SubDir after FileCost */
size = MAX_PATH;
@@ -6479,7 +6479,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "SubDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
- ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
+ ok(size == lstrlenA(subsrc), "Expected %d, got %lu\n", lstrlenA(subsrc), size);
/* try SubDir2 after FileCost */
size = MAX_PATH;
@@ -6487,7 +6487,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "SubDir2", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, sub2), "Expected \"%s\", got \"%s\"\n", sub2, path);
- ok(size == lstrlenA(sub2), "Expected %d, got %d\n", lstrlenA(sub2), size);
+ ok(size == lstrlenA(sub2), "Expected %d, got %lu\n", lstrlenA(sub2), size);
r = MsiDoActionA(hpkg, "CostFinalize");
ok(r == ERROR_SUCCESS, "file cost failed\n");
@@ -6498,7 +6498,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "TARGETDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SourceDir after CostFinalize */
size = MAX_PATH;
@@ -6506,7 +6506,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SOURCEDIR after CostFinalize */
size = MAX_PATH;
@@ -6515,7 +6515,7 @@ static void test_MsiGetSourcePath(void)
ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"),
"Expected path to be unchanged, got \"%s\"\n", path);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* source path does not exist, but the property exists */
size = MAX_PATH;
@@ -6523,14 +6523,14 @@ static void test_MsiGetSourcePath(void)
r = MsiGetPropertyA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
size = MAX_PATH;
lstrcpyA(path, "kiwi");
r = MsiGetPropertyA(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SubDir after CostFinalize */
size = MAX_PATH;
@@ -6538,7 +6538,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "SubDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
- ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
+ ok(size == lstrlenA(subsrc), "Expected %d, got %lu\n", lstrlenA(subsrc), size);
/* try SubDir2 after CostFinalize */
size = MAX_PATH;
@@ -6546,7 +6546,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "SubDir2", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, sub2), "Expected \"%s\", got \"%s\"\n", sub2, path);
- ok(size == lstrlenA(sub2), "Expected %d, got %d\n", lstrlenA(sub2), size);
+ ok(size == lstrlenA(sub2), "Expected %d, got %lu\n", lstrlenA(sub2), size);
/* nonexistent directory */
size = MAX_PATH;
@@ -6555,13 +6555,13 @@ static void test_MsiGetSourcePath(void)
ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"),
"Expected path to be unchanged, got \"%s\"\n", path);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* NULL szPathBuf */
size = MAX_PATH;
r = MsiGetSourcePathA(hpkg, "SourceDir", NULL, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* NULL pcchPathBuf */
lstrcpyA(path, "kiwi");
@@ -6578,7 +6578,7 @@ static void test_MsiGetSourcePath(void)
ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"),
"Expected path to be unchanged, got \"%s\"\n", path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* pcchPathBuf does not have room for NULL terminator */
size = lstrlenA(cwd);
@@ -6587,7 +6587,7 @@ static void test_MsiGetSourcePath(void)
ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r);
ok(!strncmp(path, cwd, lstrlenA(cwd) - 1),
"Expected path with no backslash, got \"%s\"\n", path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* pcchPathBuf has room for NULL terminator */
size = lstrlenA(cwd) + 1;
@@ -6595,7 +6595,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* remove property */
r = MsiSetPropertyA(hpkg, "SourceDir", NULL);
@@ -6607,7 +6607,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* set property to a valid directory */
r = MsiSetPropertyA(hpkg, "SOURCEDIR", cwd);
@@ -6620,7 +6620,7 @@ static void test_MsiGetSourcePath(void)
ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"),
"Expected path to be unchanged, got \"%s\"\n", path);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
MsiCloseHandle(hpkg);
@@ -6641,7 +6641,7 @@ static void test_MsiGetSourcePath(void)
ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"),
"Expected path to be unchanged, got \"%s\"\n", path);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* try SourceDir */
size = MAX_PATH;
@@ -6650,7 +6650,7 @@ static void test_MsiGetSourcePath(void)
ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"),
"Expected path to be unchanged, got \"%s\"\n", path);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* try SOURCEDIR */
size = MAX_PATH;
@@ -6659,7 +6659,7 @@ static void test_MsiGetSourcePath(void)
ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"),
"Expected path to be unchanged, got \"%s\"\n", path);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* source path nor the property exist */
size = MAX_PATH;
@@ -6667,14 +6667,14 @@ static void test_MsiGetSourcePath(void)
r = MsiGetPropertyA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
size = MAX_PATH;
lstrcpyA(path, "kiwi");
r = MsiGetPropertyA(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
/* try SubDir */
size = MAX_PATH;
@@ -6683,7 +6683,7 @@ static void test_MsiGetSourcePath(void)
ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"),
"Expected path to be unchanged, got \"%s\"\n", path);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* try SubDir2 */
size = MAX_PATH;
@@ -6692,7 +6692,7 @@ static void test_MsiGetSourcePath(void)
ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"),
"Expected path to be unchanged, got \"%s\"\n", path);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
r = MsiDoActionA(hpkg, "CostInitialize");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
@@ -6703,7 +6703,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "TARGETDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SourceDir after CostInitialize */
size = MAX_PATH;
@@ -6711,7 +6711,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SOURCEDIR after CostInitialize */
size = MAX_PATH;
@@ -6721,7 +6721,7 @@ static void test_MsiGetSourcePath(void)
{
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
}
/* source path does not exist, but the property exists */
@@ -6730,14 +6730,14 @@ static void test_MsiGetSourcePath(void)
r = MsiGetPropertyA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
size = MAX_PATH;
lstrcpyA(path, "kiwi");
r = MsiGetPropertyA(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SubDir after CostInitialize */
size = MAX_PATH;
@@ -6745,7 +6745,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "SubDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SubDir2 after CostInitialize */
size = MAX_PATH;
@@ -6753,7 +6753,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "SubDir2", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
r = MsiDoActionA(hpkg, "ResolveSource");
ok(r == ERROR_SUCCESS, "file cost failed\n");
@@ -6764,7 +6764,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "TARGETDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SourceDir after ResolveSource */
size = MAX_PATH;
@@ -6772,7 +6772,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SOURCEDIR after ResolveSource */
size = MAX_PATH;
@@ -6782,7 +6782,7 @@ static void test_MsiGetSourcePath(void)
{
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
}
/* source path and the property exist */
@@ -6791,14 +6791,14 @@ static void test_MsiGetSourcePath(void)
r = MsiGetPropertyA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
size = MAX_PATH;
lstrcpyA(path, "kiwi");
r = MsiGetPropertyA(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SubDir after ResolveSource */
size = MAX_PATH;
@@ -6806,7 +6806,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "SubDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SubDir2 after ResolveSource */
size = MAX_PATH;
@@ -6814,7 +6814,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "SubDir2", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
r = MsiDoActionA(hpkg, "FileCost");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
@@ -6825,7 +6825,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "TARGETDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SourceDir after CostFinalize */
size = MAX_PATH;
@@ -6833,7 +6833,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SOURCEDIR after CostFinalize */
size = MAX_PATH;
@@ -6843,7 +6843,7 @@ static void test_MsiGetSourcePath(void)
{
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
}
/* source path and the property exist */
@@ -6852,14 +6852,14 @@ static void test_MsiGetSourcePath(void)
r = MsiGetPropertyA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
size = MAX_PATH;
lstrcpyA(path, "kiwi");
r = MsiGetPropertyA(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SubDir after CostFinalize */
size = MAX_PATH;
@@ -6867,7 +6867,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "SubDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SubDir2 after CostFinalize */
size = MAX_PATH;
@@ -6875,7 +6875,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "SubDir2", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
r = MsiDoActionA(hpkg, "CostFinalize");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
@@ -6886,7 +6886,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "TARGETDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SourceDir after CostFinalize */
size = MAX_PATH;
@@ -6894,7 +6894,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SOURCEDIR after CostFinalize */
size = MAX_PATH;
@@ -6904,7 +6904,7 @@ static void test_MsiGetSourcePath(void)
{
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
}
/* source path and the property exist */
@@ -6913,14 +6913,14 @@ static void test_MsiGetSourcePath(void)
r = MsiGetPropertyA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
size = MAX_PATH;
lstrcpyA(path, "kiwi");
r = MsiGetPropertyA(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SubDir after CostFinalize */
size = MAX_PATH;
@@ -6928,7 +6928,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "SubDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* try SubDir2 after CostFinalize */
size = MAX_PATH;
@@ -6936,7 +6936,7 @@ static void test_MsiGetSourcePath(void)
r = MsiGetSourcePathA(hpkg, "SubDir2", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
MsiCloseHandle(hpkg);
DeleteFileA(msifile);
@@ -7026,7 +7026,7 @@ static void test_shortlongsource(void)
r = MsiGetSourcePathA(hpkg, "SubDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
- ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
+ ok(size == lstrlenA(subsrc), "Expected %d, got %lu\n", lstrlenA(subsrc), size);
CreateDirectoryA("short", NULL);
@@ -7036,7 +7036,7 @@ static void test_shortlongsource(void)
r = MsiGetSourcePathA(hpkg, "SubDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
- ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
+ ok(size == lstrlenA(subsrc), "Expected %d, got %lu\n", lstrlenA(subsrc), size);
CreateDirectoryA("long", NULL);
@@ -7046,7 +7046,7 @@ static void test_shortlongsource(void)
r = MsiGetSourcePathA(hpkg, "SubDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
- ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
+ ok(size == lstrlenA(subsrc), "Expected %d, got %lu\n", lstrlenA(subsrc), size);
lstrcpyA(subsrc, cwd);
lstrcatA(subsrc, "two");
@@ -7058,7 +7058,7 @@ static void test_shortlongsource(void)
r = MsiGetSourcePathA(hpkg, "SubDir2", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
- ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
+ ok(size == lstrlenA(subsrc), "Expected %d, got %lu\n", lstrlenA(subsrc), size);
lstrcpyA(subsrc, cwd);
lstrcatA(subsrc, "four");
@@ -7070,7 +7070,7 @@ static void test_shortlongsource(void)
r = MsiGetSourcePathA(hpkg, "SubDir3", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
- ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
+ ok(size == lstrlenA(subsrc), "Expected %d, got %lu\n", lstrlenA(subsrc), size);
lstrcpyA(subsrc, cwd);
lstrcatA(subsrc, "six");
@@ -7082,7 +7082,7 @@ static void test_shortlongsource(void)
r = MsiGetSourcePathA(hpkg, "SubDir4", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
- ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
+ ok(size == lstrlenA(subsrc), "Expected %d, got %lu\n", lstrlenA(subsrc), size);
lstrcpyA(subsrc, cwd);
lstrcatA(subsrc, "eight");
@@ -7094,7 +7094,7 @@ static void test_shortlongsource(void)
r = MsiGetSourcePathA(hpkg, "SubDir5", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
- ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
+ ok(size == lstrlenA(subsrc), "Expected %d, got %lu\n", lstrlenA(subsrc), size);
lstrcpyA(subsrc, cwd);
lstrcatA(subsrc, "ten");
@@ -7106,7 +7106,7 @@ static void test_shortlongsource(void)
r = MsiGetSourcePathA(hpkg, "SubDir6", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
- ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
+ ok(size == lstrlenA(subsrc), "Expected %d, got %lu\n", lstrlenA(subsrc), size);
lstrcpyA(subsrc, cwd);
lstrcatA(subsrc, "twelve");
@@ -7118,7 +7118,7 @@ static void test_shortlongsource(void)
r = MsiGetSourcePathA(hpkg, "SubDir7", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
- ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
+ ok(size == lstrlenA(subsrc), "Expected %d, got %lu\n", lstrlenA(subsrc), size);
MsiCloseHandle(hpkg);
RemoveDirectoryA("short");
@@ -7170,7 +7170,7 @@ static void test_shortlongsource(void)
r = MsiGetSourcePathA(hpkg, "SubDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
- ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
+ ok(size == lstrlenA(subsrc), "Expected %d, got %lu\n", lstrlenA(subsrc), size);
CreateDirectoryA("short", NULL);
@@ -7180,7 +7180,7 @@ static void test_shortlongsource(void)
r = MsiGetSourcePathA(hpkg, "SubDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
- ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
+ ok(size == lstrlenA(subsrc), "Expected %d, got %lu\n", lstrlenA(subsrc), size);
CreateDirectoryA("long", NULL);
@@ -7190,7 +7190,7 @@ static void test_shortlongsource(void)
r = MsiGetSourcePathA(hpkg, "SubDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
- ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
+ ok(size == lstrlenA(subsrc), "Expected %d, got %lu\n", lstrlenA(subsrc), size);
lstrcpyA(subsrc, cwd);
lstrcatA(subsrc, "one");
@@ -7202,7 +7202,7 @@ static void test_shortlongsource(void)
r = MsiGetSourcePathA(hpkg, "SubDir2", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
- ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
+ ok(size == lstrlenA(subsrc), "Expected %d, got %lu\n", lstrlenA(subsrc), size);
lstrcpyA(subsrc, cwd);
lstrcatA(subsrc, "three");
@@ -7214,7 +7214,7 @@ static void test_shortlongsource(void)
r = MsiGetSourcePathA(hpkg, "SubDir3", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
- ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
+ ok(size == lstrlenA(subsrc), "Expected %d, got %lu\n", lstrlenA(subsrc), size);
lstrcpyA(subsrc, cwd);
lstrcatA(subsrc, "five");
@@ -7226,7 +7226,7 @@ static void test_shortlongsource(void)
r = MsiGetSourcePathA(hpkg, "SubDir4", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
- ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
+ ok(size == lstrlenA(subsrc), "Expected %d, got %lu\n", lstrlenA(subsrc), size);
lstrcpyA(subsrc, cwd);
lstrcatA(subsrc, "seven");
@@ -7238,7 +7238,7 @@ static void test_shortlongsource(void)
r = MsiGetSourcePathA(hpkg, "SubDir5", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
- ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
+ ok(size == lstrlenA(subsrc), "Expected %d, got %lu\n", lstrlenA(subsrc), size);
lstrcpyA(subsrc, cwd);
lstrcatA(subsrc, "nine");
@@ -7250,7 +7250,7 @@ static void test_shortlongsource(void)
r = MsiGetSourcePathA(hpkg, "SubDir6", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
- ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
+ ok(size == lstrlenA(subsrc), "Expected %d, got %lu\n", lstrlenA(subsrc), size);
lstrcpyA(subsrc, cwd);
lstrcatA(subsrc, "eleven");
@@ -7262,7 +7262,7 @@ static void test_shortlongsource(void)
r = MsiGetSourcePathA(hpkg, "SubDir7", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
- ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
+ ok(size == lstrlenA(subsrc), "Expected %d, got %lu\n", lstrlenA(subsrc), size);
MsiCloseHandle(hpkg);
RemoveDirectoryA("short");
@@ -7298,7 +7298,7 @@ static void test_sourcedir(void)
add_directory_entry(hdb, "'TARGETDIR', '', 'SourceDir'");
- sprintf(package, "#%u", hdb);
+ sprintf(package, "#%lu", hdb);
r = MsiOpenPackageA(package, &hpkg);
if (r == ERROR_INSTALL_PACKAGE_REJECTED)
{
@@ -7315,7 +7315,7 @@ static void test_sourcedir(void)
r = MsiGetPropertyA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
/* SOURCEDIR prop */
size = MAX_PATH;
@@ -7323,7 +7323,7 @@ static void test_sourcedir(void)
r = MsiGetPropertyA(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
@@ -7336,7 +7336,7 @@ static void test_sourcedir(void)
r = MsiGetPropertyA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
/* SOURCEDIR after CostInitialize */
size = MAX_PATH;
@@ -7344,7 +7344,7 @@ static void test_sourcedir(void)
r = MsiGetPropertyA(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
r = MsiDoActionA(hpkg, "FileCost");
ok(r == ERROR_SUCCESS, "file cost failed\n");
@@ -7355,7 +7355,7 @@ static void test_sourcedir(void)
r = MsiGetPropertyA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
/* SOURCEDIR after FileCost */
size = MAX_PATH;
@@ -7363,7 +7363,7 @@ static void test_sourcedir(void)
r = MsiGetPropertyA(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
r = MsiDoActionA(hpkg, "CostFinalize");
ok(r == ERROR_SUCCESS, "file cost failed\n");
@@ -7374,7 +7374,7 @@ static void test_sourcedir(void)
r = MsiGetPropertyA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
/* SOURCEDIR after CostFinalize */
size = MAX_PATH;
@@ -7382,14 +7382,14 @@ static void test_sourcedir(void)
r = MsiGetPropertyA(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
size = MAX_PATH;
lstrcpyA(path, "kiwi");
r = MsiGetSourcePathA(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"), "Expected \"kiwi\", got \"%s\"\n", path);
- ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size);
+ ok(size == MAX_PATH, "Expected %d, got %lu\n", MAX_PATH, size);
/* SOURCEDIR after calling MsiGetSourcePath */
size = MAX_PATH;
@@ -7398,7 +7398,7 @@ static void test_sourcedir(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
todo_wine {
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
}
r = MsiDoActionA(hpkg, "ResolveSource");
@@ -7410,7 +7410,7 @@ static void test_sourcedir(void)
r = MsiGetPropertyA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* SOURCEDIR after ResolveSource */
size = MAX_PATH;
@@ -7418,7 +7418,7 @@ static void test_sourcedir(void)
r = MsiGetPropertyA(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* random casing */
size = MAX_PATH;
@@ -7426,12 +7426,12 @@ static void test_sourcedir(void)
r = MsiGetPropertyA(hpkg, "SoUrCeDiR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
MsiCloseHandle(hpkg);
/* reset the package state */
- sprintf(package, "#%i", hdb);
+ sprintf(package, "#%lu", hdb);
r = MsiOpenPackageA(package, &hpkg);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
@@ -7445,7 +7445,7 @@ static void test_sourcedir(void)
todo_wine
{
ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
}
size = MAX_PATH;
@@ -7454,7 +7454,7 @@ static void test_sourcedir(void)
ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"),
"Expected path to be unchanged, got \"%s\"\n", path);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* SourceDir after MsiGetSourcePath */
size = MAX_PATH;
@@ -7464,7 +7464,7 @@ static void test_sourcedir(void)
todo_wine
{
ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
}
/* SOURCEDIR prop */
@@ -7475,7 +7475,7 @@ static void test_sourcedir(void)
todo_wine
{
ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
}
size = MAX_PATH;
@@ -7484,7 +7484,7 @@ static void test_sourcedir(void)
ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"),
"Expected path to be unchanged, got \"%s\"\n", path);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* SOURCEDIR prop after MsiGetSourcePath */
size = MAX_PATH;
@@ -7494,7 +7494,7 @@ static void test_sourcedir(void)
todo_wine
{
ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
}
r = MsiDoActionA(hpkg, "CostInitialize");
@@ -7508,7 +7508,7 @@ static void test_sourcedir(void)
todo_wine
{
ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
}
size = MAX_PATH;
@@ -7516,7 +7516,7 @@ static void test_sourcedir(void)
r = MsiGetSourcePathA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* SourceDir after MsiGetSourcePath */
size = MAX_PATH;
@@ -7524,7 +7524,7 @@ static void test_sourcedir(void)
r = MsiGetPropertyA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* SOURCEDIR after CostInitialize */
size = MAX_PATH;
@@ -7532,7 +7532,7 @@ static void test_sourcedir(void)
r = MsiGetPropertyA(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* SOURCEDIR source path still does not exist */
size = MAX_PATH;
@@ -7541,7 +7541,7 @@ static void test_sourcedir(void)
ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"),
"Expected path to be unchanged, got \"%s\"\n", path);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
r = MsiDoActionA(hpkg, "FileCost");
ok(r == ERROR_SUCCESS, "file cost failed\n");
@@ -7552,7 +7552,7 @@ static void test_sourcedir(void)
r = MsiGetPropertyA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* SOURCEDIR after FileCost */
size = MAX_PATH;
@@ -7560,7 +7560,7 @@ static void test_sourcedir(void)
r = MsiGetPropertyA(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* SOURCEDIR source path still does not exist */
size = MAX_PATH;
@@ -7569,7 +7569,7 @@ static void test_sourcedir(void)
ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"),
"Expected path to be unchanged, got \"%s\"\n", path);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
r = MsiDoActionA(hpkg, "CostFinalize");
ok(r == ERROR_SUCCESS, "file cost failed\n");
@@ -7580,7 +7580,7 @@ static void test_sourcedir(void)
r = MsiGetPropertyA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* SOURCEDIR after CostFinalize */
size = MAX_PATH;
@@ -7588,7 +7588,7 @@ static void test_sourcedir(void)
r = MsiGetPropertyA(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* SOURCEDIR source path still does not exist */
size = MAX_PATH;
@@ -7597,7 +7597,7 @@ static void test_sourcedir(void)
ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"),
"Expected path to be unchanged, got \"%s\"\n", path);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
r = MsiDoActionA(hpkg, "ResolveSource");
ok(r == ERROR_SUCCESS, "file cost failed\n");
@@ -7608,7 +7608,7 @@ static void test_sourcedir(void)
r = MsiGetPropertyA(hpkg, "SourceDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* SOURCEDIR after ResolveSource */
size = MAX_PATH;
@@ -7616,7 +7616,7 @@ static void test_sourcedir(void)
r = MsiGetPropertyA(hpkg, "SOURCEDIR", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
- ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
+ ok(size == lstrlenA(cwd), "Expected %d, got %lu\n", lstrlenA(cwd), size);
/* SOURCEDIR source path still does not exist */
size = MAX_PATH;
@@ -7625,7 +7625,7 @@ static void test_sourcedir(void)
ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r);
ok(!lstrcmpA(path, "kiwi"),
"Expected path to be unchanged, got \"%s\"\n", path);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
MsiCloseHandle(hpkg);
@@ -7731,11 +7731,11 @@ static void _test_file_access(LPCSTR file, const struct access_res *ares, DWORD
lasterr = GetLastError();
ok((hfile != INVALID_HANDLE_VALUE) == ares[idx].gothandle,
- "(%d, handle, %d): Expected %d, got %d\n",
+ "(%lu, handle, %d): Expected %d, got %d\n",
line, idx, ares[idx].gothandle,
(hfile != INVALID_HANDLE_VALUE));
- ok(lasterr == ares[idx].lasterr, "(%d, lasterr, %d): Expected %d, got %d\n",
+ ok(lasterr == ares[idx].lasterr, "(%lu, lasterr, %u): Expected %lu, got %lu\n",
line, idx, ares[idx].lasterr, lasterr);
CloseHandle(hfile);
@@ -8010,7 +8010,7 @@ static void test_MsiGetProductProperty(void)
DeleteFileA(msifile);
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\");
lstrcatA(keypath, "Installer\\UserData\\S-1-5-18\\Products\\");
@@ -8024,17 +8024,17 @@ static void test_MsiGetProductProperty(void)
RegCloseKey(prodkey);
return;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegCreateKeyExA(userkey, "InstallProperties", 0, NULL, 0, access, NULL, &props, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
lstrcpyA(val, path);
lstrcatA(val, "\\");
lstrcatA(val, msifile);
res = RegSetValueExA(props, "LocalPackage", 0, REG_SZ,
(const BYTE *)val, lstrlenA(val) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
hprod = 0xdeadbeef;
r = MsiOpenProductA(prodcode, &hprod);
@@ -8049,7 +8049,7 @@ static void test_MsiGetProductProperty(void)
"Expected ERROR_INVALID_HANDLE, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
size = MAX_PATH;
lstrcpyW(valW, L"apple");
@@ -8058,7 +8058,7 @@ static void test_MsiGetProductProperty(void)
"Expected ERROR_INVALID_HANDLE, got %d\n", r);
ok(!lstrcmpW(valW, L"apple"),
"Expected val to be unchanged, got %s\n", wine_dbgstr_w(valW));
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* szProperty is NULL */
size = MAX_PATH;
@@ -8068,7 +8068,7 @@ static void test_MsiGetProductProperty(void)
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
size = MAX_PATH;
lstrcpyW(valW, L"apple");
@@ -8077,7 +8077,7 @@ static void test_MsiGetProductProperty(void)
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpW(valW, L"apple"),
"Expected val to be unchanged, got %s\n", wine_dbgstr_w(valW));
- ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size);
+ ok(size == MAX_PATH, "Expected size to be unchanged, got %lu\n", size);
/* szProperty is empty */
size = MAX_PATH;
@@ -8085,14 +8085,14 @@ static void test_MsiGetProductProperty(void)
r = MsiGetProductPropertyA(hprod, "", val, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(val, ""), "Expected \"\", got \"%s\"\n", val);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
size = MAX_PATH;
lstrcpyW(valW, L"apple");
r = MsiGetProductPropertyW(hprod, L"", valW, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(*valW == 0, "Expected \"\", got %s\n", wine_dbgstr_w(valW));
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
/* get the property */
size = MAX_PATH;
@@ -8102,7 +8102,7 @@ static void test_MsiGetProductProperty(void)
ok(!lstrcmpA(val, prodcode),
"Expected \"%s\", got \"%s\"\n", prodcode, val);
ok(size == lstrlenA(prodcode),
- "Expected %d, got %d\n", lstrlenA(prodcode), size);
+ "Expected %d, got %lu\n", lstrlenA(prodcode), size);
size = MAX_PATH;
lstrcpyW(valW, L"apple");
@@ -8111,20 +8111,20 @@ static void test_MsiGetProductProperty(void)
ok(!lstrcmpW(valW, prodcodeW),
"Expected %s, got %s\n", wine_dbgstr_w(prodcodeW), wine_dbgstr_w(valW));
ok(size == lstrlenW(prodcodeW),
- "Expected %d, got %d\n", lstrlenW(prodcodeW), size);
+ "Expected %d, got %lu\n", lstrlenW(prodcodeW), size);
/* lpValueBuf is NULL */
size = MAX_PATH;
r = MsiGetProductPropertyA(hprod, "ProductCode", NULL, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(size == lstrlenA(prodcode),
- "Expected %d, got %d\n", lstrlenA(prodcode), size);
+ "Expected %d, got %lu\n", lstrlenA(prodcode), size);
size = MAX_PATH;
r = MsiGetProductPropertyW(hprod, L"ProductCode", NULL, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(size == lstrlenW(prodcodeW),
- "Expected %d, got %d\n", lstrlenW(prodcodeW), size);
+ "Expected %d, got %lu\n", lstrlenW(prodcodeW), size);
/* pcchValueBuf is NULL */
lstrcpyA(val, "apple");
@@ -8134,7 +8134,7 @@ static void test_MsiGetProductProperty(void)
ok(!lstrcmpA(val, "apple"),
"Expected val to be unchanged, got \"%s\"\n", val);
ok(size == lstrlenA(prodcode),
- "Expected %d, got %d\n", lstrlenA(prodcode), size);
+ "Expected %d, got %lu\n", lstrlenA(prodcode), size);
lstrcpyW(valW, L"apple");
r = MsiGetProductPropertyW(hprod, L"ProductCode", valW, NULL);
@@ -8143,7 +8143,7 @@ static void test_MsiGetProductProperty(void)
ok(!lstrcmpW(valW, L"apple"),
"Expected val to be unchanged, got %s\n", wine_dbgstr_w(valW));
ok(size == lstrlenW(prodcodeW),
- "Expected %d, got %d\n", lstrlenW(prodcodeW), size);
+ "Expected %d, got %lu\n", lstrlenW(prodcodeW), size);
/* pcchValueBuf is too small */
size = 4;
@@ -8153,7 +8153,7 @@ static void test_MsiGetProductProperty(void)
ok(!strncmp(val, prodcode, 3),
"Expected first 3 chars of \"%s\", got \"%s\"\n", prodcode, val);
ok(size == lstrlenA(prodcode),
- "Expected %d, got %d\n", lstrlenA(prodcode), size);
+ "Expected %d, got %lu\n", lstrlenA(prodcode), size);
size = 4;
lstrcpyW(valW, L"apple");
@@ -8162,7 +8162,7 @@ static void test_MsiGetProductProperty(void)
ok(!memcmp(valW, prodcodeW, 3 * sizeof(WCHAR)),
"Expected first 3 chars of %s, got %s\n", wine_dbgstr_w(prodcodeW), wine_dbgstr_w(valW));
ok(size == lstrlenW(prodcodeW),
- "Expected %d, got %d\n", lstrlenW(prodcodeW), size);
+ "Expected %d, got %lu\n", lstrlenW(prodcodeW), size);
/* pcchValueBuf does not leave room for NULL terminator */
size = lstrlenA(prodcode);
@@ -8172,7 +8172,7 @@ static void test_MsiGetProductProperty(void)
ok(!strncmp(val, prodcode, lstrlenA(prodcode) - 1),
"Expected first 37 chars of \"%s\", got \"%s\"\n", prodcode, val);
ok(size == lstrlenA(prodcode),
- "Expected %d, got %d\n", lstrlenA(prodcode), size);
+ "Expected %d, got %lu\n", lstrlenA(prodcode), size);
size = lstrlenW(prodcodeW);
lstrcpyW(valW, L"apple");
@@ -8181,7 +8181,7 @@ static void test_MsiGetProductProperty(void)
ok(!memcmp(valW, prodcodeW, lstrlenW(prodcodeW) - 1),
"Expected first 37 chars of %s, got %s\n", wine_dbgstr_w(prodcodeW), wine_dbgstr_w(valW));
ok(size == lstrlenW(prodcodeW),
- "Expected %d, got %d\n", lstrlenW(prodcodeW), size);
+ "Expected %d, got %lu\n", lstrlenW(prodcodeW), size);
/* pcchValueBuf has enough room for NULL terminator */
size = lstrlenA(prodcode) + 1;
@@ -8191,7 +8191,7 @@ static void test_MsiGetProductProperty(void)
ok(!lstrcmpA(val, prodcode),
"Expected \"%s\", got \"%s\"\n", prodcode, val);
ok(size == lstrlenA(prodcode),
- "Expected %d, got %d\n", lstrlenA(prodcode), size);
+ "Expected %d, got %lu\n", lstrlenA(prodcode), size);
size = lstrlenW(prodcodeW) + 1;
lstrcpyW(valW, L"apple");
@@ -8200,7 +8200,7 @@ static void test_MsiGetProductProperty(void)
ok(!lstrcmpW(valW, prodcodeW),
"Expected %s, got %s\n", wine_dbgstr_w(prodcodeW), wine_dbgstr_w(valW));
ok(size == lstrlenW(prodcodeW),
- "Expected %d, got %d\n", lstrlenW(prodcodeW), size);
+ "Expected %d, got %lu\n", lstrlenW(prodcodeW), size);
/* nonexistent property */
size = MAX_PATH;
@@ -8208,14 +8208,14 @@ static void test_MsiGetProductProperty(void)
r = MsiGetProductPropertyA(hprod, "IDontExist", val, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(val, ""), "Expected \"\", got \"%s\"\n", val);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
size = MAX_PATH;
lstrcpyW(valW, L"apple");
r = MsiGetProductPropertyW(hprod, L"IDontExist", valW, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpW(valW, L""), "Expected \"\", got %s\n", wine_dbgstr_w(valW));
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
r = MsiSetPropertyA(hprod, "NewProperty", "value");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
@@ -8226,14 +8226,14 @@ static void test_MsiGetProductProperty(void)
r = MsiGetProductPropertyA(hprod, "NewProperty", val, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(val, ""), "Expected \"\", got \"%s\"\n", val);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
size = MAX_PATH;
lstrcpyW(valW, L"apple");
r = MsiGetProductPropertyW(hprod, L"NewProperty", valW, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpW(valW, L""), "Expected \"\", got %s\n", wine_dbgstr_w(valW));
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
r = MsiSetPropertyA(hprod, "ProductCode", "value");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
@@ -8246,7 +8246,7 @@ static void test_MsiGetProductProperty(void)
ok(!lstrcmpA(val, prodcode),
"Expected \"%s\", got \"%s\"\n", prodcode, val);
ok(size == lstrlenA(prodcode),
- "Expected %d, got %d\n", lstrlenA(prodcode), size);
+ "Expected %d, got %lu\n", lstrlenA(prodcode), size);
size = MAX_PATH;
lstrcpyW(valW, L"apple");
@@ -8255,7 +8255,7 @@ static void test_MsiGetProductProperty(void)
ok(!lstrcmpW(valW, prodcodeW),
"Expected %s, got %s\n", wine_dbgstr_w(prodcodeW), wine_dbgstr_w(valW));
ok(size == lstrlenW(prodcodeW),
- "Expected %d, got %d\n", lstrlenW(prodcodeW), size);
+ "Expected %d, got %lu\n", lstrlenW(prodcodeW), size);
MsiCloseHandle(hprod);
@@ -8324,7 +8324,7 @@ static void test_MsiSetProperty(void)
r = MsiGetPropertyA(hpkg, "Prop", buf, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "Val"), "Expected \"Val\", got \"%s\"\n", buf);
- ok(size == 3, "Expected 3, got %d\n", size);
+ ok(size == 3, "Expected 3, got %lu\n", size);
/* update the property */
r = MsiSetPropertyA(hpkg, "Prop", "Nuvo");
@@ -8335,7 +8335,7 @@ static void test_MsiSetProperty(void)
r = MsiGetPropertyA(hpkg, "Prop", buf, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "Nuvo"), "Expected \"Nuvo\", got \"%s\"\n", buf);
- ok(size == 4, "Expected 4, got %d\n", size);
+ ok(size == 4, "Expected 4, got %lu\n", size);
hdb = MsiGetActiveDatabase(hpkg);
ok(hdb != 0, "Expected a valid database handle\n");
@@ -8363,7 +8363,7 @@ static void test_MsiSetProperty(void)
r = MsiGetPropertyA(hpkg, "Prop", buf, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
/* reset the property */
r = MsiSetPropertyA(hpkg, "Prop", "BlueTap");
@@ -8378,7 +8378,7 @@ static void test_MsiSetProperty(void)
r = MsiGetPropertyA(hpkg, "Prop", buf, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
MsiCloseHandle(hpkg);
DeleteFileA(msifile);
@@ -8482,7 +8482,7 @@ static void test_costs(void)
r = MsiDatabaseCommit( hdb );
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r );
- sprintf( package, "#%u", hdb );
+ sprintf( package, "#%lu", hdb );
r = MsiOpenPackageA( package, &hpkg );
if (r == ERROR_INSTALL_PACKAGE_REJECTED)
{
@@ -8558,17 +8558,17 @@ static void test_costs(void)
len = 0;
r = MsiEnumComponentCostsA( hpkg, "one", 0, INSTALLSTATE_LOCAL, drive, &len, &cost, &temp );
ok( r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %u\n", r );
- ok( len == 2, "expected len == 2, got %u\n", len );
+ ok( len == 2, "expected len == 2, got %lu\n", len );
len = 2;
r = MsiEnumComponentCostsA( hpkg, "one", 0, INSTALLSTATE_LOCAL, drive, &len, &cost, &temp );
ok( r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %u\n", r );
- ok( len == 2, "expected len == 2, got %u\n", len );
+ ok( len == 2, "expected len == 2, got %lu\n", len );
len = 2;
r = MsiEnumComponentCostsA( hpkg, "one", 0, INSTALLSTATE_UNKNOWN, drive, &len, &cost, &temp );
ok( r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %u\n", r );
- ok( len == 2, "expected len == 2, got %u\n", len );
+ ok( len == 2, "expected len == 2, got %lu\n", len );
/* install state doesn't seem to matter */
len = sizeof(drive);
@@ -8588,7 +8588,7 @@ static void test_costs(void)
cost = temp = 0xdead;
r = MsiEnumComponentCostsA( hpkg, "one", 0, INSTALLSTATE_LOCAL, drive, &len, &cost, &temp );
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r );
- ok( len == 2, "expected len == 2, got %u\n", len );
+ ok( len == 2, "expected len == 2, got %lu\n", len );
ok( drive[0], "expected a drive\n" );
ok( cost && cost != 0xdead, "expected cost > 0, got %d\n", cost );
ok( !temp, "expected temp == 0, got %d\n", temp );
@@ -8598,7 +8598,7 @@ static void test_costs(void)
cost = temp = 0xdead;
r = MsiEnumComponentCostsA( hpkg, "two", 0, INSTALLSTATE_LOCAL, drive, &len, &cost, &temp );
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r );
- ok( len == 2, "expected len == 2, got %u\n", len );
+ ok( len == 2, "expected len == 2, got %lu\n", len );
ok( drive[0], "expected a drive\n" );
ok( !cost, "expected cost == 0, got %d\n", cost );
ok( !temp, "expected temp == 0, got %d\n", temp );
@@ -8608,7 +8608,7 @@ static void test_costs(void)
cost = temp = 0xdead;
r = MsiEnumComponentCostsA( hpkg, "", 0, INSTALLSTATE_UNKNOWN, drive, &len, &cost, &temp );
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r );
- ok( len == 2, "expected len == 2, got %u\n", len );
+ ok( len == 2, "expected len == 2, got %lu\n", len );
ok( drive[0], "expected a drive\n" );
ok( !cost, "expected cost == 0, got %d\n", cost );
ok( temp && temp != 0xdead, "expected temp > 0, got %d\n", temp );
@@ -8654,7 +8654,7 @@ static void test_MsiDatabaseCommit(void)
create_property_table( hdb );
- sprintf( package, "#%u", hdb );
+ sprintf( package, "#%lu", hdb );
r = MsiOpenPackageA( package, &hpkg );
if (r == ERROR_INSTALL_PACKAGE_REJECTED)
{
diff --git a/dlls/msi/tests/patch.c b/dlls/msi/tests/patch.c
index 8e8bd356e71..9d46f493e08 100644
--- a/dlls/msi/tests/patch.c
+++ b/dlls/msi/tests/patch.c
@@ -681,7 +681,7 @@ static void write_tables( IStorage *stg, const struct table_data *tables, UINT n
r = IStorage_CreateStream( stg, tables[i].name, STGM_WRITE|STGM_SHARE_EXCLUSIVE, 0, 0, &stm );
if (FAILED( r ))
{
- ok( 0, "failed to create stream 0x%08x\n", r );
+ ok( 0, "failed to create stream %#lx\n", r );
continue;
}
@@ -709,29 +709,29 @@ static void create_patch( const char *filename )
r = StgCreateDocfile( filenameW, mode, 0, &stg );
free( filenameW );
- ok( r == S_OK, "failed to create storage 0x%08x\n", r );
+ ok( r == S_OK, "failed to create storage %#lx\n", r );
if (!stg)
return;
r = IStorage_SetClass( stg, &CLSID_MsiPatch );
- ok( r == S_OK, "failed to set storage type 0x%08x\n", r );
+ ok( r == S_OK, "failed to set storage type %#lx\n", r );
write_tables( stg, table_patch_data, ARRAY_SIZE( table_patch_data ));
r = IStorage_CreateStorage( stg, p_name7, mode, 0, 0, &stg1 );
- ok( r == S_OK, "failed to create substorage 0x%08x\n", r );
+ ok( r == S_OK, "failed to create substorage %#lx\n", r );
r = IStorage_SetClass( stg1, &CLSID_MsiTransform );
- ok( r == S_OK, "failed to set storage type 0x%08x\n", r );
+ ok( r == S_OK, "failed to set storage type %#lx\n", r );
write_tables( stg1, table_transform1_data, ARRAY_SIZE( table_transform1_data ));
IStorage_Release( stg1 );
r = IStorage_CreateStorage( stg, p_name8, mode, 0, 0, &stg2 );
- ok( r == S_OK, "failed to create substorage 0x%08x\n", r );
+ ok( r == S_OK, "failed to create substorage %#lx\n", r );
r = IStorage_SetClass( stg2, &CLSID_MsiTransform );
- ok( r == S_OK, "failed to set storage type 0x%08x\n", r );
+ ok( r == S_OK, "failed to set storage type %#lx\n", r );
write_tables( stg2, table_transform2_data, ARRAY_SIZE( table_transform2_data ));
IStorage_Release( stg2 );
@@ -774,7 +774,7 @@ static void test_simple_patch( void )
}
size = get_pf_file_size( "msitest\\patch.txt" );
- ok( size == 1000, "expected 1000, got %u\n", size );
+ ok( size == 1000, "expected 1000, got %lu\n", size );
size = sizeof(install_source);
r = MsiGetProductInfoA( "{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}",
@@ -840,9 +840,9 @@ static void test_simple_patch( void )
}
size = get_pf_file_size( "msitest\\patch.txt" );
- ok( size == 1002, "expected 1002, got %u\n", size );
+ ok( size == 1002, "expected 1002, got %lu\n", size );
size = get_pf_file_size( "msitest\\file.txt" );
- ok( size == 1000, "expected 1000, got %u\n", size );
+ ok( size == 1000, "expected 1000, got %lu\n", size );
/* show that MsiOpenPackage applies registered patches */
r = MsiOpenPackageA( path, &hpackage );
@@ -1064,7 +1064,7 @@ static char *get_string( MSIHANDLE hdb, UINT field, const char *query)
ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r );
if (r == ERROR_SUCCESS)
{
- UINT size = MAX_PATH;
+ DWORD size = MAX_PATH;
r = MsiRecordGetStringA( hrec, field, ret, &size );
ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r);
MsiCloseHandle( hrec );
@@ -1272,7 +1272,8 @@ cleanup:
static void test_patch_registration( void )
{
- UINT r, size;
+ UINT r;
+ DWORD size;
char buffer[MAX_PATH], patch_code[39];
if (!pMsiApplyPatchA || !pMsiGetPatchInfoExA || !pMsiEnumPatchesExA)
diff --git a/dlls/msi/tests/record.c b/dlls/msi/tests/record.c
index 407d756caae..fb778104ee1 100644
--- a/dlls/msi/tests/record.c
+++ b/dlls/msi/tests/record.c
@@ -410,21 +410,21 @@ static void test_MsiRecordGetString(void)
sz = MAX_PATH;
r = MsiRecordGetStringA(rec, 1, NULL, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n",r);
- ok(sz == 0, "Expected 0, got %d\n",sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
sz = MAX_PATH;
lstrcpyA(buf, "apple");
r = MsiRecordGetStringA(rec, 1, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
sz = MAX_PATH;
lstrcpyA(buf, "apple");
r = MsiRecordGetStringA(rec, 10, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
MsiCloseHandle(rec);
@@ -437,14 +437,14 @@ static void test_MsiRecordGetString(void)
sz = MAX_PATH;
r = MsiRecordGetStringA(rec, 1, NULL, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n",r);
- ok(sz == 1, "Expected 1, got %d\n",sz);
+ ok(sz == 1, "Expected 1, got %lu\n",sz);
sz = MAX_PATH;
lstrcpyA(buf, "apple");
r = MsiRecordGetStringA(rec, 1, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "5"), "Expected \"5\", got \"%s\"\n", buf);
- ok(sz == 1, "Expected 1, got %d\n", sz);
+ ok(sz == 1, "Expected 1, got %lu\n", sz);
r = MsiRecordSetInteger(rec, 1, -5);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
@@ -454,7 +454,7 @@ static void test_MsiRecordGetString(void)
r = MsiRecordGetStringA(rec, 1, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "-5"), "Expected \"-5\", got \"%s\"\n", buf);
- ok(sz == 2, "Expected 2, got %d\n", sz);
+ ok(sz == 2, "Expected 2, got %lu\n", sz);
MsiCloseHandle(rec);
}
@@ -508,7 +508,7 @@ static void test_fieldzero(void)
r = MsiRecordGetStringA(rec, 0, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
r = MsiRecordIsNull(rec, 0);
ok(r == TRUE, "Expected TRUE, got %d\n", r);
@@ -527,7 +527,7 @@ static void test_fieldzero(void)
r = MsiRecordGetStringA(rec, 0, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
r = MsiRecordIsNull(rec, 0);
ok(r == TRUE, "Expected TRUE, got %d\n", r);
@@ -546,7 +546,7 @@ static void test_fieldzero(void)
r = MsiRecordGetStringA(rec, 0, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf);
- ok(sz == 0, "Expected 0, got %d\n", sz);
+ ok(sz == 0, "Expected 0, got %lu\n", sz);
r = MsiRecordIsNull(rec, 0);
ok(r == TRUE, "Expected TRUE, got %d\n", r);
@@ -556,7 +556,7 @@ static void test_fieldzero(void)
r = MsiRecordGetStringA(rec, 1, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "bologna"), "Expected \"bologna\", got \"%s\"\n", buf);
- ok(sz == 7, "Expected 7, got %d\n", sz);
+ ok(sz == 7, "Expected 7, got %lu\n", sz);
MsiCloseHandle(rec);
@@ -597,7 +597,7 @@ static void test_fieldzero(void)
r = MsiRecordGetStringA(rec, 0, buf, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(buf, "drone"), "Expected \"drone\", got \"%s\"\n", buf);
- ok(sz == 5, "Expected 5, got %d\n", sz);
+ ok(sz == 5, "Expected 5, got %lu\n", sz);
r = MsiRecordIsNull(rec, 0);
ok(r == FALSE, "Expected FALSE, got %d\n", r);
diff --git a/dlls/msi/tests/source.c b/dlls/msi/tests/source.c
index d141307e0ba..1e794caaf5a 100644
--- a/dlls/msi/tests/source.c
+++ b/dlls/msi/tests/source.c
@@ -124,10 +124,10 @@ static void create_test_guid(LPSTR prodcode, LPSTR squashed)
int size;
hr = CoCreateGuid(&guid);
- ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
+ ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
size = StringFromGUID2(&guid, guidW, MAX_PATH);
- ok(size == 39, "Expected 39, got %d\n", hr);
+ ok(size == 39, "Expected 39, got %#lx\n", hr);
WideCharToMultiByte(CP_ACP, 0, guidW, size, prodcode, MAX_PATH, NULL, NULL);
squash_guid(guidW, squashedW);
@@ -297,7 +297,7 @@ static void test_MsiSourceListGetInfo(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &userkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user product key exists */
size = MAX_PATH;
@@ -308,7 +308,7 @@ static void test_MsiSourceListGetInfo(void)
ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value);
res = RegCreateKeyA(userkey, "SourceList", &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* SourceList key exists */
size = MAX_PATH;
@@ -316,12 +316,12 @@ static void test_MsiSourceListGetInfo(void)
r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAMEA, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
ok(!lstrcmpA(value, ""), "Expected \"\", got \"%s\"\n", value);
data = "msitest.msi";
res = RegSetValueExA(hkey, "PackageName", 0, REG_SZ, (const BYTE *)data, lstrlenA(data) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* PackageName value exists */
size = 0xdeadbeef;
@@ -329,7 +329,7 @@ static void test_MsiSourceListGetInfo(void)
MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAMEA, NULL, &size);
ok(r == ERROR_SUCCESS || r == ERROR_INVALID_PARAMETER,
"Expected ERROR_SUCCESS or ERROR_INVALID_PARAMETER, got %d\n", r);
- ok(size == 11 || r != ERROR_SUCCESS, "Expected 11, got %d\n", size);
+ ok(size == 11 || r != ERROR_SUCCESS, "Expected 11, got %lu\n", size);
/* read the value, don't change size */
size = 11;
@@ -338,7 +338,7 @@ static void test_MsiSourceListGetInfo(void)
MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAMEA, value, &size);
ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected 'aaa', got %s\n", value);
- ok(size == 11, "Expected 11, got %d\n", size);
+ ok(size == 11, "Expected 11, got %lu\n", size);
/* read the value, fix size */
size++;
@@ -346,7 +346,7 @@ static void test_MsiSourceListGetInfo(void)
MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAMEA, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, "msitest.msi"), "Expected 'msitest.msi', got %s\n", value);
- ok(size == 11, "Expected 11, got %d\n", size);
+ ok(size == 11, "Expected 11, got %lu\n", size);
/* empty property now that product key exists */
size = MAX_PATH;
@@ -354,7 +354,7 @@ static void test_MsiSourceListGetInfo(void)
r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT, "", value, &size);
ok(r == ERROR_UNKNOWN_PROPERTY, "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
- ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size);
+ ok(size == MAX_PATH, "Expected %d, got %lu\n", MAX_PATH, size);
ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value);
/* nonexistent property now that product key exists */
@@ -363,12 +363,12 @@ static void test_MsiSourceListGetInfo(void)
r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT, "nonexistent", value, &size);
ok(r == ERROR_UNKNOWN_PROPERTY, "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
- ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size);
+ ok(size == MAX_PATH, "Expected %d, got %lu\n", MAX_PATH, size);
ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value);
data = "tester";
res = RegSetValueExA(hkey, "nonexistent", 0, REG_SZ, (const BYTE *)data, lstrlenA(data) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* nonexistent property now that nonexistent value exists */
size = MAX_PATH;
@@ -376,7 +376,7 @@ static void test_MsiSourceListGetInfo(void)
r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT, "nonexistent", value, &size);
ok(r == ERROR_UNKNOWN_PROPERTY, "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r);
- ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size);
+ ok(size == MAX_PATH, "Expected %d, got %lu\n", MAX_PATH, size);
ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value);
/* invalid option now that product key exists */
@@ -384,7 +384,7 @@ static void test_MsiSourceListGetInfo(void)
r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED,
4, INSTALLPROPERTY_PACKAGENAMEA, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(size == 11, "Expected 11, got %d\n", size);
+ ok(size == 11, "Expected 11, got %lu\n", size);
/* INSTALLPROPERTY_MEDIAPACKAGEPATH, media key does not exist */
size = MAX_PATH;
@@ -394,15 +394,15 @@ static void test_MsiSourceListGetInfo(void)
value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, ""), "Expected \"\", got \"%s\"\n", value);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
res = RegCreateKeyA(hkey, "Media", &media);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
data = "path";
res = RegSetValueExA(media, "MediaPackage", 0, REG_SZ,
(const BYTE *)data, lstrlenA(data) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* INSTALLPROPERTY_MEDIAPACKAGEPATH */
size = MAX_PATH;
@@ -411,13 +411,13 @@ static void test_MsiSourceListGetInfo(void)
value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, "path"), "Expected \"path\", got \"%s\"\n", value);
- ok(size == 4, "Expected 4, got %d\n", size);
+ ok(size == 4, "Expected 4, got %lu\n", size);
/* INSTALLPROPERTY_DISKPROMPT */
data = "prompt";
res = RegSetValueExA(media, "DiskPrompt", 0, REG_SZ,
(const BYTE *)data, lstrlenA(data) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
size = MAX_PATH;
r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED,
@@ -425,7 +425,7 @@ static void test_MsiSourceListGetInfo(void)
value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, "prompt"), "Expected \"prompt\", got \"%s\"\n", value);
- ok(size == 6, "Expected 6, got %d\n", size);
+ ok(size == 6, "Expected 6, got %lu\n", size);
/* LastUsedSource value doesn't exist */
RegDeleteValueA(hkey, "LastUsedSource");
@@ -434,9 +434,9 @@ static void test_MsiSourceListGetInfo(void)
r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCEA,
value, &size);
- ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
+ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
ok(!lstrcmpA(value, ""), "Expected \"\", got \"%s\"\n", value);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
size = MAX_PATH;
usersidW = strdupAW(usersid);
@@ -445,16 +445,16 @@ static void test_MsiSourceListGetInfo(void)
r = pMsiSourceListGetInfoW(prodcodeW, usersidW, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCEW,
valueW, &size);
- ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
+ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
ok(!valueW[0], "Expected \"\"");
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
free(usersidW);
free(prodcodeW);
data = "";
res = RegSetValueExA(hkey, "LastUsedSource", 0, REG_SZ,
(const BYTE *)data, lstrlenA(data) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* INSTALLPROPERTY_LASTUSEDSOURCE, source is empty */
size = MAX_PATH;
@@ -463,12 +463,12 @@ static void test_MsiSourceListGetInfo(void)
value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, ""), "Expected \"\", got \"%s\"\n", value);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
data = "source";
res = RegSetValueExA(hkey, "LastUsedSource", 0, REG_SZ,
(const BYTE *)data, lstrlenA(data) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* INSTALLPROPERTY_LASTUSEDSOURCE */
size = MAX_PATH;
@@ -477,7 +477,7 @@ static void test_MsiSourceListGetInfo(void)
value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, "source"), "Expected \"source\", got \"%s\"\n", value);
- ok(size == 6, "Expected 6, got %d\n", size);
+ ok(size == 6, "Expected 6, got %lu\n", size);
/* INSTALLPROPERTY_LASTUSEDSOURCE, size is too short */
size = 4;
@@ -487,7 +487,7 @@ static void test_MsiSourceListGetInfo(void)
value, &size);
ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got \"%s\"\n", value);
- ok(size == 6, "Expected 6, got %d\n", size);
+ ok(size == 6, "Expected 6, got %lu\n", size);
/* INSTALLPROPERTY_LASTUSEDSOURCE, size is exactly 6 */
size = 6;
@@ -497,12 +497,12 @@ static void test_MsiSourceListGetInfo(void)
value, &size);
ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got \"%s\"\n", value);
- ok(size == 6, "Expected 6, got %d\n", size);
+ ok(size == 6, "Expected 6, got %lu\n", size);
data = "a;source";
res = RegSetValueExA(hkey, "LastUsedSource", 0, REG_SZ,
(const BYTE *)data, lstrlenA(data) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* INSTALLPROPERTY_LASTUSEDSOURCE, one semi-colon */
size = MAX_PATH;
@@ -511,12 +511,12 @@ static void test_MsiSourceListGetInfo(void)
value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, "source"), "Expected \"source\", got \"%s\"\n", value);
- ok(size == 6, "Expected 6, got %d\n", size);
+ ok(size == 6, "Expected 6, got %lu\n", size);
data = "a:source";
res = RegSetValueExA(hkey, "LastUsedSource", 0, REG_SZ,
(const BYTE *)data, lstrlenA(data) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* INSTALLPROPERTY_LASTUSEDSOURCE, one colon */
size = MAX_PATH;
@@ -525,7 +525,7 @@ static void test_MsiSourceListGetInfo(void)
value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, "a:source"), "Expected \"a:source\", got \"%s\"\n", value);
- ok(size == 8, "Expected 8, got %d\n", size);
+ ok(size == 8, "Expected 8, got %lu\n", size);
/* INSTALLPROPERTY_LASTUSEDTYPE, invalid source format */
size = MAX_PATH;
@@ -534,12 +534,12 @@ static void test_MsiSourceListGetInfo(void)
value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, ""), "Expected \"\", got \"%s\"\n", value);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
data = "x;y;z";
res = RegSetValueExA(hkey, "LastUsedSource", 0, REG_SZ,
(const BYTE *)data, lstrlenA(data) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* INSTALLPROPERTY_LASTUSEDTYPE, invalid source format */
size = MAX_PATH;
@@ -548,12 +548,12 @@ static void test_MsiSourceListGetInfo(void)
value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, ""), "Expected \"\", got \"%s\"\n", value);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
data = "n;y;z";
res = RegSetValueExA(hkey, "LastUsedSource", 0, REG_SZ,
(const BYTE *)data, lstrlenA(data) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* INSTALLPROPERTY_LASTUSEDTYPE */
size = MAX_PATH;
@@ -562,12 +562,12 @@ static void test_MsiSourceListGetInfo(void)
value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, "n"), "Expected \"n\", got \"%s\"\n", value);
- ok(size == 1, "Expected 1, got %d\n", size);
+ ok(size == 1, "Expected 1, got %lu\n", size);
data = "negatory";
res = RegSetValueExA(hkey, "LastUsedSource", 0, REG_SZ,
(const BYTE *)data, lstrlenA(data) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* INSTALLPROPERTY_LASTUSEDTYPE */
size = MAX_PATH;
@@ -576,12 +576,12 @@ static void test_MsiSourceListGetInfo(void)
value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, "n"), "Expected \"n\", got \"%s\"\n", value);
- ok(size == 1, "Expected 1, got %d\n", size);
+ ok(size == 1, "Expected 1, got %lu\n", size);
data = "megatron";
res = RegSetValueExA(hkey, "LastUsedSource", 0, REG_SZ,
(const BYTE *)data, lstrlenA(data) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* INSTALLPROPERTY_LASTUSEDTYPE */
size = MAX_PATH;
@@ -590,12 +590,12 @@ static void test_MsiSourceListGetInfo(void)
value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, "m"), "Expected \"m\", got \"%s\"\n", value);
- ok(size == 1, "Expected 1, got %d\n", size);
+ ok(size == 1, "Expected 1, got %lu\n", size);
data = "useless";
res = RegSetValueExA(hkey, "LastUsedSource", 0, REG_SZ,
(const BYTE *)data, lstrlenA(data) + 1);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* INSTALLPROPERTY_LASTUSEDTYPE */
size = MAX_PATH;
@@ -604,7 +604,7 @@ static void test_MsiSourceListGetInfo(void)
value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, "u"), "Expected \"u\", got \"%s\"\n", value);
- ok(size == 1, "Expected 1, got %d\n", size);
+ ok(size == 1, "Expected 1, got %lu\n", size);
RegDeleteValueA(media, "MediaPackage");
RegDeleteValueA(media, "DiskPrompt");
@@ -623,14 +623,14 @@ static void test_MsiSourceListGetInfo(void)
r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PATCH, INSTALLPROPERTY_PACKAGENAMEA, value, &size);
ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r);
- ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size);
+ ok(size == MAX_PATH, "Expected %d, got %lu\n", MAX_PATH, size);
ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value);
lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Patches\\");
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &userkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* patch key exists
* NOTE: using prodcode guid, but it really doesn't matter
@@ -640,11 +640,11 @@ static void test_MsiSourceListGetInfo(void)
r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PATCH, INSTALLPROPERTY_PACKAGENAMEA, value, &size);
ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
- ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size);
+ ok(size == MAX_PATH, "Expected %d, got %lu\n", MAX_PATH, size);
ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value);
res = RegCreateKeyA(userkey, "SourceList", &hkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* SourceList key exists */
size = MAX_PATH;
@@ -653,7 +653,7 @@ static void test_MsiSourceListGetInfo(void)
MSICODE_PATCH, INSTALLPROPERTY_PACKAGENAMEA, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, ""), "Expected \"\", got \"%s\"\n", value);
- ok(size == 0, "Expected 0, got %d\n", size);
+ ok(size == 0, "Expected 0, got %lu\n", size);
RegDeleteKeyA(hkey, "");
RegDeleteKeyA(userkey, "");
@@ -743,7 +743,7 @@ static void test_MsiSourceListAddSourceEx(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &userkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user product key exists */
r = pMsiSourceListAddSourceExA(prodcode, usersid,
@@ -752,7 +752,7 @@ static void test_MsiSourceListAddSourceEx(void)
ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
res = RegCreateKeyA(userkey, "SourceList", &url);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
RegCloseKey(url);
/* SourceList key exists */
@@ -762,13 +762,13 @@ static void test_MsiSourceListAddSourceEx(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
res = RegOpenKeyA(userkey, "SourceList\\URL", &url);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
size = MAX_PATH;
res = RegQueryValueExA(url, "1", NULL, NULL, (LPBYTE)value, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(value, "C:\\source/"), "Expected 'C:\\source/', got %s\n", value);
- ok(size == 11, "Expected 11, got %d\n", size);
+ ok(size == 11, "Expected 11, got %lu\n", size);
/* add another source, index 0 */
r = pMsiSourceListAddSourceExA(prodcode, usersid,
@@ -778,15 +778,15 @@ static void test_MsiSourceListAddSourceEx(void)
size = MAX_PATH;
res = RegQueryValueExA(url, "1", NULL, NULL, (LPBYTE)value, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(value, "C:\\source/"), "Expected 'C:\\source/', got %s\n", value);
- ok(size == 11, "Expected 11, got %d\n", size);
+ ok(size == 11, "Expected 11, got %lu\n", size);
size = MAX_PATH;
res = RegQueryValueExA(url, "2", NULL, NULL, (LPBYTE)value, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(value, "another/"), "Expected 'another/', got %s\n", value);
- ok(size == 9, "Expected 9, got %d\n", size);
+ ok(size == 9, "Expected 9, got %lu\n", size);
/* add another source, index 1 */
r = pMsiSourceListAddSourceExA(prodcode, usersid,
@@ -796,21 +796,21 @@ static void test_MsiSourceListAddSourceEx(void)
size = MAX_PATH;
res = RegQueryValueExA(url, "1", NULL, NULL, (LPBYTE)value, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(value, "third/"), "Expected 'third/', got %s\n", value);
- ok(size == 7, "Expected 7, got %d\n", size);
+ ok(size == 7, "Expected 7, got %lu\n", size);
size = MAX_PATH;
res = RegQueryValueExA(url, "2", NULL, NULL, (LPBYTE)value, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(value, "C:\\source/"), "Expected 'C:\\source/', got %s\n", value);
- ok(size == 11, "Expected 11, got %d\n", size);
+ ok(size == 11, "Expected 11, got %lu\n", size);
size = MAX_PATH;
res = RegQueryValueExA(url, "3", NULL, NULL, (LPBYTE)value, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(value, "another/"), "Expected 'another/', got %s\n", value);
- ok(size == 9, "Expected 9, got %d\n", size);
+ ok(size == 9, "Expected 9, got %lu\n", size);
/* add another source, index > N */
r = pMsiSourceListAddSourceExA(prodcode, usersid,
@@ -820,27 +820,27 @@ static void test_MsiSourceListAddSourceEx(void)
size = MAX_PATH;
res = RegQueryValueExA(url, "1", NULL, NULL, (LPBYTE)value, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(value, "third/"), "Expected 'third/', got %s\n", value);
- ok(size == 7, "Expected 7, got %d\n", size);
+ ok(size == 7, "Expected 7, got %lu\n", size);
size = MAX_PATH;
res = RegQueryValueExA(url, "2", NULL, NULL, (LPBYTE)value, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(value, "C:\\source/"), "Expected 'C:\\source/', got %s\n", value);
- ok(size == 11, "Expected 11, got %d\n", size);
+ ok(size == 11, "Expected 11, got %lu\n", size);
size = MAX_PATH;
res = RegQueryValueExA(url, "3", NULL, NULL, (LPBYTE)value, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(value, "another/"), "Expected 'another/', got %s\n", value);
- ok(size == 9, "Expected 9, got %d\n", size);
+ ok(size == 9, "Expected 9, got %lu\n", size);
size = MAX_PATH;
res = RegQueryValueExA(url, "4", NULL, NULL, (LPBYTE)value, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(value, "last/"), "Expected 'last/', got %s\n", value);
- ok(size == 6, "Expected 6, got %d\n", size);
+ ok(size == 6, "Expected 6, got %lu\n", size);
/* just MSISOURCETYPE_NETWORK */
r = pMsiSourceListAddSourceExA(prodcode, usersid,
@@ -849,13 +849,13 @@ static void test_MsiSourceListAddSourceEx(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
res = RegOpenKeyA(userkey, "SourceList\\Net", &net);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
size = MAX_PATH;
res = RegQueryValueExA(net, "1", NULL, NULL, (LPBYTE)value, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(value, "source\\"), "Expected 'source\\', got %s\n", value);
- ok(size == 8, "Expected 8, got %d\n", size);
+ ok(size == 8, "Expected 8, got %lu\n", size);
/* just MSISOURCETYPE_URL */
r = pMsiSourceListAddSourceExA(prodcode, usersid,
@@ -865,33 +865,33 @@ static void test_MsiSourceListAddSourceEx(void)
size = MAX_PATH;
res = RegQueryValueExA(url, "1", NULL, NULL, (LPBYTE)value, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(value, "third/"), "Expected 'third/', got %s\n", value);
- ok(size == 7, "Expected 7, got %d\n", size);
+ ok(size == 7, "Expected 7, got %lu\n", size);
size = MAX_PATH;
res = RegQueryValueExA(url, "2", NULL, NULL, (LPBYTE)value, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(value, "C:\\source/"), "Expected 'C:\\source/', got %s\n", value);
- ok(size == 11, "Expected 11, got %d\n", size);
+ ok(size == 11, "Expected 11, got %lu\n", size);
size = MAX_PATH;
res = RegQueryValueExA(url, "3", NULL, NULL, (LPBYTE)value, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(value, "another/"), "Expected 'another/', got %s\n", value);
- ok(size == 9, "Expected 9, got %d\n", size);
+ ok(size == 9, "Expected 9, got %lu\n", size);
size = MAX_PATH;
res = RegQueryValueExA(url, "4", NULL, NULL, (LPBYTE)value, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(value, "last/"), "Expected 'last/', got %s\n", value);
- ok(size == 6, "Expected 6, got %d\n", size);
+ ok(size == 6, "Expected 6, got %lu\n", size);
size = MAX_PATH;
res = RegQueryValueExA(url, "5", NULL, NULL, (LPBYTE)value, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(value, "source/"), "Expected 'source/', got %s\n", value);
- ok(size == 8, "Expected 8, got %d\n", size);
+ ok(size == 8, "Expected 8, got %lu\n", size);
/* NULL szUserSid */
r = pMsiSourceListAddSourceExA(prodcode, NULL,
@@ -901,15 +901,15 @@ static void test_MsiSourceListAddSourceEx(void)
size = MAX_PATH;
res = RegQueryValueExA(net, "1", NULL, NULL, (LPBYTE)value, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(value, "source\\"), "Expected 'source\\', got %s\n", value);
- ok(size == 8, "Expected 8, got %d\n", size);
+ ok(size == 8, "Expected 8, got %lu\n", size);
size = MAX_PATH;
res = RegQueryValueExA(net, "2", NULL, NULL, (LPBYTE)value, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(value, "nousersid\\"), "Expected 'nousersid\\', got %s\n", value);
- ok(size == 11, "Expected 11, got %d\n", size);
+ ok(size == 11, "Expected 11, got %lu\n", size);
/* invalid options, must have source type */
r = pMsiSourceListAddSourceExA(prodcode, usersid,
@@ -949,7 +949,7 @@ static void test_MsiSourceListAddSourceEx(void)
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &prodkey, NULL);
if (res != ERROR_SUCCESS)
{
- skip("Product key creation failed with error code %u\n", res);
+ skip("Product key creation failed with error code %ld\n", res);
goto machine_tests;
}
@@ -960,7 +960,7 @@ static void test_MsiSourceListAddSourceEx(void)
ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
res = RegCreateKeyExA(prodkey, "SourceList", 0, NULL, 0, access, NULL, &hkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
RegCloseKey(hkey);
/* SourceList exists */
@@ -970,13 +970,13 @@ static void test_MsiSourceListAddSourceEx(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
res = RegOpenKeyExA(prodkey, "SourceList\\URL", 0, access, &url);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
size = MAX_PATH;
res = RegQueryValueExA(url, "1", NULL, NULL, (LPBYTE)value, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(value, "C:\\source/"), "Expected 'C:\\source/', got %s\n", value);
- ok(size == 11, "Expected 11, got %d\n", size);
+ ok(size == 11, "Expected 11, got %lu\n", size);
RegCloseKey(url);
@@ -988,19 +988,19 @@ static void test_MsiSourceListAddSourceEx(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
res = RegOpenKeyExA(prodkey, "SourceList\\URL", 0, access, &url);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
size = MAX_PATH;
res = RegQueryValueExA(url, "1", NULL, NULL, (LPBYTE)value, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(value, "C:\\source/"), "Expected 'C:\\source/', got %s\n", value);
- ok(size == 11, "Expected 11, got %d\n", size);
+ ok(size == 11, "Expected 11, got %lu\n", size);
size = MAX_PATH;
res = RegQueryValueExA(url, "2", NULL, NULL, (LPBYTE)value, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(value, "another/"), "Expected 'another/', got %s\n", value);
- ok(size == 9, "Expected 9, got %d\n", size);
+ ok(size == 9, "Expected 9, got %lu\n", size);
RegCloseKey(url);
RegCloseKey(prodkey);
@@ -1025,7 +1025,7 @@ machine_tests:
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &prodkey, NULL);
if (res != ERROR_SUCCESS)
{
- skip("Product key creation failed with error code %u\n", res);
+ skip("Product key creation failed with error code %ld\n", res);
LocalFree(usersid);
return;
}
@@ -1037,7 +1037,7 @@ machine_tests:
ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
res = RegCreateKeyExA(prodkey, "SourceList", 0, NULL, 0, access, NULL, &hkey, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
RegCloseKey(hkey);
/* SourceList exists */
@@ -1051,13 +1051,13 @@ machine_tests:
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
res = RegOpenKeyExA(prodkey, "SourceList\\URL", 0, access, &url);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
size = MAX_PATH;
res = RegQueryValueExA(url, "1", NULL, NULL, (LPBYTE)value, &size);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
ok(!lstrcmpA(value, "C:\\source/"), "Expected 'C:\\source/', got %s\n", value);
- ok(size == 11, "Expected 11, got %d\n", size);
+ ok(size == 11, "Expected 11, got %lu\n", size);
RegCloseKey(url);
RegCloseKey(prodkey);
@@ -1102,21 +1102,21 @@ static void test_MsiSourceListEnumSources(void)
r = pMsiSourceListEnumSourcesA(NULL, usersid, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size);
ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r);
- ok(size == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", size);
+ ok(size == 0xdeadbeef, "Expected 0xdeadbeef, got %lu\n", size);
/* empty szProductCodeOrPatchCode */
size = 0xdeadbeef;
r = pMsiSourceListEnumSourcesA("", usersid, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size);
ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r);
- ok(size == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", size);
+ ok(size == 0xdeadbeef, "Expected 0xdeadbeef, got %lu\n", size);
/* garbage szProductCodeOrPatchCode */
size = 0xdeadbeef;
r = pMsiSourceListEnumSourcesA("garbage", usersid, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size);
ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r);
- ok(size == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", size);
+ ok(size == 0xdeadbeef, "Expected 0xdeadbeef, got %lu\n", size);
/* guid without brackets */
size = 0xdeadbeef;
@@ -1124,7 +1124,7 @@ static void test_MsiSourceListEnumSources(void)
usersid, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size);
ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r);
- ok(size == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", size);
+ ok(size == 0xdeadbeef, "Expected 0xdeadbeef, got %lu\n", size);
/* guid with brackets */
size = 0xdeadbeef;
@@ -1132,7 +1132,7 @@ static void test_MsiSourceListEnumSources(void)
usersid, MSIINSTALLCONTEXT_USERUNMANAGED,
MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size);
ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
- ok(size == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", size);
+ ok(size == 0xdeadbeef, "Expected 0xdeadbeef, got %lu\n", size);
/* MSIINSTALLCONTEXT_USERUNMANAGED */
@@ -1143,13 +1143,13 @@ static void test_MsiSourceListEnumSources(void)
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\");
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &userkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user product key exists */
size = MAX_PATH;
@@ -1159,10 +1159,10 @@ static void test_MsiSourceListEnumSources(void)
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
res = RegCreateKeyA(userkey, "SourceList", &source);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* SourceList key exists */
size = MAX_PATH;
@@ -1172,10 +1172,10 @@ static void test_MsiSourceListEnumSources(void)
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
res = RegCreateKeyA(source, "URL", &url);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* URL key exists */
size = MAX_PATH;
@@ -1185,16 +1185,16 @@ static void test_MsiSourceListEnumSources(void)
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
res = RegSetValueExA(url, "1", 0, REG_SZ, (LPBYTE)"first", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(url, "2", 0, REG_SZ, (LPBYTE)"second", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
res = RegSetValueExA(url, "4", 0, REG_SZ, (LPBYTE)"fourth", 7);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* sources exist */
size = MAX_PATH;
@@ -1204,7 +1204,7 @@ static void test_MsiSourceListEnumSources(void)
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value);
- ok(size == 5, "Expected 5, got %d\n", size);
+ ok(size == 5, "Expected 5, got %lu\n", size);
/* try index 0 again */
size = MAX_PATH;
@@ -1214,7 +1214,7 @@ static void test_MsiSourceListEnumSources(void)
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value);
- ok(size == 5, "Expected 5, got %d\n", size);
+ ok(size == 5, "Expected 5, got %lu\n", size);
/* both szSource and pcchSource are NULL, index 0 */
r = pMsiSourceListEnumSourcesA(prodcode, usersid,
@@ -1236,7 +1236,7 @@ static void test_MsiSourceListEnumSources(void)
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got %s\n", value);
- ok(size == 5, "Expected 5, got %d\n", size);
+ ok(size == 5, "Expected 5, got %lu\n", size);
/* szSource is non-NULL while pcchSource is NULL */
lstrcpyA(value, "aaa");
@@ -1255,7 +1255,7 @@ static void test_MsiSourceListEnumSources(void)
ok(r == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
/* reset the enumeration */
size = MAX_PATH;
@@ -1265,7 +1265,7 @@ static void test_MsiSourceListEnumSources(void)
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value);
- ok(size == 5, "Expected 5, got %d\n", size);
+ ok(size == 5, "Expected 5, got %lu\n", size);
/* try index 1 */
size = MAX_PATH;
@@ -1275,7 +1275,7 @@ static void test_MsiSourceListEnumSources(void)
MSICODE_PRODUCT | MSISOURCETYPE_URL, 1, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, "second"), "Expected \"second\", got %s\n", value);
- ok(size == 6, "Expected 6, got %d\n", size);
+ ok(size == 6, "Expected 6, got %lu\n", size);
/* try index 1 again */
size = MAX_PATH;
@@ -1286,7 +1286,7 @@ static void test_MsiSourceListEnumSources(void)
ok(r == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
/* try index 2 */
size = MAX_PATH;
@@ -1296,7 +1296,7 @@ static void test_MsiSourceListEnumSources(void)
MSICODE_PRODUCT | MSISOURCETYPE_URL, 2, value, &size);
ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
/* try index < 0 */
size = MAX_PATH;
@@ -1307,7 +1307,7 @@ static void test_MsiSourceListEnumSources(void)
ok(r == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
/* NULL szUserSid */
size = MAX_PATH;
@@ -1317,7 +1317,7 @@ static void test_MsiSourceListEnumSources(void)
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value);
- ok(size == 5, "Expected 5, got %d\n", size);
+ ok(size == 5, "Expected 5, got %lu\n", size);
/* invalid dwOptions, must be one of MSICODE_ and MSISOURCETYPE_ */
size = MAX_PATH;
@@ -1327,7 +1327,7 @@ static void test_MsiSourceListEnumSources(void)
MSICODE_PRODUCT, 0, value, &size);
ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
/* invalid dwOptions, must be one of MSICODE_ and MSISOURCETYPE_ */
size = MAX_PATH;
@@ -1337,7 +1337,7 @@ static void test_MsiSourceListEnumSources(void)
MSICODE_PATCH, 0, value, &size);
ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
/* invalid dwOptions, must be one of MSICODE_ and MSISOURCETYPE_ */
size = MAX_PATH;
@@ -1348,7 +1348,7 @@ static void test_MsiSourceListEnumSources(void)
0, value, &size);
ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
/* invalid dwOptions, must be one of MSICODE_ and MSISOURCETYPE_ */
size = MAX_PATH;
@@ -1359,7 +1359,7 @@ static void test_MsiSourceListEnumSources(void)
0, value, &size);
ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
RegDeleteValueA(url, "1");
RegDeleteValueA(url, "2");
@@ -1375,10 +1375,10 @@ static void test_MsiSourceListEnumSources(void)
MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size);
ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
res = RegCreateKeyA(source, "Net", &net);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Net key exists */
size = MAX_PATH;
@@ -1388,10 +1388,10 @@ static void test_MsiSourceListEnumSources(void)
MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size);
ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
res = RegSetValueExA(net, "1", 0, REG_SZ, (LPBYTE)"first", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* sources exist */
size = MAX_PATH;
@@ -1401,7 +1401,7 @@ static void test_MsiSourceListEnumSources(void)
MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value);
- ok(size == 5, "Expected 5, got %d\n", size);
+ ok(size == 5, "Expected 5, got %lu\n", size);
RegDeleteValueA(net, "1");
RegDeleteKeyA(net, "");
@@ -1420,7 +1420,7 @@ static void test_MsiSourceListEnumSources(void)
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\");
lstrcatA(keypath, usersid);
@@ -1430,7 +1430,7 @@ static void test_MsiSourceListEnumSources(void)
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &userkey, NULL);
if (res != ERROR_SUCCESS)
{
- skip("Product key creation failed with error code %u\n", res);
+ skip("Product key creation failed with error code %ld\n", res);
goto machine_tests;
}
@@ -1442,10 +1442,10 @@ static void test_MsiSourceListEnumSources(void)
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
res = RegCreateKeyExA(userkey, "SourceList", 0, NULL, 0, access, NULL, &source, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* SourceList key exists */
size = MAX_PATH;
@@ -1455,10 +1455,10 @@ static void test_MsiSourceListEnumSources(void)
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
res = RegCreateKeyExA(source, "URL", 0, NULL, 0, access, NULL, &url, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* URL key exists */
size = MAX_PATH;
@@ -1468,10 +1468,10 @@ static void test_MsiSourceListEnumSources(void)
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
res = RegSetValueExA(url, "1", 0, REG_SZ, (LPBYTE)"first", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* sources exist */
size = MAX_PATH;
@@ -1481,7 +1481,7 @@ static void test_MsiSourceListEnumSources(void)
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value);
- ok(size == 5, "Expected 5, got %d\n", size);
+ ok(size == 5, "Expected 5, got %lu\n", size);
/* NULL szUserSid */
size = MAX_PATH;
@@ -1491,7 +1491,7 @@ static void test_MsiSourceListEnumSources(void)
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value);
- ok(size == 5, "Expected 5, got %d\n", size);
+ ok(size == 5, "Expected 5, got %lu\n", size);
RegDeleteValueA(url, "1");
delete_key(url, "", access);
@@ -1505,10 +1505,10 @@ static void test_MsiSourceListEnumSources(void)
MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size);
ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
res = RegCreateKeyExA(source, "Net", 0, NULL, 0, access, NULL, &net, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Net key exists */
size = MAX_PATH;
@@ -1518,10 +1518,10 @@ static void test_MsiSourceListEnumSources(void)
MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size);
ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
res = RegSetValueExA(net, "1", 0, REG_SZ, (LPBYTE)"first", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* sources exist */
size = MAX_PATH;
@@ -1531,7 +1531,7 @@ static void test_MsiSourceListEnumSources(void)
MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value);
- ok(size == 5, "Expected 5, got %d\n", size);
+ ok(size == 5, "Expected 5, got %lu\n", size);
RegDeleteValueA(net, "1");
delete_key(net, "", access);
@@ -1552,7 +1552,7 @@ machine_tests:
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
/* szUserSid is NULL */
size = MAX_PATH;
@@ -1562,7 +1562,7 @@ machine_tests:
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\");
lstrcatA(keypath, prod_squashed);
@@ -1570,7 +1570,7 @@ machine_tests:
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &prodkey, NULL);
if (res != ERROR_SUCCESS)
{
- skip("Product key creation failed with error code %u\n", res);
+ skip("Product key creation failed with error code %ld\n", res);
LocalFree(usersid);
return;
}
@@ -1583,10 +1583,10 @@ machine_tests:
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
res = RegCreateKeyExA(prodkey, "SourceList", 0, NULL, 0, access, NULL, &source, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* SourceList key exists */
size = MAX_PATH;
@@ -1596,10 +1596,10 @@ machine_tests:
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
res = RegCreateKeyExA(source, "URL", 0, NULL, 0, access, NULL, &url, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* URL key exists */
size = MAX_PATH;
@@ -1609,10 +1609,10 @@ machine_tests:
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
res = RegSetValueExA(url, "1", 0, REG_SZ, (LPBYTE)"first", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* sources exist */
size = MAX_PATH;
@@ -1622,7 +1622,7 @@ machine_tests:
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value);
- ok(size == 5, "Expected 5, got %d\n", size);
+ ok(size == 5, "Expected 5, got %lu\n", size);
/* NULL szUserSid */
size = MAX_PATH;
@@ -1632,7 +1632,7 @@ machine_tests:
MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value);
- ok(size == 5, "Expected 5, got %d\n", size);
+ ok(size == 5, "Expected 5, got %lu\n", size);
RegDeleteValueA(url, "1");
delete_key(url, "", access);
@@ -1646,10 +1646,10 @@ machine_tests:
MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size);
ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
res = RegCreateKeyExA(source, "Net", 0, NULL, 0, access, NULL, &net, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Net key exists */
size = MAX_PATH;
@@ -1659,10 +1659,10 @@ machine_tests:
MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size);
ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
- ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
+ ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
res = RegSetValueExA(net, "1", 0, REG_SZ, (LPBYTE)"first", 6);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* sources exist */
size = MAX_PATH;
@@ -1672,7 +1672,7 @@ machine_tests:
MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value);
- ok(size == 5, "Expected 5, got %d\n", size);
+ ok(size == 5, "Expected 5, got %lu\n", size);
RegDeleteValueA(net, "1");
delete_key(net, "", access);
@@ -1808,7 +1808,7 @@ static void test_MsiSourceListSetInfo(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &userkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user product key exists */
r = pMsiSourceListSetInfoA(prodcode, NULL,
@@ -1818,7 +1818,7 @@ static void test_MsiSourceListSetInfo(void)
"Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
res = RegCreateKeyA(userkey, "SourceList", &source);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* SourceList key exists, no source type */
r = pMsiSourceListSetInfoA(prodcode, NULL,
@@ -1828,7 +1828,7 @@ static void test_MsiSourceListSetInfo(void)
/* Media key is created by MsiSourceListSetInfo */
res = RegOpenKeyA(source, "Media", &media);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_STR(media, "MediaPackage", "path");
/* set the info again */
@@ -1921,7 +1921,7 @@ static void test_MsiSourceListSetInfo(void)
/* Net key is created by MsiSourceListSetInfo */
res = RegOpenKeyA(source, "Net", &net);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_STR(net, "1", "source\\")
CHECK_REG_STR(source, "LastUsedSource", "n;1;source");
@@ -1944,7 +1944,7 @@ static void test_MsiSourceListSetInfo(void)
/* URL key is created by MsiSourceListSetInfo */
res = RegOpenKeyA(source, "URL", &url);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_STR(url, "1", "source/");
CHECK_REG_STR(source, "LastUsedSource", "u;1;source");
@@ -2029,7 +2029,7 @@ static void test_MsiSourceListSetInfo(void)
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &userkey, NULL);
if (res != ERROR_SUCCESS)
{
- skip("Product key creation failed with error code %u\n", res);
+ skip("Product key creation failed with error code %ld\n", res);
goto machine_tests;
}
@@ -2041,7 +2041,7 @@ static void test_MsiSourceListSetInfo(void)
"Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
res = RegCreateKeyExA(userkey, "SourceList", 0, NULL, 0, access, NULL, &source, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* SourceList key exists, no source type */
r = pMsiSourceListSetInfoA(prodcode, NULL,
@@ -2051,7 +2051,7 @@ static void test_MsiSourceListSetInfo(void)
/* Media key is created by MsiSourceListSetInfo */
res = RegOpenKeyExA(source, "Media", 0, access, &media);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_STR(media, "MediaPackage", "path");
RegDeleteValueA(media, "MediaPackage");
@@ -2071,7 +2071,7 @@ machine_tests:
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &prodkey, NULL);
if (res != ERROR_SUCCESS)
{
- skip("Product key creation failed with error code %u\n", res);
+ skip("Product key creation failed with error code %ld\n", res);
LocalFree(usersid);
return;
}
@@ -2084,7 +2084,7 @@ machine_tests:
"Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
res = RegCreateKeyExA(prodkey, "SourceList", 0, NULL, 0, access, NULL, &source, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* SourceList key exists, no source type */
r = pMsiSourceListSetInfoA(prodcode, NULL,
@@ -2099,7 +2099,7 @@ machine_tests:
/* Media key is created by MsiSourceListSetInfo */
res = RegOpenKeyExA(source, "Media", 0, access, &media);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_STR(media, "MediaPackage", "path");
/* szUserSid is non-NULL */
@@ -2217,7 +2217,7 @@ static void test_MsiSourceListAddMediaDisk(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &userkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user product key exists */
r = pMsiSourceListAddMediaDiskA(prodcode, usersid,
@@ -2227,7 +2227,7 @@ static void test_MsiSourceListAddMediaDisk(void)
"Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
res = RegCreateKeyA(userkey, "SourceList", &source);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* SourceList key exists */
r = pMsiSourceListAddMediaDiskA(prodcode, usersid,
@@ -2237,7 +2237,7 @@ static void test_MsiSourceListAddMediaDisk(void)
/* Media subkey is created by MsiSourceListAddMediaDisk */
res = RegOpenKeyA(source, "Media", &media);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_STR(media, "1", "label;prompt");
@@ -2350,7 +2350,7 @@ static void test_MsiSourceListAddMediaDisk(void)
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &userkey, NULL);
if (res != ERROR_SUCCESS)
{
- skip("Product key creation failed with error code %u\n", res);
+ skip("Product key creation failed with error code %ld\n", res);
goto machine_tests;
}
@@ -2362,7 +2362,7 @@ static void test_MsiSourceListAddMediaDisk(void)
"Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
res = RegCreateKeyExA(userkey, "SourceList", 0, NULL, 0, access, NULL, &source, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* SourceList key exists */
r = pMsiSourceListAddMediaDiskA(prodcode, usersid,
@@ -2372,7 +2372,7 @@ static void test_MsiSourceListAddMediaDisk(void)
/* Media subkey is created by MsiSourceListAddMediaDisk */
res = RegOpenKeyExA(source, "Media", 0, access, &media);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_STR(media, "1", "label;prompt");
@@ -2393,7 +2393,7 @@ machine_tests:
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &prodkey, NULL);
if (res != ERROR_SUCCESS)
{
- skip("Product key creation failed with error code %u\n", res);
+ skip("Product key creation failed with error code %ld\n", res);
LocalFree(usersid);
return;
}
@@ -2406,7 +2406,7 @@ machine_tests:
"Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
res = RegCreateKeyExA(prodkey, "SourceList", 0, NULL, 0, access, NULL, &source, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* SourceList key exists */
r = pMsiSourceListAddMediaDiskA(prodcode, NULL,
@@ -2421,7 +2421,7 @@ machine_tests:
/* Media subkey is created by MsiSourceListAddMediaDisk */
res = RegOpenKeyExA(source, "Media", 0, access, &media);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_STR(media, "1", "label;prompt");
@@ -2557,7 +2557,7 @@ static void test_MsiSourceListEnumMediaDisks(void)
lstrcatA(keypath, prod_squashed);
res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &userkey);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* user product key exists */
labelsz = sizeof(label);
@@ -2569,7 +2569,7 @@ static void test_MsiSourceListEnumMediaDisks(void)
"Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
res = RegCreateKeyA(userkey, "SourceList", &source);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* SourceList key exists */
id = 0xbeef;
@@ -2582,14 +2582,14 @@ static void test_MsiSourceListEnumMediaDisks(void)
prompt, &promptsz);
ok(r == ERROR_NO_MORE_ITEMS,
"Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
- ok(id == 0xbeef, "Expected 0xbeef, got %d\n", id);
+ ok(id == 0xbeef, "Expected 0xbeef, got %lu\n", id);
ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label);
- ok(labelsz == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", labelsz);
+ ok(labelsz == 0xdeadbeef, "Expected 0xdeadbeef, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt);
- ok(promptsz == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", promptsz);
+ ok(promptsz == 0xdeadbeef, "Expected 0xdeadbeef, got %lu\n", promptsz);
res = RegCreateKeyA(source, "Media", &media);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Media key exists */
id = 0xbeef;
@@ -2602,14 +2602,14 @@ static void test_MsiSourceListEnumMediaDisks(void)
prompt, &promptsz);
ok(r == ERROR_NO_MORE_ITEMS,
"Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
- ok(id == 0xbeef, "Expected 0xbeef, got %d\n", id);
+ ok(id == 0xbeef, "Expected 0xbeef, got %lu\n", id);
ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label);
- ok(labelsz == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", labelsz);
+ ok(labelsz == 0xdeadbeef, "Expected 0xdeadbeef, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt);
- ok(promptsz == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", promptsz);
+ ok(promptsz == 0xdeadbeef, "Expected 0xdeadbeef, got %lu\n", promptsz);
res = RegSetValueExA(media, "1", 0, REG_SZ, (LPBYTE)"label;prompt", 13);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* disk exists */
id = 0;
@@ -2621,14 +2621,14 @@ static void test_MsiSourceListEnumMediaDisks(void)
MSICODE_PRODUCT, 0, &id, label, &labelsz,
prompt, &promptsz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(id == 1, "Expected 1, got %d\n", id);
+ ok(id == 1, "Expected 1, got %lu\n", id);
ok(!lstrcmpA(label, "label"), "Expected \"label\", got \"%s\"\n", label);
- ok(labelsz == 5, "Expected 5, got %d\n", labelsz);
+ ok(labelsz == 5, "Expected 5, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "prompt"), "Expected \"prompt\", got \"%s\"\n", prompt);
- ok(promptsz == 6, "Expected 6, got %d\n", promptsz);
+ ok(promptsz == 6, "Expected 6, got %lu\n", promptsz);
res = RegSetValueExA(media, "2", 0, REG_SZ, (LPBYTE)"one;two", 8);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* now disk 2 exists, get the sizes */
id = 0;
@@ -2641,9 +2641,9 @@ static void test_MsiSourceListEnumMediaDisks(void)
"Expected ERROR_SUCCESS or ERROR_INVALID_PARAMETER, got %d\n", r);
if (r == ERROR_SUCCESS)
{
- ok(id == 2, "Expected 2, got %d\n", id);
- ok(labelsz == 3, "Expected 3, got %d\n", labelsz);
- ok(promptsz == 3, "Expected 3, got %d\n", promptsz);
+ ok(id == 2, "Expected 2, got %lu\n", id);
+ ok(labelsz == 3, "Expected 3, got %lu\n", labelsz);
+ ok(promptsz == 3, "Expected 3, got %lu\n", promptsz);
}
/* now fill in the values */
@@ -2659,23 +2659,23 @@ static void test_MsiSourceListEnumMediaDisks(void)
"Expected ERROR_SUCCESS or ERROR_INVALID_PARAMETER, got %d\n", r);
if (r == ERROR_SUCCESS)
{
- ok(id == 2, "Expected 2, got %d\n", id);
+ ok(id == 2, "Expected 2, got %lu\n", id);
ok(!lstrcmpA(label, "one"), "Expected \"one\", got \"%s\"\n", label);
- ok(labelsz == 3, "Expected 3, got %d\n", labelsz);
+ ok(labelsz == 3, "Expected 3, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "two"), "Expected \"two\", got \"%s\"\n", prompt);
- ok(promptsz == 3, "Expected 3, got %d\n", promptsz);
+ ok(promptsz == 3, "Expected 3, got %lu\n", promptsz);
}
else if (r == ERROR_INVALID_PARAMETER)
{
- ok(id == 0xbeef, "Expected 0xbeef, got %d\n", id);
+ ok(id == 0xbeef, "Expected 0xbeef, got %lu\n", id);
ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label);
- ok(labelsz == MAX_PATH, "Expected MAX_PATH, got %d\n", labelsz);
+ ok(labelsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt);
- ok(promptsz == MAX_PATH, "Expected MAX_PATH, got %d\n", promptsz);
+ ok(promptsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", promptsz);
}
res = RegSetValueExA(media, "4", 0, REG_SZ, (LPBYTE)"three;four", 11);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* disks 1, 2, 4 exist, reset the enumeration */
id = 0;
@@ -2687,11 +2687,11 @@ static void test_MsiSourceListEnumMediaDisks(void)
MSICODE_PRODUCT, 0, &id, label, &labelsz,
prompt, &promptsz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(id == 1, "Expected 1, got %d\n", id);
+ ok(id == 1, "Expected 1, got %lu\n", id);
ok(!lstrcmpA(label, "label"), "Expected \"label\", got \"%s\"\n", label);
- ok(labelsz == 5, "Expected 5, got %d\n", labelsz);
+ ok(labelsz == 5, "Expected 5, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "prompt"), "Expected \"prompt\", got \"%s\"\n", prompt);
- ok(promptsz == 6, "Expected 6, got %d\n", promptsz);
+ ok(promptsz == 6, "Expected 6, got %lu\n", promptsz);
/* disks 1, 2, 4 exist, index 1 */
id = 0;
@@ -2703,11 +2703,11 @@ static void test_MsiSourceListEnumMediaDisks(void)
MSICODE_PRODUCT, 1, &id, label, &labelsz,
prompt, &promptsz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(id == 2, "Expected 2, got %d\n", id);
+ ok(id == 2, "Expected 2, got %lu\n", id);
ok(!lstrcmpA(label, "one"), "Expected \"one\", got \"%s\"\n", label);
- ok(labelsz == 3, "Expected 3, got %d\n", labelsz);
+ ok(labelsz == 3, "Expected 3, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "two"), "Expected \"two\", got \"%s\"\n", prompt);
- ok(promptsz == 3, "Expected 3, got %d\n", promptsz);
+ ok(promptsz == 3, "Expected 3, got %lu\n", promptsz);
/* disks 1, 2, 4 exist, index 2 */
id = 0;
@@ -2719,11 +2719,11 @@ static void test_MsiSourceListEnumMediaDisks(void)
MSICODE_PRODUCT, 2, &id, label, &labelsz,
prompt, &promptsz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(id == 4, "Expected 4, got %d\n", id);
+ ok(id == 4, "Expected 4, got %lu\n", id);
ok(!lstrcmpA(label, "three"), "Expected \"three\", got \"%s\"\n", label);
- ok(labelsz == 5, "Expected 5, got %d\n", labelsz);
+ ok(labelsz == 5, "Expected 5, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "four"), "Expected \"four\", got \"%s\"\n", prompt);
- ok(promptsz == 4, "Expected 4, got %d\n", promptsz);
+ ok(promptsz == 4, "Expected 4, got %lu\n", promptsz);
/* disks 1, 2, 4 exist, index 3, invalid */
id = 0xbeef;
@@ -2736,11 +2736,11 @@ static void test_MsiSourceListEnumMediaDisks(void)
prompt, &promptsz);
ok(r == ERROR_NO_MORE_ITEMS,
"Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
- ok(id == 0xbeef, "Expected 0xbeef, got %d\n", id);
+ ok(id == 0xbeef, "Expected 0xbeef, got %lu\n", id);
ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label);
- ok(labelsz == MAX_PATH, "Expected MAX_PATH, got %d\n", labelsz);
+ ok(labelsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt);
- ok(promptsz == MAX_PATH, "Expected MAX_PATH, got %d\n", promptsz);
+ ok(promptsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", promptsz);
/* disks 1, 2, 4 exist, reset the enumeration */
id = 0;
@@ -2752,11 +2752,11 @@ static void test_MsiSourceListEnumMediaDisks(void)
MSICODE_PRODUCT, 0, &id, label, &labelsz,
prompt, &promptsz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(id == 1, "Expected 1, got %d\n", id);
+ ok(id == 1, "Expected 1, got %lu\n", id);
ok(!lstrcmpA(label, "label"), "Expected \"label\", got \"%s\"\n", label);
- ok(labelsz == 5, "Expected 5, got %d\n", labelsz);
+ ok(labelsz == 5, "Expected 5, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "prompt"), "Expected \"prompt\", got \"%s\"\n", prompt);
- ok(promptsz == 6, "Expected 6, got %d\n", promptsz);
+ ok(promptsz == 6, "Expected 6, got %lu\n", promptsz);
/* try index 0 again */
id = 0;
@@ -2768,11 +2768,11 @@ static void test_MsiSourceListEnumMediaDisks(void)
MSICODE_PRODUCT, 0, &id, label, &labelsz,
prompt, &promptsz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(id == 1, "Expected 1, got %d\n", id);
+ ok(id == 1, "Expected 1, got %lu\n", id);
ok(!lstrcmpA(label, "label"), "Expected \"label\", got \"%s\"\n", label);
- ok(labelsz == 5, "Expected 5, got %d\n", labelsz);
+ ok(labelsz == 5, "Expected 5, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "prompt"), "Expected \"prompt\", got \"%s\"\n", prompt);
- ok(promptsz == 6, "Expected 6, got %d\n", promptsz);
+ ok(promptsz == 6, "Expected 6, got %lu\n", promptsz);
/* jump to index 2 */
id = 0xbeef;
@@ -2784,11 +2784,11 @@ static void test_MsiSourceListEnumMediaDisks(void)
MSICODE_PRODUCT, 2, &id, label, &labelsz,
prompt, &promptsz);
ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r);
- ok(id == 0xbeef, "Expected 0xbeef, got %d\n", id);
+ ok(id == 0xbeef, "Expected 0xbeef, got %lu\n", id);
ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label);
- ok(labelsz == MAX_PATH, "Expected MAX_PATH, got %d\n", labelsz);
+ ok(labelsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt);
- ok(promptsz == MAX_PATH, "Expected MAX_PATH, got %d\n", promptsz);
+ ok(promptsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", promptsz);
/* after error, try index 1 */
id = 0xbeef;
@@ -2800,11 +2800,11 @@ static void test_MsiSourceListEnumMediaDisks(void)
MSICODE_PRODUCT, 1, &id, label, &labelsz,
prompt, &promptsz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(id == 2, "Expected 2, got %d\n", id);
+ ok(id == 2, "Expected 2, got %lu\n", id);
ok(!lstrcmpA(label, "one"), "Expected \"one\", got \"%s\"\n", label);
- ok(labelsz == 3, "Expected 3, got %d\n", labelsz);
+ ok(labelsz == 3, "Expected 3, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "two"), "Expected \"two\", got \"%s\"\n", prompt);
- ok(promptsz == 3, "Expected 3, got %d\n", promptsz);
+ ok(promptsz == 3, "Expected 3, got %lu\n", promptsz);
/* try index 1 again */
id = 0xbeef;
@@ -2816,11 +2816,11 @@ static void test_MsiSourceListEnumMediaDisks(void)
MSICODE_PRODUCT, 1, &id, label, &labelsz,
prompt, &promptsz);
ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r);
- ok(id == 0xbeef, "Expected 0xbeef, got %d\n", id);
+ ok(id == 0xbeef, "Expected 0xbeef, got %lu\n", id);
ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label);
- ok(labelsz == MAX_PATH, "Expected MAX_PATH, got %d\n", labelsz);
+ ok(labelsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt);
- ok(promptsz == MAX_PATH, "Expected MAX_PATH, got %d\n", promptsz);
+ ok(promptsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", promptsz);
/* NULL pdwDiskId */
lstrcpyA(label, "aaa");
@@ -2832,9 +2832,9 @@ static void test_MsiSourceListEnumMediaDisks(void)
prompt, &promptsz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(label, "label"), "Expected \"label\", got \"%s\"\n", label);
- ok(labelsz == 5, "Expected 5, got %d\n", labelsz);
+ ok(labelsz == 5, "Expected 5, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "prompt"), "Expected \"prompt\", got \"%s\"\n", prompt);
- ok(promptsz == 6, "Expected 6, got %d\n", promptsz);
+ ok(promptsz == 6, "Expected 6, got %lu\n", promptsz);
/* szVolumeLabel is NULL */
id = 0;
@@ -2848,10 +2848,10 @@ static void test_MsiSourceListEnumMediaDisks(void)
"Expected ERROR_SUCCESS or ERROR_INVALID_PARAMETER, got %d\n", r);
if (r == ERROR_SUCCESS)
{
- ok(id == 1, "Expected 1, got %d\n", id);
- ok(labelsz == 5, "Expected 5, got %d\n", labelsz);
+ ok(id == 1, "Expected 1, got %lu\n", id);
+ ok(labelsz == 5, "Expected 5, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "prompt"), "Expected \"prompt\", got \"%s\"\n", prompt);
- ok(promptsz == 6, "Expected 6, got %d\n", promptsz);
+ ok(promptsz == 6, "Expected 6, got %lu\n", promptsz);
}
/* szVolumeLabel and pcchVolumeLabel are NULL */
@@ -2862,9 +2862,9 @@ static void test_MsiSourceListEnumMediaDisks(void)
MSICODE_PRODUCT, 0, &id, NULL, NULL,
prompt, &promptsz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(id == 1, "Expected 1, got %d\n", id);
+ ok(id == 1, "Expected 1, got %lu\n", id);
ok(!lstrcmpA(prompt, "prompt"), "Expected \"prompt\", got \"%s\"\n", prompt);
- ok(promptsz == 6, "Expected 6, got %d\n", promptsz);
+ ok(promptsz == 6, "Expected 6, got %lu\n", promptsz);
/* szVolumeLabel is non-NULL while pcchVolumeLabel is NULL */
id = 0xbeef;
@@ -2878,10 +2878,10 @@ static void test_MsiSourceListEnumMediaDisks(void)
"Expected ERROR_SUCCESS or ERROR_INVALID_PARAMETER, got %d\n", r);
if (r == ERROR_SUCCESS)
{
- ok(id == 1, "Expected 1, got %d\n", id);
+ ok(id == 1, "Expected 1, got %lu\n", id);
ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label);
ok(!lstrcmpA(prompt, "prompt"), "Expected \"prompt\", got \"%s\"\n", prompt);
- ok(promptsz == 6, "Expected 6, got %d\n", promptsz);
+ ok(promptsz == 6, "Expected 6, got %lu\n", promptsz);
}
/* szDiskPrompt is NULL */
@@ -2895,10 +2895,10 @@ static void test_MsiSourceListEnumMediaDisks(void)
ok(r == ERROR_SUCCESS || r == ERROR_INVALID_PARAMETER, "Expected ERROR_SUCCESS, got %d\n", r);
if (r == ERROR_SUCCESS)
{
- ok(id == 1, "Expected 1, got %d\n", id);
+ ok(id == 1, "Expected 1, got %lu\n", id);
ok(!lstrcmpA(label, "label"), "Expected \"label\", got \"%s\"\n", label);
- ok(labelsz == 5, "Expected 5, got %d\n", labelsz);
- ok(promptsz == 6, "Expected 6, got %d\n", promptsz);
+ ok(labelsz == 5, "Expected 5, got %lu\n", labelsz);
+ ok(promptsz == 6, "Expected 6, got %lu\n", promptsz);
}
/* szDiskPrompt and pcchDiskPrompt are NULL */
@@ -2909,9 +2909,9 @@ static void test_MsiSourceListEnumMediaDisks(void)
MSICODE_PRODUCT, 0, &id, label, &labelsz,
NULL, NULL);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(id == 1, "Expected 1, got %d\n", id);
+ ok(id == 1, "Expected 1, got %lu\n", id);
ok(!lstrcmpA(label, "label"), "Expected \"label\", got \"%s\"\n", label);
- ok(labelsz == 5, "Expected 5, got %d\n", labelsz);
+ ok(labelsz == 5, "Expected 5, got %lu\n", labelsz);
/* szDiskPrompt is non-NULL while pcchDiskPrompt is NULL */
id = 0xbeef;
@@ -2923,9 +2923,9 @@ static void test_MsiSourceListEnumMediaDisks(void)
prompt, NULL);
ok(r == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
- ok(id == 0xbeef, "Expected 0xbeef, got %d\n", id);
+ ok(id == 0xbeef, "Expected 0xbeef, got %lu\n", id);
ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label);
- ok(labelsz == MAX_PATH, "Expected MAX_PATH, got %d\n", labelsz);
+ ok(labelsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt);
/* pcchVolumeLabel, szDiskPrompt and pcchDiskPrompt are NULL */
@@ -2936,7 +2936,7 @@ static void test_MsiSourceListEnumMediaDisks(void)
NULL, NULL);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label);
- ok(id == 1, "Expected 1, got %d\n", id);
+ ok(id == 1, "Expected 1, got %lu\n", id);
/* szVolumeLabel, pcchVolumeLabel, szDiskPrompt and pcchDiskPrompt are NULL */
id = 0;
@@ -2944,7 +2944,7 @@ static void test_MsiSourceListEnumMediaDisks(void)
MSICODE_PRODUCT, 0, &id, NULL, NULL,
NULL, NULL);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(id == 1, "Expected 1, got %d\n", id);
+ ok(id == 1, "Expected 1, got %lu\n", id);
/* pcchVolumeLabel is exactly 5 */
lstrcpyA(label, "aaa");
@@ -2956,9 +2956,9 @@ static void test_MsiSourceListEnumMediaDisks(void)
prompt, &promptsz);
ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r);
ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label);
- ok(labelsz == 5, "Expected 5, got %d\n", labelsz);
+ ok(labelsz == 5, "Expected 5, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt);
- ok(promptsz == 6, "Expected 6, got %d\n", promptsz);
+ ok(promptsz == 6, "Expected 6, got %lu\n", promptsz);
/* pcchDiskPrompt is exactly 6 */
lstrcpyA(label, "aaa");
@@ -2970,12 +2970,12 @@ static void test_MsiSourceListEnumMediaDisks(void)
prompt, &promptsz);
ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r);
ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label);
- ok(labelsz == 5, "Expected 5, got %d\n", labelsz);
+ ok(labelsz == 5, "Expected 5, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt);
- ok(promptsz == 6, "Expected 6, got %d\n", promptsz);
+ ok(promptsz == 6, "Expected 6, got %lu\n", promptsz);
res = RegSetValueExA(media, "1", 0, REG_SZ, (LPBYTE)"label", 13);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* no semicolon */
id = 0;
@@ -2987,14 +2987,14 @@ static void test_MsiSourceListEnumMediaDisks(void)
MSICODE_PRODUCT, 0, &id, label, &labelsz,
prompt, &promptsz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(id == 1, "Expected 1, got %d\n", id);
+ ok(id == 1, "Expected 1, got %lu\n", id);
ok(!lstrcmpA(label, "label"), "Expected \"label\", got \"%s\"\n", label);
- ok(labelsz == 5, "Expected 5, got %d\n", labelsz);
+ ok(labelsz == 5, "Expected 5, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "label"), "Expected \"label\", got \"%s\"\n", prompt);
- ok(promptsz == 5, "Expected 5, got %d\n", promptsz);
+ ok(promptsz == 5, "Expected 5, got %lu\n", promptsz);
res = RegSetValueExA(media, "1", 0, REG_SZ, (LPBYTE)"label;", 13);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* semicolon, no disk prompt */
id = 0;
@@ -3006,14 +3006,14 @@ static void test_MsiSourceListEnumMediaDisks(void)
MSICODE_PRODUCT, 0, &id, label, &labelsz,
prompt, &promptsz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(id == 1, "Expected 1, got %d\n", id);
+ ok(id == 1, "Expected 1, got %lu\n", id);
ok(!lstrcmpA(label, "label"), "Expected \"label\", got \"%s\"\n", label);
- ok(labelsz == 5, "Expected 5, got %d\n", labelsz);
+ ok(labelsz == 5, "Expected 5, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, ""), "Expected \"\", got \"%s\"\n", prompt);
- ok(promptsz == 0, "Expected 0, got %d\n", promptsz);
+ ok(promptsz == 0, "Expected 0, got %lu\n", promptsz);
res = RegSetValueExA(media, "1", 0, REG_SZ, (LPBYTE)";prompt", 13);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* semicolon, label doesn't exist */
id = 0;
@@ -3025,14 +3025,14 @@ static void test_MsiSourceListEnumMediaDisks(void)
MSICODE_PRODUCT, 0, &id, label, &labelsz,
prompt, &promptsz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(id == 1, "Expected 1, got %d\n", id);
+ ok(id == 1, "Expected 1, got %lu\n", id);
ok(!lstrcmpA(label, ""), "Expected \"\", got \"%s\"\n", label);
- ok(labelsz == 0, "Expected 0, got %d\n", labelsz);
+ ok(labelsz == 0, "Expected 0, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "prompt"), "Expected \"prompt\", got \"%s\"\n", prompt);
- ok(promptsz == 6, "Expected 6, got %d\n", promptsz);
+ ok(promptsz == 6, "Expected 6, got %lu\n", promptsz);
res = RegSetValueExA(media, "1", 0, REG_SZ, (LPBYTE)";", 13);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* semicolon, neither label nor disk prompt exist */
id = 0;
@@ -3044,15 +3044,15 @@ static void test_MsiSourceListEnumMediaDisks(void)
MSICODE_PRODUCT, 0, &id, label, &labelsz,
prompt, &promptsz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(id == 1, "Expected 1, got %d\n", id);
+ ok(id == 1, "Expected 1, got %lu\n", id);
ok(!lstrcmpA(label, ""), "Expected \"\", got \"%s\"\n", label);
- ok(labelsz == 0, "Expected 0, got %d\n", labelsz);
+ ok(labelsz == 0, "Expected 0, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, ""), "Expected \"\", got \"%s\"\n", prompt);
- ok(promptsz == 0, "Expected 0, got %d\n", promptsz);
+ ok(promptsz == 0, "Expected 0, got %lu\n", promptsz);
val = 42;
res = RegSetValueExA(media, "1", 0, REG_DWORD, (LPBYTE)&val, sizeof(DWORD));
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* type is REG_DWORD */
id = 0;
@@ -3064,11 +3064,11 @@ static void test_MsiSourceListEnumMediaDisks(void)
MSICODE_PRODUCT, 0, &id, label, &labelsz,
prompt, &promptsz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(id == 1, "Expected 1, got %d\n", id);
+ ok(id == 1, "Expected 1, got %lu\n", id);
ok(!lstrcmpA(label, "#42"), "Expected \"#42\", got \"%s\"\n", label);
- ok(labelsz == 3, "Expected 3, got %d\n", labelsz);
+ ok(labelsz == 3, "Expected 3, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "#42"), "Expected \"#42\", got \"%s\"\n", prompt);
- ok(promptsz == 3, "Expected 3, got %d\n", promptsz);
+ ok(promptsz == 3, "Expected 3, got %lu\n", promptsz);
RegDeleteValueA(media, "1");
RegDeleteValueA(media, "2");
@@ -3090,7 +3090,7 @@ static void test_MsiSourceListEnumMediaDisks(void)
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &userkey, NULL);
if (res != ERROR_SUCCESS)
{
- skip("Product key creation failed with error code %u\n", res);
+ skip("Product key creation failed with error code %ld\n", res);
goto machine_tests;
}
@@ -3102,7 +3102,7 @@ static void test_MsiSourceListEnumMediaDisks(void)
"Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
res = RegCreateKeyExA(userkey, "SourceList", 0, NULL, 0, access, NULL, &source, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* SourceList key exists */
id = 0xbeef;
@@ -3115,14 +3115,14 @@ static void test_MsiSourceListEnumMediaDisks(void)
prompt, &promptsz);
ok(r == ERROR_NO_MORE_ITEMS,
"Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
- ok(id == 0xbeef, "Expected 0xbeef, got %d\n", id);
+ ok(id == 0xbeef, "Expected 0xbeef, got %lu\n", id);
ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label);
- ok(labelsz == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", labelsz);
+ ok(labelsz == 0xdeadbeef, "Expected 0xdeadbeef, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt);
- ok(promptsz == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", promptsz);
+ ok(promptsz == 0xdeadbeef, "Expected 0xdeadbeef, got %lu\n", promptsz);
res = RegCreateKeyExA(source, "Media", 0, NULL, 0, access, NULL, &media, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Media key exists */
id = 0xbeef;
@@ -3135,14 +3135,14 @@ static void test_MsiSourceListEnumMediaDisks(void)
prompt, &promptsz);
ok(r == ERROR_NO_MORE_ITEMS,
"Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
- ok(id == 0xbeef, "Expected 0xbeef, got %d\n", id);
+ ok(id == 0xbeef, "Expected 0xbeef, got %lu\n", id);
ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label);
- ok(labelsz == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", labelsz);
+ ok(labelsz == 0xdeadbeef, "Expected 0xdeadbeef, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt);
- ok(promptsz == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", promptsz);
+ ok(promptsz == 0xdeadbeef, "Expected 0xdeadbeef, got %lu\n", promptsz);
res = RegSetValueExA(media, "2", 0, REG_SZ, (LPBYTE)"label;prompt", 13);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* disk exists, but no id 1 */
id = 0;
@@ -3154,11 +3154,11 @@ static void test_MsiSourceListEnumMediaDisks(void)
MSICODE_PRODUCT, 0, &id, label, &labelsz,
prompt, &promptsz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(id == 2, "Expected 2, got %d\n", id);
+ ok(id == 2, "Expected 2, got %lu\n", id);
ok(!lstrcmpA(label, "label"), "Expected \"label\", got \"%s\"\n", label);
- ok(labelsz == 5, "Expected 5, got %d\n", labelsz);
+ ok(labelsz == 5, "Expected 5, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "prompt"), "Expected \"prompt\", got \"%s\"\n", prompt);
- ok(promptsz == 6, "Expected 6, got %d\n", promptsz);
+ ok(promptsz == 6, "Expected 6, got %lu\n", promptsz);
RegDeleteValueA(media, "2");
delete_key(media, "", access);
@@ -3177,7 +3177,7 @@ machine_tests:
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &prodkey, NULL);
if (res != ERROR_SUCCESS)
{
- skip("Product key creation failed with error code %u\n", res);
+ skip("Product key creation failed with error code %ld\n", res);
LocalFree(usersid);
return;
}
@@ -3190,7 +3190,7 @@ machine_tests:
"Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
res = RegCreateKeyExA(prodkey, "SourceList", 0, NULL, 0, access, NULL, &source, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* SourceList key exists */
id = 0xbeef;
@@ -3203,14 +3203,14 @@ machine_tests:
prompt, &promptsz);
ok(r == ERROR_NO_MORE_ITEMS,
"Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
- ok(id == 0xbeef, "Expected 0xbeef, got %d\n", id);
+ ok(id == 0xbeef, "Expected 0xbeef, got %lu\n", id);
ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label);
- ok(labelsz == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", labelsz);
+ ok(labelsz == 0xdeadbeef, "Expected 0xdeadbeef, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt);
- ok(promptsz == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", promptsz);
+ ok(promptsz == 0xdeadbeef, "Expected 0xdeadbeef, got %lu\n", promptsz);
res = RegCreateKeyExA(source, "Media", 0, NULL, 0, access, NULL, &media, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* Media key exists */
id = 0xbeef;
@@ -3223,14 +3223,14 @@ machine_tests:
prompt, &promptsz);
ok(r == ERROR_NO_MORE_ITEMS,
"Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
- ok(id == 0xbeef, "Expected 0xbeef, got %d\n", id);
+ ok(id == 0xbeef, "Expected 0xbeef, got %lu\n", id);
ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label);
- ok(labelsz == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", labelsz);
+ ok(labelsz == 0xdeadbeef, "Expected 0xdeadbeef, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt);
- ok(promptsz == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", promptsz);
+ ok(promptsz == 0xdeadbeef, "Expected 0xdeadbeef, got %lu\n", promptsz);
res = RegSetValueExA(media, "2", 0, REG_SZ, (LPBYTE)"label;prompt", 13);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* disk exists, but no id 1 */
id = 0;
@@ -3242,11 +3242,11 @@ machine_tests:
MSICODE_PRODUCT, 0, &id, label, &labelsz,
prompt, &promptsz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(id == 2, "Expected 2, got %d\n", id);
+ ok(id == 2, "Expected 2, got %lu\n", id);
ok(!lstrcmpA(label, "label"), "Expected \"label\", got \"%s\"\n", label);
- ok(labelsz == 5, "Expected 5, got %d\n", labelsz);
+ ok(labelsz == 5, "Expected 5, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "prompt"), "Expected \"prompt\", got \"%s\"\n", prompt);
- ok(promptsz == 6, "Expected 6, got %d\n", promptsz);
+ ok(promptsz == 6, "Expected 6, got %lu\n", promptsz);
/* szUserSid is non-NULL */
id = 0xbeef;
@@ -3259,11 +3259,11 @@ machine_tests:
prompt, &promptsz);
ok(r == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", r);
- ok(id == 0xbeef, "Expected 0xbeef, got %d\n", id);
+ ok(id == 0xbeef, "Expected 0xbeef, got %lu\n", id);
ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label);
- ok(labelsz == MAX_PATH, "Expected MAX_PATH, got %d\n", labelsz);
+ ok(labelsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", labelsz);
ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt);
- ok(promptsz == MAX_PATH, "Expected MAX_PATH, got %d\n", promptsz);
+ ok(promptsz == MAX_PATH, "Expected MAX_PATH, got %lu\n", promptsz);
RegDeleteValueA(media, "2");
delete_key(media, "", access);
@@ -3361,7 +3361,7 @@ static void test_MsiSourceListAddSource(void)
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &userkey, NULL);
if (res != ERROR_SUCCESS)
{
- skip("Product key creation failed with error code %u\n", res);
+ skip("Product key creation failed with error code %ld\n", res);
goto userunmanaged_tests;
}
@@ -3370,7 +3370,7 @@ static void test_MsiSourceListAddSource(void)
ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
res = RegCreateKeyExA(userkey, "SourceList", 0, NULL, 0, access, NULL, &source, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* SourceList key exists */
r = pMsiSourceListAddSourceA(prodcode, username, 0, "source");
@@ -3378,11 +3378,11 @@ static void test_MsiSourceListAddSource(void)
/* Net key is created */
res = RegOpenKeyExA(source, "Net", 0, access, &net);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* LastUsedSource does not exist and it is not created */
res = RegQueryValueExA(source, "LastUsedSource", 0, NULL, NULL, NULL);
- ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
CHECK_REG_STR(net, "1", "source\\");
@@ -3391,7 +3391,7 @@ static void test_MsiSourceListAddSource(void)
RegCloseKey(net);
res = RegSetValueExA(source, "LastUsedSource", 0, REG_SZ, (LPBYTE)"blah", 5);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* LastUsedSource value exists */
r = pMsiSourceListAddSourceA(prodcode, username, 0, "source");
@@ -3399,7 +3399,7 @@ static void test_MsiSourceListAddSource(void)
/* Net key is created */
res = RegOpenKeyExA(source, "Net", 0, access, &net);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_STR(source, "LastUsedSource", "blah");
CHECK_REG_STR(net, "1", "source\\");
@@ -3409,7 +3409,7 @@ static void test_MsiSourceListAddSource(void)
RegCloseKey(net);
res = RegSetValueExA(source, "LastUsedSource", 0, REG_SZ, (LPBYTE)"5", 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* LastUsedSource is an integer */
r = pMsiSourceListAddSourceA(prodcode, username, 0, "source");
@@ -3417,7 +3417,7 @@ static void test_MsiSourceListAddSource(void)
/* Net key is created */
res = RegOpenKeyExA(source, "Net", 0, access, &net);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_STR(source, "LastUsedSource", "5");
CHECK_REG_STR(net, "1", "source\\");
@@ -3431,7 +3431,7 @@ static void test_MsiSourceListAddSource(void)
CHECK_REG_STR(net, "2", "another\\");
res = RegSetValueExA(source, "LastUsedSource", 0, REG_SZ, (LPBYTE)"2", 2);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* LastUsedSource is in the source list */
r = pMsiSourceListAddSourceA(prodcode, username, 0, "third/");
@@ -3464,7 +3464,7 @@ userunmanaged_tests:
res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &userkey);
if (res != ERROR_SUCCESS)
{
- skip("Product key creation failed with error code %u\n", res);
+ skip("Product key creation failed with error code %ld\n", res);
goto machine_tests;
}
@@ -3473,7 +3473,7 @@ userunmanaged_tests:
ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
res = RegCreateKeyA(userkey, "SourceList", &source);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* SourceList key exists */
r = pMsiSourceListAddSourceA(prodcode, username, 0, "source");
@@ -3481,7 +3481,7 @@ userunmanaged_tests:
/* Net key is created */
res = RegOpenKeyA(source, "Net", &net);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_STR(net, "1", "source\\");
@@ -3505,7 +3505,7 @@ machine_tests:
res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, &prodkey, NULL);
if (res != ERROR_SUCCESS)
{
- skip("Product key creation failed with error code %u\n", res);
+ skip("Product key creation failed with error code %ld\n", res);
LocalFree(usersid);
return;
}
@@ -3515,7 +3515,7 @@ machine_tests:
ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r);
res = RegCreateKeyExA(prodkey, "SourceList", 0, NULL, 0, access, NULL, &source, NULL);
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
/* SourceList key exists */
r = pMsiSourceListAddSourceA(prodcode, NULL, 0, "source");
@@ -3528,7 +3528,7 @@ machine_tests:
skip("MsiSourceListAddSource (insufficient privileges)\n");
goto done;
}
- ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
CHECK_REG_STR(net, "1", "source\\");
diff --git a/dlls/msi/tests/suminfo.c b/dlls/msi/tests/suminfo.c
index 1ef18310206..6053248a7c4 100644
--- a/dlls/msi/tests/suminfo.c
+++ b/dlls/msi/tests/suminfo.c
@@ -431,7 +431,7 @@ static void test_summary_binary(void)
"Expected empty string or \"7\", got \"%s\"\n", sval);
todo_wine {
ok(type == VT_LPSTR, "Expected VT_LPSTR, got %d\n", type);
- ok(sz == 0 || sz == 1, "Expected 0 or 1, got %d\n", sz);
+ ok(sz == 0 || sz == 1, "Expected 0 or 1, got %lu\n", sz);
}
ival = -1;
--
2.30.2
2
1
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/msi/Makefile.in | 1 -
dlls/msi/action.c | 88 ++++++------
dlls/msi/appsearch.c | 4 +-
dlls/msi/assembly.c | 22 +--
dlls/msi/automation.c | 45 +++---
dlls/msi/classes.c | 16 +--
dlls/msi/custom.c | 42 +++---
dlls/msi/database.c | 51 +++----
dlls/msi/dialog.c | 41 +++---
dlls/msi/files.c | 22 +--
dlls/msi/format.c | 7 +-
dlls/msi/handle.c | 8 +-
dlls/msi/insert.c | 2 +-
dlls/msi/install.c | 64 ++++-----
dlls/msi/media.c | 13 +-
dlls/msi/msi.c | 323 +++++++++++++++++++-----------------------
dlls/msi/msiquery.c | 89 ++++++------
dlls/msi/package.c | 29 ++--
dlls/msi/record.c | 54 ++++---
dlls/msi/registry.c | 219 +++++++++++++---------------
dlls/msi/script.c | 6 +-
dlls/msi/source.c | 140 ++++++++----------
dlls/msi/streams.c | 12 +-
dlls/msi/string.c | 6 +-
dlls/msi/suminfo.c | 72 +++++-----
dlls/msi/table.c | 17 ++-
dlls/msi/upgrade.c | 2 +-
27 files changed, 641 insertions(+), 754 deletions(-)
diff --git a/dlls/msi/Makefile.in b/dlls/msi/Makefile.in
index 3a1b1827456..7140e5a3308 100644
--- a/dlls/msi/Makefile.in
+++ b/dlls/msi/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = msi.dll
IMPORTLIB = msi
IMPORTS = uuid urlmon wininet comctl32 shell32 shlwapi cabinet oleaut32 ole32 version user32 gdi32 advapi32 rpcrt4 sxs imagehlp mspatcha odbccp32 wintrust crypt32
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index a1b4eba0b8a..06cd582a389 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -2076,7 +2076,7 @@ static UINT calculate_file_cost( MSIPACKAGE *package )
continue;
}
file_size = msi_get_disk_file_size( package, file->TargetPath );
- TRACE("%s (size %u)\n", debugstr_w(file->TargetPath), file_size);
+ TRACE("%s (size %lu)\n", debugstr_w(file->TargetPath), file_size);
if (file->Version)
{
@@ -2370,7 +2370,7 @@ static BYTE *parse_value( MSIPACKAGE *package, const WCHAR *value, DWORD len, DW
}
msi_free(deformated);
- TRACE("Data %i bytes(%i)\n",*size,count);
+ TRACE( "data %lu bytes(%u)\n", *size, count );
}
else
{
@@ -2395,8 +2395,8 @@ static BYTE *parse_value( MSIPACKAGE *package, const WCHAR *value, DWORD len, DW
}
if (deformated[0] == '-')
d = -d;
- *(LPDWORD)data = d;
- TRACE("DWORD %i\n",*(LPDWORD)data);
+ *(DWORD *)data = d;
+ TRACE( "DWORD %lu\n", *(DWORD *)data);
msi_free(deformated);
}
@@ -2489,7 +2489,7 @@ static HKEY open_key( const MSICOMPONENT *comp, HKEY root, const WCHAR *path, BO
res = RegOpenKeyExW( root, subkey, 0, access, &hkey );
if (res)
{
- TRACE("failed to open key %s (%d)\n", debugstr_w(subkey), res);
+ TRACE( "failed to open key %s (%ld)\n", debugstr_w(subkey), res );
msi_free( subkey );
return NULL;
}
@@ -2753,14 +2753,14 @@ static UINT ITERATE_WriteRegistryValues(MSIRECORD *row, LPVOID param)
}
if (!check_first)
{
- TRACE("setting value %s of %s type %u\n", debugstr_w(deformated), debugstr_w(uikey), type);
+ TRACE( "setting value %s of %s type %lu\n", debugstr_w(deformated), debugstr_w(uikey), type );
RegSetValueExW( hkey, deformated, 0, type, new_value, new_size );
}
else if (!old_value)
{
if (deformated || new_size)
{
- TRACE("setting value %s of %s type %u\n", debugstr_w(deformated), debugstr_w(uikey), type);
+ TRACE( "setting value %s of %s type %lu\n", debugstr_w(deformated), debugstr_w(uikey), type );
RegSetValueExW( hkey, deformated, 0, type, new_value, new_size );
}
}
@@ -2844,7 +2844,7 @@ static void delete_key( const MSICOMPONENT *comp, HKEY root, const WCHAR *path )
res = RegDeleteKeyExW( root, subkey, access, 0 );
if (res)
{
- TRACE("failed to delete key %s (%d)\n", debugstr_w(subkey), res);
+ TRACE( "failed to delete key %s (%ld)\n", debugstr_w(subkey), res );
break;
}
} while (p);
@@ -2859,7 +2859,7 @@ static void delete_value( const MSICOMPONENT *comp, HKEY root, const WCHAR *path
if ((hkey = open_key( comp, root, path, FALSE, KEY_SET_VALUE | KEY_QUERY_VALUE )))
{
if ((res = RegDeleteValueW( hkey, value )))
- TRACE("failed to delete value %s (%d)\n", debugstr_w(value), res);
+ TRACE( "failed to delete value %s (%ld)\n", debugstr_w(value), res );
RegCloseKey( hkey );
if (is_key_empty(comp, root, path))
@@ -2877,7 +2877,7 @@ static void delete_tree( const MSICOMPONENT *comp, HKEY root, const WCHAR *path
if (!(hkey = open_key( comp, root, path, FALSE, KEY_ALL_ACCESS ))) return;
res = RegDeleteTreeW( hkey, NULL );
- if (res) TRACE("failed to delete subtree of %s (%d)\n", debugstr_w(path), res);
+ if (res) TRACE( "failed to delete subtree of %s (%ld)\n", debugstr_w(path), res );
delete_key( comp, root, path );
RegCloseKey( hkey );
}
@@ -3405,7 +3405,7 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
}
res = RegDeleteValueW( hkey, squashed_pc );
RegCloseKey(hkey);
- if (res) WARN( "failed to delete component value %d\n", res );
+ if (res) WARN( "failed to delete component value %ld\n", res );
}
}
@@ -3566,7 +3566,7 @@ static UINT ITERATE_RegisterTypeLibraries(MSIRECORD *row, LPVOID param)
hr = msi_load_typelib( package, file->TargetPath, REGKIND_REGISTER, &tlib );
if (FAILED(hr))
{
- ERR("Failed to load type library: %08x\n", hr);
+ ERR( "failed to load type library: %#lx\n", hr );
return ERROR_INSTALL_FAILURE;
}
@@ -3631,7 +3631,7 @@ static UINT ITERATE_UnregisterTypeLibraries( MSIRECORD *row, LPVOID param )
hr = UnRegisterTypeLib( &libid, (version >> 8) & 0xffff, version & 0xff, language, syskind );
if (FAILED(hr))
{
- WARN("Failed to unregister typelib: %08x\n", hr);
+ WARN( "failed to unregister typelib: %#lx\n", hr );
}
return ERROR_SUCCESS;
@@ -3865,7 +3865,7 @@ static UINT ITERATE_RemoveShortcuts( MSIRECORD *row, LPVOID param )
link_file = get_link_file( package, row );
TRACE("Removing shortcut file %s\n", debugstr_w( link_file ));
- if (!msi_delete_file( package, link_file )) WARN("Failed to remove shortcut file %u\n", GetLastError());
+ if (!msi_delete_file( package, link_file )) WARN( "failed to remove shortcut file %lu\n", GetLastError() );
msi_free( link_file );
return ERROR_SUCCESS;
@@ -4170,7 +4170,7 @@ static UINT msi_publish_patches( MSIPACKAGE *package )
if (patch->filename && !CopyFileW( patch->filename, patch->localfile, FALSE ))
{
res = GetLastError();
- ERR("Unable to copy patch package %d\n", res);
+ ERR( "unable to copy patch package %lu\n", res );
goto done;
}
res = RegCreateKeyExW( product_patches_key, patch_squashed, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &patch_key, NULL );
@@ -4467,7 +4467,7 @@ static UINT ITERATE_RemoveIniValuesOnUninstall( MSIRECORD *row, LPVOID param )
if (!WritePrivateProfileStringW( deformated_section, deformated_key, NULL, filename ))
{
- WARN("Unable to remove key %u\n", GetLastError());
+ WARN( "unable to remove key %lu\n", GetLastError() );
}
msi_free( filename );
}
@@ -4529,7 +4529,7 @@ static UINT ITERATE_RemoveIniValuesOnInstall( MSIRECORD *row, LPVOID param )
if (!WritePrivateProfileStringW( deformated_section, deformated_key, NULL, filename ))
{
- WARN("Unable to remove key %u\n", GetLastError());
+ WARN( "unable to remove key %lu\n", GetLastError() );
}
msi_free( filename );
}
@@ -5620,7 +5620,7 @@ static UINT ITERATE_UnpublishComponent( MSIRECORD *rec, LPVOID param )
res = RegDeleteKeyW( HKEY_CURRENT_USER, keypath );
if (res != ERROR_SUCCESS)
{
- WARN("Unable to delete component key %d\n", res);
+ WARN( "unable to delete component key %ld\n", res );
}
uirow = MSI_CreateRecord( 2 );
@@ -5748,7 +5748,7 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param)
{
if (GetLastError() != ERROR_SERVICE_EXISTS)
{
- WARN("Failed to create service %s: %d\n", debugstr_w(name), GetLastError());
+ WARN( "failed to create service %s (%lu)\n", debugstr_w(name), GetLastError() );
if (is_vital)
ret = ERROR_INSTALL_FAILURE;
@@ -5757,7 +5757,7 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param)
else if (sd.lpDescription)
{
if (!ChangeServiceConfig2W(service, SERVICE_CONFIG_DESCRIPTION, &sd))
- WARN("failed to set service description %u\n", GetLastError());
+ WARN( "failed to set service description %lu\n", GetLastError() );
}
if (image_path != file->TargetPath) msi_free(image_path);
@@ -5886,7 +5886,7 @@ static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param)
service = OpenServiceW(scm, name, SERVICE_START|SERVICE_QUERY_STATUS);
if (!service)
{
- ERR("Failed to open service %s (%u)\n", debugstr_w(name), GetLastError());
+ ERR( "failed to open service %s (%lu)\n", debugstr_w(name), GetLastError() );
goto done;
}
@@ -5895,7 +5895,7 @@ static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param)
if (!StartServiceW(service, numargs, vector) &&
GetLastError() != ERROR_SERVICE_ALREADY_RUNNING)
{
- ERR("Failed to start service %s (%u)\n", debugstr_w(name), GetLastError());
+ ERR( "failed to start service %s (%lu)\n", debugstr_w(name), GetLastError() );
goto done;
}
@@ -5906,7 +5906,7 @@ static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param)
if (!QueryServiceStatusEx(service, SC_STATUS_PROCESS_INFO,
(BYTE *)&status, sizeof(SERVICE_STATUS_PROCESS), &dummy))
{
- TRACE("failed to query service status (%u)\n", GetLastError());
+ TRACE( "failed to query service status (%lu)\n", GetLastError() );
goto done;
}
start_time = GetTickCount64();
@@ -5917,13 +5917,13 @@ static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param)
if (!QueryServiceStatusEx(service, SC_STATUS_PROCESS_INFO,
(BYTE *)&status, sizeof(SERVICE_STATUS_PROCESS), &dummy))
{
- TRACE("failed to query service status (%u)\n", GetLastError());
+ TRACE( "failed to query service status (%lu)\n", GetLastError() );
goto done;
}
}
if (status.dwCurrentState != SERVICE_RUNNING)
{
- WARN("service failed to start %u\n", status.dwCurrentState);
+ WARN( "service failed to start %lu\n", status.dwCurrentState );
r = ERROR_FUNCTION_FAILED;
}
}
@@ -6015,24 +6015,20 @@ static UINT stop_service( LPCWSTR name )
scm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS);
if (!scm)
{
- WARN("Failed to open the SCM: %d\n", GetLastError());
+ WARN( "failed to open the SCM (%lu)\n", GetLastError() );
goto done;
}
- service = OpenServiceW(scm, name,
- SERVICE_STOP |
- SERVICE_QUERY_STATUS |
- SERVICE_ENUMERATE_DEPENDENTS);
+ service = OpenServiceW(scm, name, SERVICE_STOP | SERVICE_QUERY_STATUS | SERVICE_ENUMERATE_DEPENDENTS);
if (!service)
{
- WARN("Failed to open service (%s): %d\n", debugstr_w(name), GetLastError());
+ WARN( "failed to open service %s (%lu)\n", debugstr_w(name), GetLastError() );
goto done;
}
- if (!QueryServiceStatusEx(service, SC_STATUS_PROCESS_INFO, (LPBYTE)&ssp,
- sizeof(SERVICE_STATUS_PROCESS), &needed))
+ if (!QueryServiceStatusEx( service, SC_STATUS_PROCESS_INFO, (BYTE *)&ssp, sizeof(ssp), &needed) )
{
- WARN("Failed to query service status (%s): %d\n", debugstr_w(name), GetLastError());
+ WARN( "failed to query service status %s (%lu)\n", debugstr_w(name), GetLastError() );
goto done;
}
@@ -6042,7 +6038,7 @@ static UINT stop_service( LPCWSTR name )
stop_service_dependents(scm, service);
if (!ControlService(service, SERVICE_CONTROL_STOP, &status))
- WARN("Failed to stop service (%s): %d\n", debugstr_w(name), GetLastError());
+ WARN( "failed to stop service %s (%lu)\n", debugstr_w(name), GetLastError() );
done:
if (service) CloseServiceHandle(service);
@@ -6154,7 +6150,7 @@ static UINT ITERATE_DeleteService( MSIRECORD *rec, LPVOID param )
scm = OpenSCManagerW( NULL, NULL, SC_MANAGER_ALL_ACCESS );
if (!scm)
{
- WARN("Failed to open the SCM: %d\n", GetLastError());
+ WARN( "failed to open the SCM (%lu)\n", GetLastError() );
goto done;
}
@@ -6169,12 +6165,12 @@ static UINT ITERATE_DeleteService( MSIRECORD *rec, LPVOID param )
service = OpenServiceW( scm, name, DELETE );
if (!service)
{
- WARN("Failed to open service (%s): %u\n", debugstr_w(name), GetLastError());
+ WARN( "failed to open service %s (%lu)\n", debugstr_w(name), GetLastError() );
goto done;
}
if (!DeleteService( service ))
- WARN("Failed to delete service (%s): %u\n", debugstr_w(name), GetLastError());
+ WARN( "failed to delete service %s (%lu)\n", debugstr_w(name), GetLastError() );
done:
uirow = MSI_CreateRecord( 2 );
@@ -6721,7 +6717,7 @@ static UINT env_parse_flags( LPCWSTR *name, LPCWSTR *value, DWORD *flags )
check_flag_combo(*flags, ENV_ACT_REMOVEMATCH | ENV_ACT_SETALWAYS) ||
check_flag_combo(*flags, ENV_ACT_SETABSENT | ENV_MOD_MASK))
{
- ERR("Invalid flags: %08x\n", *flags);
+ ERR( "invalid flags: %#lx\n", *flags );
return ERROR_FUNCTION_FAILED;
}
@@ -6751,7 +6747,7 @@ static UINT open_env_key( DWORD flags, HKEY *key )
res = RegOpenKeyExW( root, env, 0, KEY_ALL_ACCESS, key );
if (res != ERROR_SUCCESS)
{
- WARN("Failed to open key %s (%d)\n", debugstr_w(env), res);
+ WARN( "failed to open key %s (%ld)\n", debugstr_w(env), res );
return ERROR_FUNCTION_FAILED;
}
@@ -7079,7 +7075,7 @@ static UINT ITERATE_RemoveEnvironmentString( MSIRECORD *rec, LPVOID param )
TRACE("removing %s\n", debugstr_w(name));
res = RegDeleteValueW( env, name );
if (res != ERROR_SUCCESS)
- WARN("failed to delete value %s (%d)\n", debugstr_w(name), res);
+ WARN( "failed to delete value %s (%ld)\n", debugstr_w(name), res );
}
else
{
@@ -7087,7 +7083,7 @@ static UINT ITERATE_RemoveEnvironmentString( MSIRECORD *rec, LPVOID param )
size = (lstrlenW( new_value ) + 1) * sizeof(WCHAR);
res = RegSetValueExW( env, name, 0, type, (BYTE *)new_value, size );
if (res != ERROR_SUCCESS)
- WARN("failed to set %s to %s (%d)\n", debugstr_w(name), debugstr_w(new_value), res);
+ WARN( "failed to set %s to %s (%ld)\n", debugstr_w(name), debugstr_w(new_value), res );
}
done:
@@ -7199,7 +7195,7 @@ static UINT ACTION_SetODBCFolders( MSIPACKAGE *package )
msiobj_release( &view->hdr );
if (r != ERROR_SUCCESS)
return r;
- if (count) FIXME("ignored %u rows in ODBCDriver table\n", count);
+ if (count) FIXME( "ignored %lu rows in ODBCDriver table\n", count );
}
r = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `ODBCTranslator`", &view );
if (r == ERROR_SUCCESS)
@@ -7209,7 +7205,7 @@ static UINT ACTION_SetODBCFolders( MSIPACKAGE *package )
msiobj_release( &view->hdr );
if (r != ERROR_SUCCESS)
return r;
- if (count) FIXME("ignored %u rows in ODBCTranslator table\n", count);
+ if (count) FIXME( "ignored %lu rows in ODBCTranslator table\n", count );
}
return ERROR_SUCCESS;
}
@@ -7347,7 +7343,7 @@ static void bind_image( MSIPACKAGE *package, const char *filename, const char *p
{
if (!msi_bind_image( package, filename, path ))
{
- WARN("failed to bind image %u\n", GetLastError());
+ WARN( "failed to bind image %lu\n", GetLastError() );
}
}
@@ -7417,7 +7413,7 @@ static UINT msi_unimplemented_action_stub( MSIPACKAGE *package, LPCSTR action, L
if (r != ERROR_SUCCESS)
return r;
}
- if (count) FIXME("%s: ignored %u rows from %s\n", action, count, debugstr_w(table));
+ if (count) FIXME( "%s: ignored %lu rows from %s\n", action, count, debugstr_w(table) );
return ERROR_SUCCESS;
}
diff --git a/dlls/msi/appsearch.c b/dlls/msi/appsearch.c
index d3a8ccc03f3..77b12156ca8 100644
--- a/dlls/msi/appsearch.c
+++ b/dlls/msi/appsearch.c
@@ -139,7 +139,7 @@ static UINT get_signature( MSIPACKAGE *package, MSISIGNATURE *sig, const WCHAR *
TRACE("MaxVersion is %d.%d.%d.%d\n", HIWORD(sig->MaxVersionMS),
LOWORD(sig->MaxVersionMS), HIWORD(sig->MaxVersionLS),
LOWORD(sig->MaxVersionLS));
- TRACE("MinSize is %d, MaxSize is %d;\n", sig->MinSize, sig->MaxSize);
+ TRACE("MinSize is %lu, MaxSize is %lu\n", sig->MinSize, sig->MaxSize);
TRACE("Languages is %s\n", debugstr_w(sig->Languages));
msiobj_release( &row->hdr );
@@ -336,7 +336,7 @@ static void convert_reg_value( DWORD regType, const BYTE *value, DWORD sz, WCHAR
swprintf(ptr, 3, L"%02X", value[i]);
break;
default:
- WARN("unimplemented for values of type %d\n", regType);
+ WARN( "unimplemented for values of type %lu\n", regType );
*appValue = NULL;
}
}
diff --git a/dlls/msi/assembly.c b/dlls/msi/assembly.c
index 9cddfd2e68d..9f75a9c0281 100644
--- a/dlls/msi/assembly.c
+++ b/dlls/msi/assembly.c
@@ -233,7 +233,7 @@ static BOOL is_assembly_installed( IAssemblyCache *cache, const WCHAR *display_n
{
return (info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED);
}
- TRACE("QueryAssemblyInfo returned 0x%08x\n", hr);
+ TRACE( "QueryAssemblyInfo returned %#lx\n", hr );
return FALSE;
}
@@ -337,7 +337,7 @@ MSIASSEMBLY *msi_load_assembly( MSIPACKAGE *package, MSICOMPONENT *comp )
TRACE("application %s\n", debugstr_w(a->application));
a->attributes = MSI_RecordGetInteger( rec, 5 );
- TRACE("attributes %u\n", a->attributes);
+ TRACE( "attributes %lu\n", a->attributes );
if (!(a->display_name = get_assembly_display_name( package->db, comp->Component, a )))
{
@@ -445,7 +445,7 @@ UINT msi_install_assembly( MSIPACKAGE *package, MSICOMPONENT *comp )
hr = IAssemblyCache_InstallAssembly( cache, 0, manifest, NULL );
if (hr != S_OK)
{
- ERR("Failed to install assembly %s (0x%08x)\n", debugstr_w(manifest), hr);
+ ERR( "failed to install assembly %s (%#lx)\n", debugstr_w(manifest), hr );
return ERROR_FUNCTION_FAILED;
}
if (feature) feature->Action = INSTALLSTATE_LOCAL;
@@ -474,7 +474,7 @@ UINT msi_uninstall_assembly( MSIPACKAGE *package, MSICOMPONENT *comp )
{
cache = package->cache_sxs;
hr = IAssemblyCache_UninstallAssembly( cache, 0, assembly->display_name, NULL, NULL );
- if (FAILED( hr )) WARN("failed to uninstall assembly 0x%08x\n", hr);
+ if (FAILED( hr )) WARN( "failed to uninstall assembly %#lx\n", hr );
}
else
{
@@ -486,7 +486,7 @@ UINT msi_uninstall_assembly( MSIPACKAGE *package, MSICOMPONENT *comp )
if (cache)
{
hr = IAssemblyCache_UninstallAssembly( cache, 0, assembly->display_name, NULL, NULL );
- if (FAILED( hr )) WARN("failed to uninstall assembly 0x%08x\n", hr);
+ if (FAILED( hr )) WARN( "failed to uninstall assembly %#lx\n", hr );
}
}
}
@@ -638,7 +638,7 @@ UINT ACTION_MsiPublishAssemblies( MSIPACKAGE *package )
}
if ((res = open_local_assembly_key( package->Context, win32, file->TargetPath, &hkey )))
{
- WARN("failed to open local assembly key %d\n", res);
+ WARN( "failed to open local assembly key %ld\n", res );
return ERROR_FUNCTION_FAILED;
}
}
@@ -646,14 +646,14 @@ UINT ACTION_MsiPublishAssemblies( MSIPACKAGE *package )
{
if ((res = open_global_assembly_key( package->Context, win32, &hkey )))
{
- WARN("failed to open global assembly key %d\n", res);
+ WARN( "failed to open global assembly key %ld\n", res );
return ERROR_FUNCTION_FAILED;
}
}
size = sizeof(buffer);
if ((res = RegSetValueExW( hkey, assembly->display_name, 0, REG_MULTI_SZ, (const BYTE *)buffer, size )))
{
- WARN("failed to set assembly value %d\n", res);
+ WARN( "failed to set assembly value %ld\n", res );
}
RegCloseKey( hkey );
@@ -699,17 +699,17 @@ UINT ACTION_MsiUnpublishAssemblies( MSIPACKAGE *package )
continue;
}
if ((res = delete_local_assembly_key( package->Context, win32, file->TargetPath )))
- WARN("failed to delete local assembly key %d\n", res);
+ WARN( "failed to delete local assembly key %ld\n", res );
}
else
{
HKEY hkey;
if ((res = open_global_assembly_key( package->Context, win32, &hkey )))
- WARN("failed to delete global assembly key %d\n", res);
+ WARN( "failed to delete global assembly key %ld\n", res );
else
{
if ((res = RegDeleteValueW( hkey, assembly->display_name )))
- WARN("failed to delete global assembly value %d\n", res);
+ WARN( "failed to delete global assembly value %ld\n", res );
RegCloseKey( hkey );
}
}
diff --git a/dlls/msi/automation.c b/dlls/msi/automation.c
index 80d6b8a66ba..f8fd8cc1449 100644
--- a/dlls/msi/automation.c
+++ b/dlls/msi/automation.c
@@ -265,7 +265,7 @@ static HRESULT WINAPI AutomationObject_GetTypeInfo(
AutomationObject *This = impl_from_IDispatch(iface);
HRESULT hr;
- TRACE("(%p/%p)->(%d,%d,%p)\n", iface, This, iTInfo, lcid, ppTInfo);
+ TRACE( "(%p/%p)->(%u, %ld, %p)\n", iface, This, iTInfo, lcid, ppTInfo );
hr = get_typeinfo(This->tid, ppTInfo);
if (FAILED(hr))
@@ -287,7 +287,7 @@ static HRESULT WINAPI AutomationObject_GetIDsOfNames(
ITypeInfo *ti;
HRESULT hr;
- TRACE("(%p/%p)->(%s, %p, %d, %d, %p)\n", iface, This,
+ TRACE("(%p/%p)->(%s, %p, %u, %ld, %p)\n", iface, This,
debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
if (!IsEqualGUID(riid, &IID_NULL)) return E_INVALIDARG;
@@ -331,7 +331,7 @@ static HRESULT WINAPI AutomationObject_Invoke(
BSTR bstrName = NULL;
ITypeInfo *ti;
- TRACE("(%p/%p)->(%d, %s, %d, %d, %p, %p, %p, %p)\n", iface, This,
+ TRACE("(%p/%p)->(%ld, %s, %ld, %d, %p, %p, %p, %p)\n", iface, This,
dispIdMember, debugstr_guid(riid), lcid, wFlags,
pDispParams, pVarResult, pExcepInfo, puArgErr);
@@ -362,14 +362,14 @@ static HRESULT WINAPI AutomationObject_Invoke(
if (TRACE_ON(msi))
{
ITypeInfo_GetDocumentation(ti, dispIdMember, &bstrName, NULL, NULL, NULL);
- TRACE("Method %d, %s\n", dispIdMember, debugstr_w(bstrName));
+ TRACE("method %ld, %s\n", dispIdMember, debugstr_w(bstrName));
}
hr = tid_ids[This->tid].fn_invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr);
if (hr == DISP_E_MEMBERNOTFOUND) {
if (bstrName == NULL) ITypeInfo_GetDocumentation(ti, dispIdMember, &bstrName, NULL, NULL, NULL);
- FIXME("Method %d, %s wflags %d not implemented, clsid %s\n", dispIdMember, debugstr_w(bstrName), wFlags,
+ FIXME("method %ld, %s wflags %d not implemented, clsid %s\n", dispIdMember, debugstr_w(bstrName), wFlags,
debugstr_guid(get_riid_from_tid(This->tid)));
}
else if (pExcepInfo &&
@@ -383,7 +383,7 @@ static HRESULT WINAPI AutomationObject_Invoke(
if (FAILED(ITypeInfo_GetNames(ti, dispIdMember, bstrParamNames,
MAX_FUNC_PARAMS, &namesNo)))
{
- TRACE("Failed to retrieve names for dispIdMember %d\n", dispIdMember);
+ TRACE("failed to retrieve names for dispIdMember %ld\n", dispIdMember);
}
else
{
@@ -412,7 +412,7 @@ static HRESULT WINAPI AutomationObject_Invoke(
/* Free function name if we retrieved it */
SysFreeString(bstrName);
- TRACE("Returning 0x%08x, %s\n", hr, SUCCEEDED(hr) ? "ok" : "not ok");
+ TRACE("returning %#lx, %s\n", hr, SUCCEEDED(hr) ? "ok" : "not ok");
return hr;
}
@@ -470,7 +470,7 @@ static HRESULT WINAPI ProvideMultipleClassInfo_GetClassInfo(IProvideMultipleClas
static HRESULT WINAPI ProvideMultipleClassInfo_GetGUID(IProvideMultipleClassInfo* iface, DWORD dwGuidKind, GUID* pGUID)
{
AutomationObject *This = impl_from_IProvideMultipleClassInfo(iface);
- TRACE("(%p/%p)->(%d,%s)\n", iface, This, dwGuidKind, debugstr_guid(pGUID));
+ TRACE("(%p/%p)->(%lu, %s)\n", iface, This, dwGuidKind, debugstr_guid(pGUID));
if (dwGuidKind != GUIDKIND_DEFAULT_SOURCE_DISP_IID)
return E_INVALIDARG;
@@ -500,7 +500,8 @@ static HRESULT WINAPI ProvideMultipleClassInfo_GetInfoOfIndex(IProvideMultipleCl
{
AutomationObject *This = impl_from_IProvideMultipleClassInfo(iface);
- TRACE("(%p/%p)->(%d,%d,%p,%p,%p,%p,%p)\n", iface, This, iti, dwFlags, ti, pdwTIFlags, pcdispidReserved, piidPrimary, piidSource);
+ TRACE("(%p/%p)->(%lu, %#lx, %p, %p, %p, %p, %p)\n", iface, This, iti, dwFlags, ti, pdwTIFlags, pcdispidReserved,
+ piidPrimary, piidSource);
if (iti != 0)
return E_INVALIDARG;
@@ -542,7 +543,7 @@ static const IProvideMultipleClassInfoVtbl ProvideMultipleClassInfoVtbl =
static void init_automation_object(AutomationObject *This, MSIHANDLE msiHandle, tid_t tid)
{
- TRACE("(%p, %d, %s)\n", This, msiHandle, debugstr_guid(get_riid_from_tid(tid)));
+ TRACE("%p, %lu, %s\n", This, msiHandle, debugstr_guid(get_riid_from_tid(tid)));
This->IDispatch_iface.lpVtbl = &AutomationObjectVtbl;
This->IProvideMultipleClassInfo_iface.lpVtbl = &ProvideMultipleClassInfoVtbl;
@@ -618,7 +619,7 @@ static HRESULT WINAPI ListEnumerator_Next(IEnumVARIANT* iface, ULONG celt, VARIA
ListEnumerator *This = impl_from_IEnumVARIANT(iface);
ULONG i, local;
- TRACE("(%p, %uld, %p, %p)\n", iface, celt, rgVar, fetched);
+ TRACE("%p, %lu, %p, %p\n", iface, celt, rgVar, fetched);
if (fetched) *fetched = 0;
@@ -641,7 +642,7 @@ static HRESULT WINAPI ListEnumerator_Skip(IEnumVARIANT* iface, ULONG celt)
{
ListEnumerator *This = impl_from_IEnumVARIANT(iface);
- TRACE("(%p,%uld)\n", iface, celt);
+ TRACE("%p, %lu\n", iface, celt);
This->pos += celt;
if (This->pos >= This->list->count)
@@ -1030,7 +1031,7 @@ static HRESULT list_invoke(
if (SUCCEEDED(hr = create_list_enumerator(list, (LPVOID *)&pUnk)))
V_UNKNOWN(pVarResult) = pUnk;
else
- ERR("Failed to create IEnumVARIANT object, hresult 0x%08x\n", hr);
+ ERR("failed to create IEnumVARIANT object, hresult %#lx\n", hr);
}
else return DISP_E_MEMBERNOTFOUND;
break;
@@ -1189,7 +1190,7 @@ static HRESULT view_invoke(
if ((ret = MsiViewFetch(This->msiHandle, &msiHandle)) == ERROR_SUCCESS)
{
if (FAILED(hr = create_record(msiHandle, &V_DISPATCH(pVarResult))))
- ERR("Failed to create Record object, hresult 0x%08x\n", hr);
+ ERR("failed to create Record object, hresult %#lx\n", hr);
}
else if (ret == ERROR_NO_MORE_ITEMS)
V_DISPATCH(pVarResult) = NULL;
@@ -1289,7 +1290,7 @@ HRESULT database_invoke(
if (SUCCEEDED(hr))
V_DISPATCH(pVarResult) = dispatch;
else
- ERR("Failed to create SummaryInfo object: 0x%08x\n", hr);
+ ERR("failed to create SummaryInfo object: %#lx\n", hr);
}
else
{
@@ -1311,7 +1312,7 @@ HRESULT database_invoke(
if (SUCCEEDED(hr = create_view(msiHandle, &dispatch)))
V_DISPATCH(pVarResult) = dispatch;
else
- ERR("Failed to create View object, hresult 0x%08x\n", hr);
+ ERR("failed to create View object, hresult %#lx\n", hr);
}
else
{
@@ -1447,7 +1448,7 @@ static HRESULT session_invoke(
if (SUCCEEDED(hr = create_database(msiHandle, &dispatch)))
V_DISPATCH(pVarResult) = dispatch;
else
- ERR("Failed to create Database object, hresult 0x%08x\n", hr);
+ ERR("failed to create Database object, hresult %#lx\n", hr);
}
else
{
@@ -1617,11 +1618,11 @@ static void variant_from_registry_value(VARIANT *pVarResult, DWORD dwType, LPBYT
case REG_EXPAND_SZ:
if (!(dwNewSize = ExpandEnvironmentStringsW(szString, szNewString, dwNewSize)))
- ERR("ExpandEnvironmentStrings returned error %d\n", GetLastError());
+ ERR("ExpandEnvironmentStrings returned error %lu\n", GetLastError());
else if (!(szNewString = msi_alloc(dwNewSize * sizeof(WCHAR))))
ERR("Out of memory\n");
else if (!(dwNewSize = ExpandEnvironmentStringsW(szString, szNewString, dwNewSize)))
- ERR("ExpandEnvironmentStrings returned error %d\n", GetLastError());
+ ERR("ExpandEnvironmentStrings returned error %lu\n", GetLastError());
else
{
V_VT(pVarResult) = VT_BSTR;
@@ -1650,7 +1651,7 @@ static void variant_from_registry_value(VARIANT *pVarResult, DWORD dwType, LPBYT
break;
default:
- FIXME("Unhandled registry value type %d\n", dwType);
+ FIXME("Unhandled registry value type %lu\n", dwType);
}
}
@@ -2455,7 +2456,7 @@ static HRESULT create_database(MSIHANDLE msiHandle, IDispatch **dispatch)
{
AutomationObject *database;
- TRACE("(%d %p)\n", msiHandle, dispatch);
+ TRACE("%lu %p\n", msiHandle, dispatch);
database = msi_alloc(sizeof(AutomationObject));
if (!database) return E_OUTOFMEMORY;
@@ -2471,7 +2472,7 @@ static HRESULT create_view(MSIHANDLE msiHandle, IDispatch **dispatch)
{
AutomationObject *view;
- TRACE("(%d %p)\n", msiHandle, dispatch);
+ TRACE("%lu %p\n", msiHandle, dispatch);
view = msi_alloc(sizeof(AutomationObject));
if (!view) return E_OUTOFMEMORY;
diff --git a/dlls/msi/classes.c b/dlls/msi/classes.c
index 52a91b306f1..b2c94fa0ff5 100644
--- a/dlls/msi/classes.c
+++ b/dlls/msi/classes.c
@@ -911,7 +911,7 @@ UINT ACTION_UnregisterClassInfo( MSIPACKAGE *package )
res = RegDeleteTreeW( hkey, cls->clsid );
if (res != ERROR_SUCCESS)
- WARN("Failed to delete class key %d\n", res);
+ WARN("failed to delete class key %ld\n", res);
if (cls->AppID)
{
@@ -920,7 +920,7 @@ UINT ACTION_UnregisterClassInfo( MSIPACKAGE *package )
{
res = RegDeleteKeyW( hkey2, cls->AppID->AppID );
if (res != ERROR_SUCCESS)
- WARN("Failed to delete appid key %d\n", res);
+ WARN("failed to delete appid key %ld\n", res);
RegCloseKey( hkey2 );
}
}
@@ -935,7 +935,7 @@ UINT ACTION_UnregisterClassInfo( MSIPACKAGE *package )
msi_free( filetype );
if (res != ERROR_SUCCESS)
- WARN("Failed to delete file type %d\n", res);
+ WARN("failed to delete file type %ld\n", res);
}
}
@@ -1111,7 +1111,7 @@ UINT ACTION_UnregisterProgIdInfo( MSIPACKAGE *package )
res = RegDeleteTreeW( HKEY_CLASSES_ROOT, progid->ProgID );
if (res != ERROR_SUCCESS)
- TRACE("Failed to delete progid key %d\n", res);
+ TRACE("failed to delete progid key %ld\n", res);
uirow = MSI_CreateRecord( 1 );
MSI_RecordSetStringW( uirow, 1, progid->ProgID );
@@ -1256,7 +1256,7 @@ UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package)
res = RegCreateKeyW( HKEY_CLASSES_ROOT, extension, &hkey );
msi_free( extension );
if (res != ERROR_SUCCESS)
- WARN("Failed to create extension key %d\n", res);
+ WARN("failed to create extension key %ld\n", res);
}
if (ext->Mime)
@@ -1355,7 +1355,7 @@ UINT ACTION_UnregisterExtensionInfo( MSIPACKAGE *package )
res = RegDeleteTreeW( HKEY_CLASSES_ROOT, extension );
msi_free( extension );
if (res != ERROR_SUCCESS)
- WARN("Failed to delete extension key %d\n", res);
+ WARN("failed to delete extension key %ld\n", res);
}
if (ext->ProgID || ext->ProgIDText)
@@ -1376,7 +1376,7 @@ UINT ACTION_UnregisterExtensionInfo( MSIPACKAGE *package )
res = RegDeleteTreeW( HKEY_CLASSES_ROOT, progid_shell );
msi_free( progid_shell );
if (res != ERROR_SUCCESS)
- WARN("Failed to delete shell key %d\n", res);
+ WARN("failed to delete shell key %ld\n", res);
RegDeleteKeyW( HKEY_CLASSES_ROOT, progid );
}
}
@@ -1482,7 +1482,7 @@ UINT ACTION_UnregisterMIMEInfo( MSIPACKAGE *package )
lstrcatW( mime_key, mime->ContentType );
res = RegDeleteKeyW( HKEY_CLASSES_ROOT, mime_key );
if (res != ERROR_SUCCESS)
- WARN("Failed to delete MIME key %d\n", res);
+ WARN("failed to delete MIME key %ld\n", res);
msi_free( mime_key );
}
diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c
index 2f2eedebc31..8ff3d90fa58 100644
--- a/dlls/msi/custom.c
+++ b/dlls/msi/custom.c
@@ -314,7 +314,7 @@ static UINT custom_get_process_return( HANDLE process )
DWORD rc = 0;
GetExitCodeProcess( process, &rc );
- TRACE("exit code is %u\n", rc);
+ TRACE( "exit code is %lu\n", rc );
if (rc != 0)
return ERROR_FUNCTION_FAILED;
return ERROR_SUCCESS;
@@ -339,7 +339,7 @@ static UINT custom_get_thread_return( MSIPACKAGE *package, HANDLE thread )
ACTION_ForceReboot( package );
return ERROR_SUCCESS;
default:
- ERR("Invalid Return Code %d\n",rc);
+ ERR( "invalid Return Code %lu\n", rc );
return ERROR_INSTALL_FAILURE;
}
}
@@ -506,13 +506,13 @@ UINT CDECL __wine_msi_call_dll_function(DWORD client_pid, const GUID *guid)
status = RpcStringBindingComposeW(NULL, (WCHAR *)L"ncalrpc", NULL, endpoint, NULL, &binding_str);
if (status != RPC_S_OK)
{
- ERR("RpcStringBindingCompose failed: %#x\n", status);
+ ERR("RpcStringBindingCompose failed: %#lx\n", status);
return status;
}
status = RpcBindingFromStringBindingW(binding_str, &rpc_handle);
if (status != RPC_S_OK)
{
- ERR("RpcBindingFromStringBinding failed: %#x\n", status);
+ ERR("RpcBindingFromStringBinding failed: %#lx\n", status);
return status;
}
RpcStringFreeW(&binding_str);
@@ -525,7 +525,7 @@ UINT CDECL __wine_msi_call_dll_function(DWORD client_pid, const GUID *guid)
hPackage = alloc_msi_remote_handle( remote_package );
if (!hPackage)
{
- ERR( "failed to create handle for %x\n", remote_package );
+ ERR( "failed to create handle for %#lx\n", remote_package );
midl_user_free( action );
midl_user_free( dll );
midl_user_free( proc );
@@ -535,7 +535,7 @@ UINT CDECL __wine_msi_call_dll_function(DWORD client_pid, const GUID *guid)
hModule = LoadLibraryW( dll );
if (!hModule)
{
- ERR( "failed to load dll %s (%u)\n", debugstr_w( dll ), GetLastError() );
+ ERR( "failed to load dll %s (%lu)\n", debugstr_w( dll ), GetLastError() );
midl_user_free( action );
midl_user_free( dll );
midl_user_free( proc );
@@ -555,7 +555,7 @@ UINT CDECL __wine_msi_call_dll_function(DWORD client_pid, const GUID *guid)
}
__EXCEPT_PAGE_FAULT
{
- ERR( "Custom action (%s:%s) caused a page fault: %08x\n",
+ ERR( "Custom action (%s:%s) caused a page fault: %#lx\n",
debugstr_w(dll), debugstr_a(proc), GetExceptionCode() );
r = ERROR_SUCCESS;
}
@@ -590,7 +590,7 @@ static DWORD custom_start_server(MSIPACKAGE *package, DWORD arch)
pipe = CreateNamedPipeW(buffer, PIPE_ACCESS_DUPLEX, 0, 1, sizeof(DWORD64),
sizeof(GUID), 0, NULL);
if (pipe == INVALID_HANDLE_VALUE)
- ERR("Failed to create custom action client pipe: %u\n", GetLastError());
+ ERR("failed to create custom action client pipe: %lu\n", GetLastError());
if ((sizeof(void *) == 8 || is_wow64) && arch == SCS_32BIT_BINARY)
GetSystemWow64DirectoryW(path, MAX_PATH - ARRAY_SIZE(L"\\msiexec.exe"));
@@ -623,7 +623,7 @@ static DWORD custom_start_server(MSIPACKAGE *package, DWORD arch)
if (!ConnectNamedPipe(pipe, NULL))
{
- ERR("Failed to connect to custom action server: %u\n", GetLastError());
+ ERR("failed to connect to custom action server: %lu\n", GetLastError());
return GetLastError();
}
@@ -668,13 +668,13 @@ static DWORD WINAPI custom_client_thread(void *arg)
if (!WriteFile(pipe, &info->guid, sizeof(info->guid), &size, NULL) ||
size != sizeof(info->guid))
{
- ERR("Failed to write to custom action client pipe: %u\n", GetLastError());
+ ERR("failed to write to custom action client pipe: %lu\n", GetLastError());
LeaveCriticalSection(&msi_custom_action_cs);
return GetLastError();
}
if (!ReadFile(pipe, &thread64, sizeof(thread64), &size, NULL) || size != sizeof(thread64))
{
- ERR("Failed to read from custom action client pipe: %u\n", GetLastError());
+ ERR("failed to read from custom action client pipe: %lu\n", GetLastError());
LeaveCriticalSection(&msi_custom_action_cs);
return GetLastError();
}
@@ -772,7 +772,7 @@ static msi_custom_action_info *do_msidbCustomActionTypeDll(
endpoint, NULL);
if (status != RPC_S_OK)
{
- ERR("RpcServerUseProtseqEp failed: %#x\n", status);
+ ERR("RpcServerUseProtseqEp failed: %#lx\n", status);
return NULL;
}
@@ -780,7 +780,7 @@ static msi_custom_action_info *do_msidbCustomActionTypeDll(
RPC_IF_AUTOLISTEN, RPC_C_LISTEN_MAX_CALLS_DEFAULT, NULL);
if (status != RPC_S_OK)
{
- ERR("RpcServerRegisterIfEx failed: %#x\n", status);
+ ERR("RpcServerRegisterIfEx failed: %#lx\n", status);
return NULL;
}
@@ -848,7 +848,7 @@ static HANDLE execute_command( const WCHAR *app, WCHAR *arg, const WCHAR *dir )
}
if (!len_exe)
{
- ERR("can't find executable %u\n", GetLastError());
+ ERR("can't find executable %lu\n", GetLastError());
msi_free( exe );
return INVALID_HANDLE_VALUE;
}
@@ -886,7 +886,7 @@ static HANDLE execute_command( const WCHAR *app, WCHAR *arg, const WCHAR *dir )
msi_free( exe );
if (!ret)
{
- ERR("unable to execute command %u\n", GetLastError());
+ ERR("unable to execute command %lu\n", GetLastError());
return INVALID_HANDLE_VALUE;
}
CloseHandle( info.hThread );
@@ -1041,27 +1041,27 @@ static UINT write_substorage_to_file( MSIPACKAGE *package, const WCHAR *source,
hr = StgCreateDocfile( filename, STGM_CREATE|STGM_TRANSACTED|STGM_WRITE|STGM_SHARE_EXCLUSIVE, 0, &dst );
if (FAILED( hr ))
{
- WARN( "can't open destination storage %s (%08x)\n", debugstr_w(filename), hr );
+ WARN( "can't open destination storage %s (%#lx)\n", debugstr_w(filename), hr );
goto done;
}
hr = IStorage_OpenStorage( package->db->storage, source, NULL, STGM_SHARE_EXCLUSIVE, NULL, 0, &src );
if (FAILED( hr ))
{
- WARN( "can't open source storage %s (%08x)\n", debugstr_w(source), hr );
+ WARN( "can't open source storage %s (%#lx)\n", debugstr_w(source), hr );
goto done;
}
hr = IStorage_CopyTo( src, 0, NULL, NULL, dst );
if (FAILED( hr ))
{
- ERR( "failed to copy storage %s (%08x)\n", debugstr_w(source), hr );
+ ERR( "failed to copy storage %s (%#lx)\n", debugstr_w(source), hr );
goto done;
}
hr = IStorage_Commit( dst, 0 );
if (FAILED( hr ))
- ERR( "failed to commit storage (%08x)\n", hr );
+ ERR( "failed to commit storage (%#lx)\n", hr );
else
r = ERROR_SUCCESS;
@@ -1179,11 +1179,11 @@ static DWORD WINAPI ScriptThread( LPVOID arg )
LPGUID guid = arg;
DWORD rc;
- TRACE("custom action (%x) started\n", GetCurrentThreadId() );
+ TRACE("custom action (%#lx) started\n", GetCurrentThreadId() );
rc = ACTION_CallScript( guid );
- TRACE("custom action (%x) returned %i\n", GetCurrentThreadId(), rc );
+ TRACE("custom action (%#lx) returned %lu\n", GetCurrentThreadId(), rc );
MsiCloseAllHandles();
return rc;
diff --git a/dlls/msi/database.c b/dlls/msi/database.c
index dd5a6977460..f7305e661ef 100644
--- a/dlls/msi/database.c
+++ b/dlls/msi/database.c
@@ -108,7 +108,7 @@ static HRESULT db_initialize( IStorage *stg, const GUID *clsid )
hr = IStorage_SetClass( stg, clsid );
if (FAILED( hr ))
{
- WARN("failed to set class id 0x%08x\n", hr);
+ WARN("failed to set class id %#lx\n", hr);
return hr;
}
@@ -116,21 +116,21 @@ static HRESULT db_initialize( IStorage *stg, const GUID *clsid )
hr = write_stream_data( stg, L"_Tables", NULL, 0, TRUE );
if (FAILED( hr ))
{
- WARN("failed to create _Tables stream 0x%08x\n", hr);
+ WARN("failed to create _Tables stream %#lx\n", hr);
return hr;
}
hr = msi_init_string_table( stg );
if (FAILED( hr ))
{
- WARN("failed to initialize string table 0x%08x\n", hr);
+ WARN("failed to initialize string table %#lx\n", hr);
return hr;
}
hr = IStorage_Commit( stg, 0 );
if (FAILED( hr ))
{
- WARN("failed to commit changes 0x%08x\n", hr);
+ WARN("failed to commit changes %#lx\n", hr);
return hr;
}
@@ -217,7 +217,7 @@ UINT MSI_OpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIDATABASE **pdb)
if( FAILED( r ) || !stg )
{
- WARN("open failed r = %08x for %s\n", r, debugstr_w(szDBPath));
+ WARN("open failed r = %#lx for %s\n", r, debugstr_w(szDBPath));
return ERROR_FUNCTION_FAILED;
}
@@ -513,7 +513,7 @@ static LPWSTR msi_build_createsql_columns(LPWSTR *columns_data, LPWSTR *types, D
type = L"LONG";
else
{
- WARN("invalid int width %u\n", len);
+ WARN("invalid int width %lu\n", len);
msi_free(columns);
return NULL;
}
@@ -835,12 +835,12 @@ done:
return r;
}
-UINT WINAPI MsiDatabaseImportW(MSIHANDLE handle, LPCWSTR szFolder, LPCWSTR szFilename)
+UINT WINAPI MsiDatabaseImportW( MSIHANDLE handle, const WCHAR *szFolder, const WCHAR *szFilename )
{
MSIDATABASE *db;
UINT r;
- TRACE("%x %s %s\n",handle,debugstr_w(szFolder), debugstr_w(szFilename));
+ TRACE( "%lu %s %s\n", handle, debugstr_w(szFolder), debugstr_w(szFilename) );
if (!(db = msihandle2msiinfo(handle, MSIHANDLETYPE_DATABASE)))
return ERROR_INVALID_HANDLE;
@@ -850,13 +850,12 @@ UINT WINAPI MsiDatabaseImportW(MSIHANDLE handle, LPCWSTR szFolder, LPCWSTR szFil
return r;
}
-UINT WINAPI MsiDatabaseImportA( MSIHANDLE handle,
- LPCSTR szFolder, LPCSTR szFilename )
+UINT WINAPI MsiDatabaseImportA( MSIHANDLE handle, const char *szFolder, const char *szFilename )
{
- LPWSTR path = NULL, file = NULL;
+ WCHAR *path = NULL, *file = NULL;
UINT r = ERROR_OUTOFMEMORY;
- TRACE("%x %s %s\n", handle, debugstr_a(szFolder), debugstr_a(szFilename));
+ TRACE( "%lu %s %s\n", handle, debugstr_a(szFolder), debugstr_a(szFilename) );
if( szFolder )
{
@@ -1141,14 +1140,12 @@ done:
*
* row4 : data <tab> data <tab> data <tab> ... data <cr> <lf>
*/
-UINT WINAPI MsiDatabaseExportW( MSIHANDLE handle, LPCWSTR szTable,
- LPCWSTR szFolder, LPCWSTR szFilename )
+UINT WINAPI MsiDatabaseExportW( MSIHANDLE handle, const WCHAR *szTable, const WCHAR *szFolder, const WCHAR *szFilename )
{
MSIDATABASE *db;
UINT r;
- TRACE("%x %s %s %s\n", handle, debugstr_w(szTable),
- debugstr_w(szFolder), debugstr_w(szFilename));
+ TRACE( "%lu %s %s %s\n", handle, debugstr_w(szTable), debugstr_w(szFolder), debugstr_w(szFilename) );
if (!(db = msihandle2msiinfo(handle, MSIHANDLETYPE_DATABASE)))
return ERROR_INVALID_HANDLE;
@@ -1158,14 +1155,12 @@ UINT WINAPI MsiDatabaseExportW( MSIHANDLE handle, LPCWSTR szTable,
return r;
}
-UINT WINAPI MsiDatabaseExportA( MSIHANDLE handle, LPCSTR szTable,
- LPCSTR szFolder, LPCSTR szFilename )
+UINT WINAPI MsiDatabaseExportA( MSIHANDLE handle, const char *szTable, const char *szFolder, const char *szFilename )
{
- LPWSTR path = NULL, file = NULL, table = NULL;
+ WCHAR *path = NULL, *file = NULL, *table = NULL;
UINT r = ERROR_OUTOFMEMORY;
- TRACE("%x %s %s %s\n", handle, debugstr_a(szTable),
- debugstr_a(szFolder), debugstr_a(szFilename));
+ TRACE( "%lu %s %s %s\n", handle, debugstr_a(szTable), debugstr_a(szFolder), debugstr_a(szFilename) );
if( szTable )
{
@@ -1198,14 +1193,12 @@ end:
return r;
}
-UINT WINAPI MsiDatabaseMergeA(MSIHANDLE hDatabase, MSIHANDLE hDatabaseMerge,
- LPCSTR szTableName)
+UINT WINAPI MsiDatabaseMergeA( MSIHANDLE hDatabase, MSIHANDLE hDatabaseMerge, const char *szTableName )
{
UINT r;
- LPWSTR table;
+ WCHAR *table;
- TRACE("(%d, %d, %s)\n", hDatabase, hDatabaseMerge,
- debugstr_a(szTableName));
+ TRACE("%lu, %lu, %s\n", hDatabase, hDatabaseMerge, debugstr_a(szTableName) );
table = strdupAtoW(szTableName);
r = MsiDatabaseMergeW(hDatabase, hDatabaseMerge, table);
@@ -1839,7 +1832,7 @@ static UINT update_merge_errors(MSIDATABASE *db, LPCWSTR error,
return r;
}
-UINT WINAPI MsiDatabaseMergeW(MSIHANDLE hDatabase, MSIHANDLE hDatabaseMerge, LPCWSTR szTableName)
+UINT WINAPI MsiDatabaseMergeW( MSIHANDLE hDatabase, MSIHANDLE hDatabaseMerge, const WCHAR *szTableName )
{
struct list tabledata = LIST_INIT(tabledata);
struct list *item, *cursor;
@@ -1848,7 +1841,7 @@ UINT WINAPI MsiDatabaseMergeW(MSIHANDLE hDatabase, MSIHANDLE hDatabaseMerge, LPC
BOOL conflicts;
UINT r;
- TRACE("(%d, %d, %s)\n", hDatabase, hDatabaseMerge, debugstr_w(szTableName));
+ TRACE( "%lu, %lu, %s\n", hDatabase, hDatabaseMerge, debugstr_w(szTableName) );
if (szTableName && !*szTableName)
return ERROR_INVALID_TABLE;
@@ -1906,7 +1899,7 @@ MSIDBSTATE WINAPI MsiGetDatabaseState( MSIHANDLE handle )
MSIDBSTATE ret = MSIDBSTATE_READ;
MSIDATABASE *db;
- TRACE("%d\n", handle);
+ TRACE( "%lu\n", handle );
if (!(db = msihandle2msiinfo( handle, MSIHANDLETYPE_DATABASE )))
return MSIDBSTATE_ERROR;
diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c
index 6463c3062ac..9d82be8c2bd 100644
--- a/dlls/msi/dialog.c
+++ b/dlls/msi/dialog.c
@@ -590,7 +590,7 @@ static void dialog_handle_event( msi_dialog *dialog, const WCHAR *control,
val1 = MSI_RecordGetInteger( rec, 2 );
val2 = MSI_RecordGetInteger( rec, 3 );
- TRACE("progress: func %u val1 %u val2 %u\n", func, val1, val2);
+ TRACE( "progress: func %lu val1 %lu val2 %lu\n", func, val1, val2 );
units = val1 / 512;
switch (func)
@@ -633,7 +633,7 @@ static void dialog_handle_event( msi_dialog *dialog, const WCHAR *control,
ctrl->progress_max += units;
break;
default:
- FIXME("Unknown progress message %u\n", func);
+ FIXME( "unknown progress message %lu\n", func );
break;
}
}
@@ -730,8 +730,7 @@ static msi_control *msi_dialog_add_control( msi_dialog *dialog,
attributes = MSI_RecordGetInteger( rec, 8 );
if (wcscmp( control_type, L"ScrollableText" )) text = MSI_RecordGetString( rec, 10 );
- TRACE("%s, %s, %08x, %s, %08x\n", debugstr_w(szCls), debugstr_w(name),
- attributes, debugstr_w(text), style);
+ TRACE( "%s, %s, %#lx, %s, %#lx\n", debugstr_w(szCls), debugstr_w(name), attributes, debugstr_w(text), style );
if( attributes & msidbControlAttributesVisible )
style |= WS_VISIBLE;
@@ -773,7 +772,7 @@ MSIText_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
struct msi_text_info *info;
LRESULT r = 0;
- TRACE("%p %04x %08lx %08lx\n", hWnd, msg, wParam, lParam);
+ TRACE( "%p %04x %#Ix %#Ix\n", hWnd, msg, wParam, lParam );
info = GetPropW(hWnd, L"MSIDATA");
@@ -1247,7 +1246,7 @@ MSIScrollText_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
struct msi_scrolltext_info *info;
HRESULT r;
- TRACE("%p %04x %08lx %08lx\n", hWnd, msg, wParam, lParam);
+ TRACE( "%p %04x %#Ix %#Ix\n", hWnd, msg, wParam, lParam );
info = GetPropW( hWnd, L"MSIDATA" );
@@ -1287,7 +1286,7 @@ msi_richedit_stream_in( DWORD_PTR arg, LPBYTE buffer, LONG count, LONG *pcb )
*pcb = count;
info->offset += count;
- TRACE("%d/%d\n", info->offset, info->length);
+ TRACE( "%lu/%lu\n", info->offset, info->length );
return 0;
}
@@ -1428,7 +1427,7 @@ static LRESULT WINAPI MSIComboBox_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LP
LRESULT r;
DWORD j;
- TRACE("%p %04x %08lx %08lx\n", hWnd, msg, wParam, lParam);
+ TRACE( "%p %04x %#Ix %#Ix\n", hWnd, msg, wParam, lParam );
info = GetPropW( hWnd, L"MSIDATA" );
if (!info)
@@ -1828,7 +1827,7 @@ MSIMaskedEdit_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
struct msi_maskedit_info *info;
HRESULT r;
- TRACE("%p %04x %08lx %08lx\n", hWnd, msg, wParam, lParam);
+ TRACE("%p %04x %#Ix %#Ix\n", hWnd, msg, wParam, lParam);
info = GetPropW(hWnd, L"MSIDATA");
@@ -2163,7 +2162,7 @@ static LRESULT WINAPI MSIPathEdit_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LP
struct msi_pathedit_info *info = GetPropW(hWnd, L"MSIDATA");
LRESULT r = 0;
- TRACE("%p %04x %08lx %08lx\n", hWnd, msg, wParam, lParam);
+ TRACE("%p %04x %#Ix %#Ix\n", hWnd, msg, wParam, lParam);
if ( msg == WM_KILLFOCUS )
{
@@ -2262,7 +2261,7 @@ static LRESULT WINAPI MSIRadioGroup_WndProc( HWND hWnd, UINT msg, WPARAM wParam,
WNDPROC oldproc = (WNDPROC)GetPropW( hWnd, L"MSIDATA" );
LRESULT r;
- TRACE("hWnd %p msg %04x wParam 0x%08lx lParam 0x%08lx\n", hWnd, msg, wParam, lParam);
+ TRACE( "hWnd %p msg %04x wParam %#Ix lParam %#Ix\n", hWnd, msg, wParam, lParam );
if (msg == WM_COMMAND) /* Forward notifications to dialog */
SendMessageW( GetParent( hWnd ), msg, wParam, lParam );
@@ -2463,7 +2462,7 @@ MSISelectionTree_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
TVHITTESTINFO tvhti;
HRESULT r;
- TRACE("%p %04x %08lx %08lx\n", hWnd, msg, wParam, lParam);
+ TRACE("%p %04x %#Ix %#Ix\n", hWnd, msg, wParam, lParam);
info = GetPropW(hWnd, L"MSIDATA");
@@ -2714,7 +2713,7 @@ static LRESULT WINAPI MSIListBox_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPA
LRESULT r;
DWORD j;
- TRACE("%p %04x %08lx %08lx\n", hWnd, msg, wParam, lParam);
+ TRACE("%p %04x %#Ix %#Ix\n", hWnd, msg, wParam, lParam);
info = GetPropW( hWnd, L"MSIDATA" );
if (!info)
@@ -3792,7 +3791,7 @@ static LRESULT msi_dialog_oncommand( msi_dialog *dialog, WPARAM param, HWND hwnd
{
msi_control *control = NULL;
- TRACE("%p %p %08lx\n", dialog, hwnd, param);
+ TRACE( "%p, %#Ix, %p\n", dialog, param, hwnd );
switch (param)
{
@@ -4214,7 +4213,7 @@ UINT WINAPI MsiEnableUIPreview( MSIHANDLE hdb, MSIHANDLE *phPreview )
MSIPREVIEW *preview;
UINT r = ERROR_FUNCTION_FAILED;
- TRACE("%d %p\n", hdb, phPreview);
+ TRACE( "%lu %p\n", hdb, phPreview );
if (!(db = msihandle2msiinfo(hdb, MSIHANDLETYPE_DATABASE)))
return ERROR_INVALID_HANDLE;
@@ -4264,7 +4263,7 @@ UINT WINAPI MsiPreviewDialogW( MSIHANDLE hPreview, LPCWSTR szDialogName )
MSIPREVIEW *preview;
UINT r;
- TRACE("%d %s\n", hPreview, debugstr_w(szDialogName));
+ TRACE( "%lu %s\n", hPreview, debugstr_w(szDialogName) );
preview = msihandle2msiinfo( hPreview, MSIHANDLETYPE_PREVIEW );
if (!preview)
@@ -4280,7 +4279,7 @@ UINT WINAPI MsiPreviewDialogA( MSIHANDLE hPreview, LPCSTR szDialogName )
UINT r;
LPWSTR strW = NULL;
- TRACE("%d %s\n", hPreview, debugstr_a(szDialogName));
+ TRACE( "%lu %s\n", hPreview, debugstr_a(szDialogName) );
if (szDialogName)
{
@@ -4293,15 +4292,15 @@ UINT WINAPI MsiPreviewDialogA( MSIHANDLE hPreview, LPCSTR szDialogName )
return r;
}
-UINT WINAPI MsiPreviewBillboardW( MSIHANDLE hPreview, LPCWSTR szControlName, LPCWSTR szBillboard )
+UINT WINAPI MsiPreviewBillboardW( MSIHANDLE hPreview, const WCHAR *szControlName, const WCHAR *szBillboard )
{
- FIXME("%d %s %s\n", hPreview, debugstr_w(szControlName), debugstr_w(szBillboard));
+ FIXME( "%lu %s %s\n", hPreview, debugstr_w(szControlName), debugstr_w(szBillboard) );
return ERROR_CALL_NOT_IMPLEMENTED;
}
-UINT WINAPI MsiPreviewBillboardA( MSIHANDLE hPreview, LPCSTR szControlName, LPCSTR szBillboard )
+UINT WINAPI MsiPreviewBillboardA( MSIHANDLE hPreview, const char *szControlName, const char *szBillboard )
{
- FIXME("%d %s %s\n", hPreview, debugstr_a(szControlName), debugstr_a(szBillboard));
+ FIXME( "%lu %s %s\n", hPreview, debugstr_a(szControlName), debugstr_a(szBillboard) );
return ERROR_CALL_NOT_IMPLEMENTED;
}
diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index 8cb876b2468..1b8e4fd7d90 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -355,7 +355,7 @@ static msi_file_state calculate_install_state( MSIPACKAGE *package, MSIFILE *fil
}
if ((size = msi_get_disk_file_size( package, file->TargetPath )) != file->FileSize)
{
- TRACE("overwriting %s (old size %u new size %u)\n", debugstr_w(file->File), size, file->FileSize);
+ TRACE("overwriting %s (old size %lu new size %d)\n", debugstr_w(file->File), size, file->FileSize);
return msifs_overwrite;
}
if (file->hash.dwFileHashInfoSize)
@@ -722,7 +722,7 @@ static UINT patch_file( MSIPACKAGE *package, MSIFILEPATCH *patch )
}
else
{
- WARN("failed to patch %s: %08x\n", debugstr_w(patch->File->TargetPath), GetLastError());
+ WARN( "failed to patch %s: %#lx\n", debugstr_w(patch->File->TargetPath), GetLastError() );
r = ERROR_INSTALL_FAILURE;
}
DeleteFileW( patch->path );
@@ -761,8 +761,8 @@ static UINT patch_assembly( MSIPACKAGE *package, MSIASSEMBLY *assembly, MSIFILEP
{
if (!msi_copy_file( package, path, patch->File->TargetPath, FALSE ))
{
- ERR("Failed to copy file %s -> %s (%u)\n", debugstr_w(path),
- debugstr_w(patch->File->TargetPath), GetLastError() );
+ ERR( "failed to copy file %s -> %s (%lu)\n", debugstr_w(path),
+ debugstr_w(patch->File->TargetPath), GetLastError() );
msi_free( path );
msi_free( displayname );
IAssemblyName_Release( name );
@@ -898,7 +898,7 @@ static BOOL move_file( MSIPACKAGE *package, const WCHAR *source, const WCHAR *de
ret = msi_move_file( package, source, dest, MOVEFILE_REPLACE_EXISTING );
if (!ret)
{
- WARN("msi_move_file failed: %u\n", GetLastError());
+ WARN( "msi_move_file failed: %lu\n", GetLastError() );
return FALSE;
}
}
@@ -908,7 +908,7 @@ static BOOL move_file( MSIPACKAGE *package, const WCHAR *source, const WCHAR *de
ret = msi_copy_file( package, source, dest, FALSE );
if (!ret)
{
- WARN("msi_copy_file failed: %u\n", GetLastError());
+ WARN( "msi_copy_file failed: %lu\n", GetLastError() );
return FALSE;
}
}
@@ -1176,7 +1176,7 @@ static UINT ITERATE_MoveFiles( MSIRECORD *rec, LPVOID param )
{
if (!msi_create_full_path( package, destdir ))
{
- WARN("failed to create directory %u\n", GetLastError());
+ WARN( "failed to create directory %lu\n", GetLastError() );
goto done;
}
}
@@ -1317,8 +1317,8 @@ static UINT ITERATE_DuplicateFiles(MSIRECORD *row, LPVOID param)
TRACE("Duplicating file %s to %s\n", debugstr_w(file->TargetPath), debugstr_w(dest));
if (!msi_copy_file( package, file->TargetPath, dest, TRUE ))
{
- WARN("Failed to copy file %s -> %s (%u)\n",
- debugstr_w(file->TargetPath), debugstr_w(dest), GetLastError());
+ WARN( "failed to copy file %s -> %s (%lu)\n",
+ debugstr_w(file->TargetPath), debugstr_w(dest), GetLastError() );
}
FIXME("We should track these duplicate files as well\n");
@@ -1395,7 +1395,7 @@ static UINT ITERATE_RemoveDuplicateFiles( MSIRECORD *row, LPVOID param )
TRACE("Removing duplicate %s of %s\n", debugstr_w(dest), debugstr_w(file->TargetPath));
if (!msi_delete_file( package, dest ))
{
- WARN("Failed to delete duplicate file %s (%u)\n", debugstr_w(dest), GetLastError());
+ WARN( "failed to delete duplicate file %s (%lu)\n", debugstr_w(dest), GetLastError() );
}
uirow = MSI_CreateRecord( 9 );
@@ -1606,7 +1606,7 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
msi_set_file_attributes( package, file->TargetPath, FILE_ATTRIBUTE_NORMAL );
if (!msi_delete_file( package, file->TargetPath ))
{
- WARN("failed to delete %s (%u)\n", debugstr_w(file->TargetPath), GetLastError());
+ WARN( "failed to delete %s (%lu)\n", debugstr_w(file->TargetPath), GetLastError() );
}
file->state = msifs_missing;
diff --git a/dlls/msi/format.c b/dlls/msi/format.c
index 9e97c23aaad..fdfffabc22f 100644
--- a/dlls/msi/format.c
+++ b/dlls/msi/format.c
@@ -897,14 +897,13 @@ end:
return rc;
}
-UINT WINAPI MsiFormatRecordW( MSIHANDLE hInstall, MSIHANDLE hRecord,
- LPWSTR szResult, LPDWORD sz )
+UINT WINAPI MsiFormatRecordW( MSIHANDLE hInstall, MSIHANDLE hRecord, WCHAR *szResult, DWORD *sz )
{
UINT r = ERROR_INVALID_HANDLE;
MSIPACKAGE *package;
MSIRECORD *record;
- TRACE("%d %d %p %p\n", hInstall, hRecord, szResult, sz);
+ TRACE( "%lu, %lu, %p, %p\n", hInstall, hRecord, szResult, sz );
record = msihandle2msiinfo(hRecord, MSIHANDLETYPE_RECORD);
if (!record)
@@ -961,7 +960,7 @@ UINT WINAPI MsiFormatRecordA(MSIHANDLE hinst, MSIHANDLE hrec, char *buf, DWORD *
DWORD len;
UINT r;
- TRACE("%d %d %p %p\n", hinst, hrec, buf, sz);
+ TRACE( "%lu, %lu, %p, %p\n", hinst, hrec, buf, sz );
rec = msihandle2msiinfo(hrec, MSIHANDLETYPE_RECORD);
if (!rec)
diff --git a/dlls/msi/handle.c b/dlls/msi/handle.c
index 26d8e7d7f85..7be64da9bfe 100644
--- a/dlls/msi/handle.c
+++ b/dlls/msi/handle.c
@@ -127,7 +127,7 @@ MSIHANDLE alloc_msihandle( MSIOBJECTHDR *obj )
LeaveCriticalSection( &MSI_handle_cs );
- TRACE("%p -> %d\n", obj, ret );
+ TRACE( "%p -> %lu\n", obj, ret );
return ret;
}
@@ -150,7 +150,7 @@ MSIHANDLE alloc_msi_remote_handle(MSIHANDLE remote)
LeaveCriticalSection( &MSI_handle_cs );
- TRACE("%d -> %d\n", remote, ret);
+ TRACE( "%lu -> %lu\n", remote, ret );
return ret;
}
@@ -271,7 +271,7 @@ UINT WINAPI MsiCloseHandle(MSIHANDLE handle)
MSIOBJECTHDR *info = NULL;
UINT ret = ERROR_INVALID_HANDLE;
- TRACE("%x\n",handle);
+ TRACE( "%lu\n", handle );
if (!handle)
return ERROR_SUCCESS;
@@ -305,7 +305,7 @@ UINT WINAPI MsiCloseHandle(MSIHANDLE handle)
ret = ERROR_SUCCESS;
- TRACE("handle %x destroyed\n", handle+1);
+ TRACE( "handle %lu destroyed\n", handle + 1 );
out:
LeaveCriticalSection( &MSI_handle_cs );
if( info )
diff --git a/dlls/msi/insert.c b/dlls/msi/insert.c
index 098287d6039..3021fc88de8 100644
--- a/dlls/msi/insert.c
+++ b/dlls/msi/insert.c
@@ -79,7 +79,7 @@ MSIRECORD *msi_query_merge_record( UINT fields, const column_info *vl, MSIRECORD
switch( vl->val->type )
{
case EXPR_SVAL:
- TRACE("field %d -> %s\n", i, debugstr_w(vl->val->u.sval));
+ TRACE( "field %lu -> %s\n", i, debugstr_w(vl->val->u.sval) );
MSI_RecordSetStringW( merged, i, vl->val->u.sval );
break;
case EXPR_IVAL:
diff --git a/dlls/msi/install.c b/dlls/msi/install.c
index 4d909b67682..bf60406f8ef 100644
--- a/dlls/msi/install.c
+++ b/dlls/msi/install.c
@@ -672,7 +672,7 @@ BOOL WINAPI MsiGetMode(MSIHANDLE hInstall, MSIRUNMODE iRunMode)
MSIPACKAGE *package;
BOOL r = FALSE;
- TRACE("%d %d\n", hInstall, iRunMode);
+ TRACE( "%lu, %d\n", hInstall, iRunMode );
package = msihandle2msiinfo(hInstall, MSIHANDLETYPE_PACKAGE);
if (!package)
@@ -765,7 +765,7 @@ UINT WINAPI MsiSetMode(MSIHANDLE hInstall, MSIRUNMODE iRunMode, BOOL fState)
MSIPACKAGE *package;
UINT r;
- TRACE("%d %d %d\n", hInstall, iRunMode, fState);
+ TRACE( "%lu, %d, %d\n", hInstall, iRunMode, fState );
package = msihandle2msiinfo( hInstall, MSIHANDLETYPE_PACKAGE );
if (!package)
@@ -990,7 +990,7 @@ UINT WINAPI MsiSetFeatureAttributesA( MSIHANDLE handle, LPCSTR feature, DWORD at
UINT r;
WCHAR *featureW = NULL;
- TRACE("%u, %s, 0x%08x\n", handle, debugstr_a(feature), attrs);
+ TRACE( "%lu, %s, %#lx\n", handle, debugstr_a(feature), attrs );
if (feature && !(featureW = strdupAtoW( feature ))) return ERROR_OUTOFMEMORY;
@@ -1021,7 +1021,7 @@ UINT WINAPI MsiSetFeatureAttributesW( MSIHANDLE handle, LPCWSTR name, DWORD attr
MSIFEATURE *feature;
WCHAR *costing;
- TRACE("%u, %s, 0x%08x\n", handle, debugstr_w(name), attrs);
+ TRACE( "%lu, %s, %#lx\n", handle, debugstr_w(name), attrs );
if (!name || !name[0]) return ERROR_UNKNOWN_FEATURE;
@@ -1085,13 +1085,13 @@ UINT MSI_GetFeatureStateW(MSIPACKAGE *package, LPCWSTR szFeature,
/***********************************************************************
* MsiGetFeatureStateW (MSI.@)
*/
-UINT WINAPI MsiGetFeatureStateW(MSIHANDLE hInstall, LPCWSTR szFeature,
- INSTALLSTATE *piInstalled, INSTALLSTATE *piAction)
+UINT WINAPI MsiGetFeatureStateW( MSIHANDLE hInstall, const WCHAR *szFeature, INSTALLSTATE *piInstalled,
+ INSTALLSTATE *piAction )
{
MSIPACKAGE* package;
UINT ret;
- TRACE("%d %s %p %p\n", hInstall, debugstr_w(szFeature), piInstalled, piAction);
+ TRACE( "%lu, %s, %p, %p\n", hInstall, debugstr_w(szFeature), piInstalled, piAction );
if (!szFeature)
return ERROR_UNKNOWN_FEATURE;
@@ -1204,15 +1204,14 @@ UINT MSI_GetFeatureCost( MSIPACKAGE *package, MSIFEATURE *feature, MSICOSTTREE t
/***********************************************************************
* MsiGetFeatureCostW (MSI.@)
*/
-UINT WINAPI MsiGetFeatureCostW(MSIHANDLE hInstall, LPCWSTR szFeature,
- MSICOSTTREE iCostTree, INSTALLSTATE iState, LPINT piCost)
+UINT WINAPI MsiGetFeatureCostW( MSIHANDLE hInstall, const WCHAR *szFeature, MSICOSTTREE iCostTree,
+ INSTALLSTATE iState, INT *piCost )
{
MSIPACKAGE *package;
MSIFEATURE *feature;
UINT ret;
- TRACE("(%d %s %i %i %p)\n", hInstall, debugstr_w(szFeature),
- iCostTree, iState, piCost);
+ TRACE( "%lu, %s, %d, %d, %p\n", hInstall, debugstr_w(szFeature), iCostTree, iState, piCost );
if (!szFeature)
return ERROR_INVALID_PARAMETER;
@@ -1258,14 +1257,14 @@ UINT WINAPI MsiGetFeatureCostW(MSIHANDLE hInstall, LPCWSTR szFeature,
/***********************************************************************
* MsiGetFeatureInfoA (MSI.@)
*/
-UINT WINAPI MsiGetFeatureInfoA( MSIHANDLE handle, LPCSTR feature, LPDWORD attrs,
- LPSTR title, LPDWORD title_len, LPSTR help, LPDWORD help_len )
+UINT WINAPI MsiGetFeatureInfoA( MSIHANDLE handle, const char *feature, DWORD *attrs,
+ char *title, DWORD *title_len, char *help, DWORD *help_len )
{
UINT r;
WCHAR *titleW = NULL, *helpW = NULL, *featureW = NULL;
- TRACE("%u, %s, %p, %p, %p, %p, %p\n", handle, debugstr_a(feature), attrs, title,
- title_len, help, help_len);
+ TRACE( "%lu, %s, %p, %p, %p, %p, %p\n", handle, debugstr_a(feature), attrs, title,
+ title_len, help, help_len );
if (feature && !(featureW = strdupAtoW( feature ))) return ERROR_OUTOFMEMORY;
@@ -1352,14 +1351,14 @@ static UINT MSI_GetFeatureInfo( MSIPACKAGE *package, LPCWSTR name, LPDWORD attrs
/***********************************************************************
* MsiGetFeatureInfoW (MSI.@)
*/
-UINT WINAPI MsiGetFeatureInfoW( MSIHANDLE handle, LPCWSTR feature, LPDWORD attrs,
- LPWSTR title, LPDWORD title_len, LPWSTR help, LPDWORD help_len )
+UINT WINAPI MsiGetFeatureInfoW( MSIHANDLE handle, const WCHAR *feature, DWORD *attrs,
+ WCHAR *title, DWORD *title_len, WCHAR *help, DWORD *help_len )
{
UINT r;
MSIPACKAGE *package;
- TRACE("%u, %s, %p, %p, %p, %p, %p\n", handle, debugstr_w(feature), attrs, title,
- title_len, help, help_len);
+ TRACE( "%lu, %s, %p, %p, %p, %p, %p\n", handle, debugstr_w(feature), attrs, title,
+ title_len, help, help_len );
if (!feature) return ERROR_INVALID_PARAMETER;
@@ -1499,14 +1498,13 @@ UINT WINAPI MsiSetComponentStateW(MSIHANDLE hInstall, LPCWSTR szComponent,
/***********************************************************************
* MsiGetComponentStateW (MSI.@)
*/
-UINT WINAPI MsiGetComponentStateW(MSIHANDLE hInstall, LPCWSTR szComponent,
- INSTALLSTATE *piInstalled, INSTALLSTATE *piAction)
+UINT WINAPI MsiGetComponentStateW( MSIHANDLE hInstall, const WCHAR *szComponent, INSTALLSTATE *piInstalled,
+ INSTALLSTATE *piAction )
{
MSIPACKAGE* package;
UINT ret;
- TRACE("%d %s %p %p\n", hInstall, debugstr_w(szComponent),
- piInstalled, piAction);
+ TRACE( "%lu, %s, %p, %p\n", hInstall, debugstr_w(szComponent), piInstalled, piAction );
if (!szComponent)
return ERROR_UNKNOWN_COMPONENT;
@@ -1601,7 +1599,7 @@ UINT WINAPI MsiSetInstallLevel(MSIHANDLE hInstall, int iInstallLevel)
MSIPACKAGE* package;
UINT r;
- TRACE("%d %i\n", hInstall, iInstallLevel);
+ TRACE( "%lu %d\n", hInstall, iInstallLevel );
package = msihandle2msiinfo(hInstall, MSIHANDLETYPE_PACKAGE);
if (!package)
@@ -1634,28 +1632,22 @@ UINT WINAPI MsiSetInstallLevel(MSIHANDLE hInstall, int iInstallLevel)
/***********************************************************************
* MsiGetFeatureValidStatesW (MSI.@)
*/
-UINT WINAPI MsiGetFeatureValidStatesW(MSIHANDLE hInstall, LPCWSTR szFeature,
- LPDWORD pInstallState)
+UINT WINAPI MsiGetFeatureValidStatesW( MSIHANDLE hInstall, const WCHAR *szFeature, DWORD *pInstallState )
{
- if(pInstallState) *pInstallState = 1<<INSTALLSTATE_LOCAL;
- FIXME("%d %s %p stub returning %d\n",
- hInstall, debugstr_w(szFeature), pInstallState, pInstallState ? *pInstallState : 0);
-
+ if (pInstallState) *pInstallState = 1 << INSTALLSTATE_LOCAL;
+ FIXME( "%lu, %s, %p stub returning %lu\n", hInstall, debugstr_w(szFeature), pInstallState,
+ pInstallState ? *pInstallState : 0 );
return ERROR_SUCCESS;
}
/***********************************************************************
* MsiGetFeatureValidStatesA (MSI.@)
*/
-UINT WINAPI MsiGetFeatureValidStatesA(MSIHANDLE hInstall, LPCSTR szFeature,
- LPDWORD pInstallState)
+UINT WINAPI MsiGetFeatureValidStatesA( MSIHANDLE hInstall, const char *szFeature, DWORD *pInstallState )
{
UINT ret;
- LPWSTR szwFeature = strdupAtoW(szFeature);
-
+ WCHAR *szwFeature = strdupAtoW(szFeature);
ret = MsiGetFeatureValidStatesW(hInstall, szwFeature, pInstallState);
-
msi_free(szwFeature);
-
return ret;
}
diff --git a/dlls/msi/media.c b/dlls/msi/media.c
index af6e83b893e..6aeb948de51 100644
--- a/dlls/msi/media.c
+++ b/dlls/msi/media.c
@@ -64,7 +64,7 @@ static BOOL source_matches_volume(MSIMEDIAINFO *mi, LPCWSTR source_root)
if (!GetVolumeInformationW(root, volume_name, MAX_PATH + 1, NULL, NULL, NULL, NULL, 0))
{
- WARN("failed to get volume information for %s (%u)\n", debugstr_w(root), GetLastError());
+ WARN( "failed to get volume information for %s (%lu)\n", debugstr_w(root), GetLastError() );
return FALSE;
}
@@ -227,7 +227,7 @@ static INT_PTR CDECL cabinet_open_stream( char *pszFile, int oflag, int pmode )
msi_free( encoded );
if (FAILED(hr))
{
- WARN("failed to open stream 0x%08x\n", hr);
+ WARN( "failed to open stream %#lx\n", hr );
return -1;
}
}
@@ -349,7 +349,7 @@ static INT_PTR cabinet_next_cabinet(FDINOTIFICATIONTYPE fdint,
length = strlen(pfdin->psz3) + 1 + strlen(next_cab) + 1;
if (length > 256)
{
- WARN("Cannot update next cabinet filename with a string size %u > 256\n", length);
+ WARN( "cannot update next cabinet filename with a string size %lu > 256\n", length );
msi_free(next_cab);
goto done;
}
@@ -441,7 +441,7 @@ static INT_PTR cabinet_copy_file(FDINOTIFICATIONTYPE fdint,
if (attrs2 == INVALID_FILE_ATTRIBUTES)
{
- ERR("failed to create %s (error %d)\n", debugstr_w(path), err);
+ ERR( "failed to create %s (error %lu)\n", debugstr_w(path), err );
goto done;
}
else if (err == ERROR_ACCESS_DENIED && (attrs2 & FILE_ATTRIBUTE_READONLY))
@@ -481,13 +481,12 @@ static INT_PTR cabinet_copy_file(FDINOTIFICATIONTYPE fdint,
}
else
{
- WARN("failed to schedule rename operation %s (error %d)\n", debugstr_w(path), GetLastError());
+ WARN( "failed to schedule rename operation %s (error %lu)\n", debugstr_w(path), GetLastError() );
DeleteFileW( tmpfileW );
}
msi_free(tmpfileW);
}
- else
- WARN("failed to create %s (error %d)\n", debugstr_w(path), err);
+ else WARN( "failed to create %s (error %lu)\n", debugstr_w(path), err );
}
done:
diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c
index e91959e69f7..872c6cb66e2 100644
--- a/dlls/msi/msi.c
+++ b/dlls/msi/msi.c
@@ -181,21 +181,19 @@ UINT WINAPI MsiAdvertiseProductW(LPCWSTR szPackagePath, LPCWSTR szScriptfilePath
return ERROR_CALL_NOT_IMPLEMENTED;
}
-UINT WINAPI MsiAdvertiseProductExA(LPCSTR szPackagePath, LPCSTR szScriptfilePath,
- LPCSTR szTransforms, LANGID lgidLanguage, DWORD dwPlatform, DWORD dwOptions)
+UINT WINAPI MsiAdvertiseProductExA( const char *szPackagePath, const char *szScriptfilePath,
+ const char *szTransforms, LANGID lgidLanguage, DWORD dwPlatform, DWORD dwOptions )
{
- FIXME("%s %s %s %08x %08x %08x\n", debugstr_a(szPackagePath),
- debugstr_a(szScriptfilePath), debugstr_a(szTransforms),
- lgidLanguage, dwPlatform, dwOptions);
+ FIXME( "%s, %s, %s, %#x, %#lx, %#lx\n", debugstr_a(szPackagePath), debugstr_a(szScriptfilePath),
+ debugstr_a(szTransforms), lgidLanguage, dwPlatform, dwOptions );
return ERROR_CALL_NOT_IMPLEMENTED;
}
-UINT WINAPI MsiAdvertiseProductExW( LPCWSTR szPackagePath, LPCWSTR szScriptfilePath,
- LPCWSTR szTransforms, LANGID lgidLanguage, DWORD dwPlatform, DWORD dwOptions)
+UINT WINAPI MsiAdvertiseProductExW( const WCHAR *szPackagePath, const WCHAR *szScriptfilePath,
+ const WCHAR *szTransforms, LANGID lgidLanguage, DWORD dwPlatform, DWORD dwOptions )
{
- FIXME("%s %s %s %08x %08x %08x\n", debugstr_w(szPackagePath),
- debugstr_w(szScriptfilePath), debugstr_w(szTransforms),
- lgidLanguage, dwPlatform, dwOptions);
+ FIXME( "%s, %s, %s, %#x %#lx %#lx\n", debugstr_w(szPackagePath), debugstr_w(szScriptfilePath),
+ debugstr_w(szTransforms), lgidLanguage, dwPlatform, dwOptions );
return ERROR_CALL_NOT_IMPLEMENTED;
}
@@ -267,24 +265,22 @@ UINT WINAPI MsiInstallProductW(LPCWSTR szPackagePath, LPCWSTR szCommandLine)
return r;
}
-UINT WINAPI MsiReinstallProductA(LPCSTR szProduct, DWORD dwReinstallMode)
+UINT WINAPI MsiReinstallProductA( const char *szProduct, DWORD dwReinstallMode )
{
- LPWSTR wszProduct;
+ WCHAR *wszProduct;
UINT rc;
- TRACE("%s %08x\n", debugstr_a(szProduct), dwReinstallMode);
+ TRACE( "%s, %#lx\n", debugstr_a(szProduct), dwReinstallMode );
wszProduct = strdupAtoW(szProduct);
-
rc = MsiReinstallProductW(wszProduct, dwReinstallMode);
-
msi_free(wszProduct);
return rc;
}
-UINT WINAPI MsiReinstallProductW(LPCWSTR szProduct, DWORD dwReinstallMode)
+UINT WINAPI MsiReinstallProductW( const WCHAR *szProduct, DWORD dwReinstallMode )
{
- TRACE("%s %08x\n", debugstr_w(szProduct), dwReinstallMode);
+ TRACE( "%s, %#lx\n", debugstr_w(szProduct), dwReinstallMode );
return MsiReinstallFeatureW(szProduct, L"ALL", dwReinstallMode);
}
@@ -531,14 +527,14 @@ static MSIPATCHSEQUENCEINFOW *patchinfoAtoW( DWORD count, const MSIPATCHSEQUENCE
return ret;
}
-UINT WINAPI MsiDetermineApplicablePatchesA(LPCSTR szProductPackagePath,
- DWORD cPatchInfo, PMSIPATCHSEQUENCEINFOA pPatchInfo)
+UINT WINAPI MsiDetermineApplicablePatchesA( const char *szProductPackagePath, DWORD cPatchInfo,
+ MSIPATCHSEQUENCEINFOA *pPatchInfo )
{
UINT i, r;
WCHAR *package_path = NULL;
MSIPATCHSEQUENCEINFOW *psi;
- TRACE("%s, %u, %p\n", debugstr_a(szProductPackagePath), cPatchInfo, pPatchInfo);
+ TRACE( "%s, %lu, %p\n", debugstr_a(szProductPackagePath), cPatchInfo, pPatchInfo );
if (szProductPackagePath && !(package_path = strdupAtoW( szProductPackagePath )))
return ERROR_OUTOFMEMORY;
@@ -673,7 +669,7 @@ static UINT determine_patch_sequence( MSIPACKAGE *package, DWORD count, MSIPATCH
&IID_IXMLDOMDocument, (void**)&desc );
if (hr != S_OK)
{
- ERR("failed to create DOMDocument30 instance, 0x%08x\n", hr);
+ ERR( "failed to create DOMDocument30 instance, %#lx\n", hr );
return ERROR_FUNCTION_FAILED;
}
}
@@ -720,7 +716,7 @@ static UINT determine_patch_sequence( MSIPACKAGE *package, DWORD count, MSIPATCH
TRACE("szPatchData: %s\n", debugstr_w(info[i].szPatchData));
TRACE("ePatchDataType: %u\n", info[i].ePatchDataType);
- TRACE("dwOrder: %u\n", info[i].dwOrder);
+ TRACE("dwOrder: %lu\n", info[i].dwOrder);
TRACE("uStatus: %u\n", info[i].uStatus);
}
@@ -729,13 +725,13 @@ static UINT determine_patch_sequence( MSIPACKAGE *package, DWORD count, MSIPATCH
return ERROR_SUCCESS;
}
-UINT WINAPI MsiDetermineApplicablePatchesW(LPCWSTR szProductPackagePath,
- DWORD cPatchInfo, PMSIPATCHSEQUENCEINFOW pPatchInfo)
+UINT WINAPI MsiDetermineApplicablePatchesW( const WCHAR *szProductPackagePath, DWORD cPatchInfo,
+ MSIPATCHSEQUENCEINFOW *pPatchInfo )
{
UINT r;
MSIPACKAGE *package;
- TRACE("%s, %u, %p\n", debugstr_w(szProductPackagePath), cPatchInfo, pPatchInfo);
+ TRACE( "%s, %lu, %p\n", debugstr_w(szProductPackagePath), cPatchInfo, pPatchInfo );
r = MSI_OpenPackageW( szProductPackagePath, 0, &package );
if (r != ERROR_SUCCESS)
@@ -748,15 +744,14 @@ UINT WINAPI MsiDetermineApplicablePatchesW(LPCWSTR szProductPackagePath,
return r;
}
-UINT WINAPI MsiDeterminePatchSequenceA( LPCSTR product, LPCSTR usersid,
- MSIINSTALLCONTEXT context, DWORD count, PMSIPATCHSEQUENCEINFOA patchinfo )
+UINT WINAPI MsiDeterminePatchSequenceA( const char *product, const char *usersid, MSIINSTALLCONTEXT context,
+ DWORD count, MSIPATCHSEQUENCEINFOA *patchinfo )
{
UINT i, r;
WCHAR *productW, *usersidW = NULL;
MSIPATCHSEQUENCEINFOW *patchinfoW;
- TRACE("%s, %s, %d, %d, %p\n", debugstr_a(product), debugstr_a(usersid),
- context, count, patchinfo);
+ TRACE( "%s, %s, %d, %lu, %p\n", debugstr_a(product), debugstr_a(usersid), context, count, patchinfo );
if (!product) return ERROR_INVALID_PARAMETER;
if (!(productW = strdupAtoW( product ))) return ERROR_OUTOFMEMORY;
@@ -818,14 +813,13 @@ static UINT open_package( const WCHAR *product, const WCHAR *usersid,
return MSI_OpenPackageW( sourcepath, 0, package );
}
-UINT WINAPI MsiDeterminePatchSequenceW( LPCWSTR product, LPCWSTR usersid,
- MSIINSTALLCONTEXT context, DWORD count, PMSIPATCHSEQUENCEINFOW patchinfo )
+UINT WINAPI MsiDeterminePatchSequenceW( const WCHAR *product, const WCHAR *usersid, MSIINSTALLCONTEXT context,
+ DWORD count, MSIPATCHSEQUENCEINFOW *patchinfo )
{
UINT r;
MSIPACKAGE *package;
- TRACE("%s, %s, %d, %d, %p\n", debugstr_w(product), debugstr_w(usersid),
- context, count, patchinfo);
+ TRACE( "%s, %s, %d, %lu, %p\n", debugstr_w(product), debugstr_w(usersid), context, count, patchinfo );
if (!product) return ERROR_INVALID_PARAMETER;
r = open_package( product, usersid, context, &package );
@@ -1089,7 +1083,7 @@ static WCHAR *reg_get_value( HKEY hkey, const WCHAR *name, DWORD *type )
return strdupW( temp );
}
- ERR( "unhandled value type %u\n", *type );
+ ERR( "unhandled value type %lu\n", *type );
return NULL;
}
@@ -1887,12 +1881,12 @@ UINT WINAPI MsiGetPatchInfoW( LPCWSTR patch, LPCWSTR attr, LPWSTR buffer, LPDWOR
return ERROR_UNKNOWN_PRODUCT;
}
-UINT WINAPI MsiEnableLogA(DWORD dwLogMode, LPCSTR szLogFile, DWORD attributes)
+UINT WINAPI MsiEnableLogA( DWORD dwLogMode, const char *szLogFile, DWORD attributes )
{
LPWSTR szwLogFile = NULL;
UINT r;
- TRACE("%08x %s %08x\n", dwLogMode, debugstr_a(szLogFile), attributes);
+ TRACE( "%#lx, %s, %#lx\n", dwLogMode, debugstr_a(szLogFile), attributes );
if( szLogFile )
{
@@ -1905,9 +1899,9 @@ UINT WINAPI MsiEnableLogA(DWORD dwLogMode, LPCSTR szLogFile, DWORD attributes)
return r;
}
-UINT WINAPI MsiEnableLogW(DWORD dwLogMode, LPCWSTR szLogFile, DWORD attributes)
+UINT WINAPI MsiEnableLogW( DWORD dwLogMode, const WCHAR *szLogFile, DWORD attributes )
{
- TRACE("%08x %s %08x\n", dwLogMode, debugstr_w(szLogFile), attributes);
+ TRACE( "%#lx, %s, %#lx\n", dwLogMode, debugstr_w(szLogFile), attributes );
msi_free(gszLogFile);
gszLogFile = NULL;
@@ -1924,23 +1918,21 @@ UINT WINAPI MsiEnableLogW(DWORD dwLogMode, LPCWSTR szLogFile, DWORD attributes)
gszLogFile = strdupW(szLogFile);
CloseHandle(file);
}
- else
- ERR("Unable to enable log %s (%u)\n", debugstr_w(szLogFile), GetLastError());
+ else ERR( "unable to enable log %s (%lu)\n", debugstr_w(szLogFile), GetLastError() );
}
return ERROR_SUCCESS;
}
-UINT WINAPI MsiEnumComponentCostsA( MSIHANDLE handle, LPCSTR component, DWORD index,
- INSTALLSTATE state, LPSTR drive, DWORD *buflen,
- int *cost, int *temp )
+UINT WINAPI MsiEnumComponentCostsA( MSIHANDLE handle, const char *component, DWORD index, INSTALLSTATE state,
+ char *drive, DWORD *buflen, int *cost, int *temp )
{
UINT r;
DWORD len;
WCHAR *driveW, *componentW = NULL;
- TRACE("%d, %s, %u, %d, %p, %p, %p %p\n", handle, debugstr_a(component), index,
- state, drive, buflen, cost, temp);
+ TRACE( "%lu, %s, %lu, %d, %p, %p, %p, %p\n", handle, debugstr_a(component), index, state, drive, buflen, cost,
+ temp );
if (!drive || !buflen) return ERROR_INVALID_PARAMETER;
if (component && !(componentW = strdupAtoW( component ))) return ERROR_OUTOFMEMORY;
@@ -1969,9 +1961,8 @@ static UINT set_drive( WCHAR *buffer, WCHAR letter )
return 2;
}
-UINT WINAPI MsiEnumComponentCostsW( MSIHANDLE handle, LPCWSTR component, DWORD index,
- INSTALLSTATE state, LPWSTR drive, DWORD *buflen,
- int *cost, int *temp )
+UINT WINAPI MsiEnumComponentCostsW( MSIHANDLE handle, const WCHAR *component, DWORD index, INSTALLSTATE state,
+ WCHAR *drive, DWORD *buflen, int *cost, int *temp )
{
UINT r = ERROR_NO_MORE_ITEMS;
MSICOMPONENT *comp = NULL;
@@ -1980,8 +1971,8 @@ UINT WINAPI MsiEnumComponentCostsW( MSIHANDLE handle, LPCWSTR component, DWORD i
STATSTG stat = {0};
WCHAR path[MAX_PATH];
- TRACE("%d, %s, %u, %d, %p, %p, %p %p\n", handle, debugstr_w(component), index,
- state, drive, buflen, cost, temp);
+ TRACE( "%lu, %s, %lu, %d, %p, %p, %p, %p\n", handle, debugstr_w(component), index, state, drive, buflen, cost,
+ temp );
if (!drive || !buflen || !cost || !temp) return ERROR_INVALID_PARAMETER;
if (!(package = msihandle2msiinfo( handle, MSIHANDLETYPE_PACKAGE )))
@@ -2315,12 +2306,11 @@ INSTALLUILEVEL WINAPI MsiSetInternalUI(INSTALLUILEVEL dwUILevel, HWND *phWnd)
return old;
}
-INSTALLUI_HANDLERA WINAPI MsiSetExternalUIA(INSTALLUI_HANDLERA puiHandler,
- DWORD dwMessageFilter, LPVOID pvContext)
+INSTALLUI_HANDLERA WINAPI MsiSetExternalUIA( INSTALLUI_HANDLERA puiHandler, DWORD dwMessageFilter, void *pvContext )
{
INSTALLUI_HANDLERA prev = gUIHandlerA;
- TRACE("%p %08x %p\n", puiHandler, dwMessageFilter, pvContext);
+ TRACE( "%p, %#lx, %p\n", puiHandler, dwMessageFilter, pvContext );
gUIHandlerA = puiHandler;
gUIHandlerW = NULL;
@@ -2330,12 +2320,11 @@ INSTALLUI_HANDLERA WINAPI MsiSetExternalUIA(INSTALLUI_HANDLERA puiHandler,
return prev;
}
-INSTALLUI_HANDLERW WINAPI MsiSetExternalUIW(INSTALLUI_HANDLERW puiHandler,
- DWORD dwMessageFilter, LPVOID pvContext)
+INSTALLUI_HANDLERW WINAPI MsiSetExternalUIW( INSTALLUI_HANDLERW puiHandler, DWORD dwMessageFilter, void *pvContext )
{
INSTALLUI_HANDLERW prev = gUIHandlerW;
- TRACE("%p %08x %p\n", puiHandler, dwMessageFilter, pvContext);
+ TRACE( "%p, %#lx, %p\n", puiHandler, dwMessageFilter, pvContext );
gUIHandlerA = NULL;
gUIHandlerW = puiHandler;
@@ -2370,24 +2359,22 @@ INSTALLUI_HANDLERW WINAPI MsiSetExternalUIW(INSTALLUI_HANDLERW puiHandler,
* for starters, as -1 is an invalid MSI handle, but not an invalid module
* handle. Maybe strings can be stored in an MSI database somehow.
*/
-LANGID WINAPI MsiLoadStringW( MSIHANDLE handle, UINT id, LPWSTR lpBuffer,
- int nBufferMax, LANGID lang )
+LANGID WINAPI MsiLoadStringW( MSIHANDLE handle, UINT id, WCHAR *lpBuffer, int nBufferMax, LANGID lang )
{
HRSRC hres;
HGLOBAL hResData;
LPWSTR p;
DWORD i, len;
- TRACE("%d %u %p %d %d\n", handle, id, lpBuffer, nBufferMax, lang);
+ TRACE( "%lu, %u, %p, %d, %#x\n", handle, id, lpBuffer, nBufferMax, lang );
if( handle != -1 )
- FIXME("don't know how to deal with handle = %08x\n", handle);
+ FIXME( "don't know how to deal with handle = %lu\n", handle );
if( !lang )
lang = GetUserDefaultLangID();
- hres = FindResourceExW( msi_hInstance, (LPCWSTR) RT_STRING,
- (LPWSTR)1, lang );
+ hres = FindResourceExW( msi_hInstance, (const WCHAR *)RT_STRING, (WCHAR *)1, lang );
if( !hres )
return 0;
hResData = LoadResource( msi_hInstance, hres );
@@ -2464,55 +2451,49 @@ INSTALLSTATE WINAPI MsiLocateComponentW(LPCWSTR szComponent, LPWSTR lpPathBuf,
return MsiGetComponentPathW( szProduct, szComponent, lpPathBuf, pcchBuf );
}
-UINT WINAPI MsiMessageBoxA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType,
- WORD wLanguageId, DWORD f)
+UINT WINAPI MsiMessageBoxA( HWND hWnd, const char *lpText, const char *lpCaption, UINT uType, WORD wLanguageId,
+ DWORD f )
{
- FIXME("%p %s %s %u %08x %08x\n", hWnd, debugstr_a(lpText), debugstr_a(lpCaption),
- uType, wLanguageId, f);
- return MessageBoxExA(hWnd,lpText,lpCaption,uType,wLanguageId);
+ FIXME( "%p, %s, %s, %u, %#x, %#lx\n", hWnd, debugstr_a(lpText), debugstr_a(lpCaption), uType, wLanguageId, f );
+ return MessageBoxExA( hWnd, lpText, lpCaption, uType, wLanguageId );
}
-UINT WINAPI MsiMessageBoxW(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType,
- WORD wLanguageId, DWORD f)
+UINT WINAPI MsiMessageBoxW( HWND hWnd, const WCHAR *lpText, const WCHAR *lpCaption, UINT uType, WORD wLanguageId,
+ DWORD f )
{
- FIXME("%p %s %s %u %08x %08x\n", hWnd, debugstr_w(lpText), debugstr_w(lpCaption),
- uType, wLanguageId, f);
- return MessageBoxExW(hWnd,lpText,lpCaption,uType,wLanguageId);
+ FIXME( "%p, %s, %s, %u, %#x %#lx\n", hWnd, debugstr_w(lpText), debugstr_w(lpCaption), uType, wLanguageId, f );
+ return MessageBoxExW( hWnd, lpText, lpCaption, uType, wLanguageId );
}
-UINT WINAPI MsiMessageBoxExA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType,
- DWORD unknown, WORD wLanguageId, DWORD f)
+UINT WINAPI MsiMessageBoxExA( HWND hWnd, const char *lpText, const char *lpCaption, UINT uType, DWORD unknown,
+ WORD wLanguageId, DWORD f )
{
- FIXME("(%p, %s, %s, %u, 0x%08x, 0x%08x, 0x%08x): semi-stub\n", hWnd, debugstr_a(lpText),
- debugstr_a(lpCaption), uType, unknown, wLanguageId, f);
- return MessageBoxExA(hWnd, lpText, lpCaption, uType, wLanguageId);
+ FIXME( "%p, %s, %s, %u, %#lx, %#x, %#lx): semi-stub\n", hWnd, debugstr_a(lpText), debugstr_a(lpCaption), uType,
+ unknown, wLanguageId, f );
+ return MessageBoxExA( hWnd, lpText, lpCaption, uType, wLanguageId );
}
-UINT WINAPI MsiMessageBoxExW(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType,
- DWORD unknown, WORD wLanguageId, DWORD f)
+UINT WINAPI MsiMessageBoxExW( HWND hWnd, const WCHAR *lpText, const WCHAR *lpCaption, UINT uType, DWORD unknown,
+ WORD wLanguageId, DWORD f )
{
- FIXME("(%p, %s, %s, %u, 0x%08x, 0x%08x, 0x%08x): semi-stub\n", hWnd, debugstr_w(lpText),
- debugstr_w(lpCaption), uType, unknown, wLanguageId, f);
- return MessageBoxExW(hWnd, lpText, lpCaption, uType, wLanguageId);
+ FIXME( "%p, %s, %s, %u, %#lx, %#x, %#lx): semi-stub\n", hWnd, debugstr_w(lpText), debugstr_w(lpCaption), uType,
+ unknown, wLanguageId, f );
+ return MessageBoxExW( hWnd, lpText, lpCaption, uType, wLanguageId );
}
-UINT WINAPI MsiProvideAssemblyA( LPCSTR szAssemblyName, LPCSTR szAppContext,
- DWORD dwInstallMode, DWORD dwAssemblyInfo, LPSTR lpPathBuf,
- LPDWORD pcchPathBuf )
+UINT WINAPI MsiProvideAssemblyA( const char *szAssemblyName, const char *szAppContext, DWORD dwInstallMode,
+ DWORD dwAssemblyInfo, char *lpPathBuf, DWORD *pcchPathBuf )
{
- FIXME("%s %s %08x %08x %p %p\n", debugstr_a(szAssemblyName),
- debugstr_a(szAppContext), dwInstallMode, dwAssemblyInfo, lpPathBuf,
- pcchPathBuf);
+ FIXME( "%s, %s, %#lx, %#lx, %p, %p\n", debugstr_a(szAssemblyName), debugstr_a(szAppContext), dwInstallMode,
+ dwAssemblyInfo, lpPathBuf, pcchPathBuf );
return ERROR_CALL_NOT_IMPLEMENTED;
}
-UINT WINAPI MsiProvideAssemblyW( LPCWSTR szAssemblyName, LPCWSTR szAppContext,
- DWORD dwInstallMode, DWORD dwAssemblyInfo, LPWSTR lpPathBuf,
- LPDWORD pcchPathBuf )
+UINT WINAPI MsiProvideAssemblyW( const WCHAR *szAssemblyName, const WCHAR *szAppContext, DWORD dwInstallMode,
+ DWORD dwAssemblyInfo, WCHAR *lpPathBuf, DWORD *pcchPathBuf )
{
- FIXME("%s %s %08x %08x %p %p\n", debugstr_w(szAssemblyName),
- debugstr_w(szAppContext), dwInstallMode, dwAssemblyInfo, lpPathBuf,
- pcchPathBuf);
+ FIXME( "%s, %s, %#lx, %#lx, %p, %p\n", debugstr_w(szAssemblyName), debugstr_w(szAppContext), dwInstallMode,
+ dwAssemblyInfo, lpPathBuf, pcchPathBuf );
return ERROR_CALL_NOT_IMPLEMENTED;
}
@@ -2530,13 +2511,13 @@ UINT WINAPI MsiProvideComponentFromDescriptorW( LPCWSTR szDescriptor,
return ERROR_CALL_NOT_IMPLEMENTED;
}
-HRESULT WINAPI MsiGetFileSignatureInformationA( LPCSTR path, DWORD flags, PCCERT_CONTEXT *cert,
- LPBYTE hash, LPDWORD hashlen )
+HRESULT WINAPI MsiGetFileSignatureInformationA( const char *path, DWORD flags, PCCERT_CONTEXT *cert, BYTE *hash,
+ DWORD *hashlen )
{
UINT r;
WCHAR *pathW = NULL;
- TRACE("%s %08x %p %p %p\n", debugstr_a(path), flags, cert, hash, hashlen);
+ TRACE( "%s, %#lx, %p, %p, %p\n", debugstr_a(path), flags, cert, hash, hashlen );
if (path && !(pathW = strdupAtoW( path ))) return E_OUTOFMEMORY;
r = MsiGetFileSignatureInformationW( pathW, flags, cert, hash, hashlen );
@@ -2544,8 +2525,8 @@ HRESULT WINAPI MsiGetFileSignatureInformationA( LPCSTR path, DWORD flags, PCCERT
return r;
}
-HRESULT WINAPI MsiGetFileSignatureInformationW( LPCWSTR path, DWORD flags, PCCERT_CONTEXT *cert,
- LPBYTE hash, LPDWORD hashlen )
+HRESULT WINAPI MsiGetFileSignatureInformationW( const WCHAR *path, DWORD flags, PCCERT_CONTEXT *cert, BYTE *hash,
+ DWORD *hashlen )
{
static GUID generic_verify_v2 = WINTRUST_ACTION_GENERIC_VERIFY_V2;
HRESULT hr;
@@ -2554,7 +2535,7 @@ HRESULT WINAPI MsiGetFileSignatureInformationW( LPCWSTR path, DWORD flags, PCCER
CRYPT_PROVIDER_SGNR *signer;
CRYPT_PROVIDER_CERT *provider;
- TRACE("%s %08x %p %p %p\n", debugstr_w(path), flags, cert, hash, hashlen);
+ TRACE( "%s, %#lx, %p, %p, %p\n", debugstr_w(path), flags, cert, hash, hashlen );
if (!path || !cert) return E_INVALIDARG;
@@ -2612,15 +2593,13 @@ done:
/******************************************************************
* MsiGetProductPropertyA [MSI.@]
*/
-UINT WINAPI MsiGetProductPropertyA(MSIHANDLE hProduct, LPCSTR szProperty,
- LPSTR szValue, LPDWORD pccbValue)
+UINT WINAPI MsiGetProductPropertyA( MSIHANDLE hProduct, const char *szProperty, char *szValue, DWORD *pccbValue )
{
LPWSTR prop = NULL, val = NULL;
DWORD len;
UINT r;
- TRACE("(%d, %s, %p, %p)\n", hProduct, debugstr_a(szProperty),
- szValue, pccbValue);
+ TRACE( "%lu, %s, %p, %p\n", hProduct, debugstr_a(szProperty), szValue, pccbValue );
if (szValue && !pccbValue)
return ERROR_INVALID_PARAMETER;
@@ -2674,8 +2653,7 @@ done:
/******************************************************************
* MsiGetProductPropertyW [MSI.@]
*/
-UINT WINAPI MsiGetProductPropertyW(MSIHANDLE hProduct, LPCWSTR szProperty,
- LPWSTR szValue, LPDWORD pccbValue)
+UINT WINAPI MsiGetProductPropertyW( MSIHANDLE hProduct, const WCHAR *szProperty, WCHAR *szValue, DWORD *pccbValue )
{
MSIPACKAGE *package;
MSIQUERY *view = NULL;
@@ -2683,8 +2661,7 @@ UINT WINAPI MsiGetProductPropertyW(MSIHANDLE hProduct, LPCWSTR szProperty,
LPCWSTR val;
UINT r;
- TRACE("(%d, %s, %p, %p)\n", hProduct, debugstr_w(szProperty),
- szValue, pccbValue);
+ TRACE( "%lu, %s, %p, %p)\n", hProduct, debugstr_w(szProperty), szValue, pccbValue );
if (!szProperty)
return ERROR_INVALID_PARAMETER;
@@ -3234,13 +3211,11 @@ static UINT get_file_version( const WCHAR *path, WCHAR *verbuf, DWORD *verlen,
/******************************************************************
* MsiGetFileVersionW [MSI.@]
*/
-UINT WINAPI MsiGetFileVersionW( LPCWSTR path, LPWSTR verbuf, LPDWORD verlen,
- LPWSTR langbuf, LPDWORD langlen )
+UINT WINAPI MsiGetFileVersionW( const WCHAR *path, WCHAR *verbuf, DWORD *verlen, WCHAR *langbuf, DWORD *langlen )
{
UINT ret;
- TRACE("%s %p %u %p %u\n", debugstr_w(path), verbuf, verlen ? *verlen : 0,
- langbuf, langlen ? *langlen : 0);
+ TRACE( "%s, %p(%lu), %p(%lu)\n", debugstr_w(path), verbuf, verlen ? *verlen : 0, langbuf, langlen ? *langlen : 0 );
if ((verbuf && !verlen) || (langbuf && !langlen))
return ERROR_INVALID_PARAMETER;
@@ -3307,13 +3282,12 @@ end:
/***********************************************************************
* MsiUseFeatureExW [MSI.@]
*/
-INSTALLSTATE WINAPI MsiUseFeatureExW( LPCWSTR szProduct, LPCWSTR szFeature,
- DWORD dwInstallMode, DWORD dwReserved )
+INSTALLSTATE WINAPI MsiUseFeatureExW( const WCHAR *szProduct, const WCHAR *szFeature, DWORD dwInstallMode,
+ DWORD dwReserved )
{
INSTALLSTATE state;
- TRACE("%s %s %i %i\n", debugstr_w(szProduct), debugstr_w(szFeature),
- dwInstallMode, dwReserved);
+ TRACE( "%s, %s, %lu %#lx\n", debugstr_w(szProduct), debugstr_w(szFeature), dwInstallMode, dwReserved );
state = MsiQueryFeatureStateW( szProduct, szFeature );
@@ -3332,14 +3306,13 @@ INSTALLSTATE WINAPI MsiUseFeatureExW( LPCWSTR szProduct, LPCWSTR szFeature,
/***********************************************************************
* MsiUseFeatureExA [MSI.@]
*/
-INSTALLSTATE WINAPI MsiUseFeatureExA( LPCSTR szProduct, LPCSTR szFeature,
- DWORD dwInstallMode, DWORD dwReserved )
+INSTALLSTATE WINAPI MsiUseFeatureExA( const char *szProduct, const char *szFeature, DWORD dwInstallMode,
+ DWORD dwReserved )
{
INSTALLSTATE ret = INSTALLSTATE_UNKNOWN;
- LPWSTR prod = NULL, feat = NULL;
+ WCHAR *prod = NULL, *feat = NULL;
- TRACE("%s %s %i %i\n", debugstr_a(szProduct), debugstr_a(szFeature),
- dwInstallMode, dwReserved);
+ TRACE( "%s, %s, %lu, %#lx\n", debugstr_a(szProduct), debugstr_a(szFeature), dwInstallMode, dwReserved );
prod = strdupAtoW( szProduct );
if (szProduct && !prod)
@@ -3456,39 +3429,35 @@ static UINT MSI_ProvideQualifiedComponentEx(LPCWSTR szComponent,
/***********************************************************************
* MsiProvideQualifiedComponentExW [MSI.@]
*/
-UINT WINAPI MsiProvideQualifiedComponentExW(LPCWSTR szComponent,
- LPCWSTR szQualifier, DWORD dwInstallMode, LPCWSTR szProduct,
- DWORD Unused1, DWORD Unused2, LPWSTR lpPathBuf,
- LPDWORD pcchPathBuf)
+UINT WINAPI MsiProvideQualifiedComponentExW( const WCHAR *szComponent, const WCHAR *szQualifier, DWORD dwInstallMode,
+ const WCHAR *szProduct, DWORD Unused1, DWORD Unused2, WCHAR *lpPathBuf,
+ DWORD *pcchPathBuf )
{
awstring path;
- TRACE("%s %s %u %s %u %u %p %p\n", debugstr_w(szComponent),
- debugstr_w(szQualifier), dwInstallMode, debugstr_w(szProduct),
- Unused1, Unused2, lpPathBuf, pcchPathBuf);
+ TRACE( "%s, %s, %lu, %s, %#lx, %#lx, %p, %p\n", debugstr_w(szComponent), debugstr_w(szQualifier), dwInstallMode,
+ debugstr_w(szProduct), Unused1, Unused2, lpPathBuf, pcchPathBuf );
path.unicode = TRUE;
path.str.w = lpPathBuf;
- return MSI_ProvideQualifiedComponentEx(szComponent, szQualifier,
- dwInstallMode, szProduct, Unused1, Unused2, &path, pcchPathBuf);
+ return MSI_ProvideQualifiedComponentEx( szComponent, szQualifier, dwInstallMode, szProduct, Unused1, Unused2,
+ &path, pcchPathBuf );
}
/***********************************************************************
* MsiProvideQualifiedComponentExA [MSI.@]
*/
-UINT WINAPI MsiProvideQualifiedComponentExA(LPCSTR szComponent,
- LPCSTR szQualifier, DWORD dwInstallMode, LPCSTR szProduct,
- DWORD Unused1, DWORD Unused2, LPSTR lpPathBuf,
- LPDWORD pcchPathBuf)
+UINT WINAPI MsiProvideQualifiedComponentExA( const char *szComponent, const char *szQualifier, DWORD dwInstallMode,
+ const char *szProduct, DWORD Unused1, DWORD Unused2, char *lpPathBuf,
+ DWORD *pcchPathBuf )
{
- LPWSTR szwComponent, szwQualifier = NULL, szwProduct = NULL;
+ WCHAR *szwComponent, *szwQualifier = NULL, *szwProduct = NULL;
UINT r = ERROR_OUTOFMEMORY;
awstring path;
- TRACE("%s %s %u %s %u %u %p %p\n", debugstr_a(szComponent),
- debugstr_a(szQualifier), dwInstallMode, debugstr_a(szProduct),
- Unused1, Unused2, lpPathBuf, pcchPathBuf);
+ TRACE( "%s, %s, %lu, %s, %#lx, %#lx, %p, %p\n", debugstr_a(szComponent), debugstr_a(szQualifier), dwInstallMode,
+ debugstr_a(szProduct), Unused1, Unused2, lpPathBuf, pcchPathBuf );
szwComponent = strdupAtoW( szComponent );
if (szComponent && !szwComponent)
@@ -3848,11 +3817,11 @@ UINT WINAPI MsiCreateAndVerifyInstallerDirectory(DWORD dwReserved)
{
WCHAR path[MAX_PATH];
- TRACE("%d\n", dwReserved);
+ TRACE( "%#lx\n", dwReserved );
if (dwReserved)
{
- FIXME("dwReserved=%d\n", dwReserved);
+ FIXME( "dwReserved = %#lx\n", dwReserved );
return ERROR_INVALID_PARAMETER;
}
@@ -3952,7 +3921,7 @@ UINT WINAPI MsiGetShortcutTargetW( LPCWSTR szShortcutTarget,
return ERROR_FUNCTION_FAILED;
}
-UINT WINAPI MsiReinstallFeatureW( LPCWSTR szProduct, LPCWSTR szFeature, DWORD dwReinstallMode )
+UINT WINAPI MsiReinstallFeatureW( const WCHAR *szProduct, const WCHAR *szFeature, DWORD dwReinstallMode )
{
MSIPACKAGE *package;
MSIINSTALLCONTEXT context;
@@ -3961,7 +3930,7 @@ UINT WINAPI MsiReinstallFeatureW( LPCWSTR szProduct, LPCWSTR szFeature, DWORD dw
WCHAR *ptr, *cmdline;
DWORD sz;
- TRACE("%s, %s, 0x%08x\n", debugstr_w(szProduct), debugstr_w(szFeature), dwReinstallMode);
+ TRACE( "%s, %s, %#lx\n", debugstr_w(szProduct), debugstr_w(szFeature), dwReinstallMode );
r = msi_locate_product( szProduct, &context );
if (r != ERROR_SUCCESS)
@@ -4023,15 +3992,12 @@ UINT WINAPI MsiReinstallFeatureW( LPCWSTR szProduct, LPCWSTR szFeature, DWORD dw
return r;
}
-UINT WINAPI MsiReinstallFeatureA( LPCSTR szProduct, LPCSTR szFeature,
- DWORD dwReinstallMode )
+UINT WINAPI MsiReinstallFeatureA( const char *szProduct, const char *szFeature, DWORD dwReinstallMode )
{
- LPWSTR wszProduct;
- LPWSTR wszFeature;
+ WCHAR *wszProduct, *wszFeature;
UINT rc;
- TRACE("%s %s %i\n", debugstr_a(szProduct), debugstr_a(szFeature),
- dwReinstallMode);
+ TRACE( "%s, %s, %lu\n", debugstr_a(szProduct), debugstr_a(szFeature), dwReinstallMode );
wszProduct = strdupAtoW(szProduct);
wszFeature = strdupAtoW(szFeature);
@@ -4068,7 +4034,7 @@ UINT msi_get_filehash( MSIPACKAGE *package, const WCHAR *path, MSIFILEHASHINFO *
handle = CreateFileW( path, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_DELETE, NULL, OPEN_EXISTING, 0, NULL );
if (handle == INVALID_HANDLE_VALUE)
{
- WARN("can't open file %u\n", GetLastError());
+ WARN( "can't open file %lu\n", GetLastError() );
return ERROR_FILE_NOT_FOUND;
}
if ((length = GetFileSize( handle, NULL )))
@@ -4104,10 +4070,9 @@ UINT msi_get_filehash( MSIPACKAGE *package, const WCHAR *path, MSIFILEHASHINFO *
/***********************************************************************
* MsiGetFileHashW [MSI.@]
*/
-UINT WINAPI MsiGetFileHashW( LPCWSTR szFilePath, DWORD dwOptions,
- PMSIFILEHASHINFO pHash )
+UINT WINAPI MsiGetFileHashW( const WCHAR *szFilePath, DWORD dwOptions, MSIFILEHASHINFO *pHash )
{
- TRACE("%s %08x %p\n", debugstr_w(szFilePath), dwOptions, pHash );
+ TRACE( "%s, %#lx, %p\n", debugstr_w(szFilePath), dwOptions, pHash );
if (!szFilePath)
return ERROR_INVALID_PARAMETER;
@@ -4128,13 +4093,12 @@ UINT WINAPI MsiGetFileHashW( LPCWSTR szFilePath, DWORD dwOptions,
/***********************************************************************
* MsiGetFileHashA [MSI.@]
*/
-UINT WINAPI MsiGetFileHashA( LPCSTR szFilePath, DWORD dwOptions,
- PMSIFILEHASHINFO pHash )
+UINT WINAPI MsiGetFileHashA( const char *szFilePath, DWORD dwOptions, MSIFILEHASHINFO *pHash )
{
LPWSTR file;
UINT r;
- TRACE("%s %08x %p\n", debugstr_a(szFilePath), dwOptions, pHash );
+ TRACE( "%s, %#lx, %p\n", debugstr_a(szFilePath), dwOptions, pHash );
file = strdupAtoW( szFilePath );
if (szFilePath && !file)
@@ -4148,22 +4112,18 @@ UINT WINAPI MsiGetFileHashA( LPCSTR szFilePath, DWORD dwOptions,
/***********************************************************************
* MsiAdvertiseScriptW [MSI.@]
*/
-UINT WINAPI MsiAdvertiseScriptW( LPCWSTR szScriptFile, DWORD dwFlags,
- PHKEY phRegData, BOOL fRemoveItems )
+UINT WINAPI MsiAdvertiseScriptW( const WCHAR *szScriptFile, DWORD dwFlags, HKEY *phRegData, BOOL fRemoveItems )
{
- FIXME("%s %08x %p %d\n",
- debugstr_w( szScriptFile ), dwFlags, phRegData, fRemoveItems );
+ FIXME( "%s, %#lx, %p, %d\n", debugstr_w(szScriptFile), dwFlags, phRegData, fRemoveItems );
return ERROR_CALL_NOT_IMPLEMENTED;
}
/***********************************************************************
* MsiAdvertiseScriptA [MSI.@]
*/
-UINT WINAPI MsiAdvertiseScriptA( LPCSTR szScriptFile, DWORD dwFlags,
- PHKEY phRegData, BOOL fRemoveItems )
+UINT WINAPI MsiAdvertiseScriptA( const char *szScriptFile, DWORD dwFlags, HKEY *phRegData, BOOL fRemoveItems )
{
- FIXME("%s %08x %p %d\n",
- debugstr_a( szScriptFile ), dwFlags, phRegData, fRemoveItems );
+ FIXME( "%s, %#lx, %p, %d\n", debugstr_a(szScriptFile), dwFlags, phRegData, fRemoveItems );
return ERROR_CALL_NOT_IMPLEMENTED;
}
@@ -4192,11 +4152,10 @@ UINT WINAPI MsiIsProductElevatedA( LPCSTR szProduct, BOOL *pfElevated )
/***********************************************************************
* MsiSetExternalUIRecord [MSI.@]
*/
-UINT WINAPI MsiSetExternalUIRecord( INSTALLUI_HANDLER_RECORD handler,
- DWORD filter, LPVOID context,
- PINSTALLUI_HANDLER_RECORD prev )
+UINT WINAPI MsiSetExternalUIRecord( INSTALLUI_HANDLER_RECORD handler, DWORD filter, void *context,
+ INSTALLUI_HANDLER_RECORD *prev )
{
- TRACE("%p %08x %p %p\n", handler, filter, context, prev);
+ TRACE( "%p, %#lx, %p, %p\n", handler, filter, context, prev );
if (prev)
*prev = gUIHandlerRecord;
@@ -4242,14 +4201,16 @@ UINT WINAPI MsiInstallMissingComponentW(LPCWSTR szProduct, LPCWSTR szComponent,
return ERROR_SUCCESS;
}
-UINT WINAPI MsiProvideComponentA( LPCSTR product, LPCSTR feature, LPCSTR component, DWORD mode, LPSTR buf, LPDWORD buflen )
+UINT WINAPI MsiProvideComponentA( const char *product, const char *feature, const char *component, DWORD mode,
+ char *buf, DWORD *buflen )
{
WCHAR *productW = NULL, *componentW = NULL, *featureW = NULL, *bufW = NULL;
UINT r = ERROR_OUTOFMEMORY;
DWORD lenW = 0;
int len;
- TRACE("%s, %s, %s, %x, %p, %p\n", debugstr_a(product), debugstr_a(component), debugstr_a(feature), mode, buf, buflen);
+ TRACE( "%s, %s, %s, %#lx, %p, %p\n", debugstr_a(product), debugstr_a(component), debugstr_a(feature), mode,
+ buf, buflen );
if (product && !(productW = strdupAtoW( product ))) goto done;
if (feature && !(featureW = strdupAtoW( feature ))) goto done;
@@ -4288,11 +4249,13 @@ done:
return r;
}
-UINT WINAPI MsiProvideComponentW( LPCWSTR product, LPCWSTR feature, LPCWSTR component, DWORD mode, LPWSTR buf, LPDWORD buflen )
+UINT WINAPI MsiProvideComponentW( const WCHAR *product, const WCHAR *feature, const WCHAR *component, DWORD mode,
+ WCHAR *buf, DWORD *buflen )
{
INSTALLSTATE state;
- TRACE("%s, %s, %s, %x, %p, %p\n", debugstr_w(product), debugstr_w(component), debugstr_w(feature), mode, buf, buflen);
+ TRACE( "%s, %s, %s, %#lx, %p, %p\n", debugstr_w(product), debugstr_w(component), debugstr_w(feature), mode,
+ buf, buflen);
state = MsiQueryFeatureStateW( product, feature );
TRACE("feature state: %d\n", state);
@@ -4302,7 +4265,7 @@ UINT WINAPI MsiProvideComponentW( LPCWSTR product, LPCWSTR feature, LPCWSTR comp
break;
default:
- FIXME("mode %x not implemented\n", mode);
+ FIXME( "mode %#lx not implemented\n", mode );
return ERROR_INSTALL_FAILURE;
}
@@ -4331,12 +4294,12 @@ UINT WINAPI MsiProvideComponentW( LPCWSTR product, LPCWSTR feature, LPCWSTR comp
/***********************************************************************
* MsiBeginTransactionA [MSI.@]
*/
-UINT WINAPI MsiBeginTransactionA( LPCSTR name, DWORD attrs, MSIHANDLE *id, HANDLE *event )
+UINT WINAPI MsiBeginTransactionA( const char *name, DWORD attrs, MSIHANDLE *id, HANDLE *event )
{
WCHAR *nameW;
UINT r;
- FIXME("%s %u %p %p\n", debugstr_a(name), attrs, id, event);
+ FIXME( "%s, %#lx, %p, %p\n", debugstr_a(name), attrs, id, event );
nameW = strdupAtoW( name );
if (name && !nameW)
@@ -4350,9 +4313,9 @@ UINT WINAPI MsiBeginTransactionA( LPCSTR name, DWORD attrs, MSIHANDLE *id, HANDL
/***********************************************************************
* MsiBeginTransactionW [MSI.@]
*/
-UINT WINAPI MsiBeginTransactionW( LPCWSTR name, DWORD attrs, MSIHANDLE *id, HANDLE *event )
+UINT WINAPI MsiBeginTransactionW( const WCHAR *name, DWORD attrs, MSIHANDLE *id, HANDLE *event )
{
- FIXME("%s %u %p %p\n", debugstr_w(name), attrs, id, event);
+ FIXME( "%s, %#lx, %p, %p\n", debugstr_w(name), attrs, id, event );
*id = (MSIHANDLE)0xdeadbeef;
*event = (HANDLE)0xdeadbeef;
@@ -4365,7 +4328,7 @@ UINT WINAPI MsiBeginTransactionW( LPCWSTR name, DWORD attrs, MSIHANDLE *id, HAND
*/
UINT WINAPI MsiJoinTransaction( MSIHANDLE handle, DWORD attrs, HANDLE *event )
{
- FIXME("%u %08x %p\n", handle, attrs, event);
+ FIXME( "%lu, %#lx, %p\n", handle, attrs, event );
*event = (HANDLE)0xdeadbeef;
return ERROR_SUCCESS;
@@ -4376,13 +4339,13 @@ UINT WINAPI MsiJoinTransaction( MSIHANDLE handle, DWORD attrs, HANDLE *event )
*/
UINT WINAPI MsiEndTransaction( DWORD state )
{
- FIXME("%u\n", state);
+ FIXME( "%#lx\n", state );
return ERROR_SUCCESS;
}
-UINT WINAPI Migrate10CachedPackagesW(void* a, void* b, void* c, DWORD d)
+UINT WINAPI Migrate10CachedPackagesW( void *a, void *b, void *c, DWORD d )
{
- FIXME("%p,%p,%p,%08x\n", a, b, c, d);
+ FIXME( "%p, %p, %p, %#lx\n", a, b, c, d );
return ERROR_SUCCESS;
}
diff --git a/dlls/msi/msiquery.c b/dlls/msi/msiquery.c
index b3a499a0788..00135a0317a 100644
--- a/dlls/msi/msiquery.c
+++ b/dlls/msi/msiquery.c
@@ -85,13 +85,12 @@ UINT VIEW_find_column( MSIVIEW *table, LPCWSTR name, LPCWSTR table_name, UINT *n
return ERROR_INVALID_PARAMETER;
}
-UINT WINAPI MsiDatabaseOpenViewA(MSIHANDLE hdb,
- LPCSTR szQuery, MSIHANDLE *phView)
+UINT WINAPI MsiDatabaseOpenViewA( MSIHANDLE hdb, const char *szQuery, MSIHANDLE *phView )
{
UINT r;
- LPWSTR szwQuery;
+ WCHAR *szwQuery;
- TRACE("%d %s %p\n", hdb, debugstr_a(szQuery), phView);
+ TRACE( "%lu, %s, %p\n", hdb, debugstr_a(szQuery), phView );
if( szQuery )
{
@@ -108,13 +107,12 @@ UINT WINAPI MsiDatabaseOpenViewA(MSIHANDLE hdb,
return r;
}
-UINT MSI_DatabaseOpenViewW(MSIDATABASE *db,
- LPCWSTR szQuery, MSIQUERY **pView)
+UINT MSI_DatabaseOpenViewW( MSIDATABASE *db, const WCHAR *szQuery, MSIQUERY **pView )
{
MSIQUERY *query;
UINT r;
- TRACE("%s %p\n", debugstr_w(szQuery), pView);
+ TRACE( "%s, %p\n", debugstr_w(szQuery), pView );
/* pre allocate a handle to hold a pointer to the view */
query = alloc_msiobject( MSIHANDLETYPE_VIEW, sizeof (MSIQUERY),
@@ -403,13 +401,13 @@ UINT MSI_ViewFetch(MSIQUERY *query, MSIRECORD **prec)
return r;
}
-UINT WINAPI MsiViewFetch(MSIHANDLE hView, MSIHANDLE *record)
+UINT WINAPI MsiViewFetch( MSIHANDLE hView, MSIHANDLE *record )
{
MSIQUERY *query;
MSIRECORD *rec = NULL;
UINT ret;
- TRACE("%d %p\n", hView, record);
+ TRACE( "%lu, %p\n", hView, record );
if( !record )
return ERROR_INVALID_PARAMETER;
@@ -468,12 +466,12 @@ UINT MSI_ViewClose(MSIQUERY *query)
return view->ops->close( view );
}
-UINT WINAPI MsiViewClose(MSIHANDLE hView)
+UINT WINAPI MsiViewClose( MSIHANDLE hView )
{
MSIQUERY *query;
UINT ret;
- TRACE("%d\n", hView );
+ TRACE( "%lu\n", hView );
query = msihandle2msiinfo( hView, MSIHANDLETYPE_VIEW );
if (!query)
@@ -517,13 +515,13 @@ UINT MSI_ViewExecute(MSIQUERY *query, MSIRECORD *rec )
return view->ops->execute( view, rec );
}
-UINT WINAPI MsiViewExecute(MSIHANDLE hView, MSIHANDLE hRec)
+UINT WINAPI MsiViewExecute( MSIHANDLE hView, MSIHANDLE hRec )
{
MSIQUERY *query;
MSIRECORD *rec = NULL;
UINT ret;
- TRACE("%d %d\n", hView, hRec);
+ TRACE( "%lu, %lu\n", hView, hRec );
if( hRec )
{
@@ -641,13 +639,13 @@ UINT MSI_ViewGetColumnInfo( MSIQUERY *query, MSICOLINFO info, MSIRECORD **prec )
return ERROR_SUCCESS;
}
-UINT WINAPI MsiViewGetColumnInfo(MSIHANDLE hView, MSICOLINFO info, MSIHANDLE *hRec)
+UINT WINAPI MsiViewGetColumnInfo( MSIHANDLE hView, MSICOLINFO info, MSIHANDLE *hRec )
{
MSIQUERY *query = NULL;
MSIRECORD *rec = NULL;
UINT r;
- TRACE("%d %d %p\n", hView, info, hRec);
+ TRACE( "%lu, %d, %p\n", hView, info, hRec );
if( !hRec )
return ERROR_INVALID_PARAMETER;
@@ -719,14 +717,13 @@ UINT MSI_ViewModify( MSIQUERY *query, MSIMODIFY mode, MSIRECORD *rec )
return r;
}
-UINT WINAPI MsiViewModify( MSIHANDLE hView, MSIMODIFY eModifyMode,
- MSIHANDLE hRecord)
+UINT WINAPI MsiViewModify( MSIHANDLE hView, MSIMODIFY eModifyMode, MSIHANDLE hRecord )
{
MSIQUERY *query = NULL;
MSIRECORD *rec = NULL;
UINT r = ERROR_FUNCTION_FAILED;
- TRACE("%d %x %d\n", hView, eModifyMode, hRecord);
+ TRACE( "%lu, %#x, %lu\n", hView, eModifyMode, hRecord );
rec = msihandle2msiinfo( hRecord, MSIHANDLETYPE_RECORD );
@@ -770,13 +767,13 @@ UINT WINAPI MsiViewModify( MSIHANDLE hView, MSIMODIFY eModifyMode,
return r;
}
-MSIDBERROR WINAPI MsiViewGetErrorW( MSIHANDLE handle, LPWSTR buffer, LPDWORD buflen )
+MSIDBERROR WINAPI MsiViewGetErrorW( MSIHANDLE handle, WCHAR *buffer, DWORD *buflen )
{
MSIQUERY *query;
const WCHAR *column;
MSIDBERROR r;
- TRACE("%u %p %p\n", handle, buffer, buflen);
+ TRACE( "%lu, %p, %p\n", handle, buffer, buflen );
if (!buflen)
return MSIDBERROR_INVALIDARG;
@@ -821,13 +818,13 @@ MSIDBERROR WINAPI MsiViewGetErrorW( MSIHANDLE handle, LPWSTR buffer, LPDWORD buf
return r;
}
-MSIDBERROR WINAPI MsiViewGetErrorA( MSIHANDLE handle, LPSTR buffer, LPDWORD buflen )
+MSIDBERROR WINAPI MsiViewGetErrorA( MSIHANDLE handle, char *buffer, DWORD *buflen )
{
MSIQUERY *query;
const WCHAR *column;
MSIDBERROR r;
- TRACE("%u %p %p\n", handle, buffer, buflen);
+ TRACE( "%lu, %p, %p\n", handle, buffer, buflen );
if (!buflen)
return MSIDBERROR_INVALIDARG;
@@ -892,7 +889,7 @@ UINT MSI_DatabaseApplyTransformW( MSIDATABASE *db, const WCHAR *transform, int e
hr = IStorage_OpenStorage( db->storage, transform + 1, NULL, STGM_SHARE_EXCLUSIVE, NULL, 0, &stg );
if (FAILED( hr ))
{
- WARN( "failed to open substorage transform 0x%08x\n", hr );
+ WARN( "failed to open substorage transform %#lx\n", hr );
return ERROR_FUNCTION_FAILED;
}
}
@@ -901,7 +898,7 @@ UINT MSI_DatabaseApplyTransformW( MSIDATABASE *db, const WCHAR *transform, int e
hr = StgOpenStorage( transform, NULL, STGM_DIRECT|STGM_READ|STGM_SHARE_DENY_WRITE, NULL, 0, &stg );
if (FAILED( hr ))
{
- WARN( "failed to open file transform 0x%08x\n", hr );
+ WARN( "failed to open file transform %#lx\n", hr );
return ERROR_FUNCTION_FAILED;
}
}
@@ -938,7 +935,7 @@ UINT WINAPI MsiDatabaseApplyTransformA( MSIHANDLE hdb, const char *transform, in
WCHAR *wstr;
UINT ret;
- TRACE( "%d %s %08x\n", hdb, debugstr_a(transform), error_cond );
+ TRACE( "%lu, %s, %#x\n", hdb, debugstr_a(transform), error_cond );
wstr = strdupAtoW( transform );
if (transform && !wstr)
@@ -949,19 +946,17 @@ UINT WINAPI MsiDatabaseApplyTransformA( MSIHANDLE hdb, const char *transform, in
return ret;
}
-UINT WINAPI MsiDatabaseGenerateTransformA( MSIHANDLE hdb, MSIHANDLE hdbref,
- LPCSTR szTransformFile, int iReserved1, int iReserved2 )
+UINT WINAPI MsiDatabaseGenerateTransformA( MSIHANDLE hdb, MSIHANDLE hdbref, const char *szTransformFile,
+ int iReserved1, int iReserved2 )
{
- FIXME("%d %d %s %d %d\n", hdb, hdbref,
- debugstr_a(szTransformFile), iReserved1, iReserved2);
+ FIXME( "%lu, %lu, %s, %d, %d\n", hdb, hdbref, debugstr_a(szTransformFile), iReserved1, iReserved2 );
return ERROR_CALL_NOT_IMPLEMENTED;
}
-UINT WINAPI MsiDatabaseGenerateTransformW( MSIHANDLE hdb, MSIHANDLE hdbref,
- LPCWSTR szTransformFile, int iReserved1, int iReserved2 )
+UINT WINAPI MsiDatabaseGenerateTransformW( MSIHANDLE hdb, MSIHANDLE hdbref, const WCHAR *szTransformFile,
+ int iReserved1, int iReserved2 )
{
- FIXME("%d %d %s %d %d\n", hdb, hdbref,
- debugstr_w(szTransformFile), iReserved1, iReserved2);
+ FIXME( "%lu, %lu, %s, %d, %d\n", hdb, hdbref, debugstr_w(szTransformFile), iReserved1, iReserved2 );
return ERROR_CALL_NOT_IMPLEMENTED;
}
@@ -970,7 +965,7 @@ UINT WINAPI MsiDatabaseCommit( MSIHANDLE hdb )
MSIDATABASE *db;
UINT r;
- TRACE("%d\n", hdb);
+ TRACE( "%lu\n", hdb );
db = msihandle2msiinfo( hdb, MSIHANDLETYPE_DATABASE );
if( !db )
@@ -1066,7 +1061,7 @@ UINT MSI_DatabaseGetPrimaryKeys( MSIDATABASE *db,
r = MSI_IterateRecords( query, 0, msi_primary_key_iterator, &info );
if( r == ERROR_SUCCESS )
{
- TRACE("Found %d primary keys\n", info.n );
+ TRACE( "found %lu primary keys\n", info.n );
/* allocate a record and fill in the names of the tables */
info.rec = MSI_CreateRecord( info.n );
@@ -1082,14 +1077,13 @@ UINT MSI_DatabaseGetPrimaryKeys( MSIDATABASE *db,
return r;
}
-UINT WINAPI MsiDatabaseGetPrimaryKeysW( MSIHANDLE hdb,
- LPCWSTR table, MSIHANDLE* phRec )
+UINT WINAPI MsiDatabaseGetPrimaryKeysW( MSIHANDLE hdb, const WCHAR *table, MSIHANDLE *phRec )
{
MSIRECORD *rec = NULL;
MSIDATABASE *db;
UINT r;
- TRACE("%d %s %p\n", hdb, debugstr_w(table), phRec);
+ TRACE( "%lu, %s, %p\n", hdb, debugstr_w(table), phRec );
db = msihandle2msiinfo( hdb, MSIHANDLETYPE_DATABASE );
if( !db )
@@ -1132,13 +1126,12 @@ UINT WINAPI MsiDatabaseGetPrimaryKeysW( MSIHANDLE hdb,
return r;
}
-UINT WINAPI MsiDatabaseGetPrimaryKeysA(MSIHANDLE hdb,
- LPCSTR table, MSIHANDLE* phRec)
+UINT WINAPI MsiDatabaseGetPrimaryKeysA( MSIHANDLE hdb, const char *table, MSIHANDLE *phRec )
{
- LPWSTR szwTable = NULL;
+ WCHAR *szwTable = NULL;
UINT r;
- TRACE("%d %s %p\n", hdb, debugstr_a(table), phRec);
+ TRACE( "%lu, %s, %p\n", hdb, debugstr_a(table), phRec );
if( table )
{
@@ -1152,13 +1145,12 @@ UINT WINAPI MsiDatabaseGetPrimaryKeysA(MSIHANDLE hdb,
return r;
}
-MSICONDITION WINAPI MsiDatabaseIsTablePersistentA(
- MSIHANDLE hDatabase, LPCSTR szTableName)
+MSICONDITION WINAPI MsiDatabaseIsTablePersistentA( MSIHANDLE hDatabase, const char *szTableName )
{
- LPWSTR szwTableName = NULL;
+ WCHAR *szwTableName = NULL;
MSICONDITION r;
- TRACE("%x %s\n", hDatabase, debugstr_a(szTableName));
+ TRACE( "%lu, %s\n", hDatabase, debugstr_a(szTableName) );
if( szTableName )
{
@@ -1172,13 +1164,12 @@ MSICONDITION WINAPI MsiDatabaseIsTablePersistentA(
return r;
}
-MSICONDITION WINAPI MsiDatabaseIsTablePersistentW(
- MSIHANDLE hDatabase, LPCWSTR szTableName)
+MSICONDITION WINAPI MsiDatabaseIsTablePersistentW( MSIHANDLE hDatabase, const WCHAR *szTableName )
{
MSIDATABASE *db;
MSICONDITION r;
- TRACE("%x %s\n", hDatabase, debugstr_w(szTableName));
+ TRACE( "%lu, %s\n", hDatabase, debugstr_w(szTableName) );
db = msihandle2msiinfo( hDatabase, MSIHANDLETYPE_DATABASE );
if( !db )
diff --git a/dlls/msi/package.c b/dlls/msi/package.c
index 93cc6210f6e..ccbcdea6717 100644
--- a/dlls/msi/package.c
+++ b/dlls/msi/package.c
@@ -291,7 +291,7 @@ static void free_package_structures( MSIPACKAGE *package )
list_remove( &binary->entry );
if (!DeleteFileW( binary->tmpfile ))
- ERR("failed to delete %s (%u)\n", debugstr_w(binary->tmpfile), GetLastError());
+ ERR( "failed to delete %s (%lu)\n", debugstr_w(binary->tmpfile), GetLastError() );
msi_free( binary->source );
msi_free( binary->tmpfile );
msi_free( binary );
@@ -314,7 +314,7 @@ static void free_package_structures( MSIPACKAGE *package )
list_remove( &patch->entry );
if (patch->delete_on_close && !DeleteFileW( patch->localfile ))
{
- ERR("failed to delete %s (%u)\n", debugstr_w(patch->localfile), GetLastError());
+ ERR( "failed to delete %s (%lu)\n", debugstr_w(patch->localfile), GetLastError() );
}
msi_free_patchinfo( patch );
}
@@ -1546,12 +1546,12 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, DWORD dwOptions, MSIPACKAGE **pPackage)
return ERROR_SUCCESS;
}
-UINT WINAPI MsiOpenPackageExW(LPCWSTR szPackage, DWORD dwOptions, MSIHANDLE *phPackage)
+UINT WINAPI MsiOpenPackageExW( const WCHAR *szPackage, DWORD dwOptions, MSIHANDLE *phPackage )
{
MSIPACKAGE *package = NULL;
UINT ret;
- TRACE("%s %08x %p\n", debugstr_w(szPackage), dwOptions, phPackage );
+ TRACE( "%s, %#lx, %p\n", debugstr_w(szPackage), dwOptions, phPackage );
if( !szPackage || !phPackage )
return ERROR_INVALID_PARAMETER;
@@ -1563,7 +1563,7 @@ UINT WINAPI MsiOpenPackageExW(LPCWSTR szPackage, DWORD dwOptions, MSIHANDLE *phP
}
if( dwOptions )
- FIXME("dwOptions %08x not supported\n", dwOptions);
+ FIXME( "dwOptions %#lx not supported\n", dwOptions );
ret = MSI_OpenPackageW( szPackage, 0, &package );
if( ret == ERROR_SUCCESS )
@@ -1608,13 +1608,13 @@ UINT WINAPI MsiOpenPackageA(LPCSTR szPackage, MSIHANDLE *phPackage)
return MsiOpenPackageExA( szPackage, 0, phPackage );
}
-MSIHANDLE WINAPI MsiGetActiveDatabase(MSIHANDLE hInstall)
+MSIHANDLE WINAPI MsiGetActiveDatabase( MSIHANDLE hInstall )
{
MSIPACKAGE *package;
MSIHANDLE handle = 0;
MSIHANDLE remote;
- TRACE("(%d)\n",hInstall);
+ TRACE( "%lu\n", hInstall );
package = msihandle2msiinfo( hInstall, MSIHANDLETYPE_PACKAGE);
if( package)
@@ -1814,21 +1814,21 @@ INT MSI_ProcessMessageVerbatim(MSIPACKAGE *package, INSTALLMESSAGE eMessageType,
if (gUIHandlerRecord && (gUIFilterRecord & log_type))
{
MSIHANDLE rec = alloc_msihandle(&record->hdr);
- TRACE("Calling UI handler %p(pvContext=%p, iMessageType=%08x, hRecord=%u)\n",
- gUIHandlerRecord, gUIContextRecord, eMessageType, rec);
+ TRACE( "calling UI handler %p(pvContext = %p, iMessageType = %#x, hRecord = %lu)\n",
+ gUIHandlerRecord, gUIContextRecord, eMessageType, rec );
rc = gUIHandlerRecord( gUIContextRecord, eMessageType, rec );
MsiCloseHandle( rec );
}
if (!rc && gUIHandlerW && (gUIFilter & log_type))
{
- TRACE("Calling UI handler %p(pvContext=%p, iMessageType=%08x, szMessage=%s)\n",
- gUIHandlerW, gUIContext, eMessageType, debugstr_w(message));
+ TRACE( "calling UI handler %p(pvContext = %p, iMessageType = %#x, szMessage = %s)\n",
+ gUIHandlerW, gUIContext, eMessageType, debugstr_w(message) );
rc = gUIHandlerW( gUIContext, eMessageType, message );
}
else if (!rc && gUIHandlerA && (gUIFilter & log_type))
{
- TRACE("Calling UI handler %p(pvContext=%p, iMessageType=%08x, szMessage=%s)\n",
- gUIHandlerA, gUIContext, eMessageType, debugstr_a(msg));
+ TRACE( "calling UI handler %p(pvContext = %p, iMessageType = %#x, szMessage = %s)\n",
+ gUIHandlerA, gUIContext, eMessageType, debugstr_a(msg) );
rc = gUIHandlerA( gUIContext, eMessageType, msg );
}
@@ -2207,8 +2207,7 @@ UINT msi_get_property( MSIDATABASE *db, LPCWSTR szName,
TRACE("returning %s for property %s\n", debugstr_wn(szValueBuf, *pchValueBuf),
debugstr_w(szName));
else if (rc == ERROR_MORE_DATA)
- TRACE("need %d sized buffer for %s\n", *pchValueBuf,
- debugstr_w(szName));
+ TRACE( "need %lu sized buffer for %s\n", *pchValueBuf, debugstr_w(szName) );
else
{
*pchValueBuf = 0;
diff --git a/dlls/msi/record.c b/dlls/msi/record.c
index 46c2d71f6f1..9e11752cc97 100644
--- a/dlls/msi/record.c
+++ b/dlls/msi/record.c
@@ -115,7 +115,7 @@ UINT WINAPI MsiRecordGetFieldCount( MSIHANDLE handle )
MSIRECORD *rec;
UINT ret;
- TRACE("%d\n", handle );
+ TRACE( "%lu\n", handle );
rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD );
if( !rec )
@@ -239,7 +239,7 @@ int WINAPI MsiRecordGetInteger( MSIHANDLE handle, UINT iField)
MSIRECORD *rec;
UINT ret;
- TRACE("%d %d\n", handle, iField );
+ TRACE( "%lu, %u\n", handle, iField );
rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD );
if( !rec )
@@ -258,7 +258,7 @@ UINT WINAPI MsiRecordClearData( MSIHANDLE handle )
MSIRECORD *rec;
UINT i;
- TRACE("%d\n", handle );
+ TRACE( "%lu\n", handle );
rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD );
if( !rec )
@@ -305,7 +305,7 @@ UINT WINAPI MsiRecordSetInteger( MSIHANDLE handle, UINT iField, int iVal )
MSIRECORD *rec;
UINT ret;
- TRACE("%d %u %d\n", handle, iField, iVal);
+ TRACE( "%lu, %u, %d\n", handle, iField, iVal );
rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD );
if( !rec )
@@ -335,7 +335,7 @@ BOOL WINAPI MsiRecordIsNull( MSIHANDLE handle, UINT iField )
MSIRECORD *rec;
UINT ret;
- TRACE("%d %d\n", handle, iField );
+ TRACE( "%lu, %u\n", handle, iField );
rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD );
if( !rec )
@@ -400,13 +400,12 @@ UINT MSI_RecordGetStringA(MSIRECORD *rec, UINT iField,
return ret;
}
-UINT WINAPI MsiRecordGetStringA(MSIHANDLE handle, UINT iField,
- LPSTR szValue, LPDWORD pcchValue)
+UINT WINAPI MsiRecordGetStringA( MSIHANDLE handle, UINT iField, char *szValue, DWORD *pcchValue )
{
MSIRECORD *rec;
UINT ret;
- TRACE("%d %d %p %p\n", handle, iField, szValue, pcchValue);
+ TRACE( "%lu, %d, %p, %p\n", handle, iField, szValue, pcchValue );
rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD );
if( !rec )
@@ -436,13 +435,12 @@ const WCHAR *MSI_RecordGetString( const MSIRECORD *rec, UINT iField )
return msi_record_get_string( rec, iField, NULL );
}
-UINT MSI_RecordGetStringW(MSIRECORD *rec, UINT iField,
- LPWSTR szValue, LPDWORD pcchValue)
+UINT MSI_RecordGetStringW( MSIRECORD *rec, UINT iField, WCHAR *szValue, DWORD *pcchValue )
{
UINT len = 0, ret = ERROR_SUCCESS;
WCHAR buffer[16];
- TRACE("%p %d %p %p\n", rec, iField, szValue, pcchValue);
+ TRACE( "%p, %u, %p, %p\n", rec, iField, szValue, pcchValue );
if( iField > rec->count )
{
@@ -481,13 +479,12 @@ UINT MSI_RecordGetStringW(MSIRECORD *rec, UINT iField,
return ret;
}
-UINT WINAPI MsiRecordGetStringW(MSIHANDLE handle, UINT iField,
- LPWSTR szValue, LPDWORD pcchValue)
+UINT WINAPI MsiRecordGetStringW( MSIHANDLE handle, UINT iField, WCHAR *szValue, DWORD *pcchValue )
{
MSIRECORD *rec;
UINT ret;
- TRACE("%d %d %p %p\n", handle, iField, szValue, pcchValue);
+ TRACE( "%lu, %u, %p, %p\n", handle, iField, szValue, pcchValue );
rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD );
if( !rec )
@@ -532,12 +529,12 @@ static UINT MSI_RecordDataSize(MSIRECORD *rec, UINT iField)
return 0;
}
-UINT WINAPI MsiRecordDataSize(MSIHANDLE handle, UINT iField)
+UINT WINAPI MsiRecordDataSize( MSIHANDLE handle, UINT iField )
{
MSIRECORD *rec;
UINT ret;
- TRACE("%d %d\n", handle, iField);
+ TRACE( "%lu, %u\n", handle, iField );
rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD );
if( !rec )
@@ -549,13 +546,13 @@ UINT WINAPI MsiRecordDataSize(MSIHANDLE handle, UINT iField)
return ret;
}
-UINT WINAPI MsiRecordSetStringA( MSIHANDLE handle, UINT iField, LPCSTR szValue )
+UINT WINAPI MsiRecordSetStringA( MSIHANDLE handle, UINT iField, const char *szValue )
{
WCHAR *valueW = NULL;
MSIRECORD *rec;
UINT ret;
- TRACE("%d %d %s\n", handle, iField, debugstr_a(szValue));
+ TRACE( "%lu, %u %s\n", handle, iField, debugstr_a(szValue) );
if (szValue && !(valueW = strdupAtoW( szValue ))) return ERROR_OUTOFMEMORY;
@@ -604,12 +601,12 @@ UINT MSI_RecordSetStringW( MSIRECORD *rec, UINT iField, LPCWSTR szValue )
return msi_record_set_string( rec, iField, szValue, -1 );
}
-UINT WINAPI MsiRecordSetStringW( MSIHANDLE handle, UINT iField, LPCWSTR szValue )
+UINT WINAPI MsiRecordSetStringW( MSIHANDLE handle, UINT iField, const WCHAR *szValue )
{
MSIRECORD *rec;
UINT ret;
- TRACE("%d %d %s\n", handle, iField, debugstr_w(szValue));
+ TRACE( "%lu, %u, %s\n", handle, iField, debugstr_w(szValue) );
rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD );
if( !rec )
@@ -667,8 +664,7 @@ static UINT RECORD_StreamFromFile(LPCWSTR szFile, IStream **pstm)
ulSize.QuadPart = sz;
IStream_SetSize(*pstm, ulSize);
- TRACE("read %s, %d bytes into IStream %p\n", debugstr_w(szFile), sz, *pstm);
-
+ TRACE( "read %s, %lu bytes into IStream %p\n", debugstr_w(szFile), sz, *pstm );
return ERROR_SUCCESS;
}
@@ -725,12 +721,12 @@ UINT MSI_RecordSetStreamFromFileW(MSIRECORD *rec, UINT iField, LPCWSTR szFilenam
return ERROR_SUCCESS;
}
-UINT WINAPI MsiRecordSetStreamA(MSIHANDLE hRecord, UINT iField, LPCSTR szFilename)
+UINT WINAPI MsiRecordSetStreamA( MSIHANDLE hRecord, UINT iField, const char *szFilename )
{
- LPWSTR wstr = NULL;
+ WCHAR *wstr = NULL;
UINT ret;
- TRACE("%d %d %s\n", hRecord, iField, debugstr_a(szFilename));
+ TRACE( "%lu, %u, %s\n", hRecord, iField, debugstr_a(szFilename) );
if( szFilename )
{
@@ -744,12 +740,12 @@ UINT WINAPI MsiRecordSetStreamA(MSIHANDLE hRecord, UINT iField, LPCSTR szFilenam
return ret;
}
-UINT WINAPI MsiRecordSetStreamW(MSIHANDLE handle, UINT iField, LPCWSTR szFilename)
+UINT WINAPI MsiRecordSetStreamW( MSIHANDLE handle, UINT iField, const WCHAR *szFilename )
{
MSIRECORD *rec;
UINT ret;
- TRACE("%d %d %s\n", handle, iField, debugstr_w(szFilename));
+ TRACE( "%lu, %u, %s\n", handle, iField, debugstr_w(szFilename) );
rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD );
if( !rec )
@@ -820,12 +816,12 @@ UINT MSI_RecordReadStream(MSIRECORD *rec, UINT iField, char *buf, LPDWORD sz)
return ERROR_SUCCESS;
}
-UINT WINAPI MsiRecordReadStream(MSIHANDLE handle, UINT iField, char *buf, LPDWORD sz)
+UINT WINAPI MsiRecordReadStream( MSIHANDLE handle, UINT iField, char *buf, DWORD *sz )
{
MSIRECORD *rec;
UINT ret;
- TRACE("%d %d %p %p\n", handle, iField, buf, sz);
+ TRACE( "%lu, %u, %p, %p\n", handle, iField, buf, sz );
rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD );
if( !rec )
diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c
index 5dc3c0a81c3..877b889ef42 100644
--- a/dlls/msi/registry.c
+++ b/dlls/msi/registry.c
@@ -1021,12 +1021,12 @@ UINT WINAPI MsiDecomposeDescriptorA( LPCSTR szDescriptor, LPSTR szProduct,
return r;
}
-UINT WINAPI MsiEnumProductsA(DWORD index, LPSTR lpguid)
+UINT WINAPI MsiEnumProductsA( DWORD index, char *lpguid )
{
DWORD r;
WCHAR szwGuid[GUID_SIZE];
- TRACE("%d %p\n", index, lpguid);
+ TRACE( "%lu, %p\n", index, lpguid );
if (NULL == lpguid)
return ERROR_INVALID_PARAMETER;
@@ -1037,9 +1037,9 @@ UINT WINAPI MsiEnumProductsA(DWORD index, LPSTR lpguid)
return r;
}
-UINT WINAPI MsiEnumProductsW(DWORD index, LPWSTR lpguid)
+UINT WINAPI MsiEnumProductsW( DWORD index, WCHAR *lpguid )
{
- TRACE("%d %p\n", index, lpguid);
+ TRACE("%lu, %p\n", index, lpguid );
if (NULL == lpguid)
return ERROR_INVALID_PARAMETER;
@@ -1048,13 +1048,13 @@ UINT WINAPI MsiEnumProductsW(DWORD index, LPWSTR lpguid)
NULL, NULL, NULL );
}
-UINT WINAPI MsiEnumFeaturesA(LPCSTR szProduct, DWORD index, LPSTR szFeature, LPSTR szParent)
+UINT WINAPI MsiEnumFeaturesA( const char *szProduct, DWORD index, char *szFeature, char *szParent )
{
DWORD r;
WCHAR szwFeature[GUID_SIZE], szwParent[GUID_SIZE];
- LPWSTR szwProduct = NULL;
+ WCHAR *szwProduct = NULL;
- TRACE("%s %d %p %p\n", debugstr_a(szProduct), index, szFeature, szParent);
+ TRACE( "%s, %lu, %p, %p\n", debugstr_a(szProduct), index, szFeature, szParent );
if( szProduct )
{
@@ -1066,10 +1066,8 @@ UINT WINAPI MsiEnumFeaturesA(LPCSTR szProduct, DWORD index, LPSTR szFeature, LPS
r = MsiEnumFeaturesW(szwProduct, index, szwFeature, szwParent);
if( r == ERROR_SUCCESS )
{
- WideCharToMultiByte(CP_ACP, 0, szwFeature, -1,
- szFeature, GUID_SIZE, NULL, NULL);
- WideCharToMultiByte(CP_ACP, 0, szwParent, -1,
- szParent, GUID_SIZE, NULL, NULL);
+ WideCharToMultiByte(CP_ACP, 0, szwFeature, -1, szFeature, GUID_SIZE, NULL, NULL);
+ WideCharToMultiByte(CP_ACP, 0, szwParent, -1, szParent, GUID_SIZE, NULL, NULL);
}
msi_free( szwProduct);
@@ -1077,12 +1075,12 @@ UINT WINAPI MsiEnumFeaturesA(LPCSTR szProduct, DWORD index, LPSTR szFeature, LPS
return r;
}
-UINT WINAPI MsiEnumFeaturesW(LPCWSTR szProduct, DWORD index, LPWSTR szFeature, LPWSTR szParent)
+UINT WINAPI MsiEnumFeaturesW( const WCHAR *szProduct, DWORD index, WCHAR *szFeature, WCHAR *szParent )
{
HKEY hkeyProduct = 0;
DWORD r, sz;
- TRACE("%s %d %p %p\n", debugstr_w(szProduct), index, szFeature, szParent);
+ TRACE( "%s, %lu, %p, %p\n", debugstr_w(szProduct), index, szFeature, szParent );
if( !szProduct )
return ERROR_INVALID_PARAMETER;
@@ -1098,12 +1096,12 @@ UINT WINAPI MsiEnumFeaturesW(LPCWSTR szProduct, DWORD index, LPWSTR szFeature, L
return r;
}
-UINT WINAPI MsiEnumComponentsA(DWORD index, LPSTR lpguid)
+UINT WINAPI MsiEnumComponentsA( DWORD index, char *lpguid )
{
DWORD r;
WCHAR szwGuid[GUID_SIZE];
- TRACE("%u, %p\n", index, lpguid);
+ TRACE( "%lu, %p\n", index, lpguid );
if (!lpguid) return ERROR_INVALID_PARAMETER;
@@ -1114,23 +1112,23 @@ UINT WINAPI MsiEnumComponentsA(DWORD index, LPSTR lpguid)
return r;
}
-UINT WINAPI MsiEnumComponentsW(DWORD index, LPWSTR lpguid)
+UINT WINAPI MsiEnumComponentsW( DWORD index, WCHAR *lpguid )
{
- TRACE("%u, %p\n", index, lpguid);
+ TRACE( "%lu, %p\n", index, lpguid );
if (!lpguid) return ERROR_INVALID_PARAMETER;
return MsiEnumComponentsExW( L"S-1-1-0", MSIINSTALLCONTEXT_ALL, index, lpguid, NULL, NULL, NULL );
}
-UINT WINAPI MsiEnumComponentsExA( LPCSTR user_sid, DWORD ctx, DWORD index, CHAR guid[39],
- MSIINSTALLCONTEXT *installed_ctx, LPSTR sid, LPDWORD sid_len )
+UINT WINAPI MsiEnumComponentsExA( const char *user_sid, DWORD ctx, DWORD index, CHAR guid[39],
+ MSIINSTALLCONTEXT *installed_ctx, char *sid, DWORD *sid_len )
{
UINT r;
WCHAR *user_sidW = NULL, *sidW = NULL, guidW[GUID_SIZE];
- TRACE("%s, %u, %u, %p, %p, %p, %p\n", debugstr_a(user_sid), ctx, index, guid, installed_ctx,
- sid, sid_len);
+ TRACE( "%s, %#lx, %lu, %p, %p, %p, %p\n", debugstr_a(user_sid), ctx, index, guid, installed_ctx,
+ sid, sid_len );
if (sid && !sid_len) return ERROR_INVALID_PARAMETER;
if (user_sid && !(user_sidW = strdupAtoW( user_sid ))) return ERROR_OUTOFMEMORY;
@@ -1300,15 +1298,15 @@ done:
return r;
}
-UINT WINAPI MsiEnumComponentsExW( LPCWSTR user_sid, DWORD ctx, DWORD index, WCHAR guid[39],
- MSIINSTALLCONTEXT *installed_ctx, LPWSTR sid, LPDWORD sid_len )
+UINT WINAPI MsiEnumComponentsExW( const WCHAR *user_sid, DWORD ctx, DWORD index, WCHAR guid[39],
+ MSIINSTALLCONTEXT *installed_ctx, WCHAR *sid, DWORD *sid_len )
{
UINT r;
DWORD idx = 0;
static DWORD last_index;
- TRACE("%s, %u, %u, %p, %p, %p, %p\n", debugstr_w(user_sid), ctx, index, guid, installed_ctx,
- sid, sid_len);
+ TRACE( "%s, %#lx, %lu, %p, %p, %p, %p\n", debugstr_w(user_sid), ctx, index, guid, installed_ctx,
+ sid, sid_len );
if ((sid && !sid_len) || !ctx || (user_sid && ctx == MSIINSTALLCONTEXT_MACHINE))
return ERROR_INVALID_PARAMETER;
@@ -1327,13 +1325,13 @@ UINT WINAPI MsiEnumComponentsExW( LPCWSTR user_sid, DWORD ctx, DWORD index, WCHA
return r;
}
-UINT WINAPI MsiEnumClientsA(LPCSTR szComponent, DWORD index, LPSTR szProduct)
+UINT WINAPI MsiEnumClientsA( const char *szComponent, DWORD index, char *szProduct )
{
DWORD r;
WCHAR szwProduct[GUID_SIZE];
- LPWSTR szwComponent = NULL;
+ WCHAR *szwComponent = NULL;
- TRACE("%s %d %p\n", debugstr_a(szComponent), index, szProduct);
+ TRACE( "%s, %lu, %p\n", debugstr_a(szComponent), index, szProduct );
if ( !szProduct )
return ERROR_INVALID_PARAMETER;
@@ -1347,23 +1345,20 @@ UINT WINAPI MsiEnumClientsA(LPCSTR szComponent, DWORD index, LPSTR szProduct)
r = MsiEnumClientsW(szComponent?szwComponent:NULL, index, szwProduct);
if( r == ERROR_SUCCESS )
- {
- WideCharToMultiByte(CP_ACP, 0, szwProduct, -1,
- szProduct, GUID_SIZE, NULL, NULL);
- }
+ WideCharToMultiByte(CP_ACP, 0, szwProduct, -1, szProduct, GUID_SIZE, NULL, NULL);
msi_free( szwComponent);
return r;
}
-UINT WINAPI MsiEnumClientsW(LPCWSTR szComponent, DWORD index, LPWSTR szProduct)
+UINT WINAPI MsiEnumClientsW( const WCHAR *szComponent, DWORD index, WCHAR *szProduct )
{
HKEY hkeyComp = 0;
DWORD r, sz;
WCHAR szValName[SQUASHED_GUID_SIZE];
- TRACE("%s %d %p\n", debugstr_w(szComponent), index, szProduct);
+ TRACE( "%s, %lu, %p\n", debugstr_w(szComponent), index, szProduct );
if (!szComponent || !*szComponent || !szProduct)
return ERROR_INVALID_PARAMETER;
@@ -1396,35 +1391,33 @@ UINT WINAPI MsiEnumClientsW(LPCWSTR szComponent, DWORD index, LPWSTR szProduct)
return r;
}
-UINT WINAPI MsiEnumClientsExA(LPCSTR component, LPCSTR usersid, DWORD ctx, DWORD index,
- CHAR installed_product[GUID_SIZE],
- MSIINSTALLCONTEXT *installed_ctx, LPSTR sid, LPDWORD sid_len)
+UINT WINAPI MsiEnumClientsExA( const char *component, const char *usersid, DWORD ctx, DWORD index,
+ char installed_product[GUID_SIZE], MSIINSTALLCONTEXT *installed_ctx, char *sid,
+ DWORD *sid_len )
{
- FIXME("%s, %s, %u, %u, %p, %p, %p, %p\n", debugstr_a(component), debugstr_a(usersid),
- ctx, index, installed_product, installed_ctx, sid, sid_len);
+ FIXME( "%s, %s, %#lx, %lu, %p, %p, %p, %p\n", debugstr_a(component), debugstr_a(usersid), ctx, index,
+ installed_product, installed_ctx, sid, sid_len );
return ERROR_ACCESS_DENIED;
}
-UINT WINAPI MsiEnumClientsExW(LPCWSTR component, LPCWSTR usersid, DWORD ctx, DWORD index,
- WCHAR installed_product[GUID_SIZE],
- MSIINSTALLCONTEXT *installed_ctx, LPWSTR sid, LPDWORD sid_len)
+UINT WINAPI MsiEnumClientsExW( const WCHAR *component, const WCHAR *usersid, DWORD ctx, DWORD index,
+ WCHAR installed_product[GUID_SIZE], MSIINSTALLCONTEXT *installed_ctx, WCHAR *sid,
+ DWORD *sid_len )
{
- FIXME("%s, %s, %u, %u, %p, %p, %p, %p\n", debugstr_w(component), debugstr_w(usersid),
- ctx, index, installed_product, installed_ctx, sid, sid_len);
+ FIXME( "%s, %s, %#lx, %lu, %p, %p, %p, %p\n", debugstr_w(component), debugstr_w(usersid), ctx, index,
+ installed_product, installed_ctx, sid, sid_len );
return ERROR_ACCESS_DENIED;
}
-static UINT MSI_EnumComponentQualifiers( LPCWSTR szComponent, DWORD iIndex,
- awstring *lpQualBuf, LPDWORD pcchQual,
- awstring *lpAppBuf, LPDWORD pcchAppBuf )
+static UINT MSI_EnumComponentQualifiers( const WCHAR *szComponent, DWORD iIndex, awstring *lpQualBuf,
+ DWORD *pcchQual, awstring *lpAppBuf, DWORD *pcchAppBuf )
{
DWORD name_sz, val_sz, name_max, val_max, type, ofs;
- LPWSTR name = NULL, val = NULL;
+ WCHAR *name = NULL, *val = NULL;
UINT r, r2;
HKEY key;
- TRACE("%s %08x %p %p %p %p\n", debugstr_w(szComponent), iIndex,
- lpQualBuf, pcchQual, lpAppBuf, pcchAppBuf);
+ TRACE( "%s, %lu, %p, %p, %p, %p\n", debugstr_w(szComponent), iIndex, lpQualBuf, pcchQual, lpAppBuf, pcchAppBuf );
if (!szComponent)
return ERROR_INVALID_PARAMETER;
@@ -1451,8 +1444,7 @@ static UINT MSI_EnumComponentQualifiers( LPCWSTR szComponent, DWORD iIndex,
{
name_sz = name_max;
val_sz = val_max;
- r = RegEnumValueW( key, iIndex, name, &name_sz,
- NULL, &type, (LPBYTE)val, &val_sz );
+ r = RegEnumValueW( key, iIndex, name, &name_sz, NULL, &type, (BYTE *)val, &val_sz );
if (r == ERROR_SUCCESS)
break;
if (r != ERROR_MORE_DATA)
@@ -1460,7 +1452,7 @@ static UINT MSI_EnumComponentQualifiers( LPCWSTR szComponent, DWORD iIndex,
if (type != REG_MULTI_SZ)
{
- ERR("component data has wrong type (%d)\n", type);
+ ERR( "component data has wrong type (%lu)\n", type );
goto end;
}
@@ -1483,7 +1475,7 @@ static UINT MSI_EnumComponentQualifiers( LPCWSTR szComponent, DWORD iIndex,
goto end;
continue;
}
- ERR("should be enough data, but isn't %d %d\n", name_sz, val_sz );
+ ERR( "should be enough data, but isn't %lu %lu\n", name_sz, val_sz );
goto end;
}
@@ -1510,17 +1502,16 @@ end:
/*************************************************************************
* MsiEnumComponentQualifiersA [MSI.@]
*/
-UINT WINAPI MsiEnumComponentQualifiersA( LPCSTR szComponent, DWORD iIndex,
- LPSTR lpQualifierBuf, LPDWORD pcchQualifierBuf,
- LPSTR lpApplicationDataBuf, LPDWORD pcchApplicationDataBuf )
+UINT WINAPI MsiEnumComponentQualifiersA( const char *szComponent, DWORD iIndex, char *lpQualifierBuf,
+ DWORD *pcchQualifierBuf, char *lpApplicationDataBuf,
+ DWORD *pcchApplicationDataBuf )
{
awstring qual, appdata;
- LPWSTR comp;
+ WCHAR *comp;
UINT r;
- TRACE("%s %08x %p %p %p %p\n", debugstr_a(szComponent), iIndex,
- lpQualifierBuf, pcchQualifierBuf, lpApplicationDataBuf,
- pcchApplicationDataBuf);
+ TRACE( "%s, %lu, %p, %p, %p, %p\n", debugstr_a(szComponent), iIndex, lpQualifierBuf, pcchQualifierBuf,
+ lpApplicationDataBuf, pcchApplicationDataBuf );
comp = strdupAtoW( szComponent );
if (szComponent && !comp)
@@ -1541,15 +1532,14 @@ UINT WINAPI MsiEnumComponentQualifiersA( LPCSTR szComponent, DWORD iIndex,
/*************************************************************************
* MsiEnumComponentQualifiersW [MSI.@]
*/
-UINT WINAPI MsiEnumComponentQualifiersW( LPCWSTR szComponent, DWORD iIndex,
- LPWSTR lpQualifierBuf, LPDWORD pcchQualifierBuf,
- LPWSTR lpApplicationDataBuf, LPDWORD pcchApplicationDataBuf )
+UINT WINAPI MsiEnumComponentQualifiersW( const WCHAR *szComponent, DWORD iIndex, WCHAR *lpQualifierBuf,
+ DWORD *pcchQualifierBuf, WCHAR *lpApplicationDataBuf,
+ DWORD *pcchApplicationDataBuf )
{
awstring qual, appdata;
- TRACE("%s %08x %p %p %p %p\n", debugstr_w(szComponent), iIndex,
- lpQualifierBuf, pcchQualifierBuf, lpApplicationDataBuf,
- pcchApplicationDataBuf);
+ TRACE( "%s, %lu, %p, %p, %p, %p\n", debugstr_w(szComponent), iIndex, lpQualifierBuf, pcchQualifierBuf,
+ lpApplicationDataBuf, pcchApplicationDataBuf );
qual.unicode = TRUE;
qual.str.w = lpQualifierBuf;
@@ -1557,24 +1547,22 @@ UINT WINAPI MsiEnumComponentQualifiersW( LPCWSTR szComponent, DWORD iIndex,
appdata.unicode = TRUE;
appdata.str.w = lpApplicationDataBuf;
- return MSI_EnumComponentQualifiers( szComponent, iIndex,
- &qual, pcchQualifierBuf, &appdata, pcchApplicationDataBuf );
+ return MSI_EnumComponentQualifiers( szComponent, iIndex, &qual, pcchQualifierBuf, &appdata, pcchApplicationDataBuf );
}
/*************************************************************************
* MsiEnumRelatedProductsW [MSI.@]
*
*/
-UINT WINAPI MsiEnumRelatedProductsW(LPCWSTR szUpgradeCode, DWORD dwReserved,
- DWORD iProductIndex, LPWSTR lpProductBuf)
+UINT WINAPI MsiEnumRelatedProductsW( const WCHAR *szUpgradeCode, DWORD dwReserved, DWORD iProductIndex,
+ WCHAR *lpProductBuf )
{
UINT r;
HKEY hkey;
WCHAR szKeyName[SQUASHED_GUID_SIZE];
DWORD dwSize = ARRAY_SIZE(szKeyName);
- TRACE("%s %u %u %p\n", debugstr_w(szUpgradeCode), dwReserved,
- iProductIndex, lpProductBuf);
+ TRACE( "%s, %#lx, %lu, %p\n", debugstr_w(szUpgradeCode), dwReserved, iProductIndex, lpProductBuf );
if (NULL == szUpgradeCode)
return ERROR_INVALID_PARAMETER;
@@ -1597,15 +1585,14 @@ UINT WINAPI MsiEnumRelatedProductsW(LPCWSTR szUpgradeCode, DWORD dwReserved,
* MsiEnumRelatedProductsA [MSI.@]
*
*/
-UINT WINAPI MsiEnumRelatedProductsA(LPCSTR szUpgradeCode, DWORD dwReserved,
- DWORD iProductIndex, LPSTR lpProductBuf)
+UINT WINAPI MsiEnumRelatedProductsA( const char *szUpgradeCode, DWORD dwReserved, DWORD iProductIndex,
+ char *lpProductBuf )
{
- LPWSTR szwUpgradeCode = NULL;
+ WCHAR *szwUpgradeCode = NULL;
WCHAR productW[GUID_SIZE];
UINT r;
- TRACE("%s %u %u %p\n", debugstr_a(szUpgradeCode), dwReserved,
- iProductIndex, lpProductBuf);
+ TRACE( "%s, %#lx, %lu, %p\n", debugstr_a(szUpgradeCode), dwReserved, iProductIndex, lpProductBuf );
if (szUpgradeCode)
{
@@ -1628,23 +1615,19 @@ UINT WINAPI MsiEnumRelatedProductsA(LPCSTR szUpgradeCode, DWORD dwReserved,
/***********************************************************************
* MsiEnumPatchesExA [MSI.@]
*/
-UINT WINAPI MsiEnumPatchesExA(LPCSTR szProductCode, LPCSTR szUserSid,
- DWORD dwContext, DWORD dwFilter, DWORD dwIndex, LPSTR szPatchCode,
- LPSTR szTargetProductCode, MSIINSTALLCONTEXT *pdwTargetProductContext,
- LPSTR szTargetUserSid, LPDWORD pcchTargetUserSid)
+UINT WINAPI MsiEnumPatchesExA( const char *szProductCode, const char *szUserSid, DWORD dwContext, DWORD dwFilter,
+ DWORD dwIndex, char *szPatchCode, char *szTargetProductCode,
+ MSIINSTALLCONTEXT *pdwTargetProductContext, char *szTargetUserSid,
+ DWORD *pcchTargetUserSid )
{
- LPWSTR prodcode = NULL;
- LPWSTR usersid = NULL;
- LPWSTR targsid = NULL;
- WCHAR patch[GUID_SIZE];
- WCHAR targprod[GUID_SIZE];
+ WCHAR *prodcode = NULL, *usersid = NULL, *targsid = NULL;
+ WCHAR patch[GUID_SIZE], targprod[GUID_SIZE];
DWORD len;
UINT r;
- TRACE("(%s, %s, %d, %d, %d, %p, %p, %p, %p, %p)\n",
- debugstr_a(szProductCode), debugstr_a(szUserSid), dwContext, dwFilter,
- dwIndex, szPatchCode, szTargetProductCode, pdwTargetProductContext,
- szTargetUserSid, pcchTargetUserSid);
+ TRACE( "%s, %s, %#lx, %lu, %lu, %p, %p, %p, %p, %p\n", debugstr_a(szProductCode), debugstr_a(szUserSid),
+ dwContext, dwFilter, dwIndex, szPatchCode, szTargetProductCode, pdwTargetProductContext, szTargetUserSid,
+ pcchTargetUserSid );
if (szTargetUserSid && !pcchTargetUserSid)
return ERROR_INVALID_PARAMETER;
@@ -1977,10 +1960,10 @@ done:
/***********************************************************************
* MsiEnumPatchesExW [MSI.@]
*/
-UINT WINAPI MsiEnumPatchesExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
- DWORD dwContext, DWORD dwFilter, DWORD dwIndex, LPWSTR szPatchCode,
- LPWSTR szTargetProductCode, MSIINSTALLCONTEXT *pdwTargetProductContext,
- LPWSTR szTargetUserSid, LPDWORD pcchTargetUserSid)
+UINT WINAPI MsiEnumPatchesExW( const WCHAR *szProductCode, const WCHAR *szUserSid, DWORD dwContext, DWORD dwFilter,
+ DWORD dwIndex, WCHAR *szPatchCode, WCHAR *szTargetProductCode,
+ MSIINSTALLCONTEXT *pdwTargetProductContext, WCHAR *szTargetUserSid,
+ DWORD *pcchTargetUserSid )
{
WCHAR squashed_pc[SQUASHED_GUID_SIZE];
DWORD idx = 0;
@@ -1988,10 +1971,9 @@ UINT WINAPI MsiEnumPatchesExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
static DWORD last_index;
- TRACE("(%s, %s, %d, %d, %d, %p, %p, %p, %p, %p)\n",
- debugstr_w(szProductCode), debugstr_w(szUserSid), dwContext, dwFilter,
- dwIndex, szPatchCode, szTargetProductCode, pdwTargetProductContext,
- szTargetUserSid, pcchTargetUserSid);
+ TRACE( "%s, %s, %#lx, %lu, %lu, %p, %p, %p, %p, %p)\n", debugstr_w(szProductCode), debugstr_w(szUserSid),
+ dwContext, dwFilter, dwIndex, szPatchCode, szTargetProductCode, pdwTargetProductContext, szTargetUserSid,
+ pcchTargetUserSid );
if (!szProductCode || !squash_guid( szProductCode, squashed_pc ))
return ERROR_INVALID_PARAMETER;
@@ -2031,16 +2013,15 @@ UINT WINAPI MsiEnumPatchesExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
/***********************************************************************
* MsiEnumPatchesA [MSI.@]
*/
-UINT WINAPI MsiEnumPatchesA(LPCSTR szProduct, DWORD iPatchIndex,
- LPSTR lpPatchBuf, LPSTR lpTransformsBuf, LPDWORD pcchTransformsBuf)
+UINT WINAPI MsiEnumPatchesA( const char *szProduct, DWORD iPatchIndex, char *lpPatchBuf, char *lpTransformsBuf,
+ DWORD *pcchTransformsBuf )
{
- LPWSTR product, transforms;
- WCHAR patch[GUID_SIZE];
+ WCHAR *product, *transforms, patch[GUID_SIZE];
DWORD len;
UINT r;
- TRACE("(%s %d %p %p %p)\n", debugstr_a(szProduct), iPatchIndex,
- lpPatchBuf, lpTransformsBuf, pcchTransformsBuf);
+ TRACE( "%s, %lu, %p, %p, %p\n", debugstr_a(szProduct), iPatchIndex, lpPatchBuf, lpTransformsBuf,
+ pcchTransformsBuf );
if (!szProduct || !lpPatchBuf || !lpTransformsBuf || !pcchTransformsBuf)
return ERROR_INVALID_PARAMETER;
@@ -2086,16 +2067,16 @@ done:
/***********************************************************************
* MsiEnumPatchesW [MSI.@]
*/
-UINT WINAPI MsiEnumPatchesW(LPCWSTR szProduct, DWORD iPatchIndex,
- LPWSTR lpPatchBuf, LPWSTR lpTransformsBuf, LPDWORD pcchTransformsBuf)
+UINT WINAPI MsiEnumPatchesW( const WCHAR *szProduct, DWORD iPatchIndex, WCHAR *lpPatchBuf, WCHAR *lpTransformsBuf,
+ DWORD *pcchTransformsBuf )
{
WCHAR *transforms = NULL, squashed_pc[SQUASHED_GUID_SIZE];
HKEY prod;
DWORD idx = 0;
UINT r;
- TRACE("(%s %d %p %p %p)\n", debugstr_w(szProduct), iPatchIndex,
- lpPatchBuf, lpTransformsBuf, pcchTransformsBuf);
+ TRACE( "%s, %lu, %p, %p, %p)\n", debugstr_w(szProduct), iPatchIndex, lpPatchBuf, lpTransformsBuf,
+ pcchTransformsBuf );
if (!szProduct || !squash_guid( szProduct, squashed_pc ))
return ERROR_INVALID_PARAMETER;
@@ -2133,15 +2114,15 @@ done:
return r;
}
-UINT WINAPI MsiEnumProductsExA( LPCSTR product, LPCSTR usersid, DWORD ctx, DWORD index,
- CHAR installed_product[GUID_SIZE],
- MSIINSTALLCONTEXT *installed_ctx, LPSTR sid, LPDWORD sid_len )
+UINT WINAPI MsiEnumProductsExA( const char *product, const char *usersid, DWORD ctx, DWORD index,
+ char installed_product[GUID_SIZE], MSIINSTALLCONTEXT *installed_ctx, char *sid,
+ DWORD *sid_len )
{
UINT r;
WCHAR installed_productW[GUID_SIZE], *productW = NULL, *usersidW = NULL, *sidW = NULL;
- TRACE("%s, %s, %u, %u, %p, %p, %p, %p\n", debugstr_a(product), debugstr_a(usersid),
- ctx, index, installed_product, installed_ctx, sid, sid_len);
+ TRACE( "%s, %s, %#lx, %lu, %p, %p, %p, %p\n", debugstr_a(product), debugstr_a(usersid), ctx, index,
+ installed_product, installed_ctx, sid, sid_len );
if (sid && !sid_len) return ERROR_INVALID_PARAMETER;
if (product && !(productW = strdupAtoW( product ))) return ERROR_OUTOFMEMORY;
@@ -2342,16 +2323,16 @@ done:
return r;
}
-UINT WINAPI MsiEnumProductsExW( LPCWSTR product, LPCWSTR usersid, DWORD ctx, DWORD index,
- WCHAR installed_product[GUID_SIZE],
- MSIINSTALLCONTEXT *installed_ctx, LPWSTR sid, LPDWORD sid_len )
+UINT WINAPI MsiEnumProductsExW( const WCHAR *product, const WCHAR *usersid, DWORD ctx, DWORD index,
+ WCHAR installed_product[GUID_SIZE], MSIINSTALLCONTEXT *installed_ctx, WCHAR *sid,
+ DWORD *sid_len )
{
UINT r;
DWORD idx = 0;
static DWORD last_index;
- TRACE("%s, %s, %u, %u, %p, %p, %p, %p\n", debugstr_w(product), debugstr_w(usersid),
- ctx, index, installed_product, installed_ctx, sid, sid_len);
+ TRACE( "%s, %s, %#lx, %lu, %p, %p, %p, %p\n", debugstr_w(product), debugstr_w(usersid), ctx, index,
+ installed_product, installed_ctx, sid, sid_len );
if ((sid && !sid_len) || !ctx || (usersid && ctx == MSIINSTALLCONTEXT_MACHINE))
return ERROR_INVALID_PARAMETER;
diff --git a/dlls/msi/script.c b/dlls/msi/script.c
index 4585c2b5922..26dcddc041e 100644
--- a/dlls/msi/script.c
+++ b/dlls/msi/script.c
@@ -90,7 +90,7 @@ static ULONG WINAPI MsiActiveScriptSite_AddRef(IActiveScriptSite* iface)
{
MsiActiveScriptSite *This = impl_from_IActiveScriptSite(iface);
ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE( "(%p)->(%lu)\n", This, ref );
return ref;
}
@@ -99,7 +99,7 @@ static ULONG WINAPI MsiActiveScriptSite_Release(IActiveScriptSite* iface)
MsiActiveScriptSite *This = impl_from_IActiveScriptSite(iface);
ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE( "(%p)->(%lu)\n", This, ref );
if (!ref)
msi_free(This);
@@ -118,7 +118,7 @@ static HRESULT WINAPI MsiActiveScriptSite_GetItemInfo(IActiveScriptSite* iface,
{
MsiActiveScriptSite *This = impl_from_IActiveScriptSite(iface);
- TRACE("(%p)->(%p, %d, %p, %p)\n", This, pstrName, dwReturnMask, ppiunkItem, ppti);
+ TRACE( "(%p)->(%p, %lu, %p, %p)\n", This, pstrName, dwReturnMask, ppiunkItem, ppti );
/* Determine the kind of pointer that is requested, and make sure placeholder is valid */
if (dwReturnMask & SCRIPTINFO_ITYPEINFO) {
diff --git a/dlls/msi/source.c b/dlls/msi/source.c
index 0eed436774a..7ed0aabf142 100644
--- a/dlls/msi/source.c
+++ b/dlls/msi/source.c
@@ -141,21 +141,17 @@ static UINT OpenURLSubkey(HKEY rootkey, HKEY *key, BOOL create)
/******************************************************************
* MsiSourceListEnumMediaDisksA (MSI.@)
*/
-UINT WINAPI MsiSourceListEnumMediaDisksA(LPCSTR szProductCodeOrPatchCode,
- LPCSTR szUserSid, MSIINSTALLCONTEXT dwContext,
- DWORD dwOptions, DWORD dwIndex, LPDWORD pdwDiskId,
- LPSTR szVolumeLabel, LPDWORD pcchVolumeLabel,
- LPSTR szDiskPrompt, LPDWORD pcchDiskPrompt)
+UINT WINAPI MsiSourceListEnumMediaDisksA( const char *szProductCodeOrPatchCode, const char *szUserSid,
+ MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwIndex,
+ DWORD *pdwDiskId, char *szVolumeLabel, DWORD *pcchVolumeLabel,
+ char *szDiskPrompt, DWORD *pcchDiskPrompt )
{
- LPWSTR product = NULL;
- LPWSTR usersid = NULL;
- LPWSTR volume = NULL;
- LPWSTR prompt = NULL;
+ WCHAR *product = NULL, *usersid = NULL, *volume = NULL, *prompt = NULL;
UINT r = ERROR_INVALID_PARAMETER;
- TRACE("(%s, %s, %d, %d, %d, %p, %p, %p, %p, %p)\n", debugstr_a(szProductCodeOrPatchCode),
- debugstr_a(szUserSid), dwContext, dwOptions, dwIndex, pdwDiskId,
- szVolumeLabel, pcchVolumeLabel, szDiskPrompt, pcchDiskPrompt);
+ TRACE( "%s, %s, %d, %#lx, %lu, %p, %p, %p, %p, %p\n", debugstr_a(szProductCodeOrPatchCode),
+ debugstr_a(szUserSid), dwContext, dwOptions, dwIndex, pdwDiskId, szVolumeLabel, pcchVolumeLabel,
+ szDiskPrompt, pcchDiskPrompt );
if (szDiskPrompt && !pcchDiskPrompt)
return ERROR_INVALID_PARAMETER;
@@ -199,11 +195,10 @@ done:
/******************************************************************
* MsiSourceListEnumMediaDisksW (MSI.@)
*/
-UINT WINAPI MsiSourceListEnumMediaDisksW(LPCWSTR szProductCodeOrPatchCode,
- LPCWSTR szUserSid, MSIINSTALLCONTEXT dwContext,
- DWORD dwOptions, DWORD dwIndex, LPDWORD pdwDiskId,
- LPWSTR szVolumeLabel, LPDWORD pcchVolumeLabel,
- LPWSTR szDiskPrompt, LPDWORD pcchDiskPrompt)
+UINT WINAPI MsiSourceListEnumMediaDisksW( const WCHAR *szProductCodeOrPatchCode, const WCHAR *szUserSid,
+ MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwIndex,
+ DWORD *pdwDiskId, WCHAR *szVolumeLabel, DWORD *pcchVolumeLabel,
+ WCHAR *szDiskPrompt, DWORD *pcchDiskPrompt )
{
WCHAR squashed_pc[SQUASHED_GUID_SIZE], convert[11];
WCHAR *value = NULL, *data = NULL, *ptr, *ptr2;
@@ -213,9 +208,9 @@ UINT WINAPI MsiSourceListEnumMediaDisksW(LPCWSTR szProductCodeOrPatchCode,
UINT r;
static DWORD index = 0;
- TRACE("(%s, %s, %d, %d, %d, %p, %p, %p, %p)\n", debugstr_w(szProductCodeOrPatchCode),
- debugstr_w(szUserSid), dwContext, dwOptions, dwIndex, szVolumeLabel,
- pcchVolumeLabel, szDiskPrompt, pcchDiskPrompt);
+ TRACE( "%s, %s, %d, %#lx, %lu, %p, %p, %p, %p\n", debugstr_w(szProductCodeOrPatchCode),
+ debugstr_w(szUserSid), dwContext, dwOptions, dwIndex, szVolumeLabel, pcchVolumeLabel,
+ szDiskPrompt, pcchDiskPrompt );
if (!szProductCodeOrPatchCode || !squash_guid( szProductCodeOrPatchCode, squashed_pc ))
return ERROR_INVALID_PARAMETER;
@@ -331,20 +326,17 @@ done:
/******************************************************************
* MsiSourceListEnumSourcesA (MSI.@)
*/
-UINT WINAPI MsiSourceListEnumSourcesA(LPCSTR szProductCodeOrPatch, LPCSTR szUserSid,
- MSIINSTALLCONTEXT dwContext,
- DWORD dwOptions, DWORD dwIndex,
- LPSTR szSource, LPDWORD pcchSource)
+UINT WINAPI MsiSourceListEnumSourcesA( const char *szProductCodeOrPatch, const char *szUserSid,
+ MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwIndex, char *szSource,
+ DWORD *pcchSource )
{
- LPWSTR product = NULL;
- LPWSTR usersid = NULL;
- LPWSTR source = NULL;
+ WCHAR *product = NULL, *usersid = NULL, *source = NULL;
DWORD len = 0;
UINT r = ERROR_INVALID_PARAMETER;
static DWORD index = 0;
- TRACE("(%s, %s, %d, %d, %d, %p, %p)\n", debugstr_a(szProductCodeOrPatch),
- debugstr_a(szUserSid), dwContext, dwOptions, dwIndex, szSource, pcchSource);
+ TRACE( "%s, %s, %d, %#lx, %lu, %p, %p)\n", debugstr_a(szProductCodeOrPatch), debugstr_a(szUserSid), dwContext,
+ dwOptions, dwIndex, szSource, pcchSource );
if (dwIndex == 0)
index = 0;
@@ -403,10 +395,9 @@ done:
/******************************************************************
* MsiSourceListEnumSourcesW (MSI.@)
*/
-UINT WINAPI MsiSourceListEnumSourcesW(LPCWSTR szProductCodeOrPatch, LPCWSTR szUserSid,
- MSIINSTALLCONTEXT dwContext,
- DWORD dwOptions, DWORD dwIndex,
- LPWSTR szSource, LPDWORD pcchSource)
+UINT WINAPI MsiSourceListEnumSourcesW( const WCHAR *szProductCodeOrPatch, const WCHAR *szUserSid,
+ MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwIndex, WCHAR *szSource,
+ DWORD *pcchSource )
{
WCHAR squashed_pc[SQUASHED_GUID_SIZE], name[32];
HKEY source = NULL, subkey = NULL;
@@ -414,8 +405,8 @@ UINT WINAPI MsiSourceListEnumSourcesW(LPCWSTR szProductCodeOrPatch, LPCWSTR szUs
UINT r = ERROR_INVALID_PARAMETER;
static DWORD index = 0;
- TRACE("(%s, %s, %d, %d, %d, %p, %p)\n", debugstr_w(szProductCodeOrPatch),
- debugstr_w(szUserSid), dwContext, dwOptions, dwIndex, szSource, pcchSource);
+ TRACE( "%s, %s, %d, %#lx, %lu, %p, %p\n", debugstr_w(szProductCodeOrPatch), debugstr_w(szUserSid), dwContext,
+ dwOptions, dwIndex, szSource, pcchSource );
if (dwIndex == 0)
index = 0;
@@ -754,17 +745,16 @@ UINT msi_set_last_used_source(LPCWSTR product, LPCWSTR usersid,
/******************************************************************
* MsiSourceListSetInfoW (MSI.@)
*/
-UINT WINAPI MsiSourceListSetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
- MSIINSTALLCONTEXT dwContext, DWORD dwOptions,
- LPCWSTR szProperty, LPCWSTR szValue)
+UINT WINAPI MsiSourceListSetInfoW( const WCHAR *szProduct, const WCHAR *szUserSid, MSIINSTALLCONTEXT dwContext,
+ DWORD dwOptions, const WCHAR *szProperty, const WCHAR *szValue )
{
WCHAR squashed_pc[SQUASHED_GUID_SIZE];
HKEY sourcekey, media;
LPCWSTR property;
UINT rc;
- TRACE("%s %s %x %x %s %s\n", debugstr_w(szProduct), debugstr_w(szUserSid),
- dwContext, dwOptions, debugstr_w(szProperty), debugstr_w(szValue));
+ TRACE( "%s, %s, %d, %#lx, %s, %s\n", debugstr_w(szProduct), debugstr_w(szUserSid), dwContext, dwOptions,
+ debugstr_w(szProperty), debugstr_w(szValue) );
if (!szProduct || !squash_guid( szProduct, squashed_pc ))
return ERROR_INVALID_PARAMETER;
@@ -1041,9 +1031,8 @@ error:
/******************************************************************
* MsiSourceListAddSourceExW (MSI.@)
*/
-UINT WINAPI MsiSourceListAddSourceExW( LPCWSTR szProduct, LPCWSTR szUserSid,
- MSIINSTALLCONTEXT dwContext, DWORD dwOptions, LPCWSTR szSource,
- DWORD dwIndex)
+UINT WINAPI MsiSourceListAddSourceExW( const WCHAR *szProduct, const WCHAR *szUserSid, MSIINSTALLCONTEXT dwContext,
+ DWORD dwOptions, const WCHAR *szSource, DWORD dwIndex )
{
HKEY sourcekey, typekey;
UINT rc;
@@ -1053,8 +1042,8 @@ UINT WINAPI MsiSourceListAddSourceExW( LPCWSTR szProduct, LPCWSTR szUserSid,
LPCWSTR postfix;
DWORD size, count, index;
- TRACE("%s %s %x %x %s %i\n", debugstr_w(szProduct), debugstr_w(szUserSid),
- dwContext, dwOptions, debugstr_w(szSource), dwIndex);
+ TRACE( "%s, %s, %d, %#lx, %s, %lu\n", debugstr_w(szProduct), debugstr_w(szUserSid), dwContext, dwOptions,
+ debugstr_w(szSource), dwIndex );
if (!szProduct || !squash_guid( szProduct, squashed_pc ))
return ERROR_INVALID_PARAMETER;
@@ -1086,7 +1075,7 @@ UINT WINAPI MsiSourceListAddSourceExW( LPCWSTR szProduct, LPCWSTR szUserSid,
rc = OpenMediaSubkey(sourcekey, &typekey, TRUE);
else
{
- ERR("unknown media type: %08x\n", dwOptions);
+ ERR( "unknown media type: %#lx\n", dwOptions );
RegCloseKey(sourcekey);
return ERROR_FUNCTION_FAILED;
}
@@ -1194,18 +1183,17 @@ UINT WINAPI MsiSourceListAddMediaDiskA(LPCSTR szProduct, LPCSTR szUserSid,
/******************************************************************
* MsiSourceListAddMediaDiskW (MSI.@)
*/
-UINT WINAPI MsiSourceListAddMediaDiskW(LPCWSTR szProduct, LPCWSTR szUserSid,
- MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwDiskId,
- LPCWSTR szVolumeLabel, LPCWSTR szDiskPrompt)
+UINT WINAPI MsiSourceListAddMediaDiskW( const WCHAR *szProduct, const WCHAR *szUserSid, MSIINSTALLCONTEXT dwContext,
+ DWORD dwOptions, DWORD dwDiskId, const WCHAR *szVolumeLabel,
+ const WCHAR *szDiskPrompt )
{
HKEY sourcekey, mediakey;
UINT rc;
WCHAR *buffer, squashed_pc[SQUASHED_GUID_SIZE], szIndex[10];
DWORD size;
- TRACE("%s %s %x %x %i %s %s\n", debugstr_w(szProduct),
- debugstr_w(szUserSid), dwContext, dwOptions, dwDiskId,
- debugstr_w(szVolumeLabel), debugstr_w(szDiskPrompt));
+ TRACE( "%s, %s, %d, %#lx, %lu, %s, %s\n", debugstr_w(szProduct), debugstr_w(szUserSid), dwContext, dwOptions,
+ dwDiskId, debugstr_w(szVolumeLabel), debugstr_w(szDiskPrompt) );
if (!szProduct || !squash_guid( szProduct, squashed_pc ))
return ERROR_INVALID_PARAMETER;
@@ -1257,81 +1245,77 @@ UINT WINAPI MsiSourceListAddMediaDiskW(LPCWSTR szProduct, LPCWSTR szUserSid,
/******************************************************************
* MsiSourceListClearAllA (MSI.@)
*/
-UINT WINAPI MsiSourceListClearAllA( LPCSTR szProduct, LPCSTR szUserName, DWORD dwReserved )
+UINT WINAPI MsiSourceListClearAllA( const char *szProduct, const char *szUserName, DWORD dwReserved )
{
- FIXME("(%s %s %d)\n", debugstr_a(szProduct), debugstr_a(szUserName), dwReserved);
+ FIXME( "%s, %s, %#lx\n", debugstr_a(szProduct), debugstr_a(szUserName), dwReserved );
return ERROR_SUCCESS;
}
/******************************************************************
* MsiSourceListClearAllW (MSI.@)
*/
-UINT WINAPI MsiSourceListClearAllW( LPCWSTR szProduct, LPCWSTR szUserName, DWORD dwReserved )
+UINT WINAPI MsiSourceListClearAllW( const WCHAR *szProduct, const WCHAR *szUserName, DWORD dwReserved )
{
- FIXME("(%s %s %d)\n", debugstr_w(szProduct), debugstr_w(szUserName), dwReserved);
+ FIXME( "%s, %s, %#lx\n", debugstr_w(szProduct), debugstr_w(szUserName), dwReserved );
return ERROR_SUCCESS;
}
/******************************************************************
* MsiSourceListClearAllExA (MSI.@)
*/
-UINT WINAPI MsiSourceListClearAllExA( LPCSTR szProduct, LPCSTR szUserSid,
- MSIINSTALLCONTEXT dwContext, DWORD dwOptions )
+UINT WINAPI MsiSourceListClearAllExA( const char *szProduct, const char *szUserSid, MSIINSTALLCONTEXT dwContext,
+ DWORD dwOptions )
{
- FIXME("(%s %s %d %08x)\n", debugstr_a(szProduct), debugstr_a(szUserSid),
- dwContext, dwOptions);
+ FIXME( "%s, %s, %d, %#lx\n", debugstr_a(szProduct), debugstr_a(szUserSid), dwContext, dwOptions );
return ERROR_SUCCESS;
}
/******************************************************************
* MsiSourceListClearAllExW (MSI.@)
*/
-UINT WINAPI MsiSourceListClearAllExW( LPCWSTR szProduct, LPCWSTR szUserSid,
- MSIINSTALLCONTEXT dwContext, DWORD dwOptions )
+UINT WINAPI MsiSourceListClearAllExW( const WCHAR *szProduct, const WCHAR *szUserSid, MSIINSTALLCONTEXT dwContext,
+ DWORD dwOptions )
{
- FIXME("(%s %s %d %08x)\n", debugstr_w(szProduct), debugstr_w(szUserSid),
- dwContext, dwOptions);
+ FIXME( "%s, %s, %d, %#lx\n", debugstr_w(szProduct), debugstr_w(szUserSid), dwContext, dwOptions );
return ERROR_SUCCESS;
}
/******************************************************************
* MsiSourceListClearSourceA (MSI.@)
*/
-UINT WINAPI MsiSourceListClearSourceA(LPCSTR szProductCodeOrPatchCode, LPCSTR szUserSid,
- MSIINSTALLCONTEXT dwContext, DWORD dwOptions,
- LPCSTR szSource)
+UINT WINAPI MsiSourceListClearSourceA( const char *szProductCodeOrPatchCode, const char *szUserSid,
+ MSIINSTALLCONTEXT dwContext, DWORD dwOptions, const char *szSource )
{
- FIXME("(%s %s %x %x %s)\n", debugstr_a(szProductCodeOrPatchCode), debugstr_a(szUserSid),
- dwContext, dwOptions, debugstr_a(szSource));
+ FIXME( "%s, %s, %d, %#lx, %s\n", debugstr_a(szProductCodeOrPatchCode), debugstr_a(szUserSid), dwContext,
+ dwOptions, debugstr_a(szSource) );
return ERROR_SUCCESS;
}
/******************************************************************
* MsiSourceListClearSourceW (MSI.@)
*/
-UINT WINAPI MsiSourceListClearSourceW(LPCWSTR szProductCodeOrPatchCode, LPCWSTR szUserSid,
- MSIINSTALLCONTEXT dwContext, DWORD dwOptions,
- LPCWSTR szSource)
+UINT WINAPI MsiSourceListClearSourceW( const WCHAR *szProductCodeOrPatchCode, const WCHAR *szUserSid,
+ MSIINSTALLCONTEXT dwContext, DWORD dwOptions, LPCWSTR szSource )
{
- FIXME("(%s %s %x %x %s)\n", debugstr_w(szProductCodeOrPatchCode), debugstr_w(szUserSid),
- dwContext, dwOptions, debugstr_w(szSource));
+ FIXME( "%s, %s, %d, %#lx, %s\n", debugstr_w(szProductCodeOrPatchCode), debugstr_w(szUserSid), dwContext,
+ dwOptions, debugstr_w(szSource) );
return ERROR_SUCCESS;
}
/******************************************************************
* MsiSourceListForceResolutionA (MSI.@)
*/
-UINT WINAPI MsiSourceListForceResolutionA(const CHAR *product, const CHAR *user, DWORD reserved)
+UINT WINAPI MsiSourceListForceResolutionA( const char *product, const char *user, DWORD reserved )
{
- FIXME("(%s %s %x)\n", debugstr_a(product), debugstr_a(user), reserved);
+ FIXME( "%s, %s, %#lx\n", debugstr_a(product), debugstr_a(user), reserved );
return ERROR_SUCCESS;
}
/******************************************************************
* MsiSourceListForceResolutionW (MSI.@)
*/
-UINT WINAPI MsiSourceListForceResolutionW(const WCHAR *product, const WCHAR *user, DWORD reserved)
+UINT WINAPI MsiSourceListForceResolutionW( const WCHAR *product, const WCHAR *user, DWORD reserved )
{
- FIXME("(%s %s %x)\n", debugstr_w(product), debugstr_w(user), reserved);
+ FIXME( "%s, %s, %#lx\n", debugstr_w(product), debugstr_w(user), reserved );
return ERROR_SUCCESS;
}
diff --git a/dlls/msi/streams.c b/dlls/msi/streams.c
index 53698f32872..faa9fe4333a 100644
--- a/dlls/msi/streams.c
+++ b/dlls/msi/streams.c
@@ -481,7 +481,7 @@ static UINT load_streams( MSIDATABASE *db )
CoTaskMemFree( stat.pwcsName );
if (FAILED( hr ))
{
- ERR("unable to open stream %08x\n", hr);
+ ERR( "unable to open stream %#lx\n", hr );
r = ERROR_FUNCTION_FAILED;
break;
}
@@ -584,7 +584,7 @@ static HRESULT write_stream( IStream *dst, IStream *src )
hr = IStream_Read( src, buf, size, &count );
if (FAILED( hr ) || count != size)
{
- WARN("failed to read stream: %08x\n", hr);
+ WARN( "failed to read stream: %#lx\n", hr );
return E_INVALIDARG;
}
stat.cbSize.QuadPart -= count;
@@ -594,7 +594,7 @@ static HRESULT write_stream( IStream *dst, IStream *src )
hr = IStream_Write( dst, buf, size, &count );
if (FAILED( hr ) || count != size)
{
- WARN("failed to write stream: %08x\n", hr);
+ WARN( "failed to write stream: %#lx\n", hr );
return E_INVALIDARG;
}
}
@@ -628,7 +628,7 @@ UINT msi_commit_streams( MSIDATABASE *db )
hr = write_stream( stream, db->streams[i].stream );
if (FAILED( hr ))
{
- ERR("failed to write stream %s (hr = %08x)\n", debugstr_w(encname), hr);
+ ERR( "failed to write stream %s (hr = %#lx)\n", debugstr_w(encname), hr );
msi_free( encname );
IStream_Release( stream );
return ERROR_FUNCTION_FAILED;
@@ -637,14 +637,14 @@ UINT msi_commit_streams( MSIDATABASE *db )
IStream_Release( stream );
if (FAILED( hr ))
{
- ERR("failed to commit stream %s (hr = %08x)\n", debugstr_w(encname), hr);
+ ERR( "failed to commit stream %s (hr = %#lx)\n", debugstr_w(encname), hr );
msi_free( encname );
return ERROR_FUNCTION_FAILED;
}
}
else if (hr != STG_E_FILEALREADYEXISTS)
{
- ERR("failed to create stream %s (hr = %08x)\n", debugstr_w(encname), hr);
+ ERR( "failed to create stream %s (hr = %#lx)\n", debugstr_w(encname), hr );
msi_free( encname );
return ERROR_FUNCTION_FAILED;
}
diff --git a/dlls/msi/string.c b/dlls/msi/string.c
index fb0134810b9..70c6873a331 100644
--- a/dlls/msi/string.c
+++ b/dlls/msi/string.c
@@ -544,15 +544,15 @@ string_table *msi_load_string_table( IStorage *stg, UINT *bytes_per_strref )
r = add_string( st, n, data+offset, len, refs, TRUE );
if( r != n )
- ERR("Failed to add string %d\n", n );
+ ERR( "Failed to add string %lu\n", n );
n++;
offset += len;
}
if ( datasize != offset )
- ERR("string table load failed! (%08x != %08x), please report\n", datasize, offset );
+ ERR( "string table load failed! (%u != %lu), please report\n", datasize, offset );
- TRACE("Loaded %d strings\n", count);
+ TRACE( "loaded %lu strings\n", count );
end:
msi_free( pool );
diff --git a/dlls/msi/suminfo.c b/dlls/msi/suminfo.c
index c0e1e3151ca..296d554cfe0 100644
--- a/dlls/msi/suminfo.c
+++ b/dlls/msi/suminfo.c
@@ -184,14 +184,14 @@ static void read_properties_from_data( PROPVARIANT *prop, LPBYTE data, DWORD sz
{
if( idofs[i].propid >= MSI_MAX_PROPS )
{
- ERR("Unknown property ID %d\n", idofs[i].propid );
+ ERR( "unknown property ID %lu\n", idofs[i].propid );
break;
}
type = get_type( idofs[i].propid );
if( type == VT_EMPTY )
{
- ERR("propid %d has unknown type\n", idofs[i].propid);
+ ERR( "propid %lu has unknown type\n", idofs[i].propid );
break;
}
@@ -282,7 +282,7 @@ static UINT load_summary_info( MSISUMMARYINFO *si, IStream *stm )
if( section_hdr.cProperties > MSI_MAX_PROPS )
{
- ERR("too many properties %d\n", section_hdr.cProperties);
+ ERR( "too many properties %lu\n", section_hdr.cProperties );
return ERROR_FUNCTION_FAILED;
}
@@ -298,7 +298,7 @@ static UINT load_summary_info( MSISUMMARYINFO *si, IStream *stm )
if( SUCCEEDED(r) && count == sz )
read_properties_from_data( si->property, data, sz + SECT_HDR_SIZE );
else
- ERR("failed to read properties %d %d\n", count, sz);
+ ERR( "failed to read properties %lu %lu\n", count, sz );
msi_free( data );
return ERROR_SUCCESS;
@@ -498,15 +498,14 @@ UINT msi_get_db_suminfo( MSIDATABASE *db, UINT uiUpdateCount, MSISUMMARYINFO **r
return ERROR_SUCCESS;
}
-UINT WINAPI MsiGetSummaryInformationW( MSIHANDLE hDatabase,
- LPCWSTR szDatabase, UINT uiUpdateCount, MSIHANDLE *pHandle )
+UINT WINAPI MsiGetSummaryInformationW( MSIHANDLE hDatabase, const WCHAR *szDatabase, UINT uiUpdateCount,
+ MSIHANDLE *pHandle )
{
MSISUMMARYINFO *si;
MSIDATABASE *db;
UINT ret;
- TRACE("%d %s %d %p\n", hDatabase, debugstr_w(szDatabase),
- uiUpdateCount, pHandle);
+ TRACE( "%lu, %s, %u, %p\n", hDatabase, debugstr_w(szDatabase), uiUpdateCount, pHandle );
if( !pHandle )
return ERROR_INVALID_PARAMETER;
@@ -569,14 +568,13 @@ UINT WINAPI MsiGetSummaryInformationW( MSIHANDLE hDatabase,
return ret;
}
-UINT WINAPI MsiGetSummaryInformationA(MSIHANDLE hDatabase,
- LPCSTR szDatabase, UINT uiUpdateCount, MSIHANDLE *pHandle)
+UINT WINAPI MsiGetSummaryInformationA( MSIHANDLE hDatabase, const char *szDatabase, UINT uiUpdateCount,
+ MSIHANDLE *pHandle )
{
- LPWSTR szwDatabase = NULL;
+ WCHAR *szwDatabase = NULL;
UINT ret;
- TRACE("%d %s %d %p\n", hDatabase, debugstr_a(szDatabase),
- uiUpdateCount, pHandle);
+ TRACE( "%lu, %s, %u, %p\n", hDatabase, debugstr_a(szDatabase), uiUpdateCount, pHandle );
if( szDatabase )
{
@@ -592,11 +590,11 @@ UINT WINAPI MsiGetSummaryInformationA(MSIHANDLE hDatabase,
return ret;
}
-UINT WINAPI MsiSummaryInfoGetPropertyCount(MSIHANDLE hSummaryInfo, PUINT pCount)
+UINT WINAPI MsiSummaryInfoGetPropertyCount( MSIHANDLE hSummaryInfo, UINT *pCount )
{
MSISUMMARYINFO *si;
- TRACE("%d %p\n", hSummaryInfo, pCount);
+ TRACE( "%lu, %p\n", hSummaryInfo, pCount );
si = msihandle2msiinfo( hSummaryInfo, MSIHANDLETYPE_SUMMARYINFO );
if( !si )
@@ -723,16 +721,15 @@ LPWSTR msi_get_suminfo_product( IStorage *stg )
return prod;
}
-UINT WINAPI MsiSummaryInfoGetPropertyA(
- MSIHANDLE handle, UINT uiProperty, PUINT puiDataType, LPINT piValue,
- FILETIME *pftValue, LPSTR szValueBuf, LPDWORD pcchValueBuf)
+UINT WINAPI MsiSummaryInfoGetPropertyA( MSIHANDLE handle, UINT uiProperty, UINT *puiDataType, INT *piValue,
+ FILETIME *pftValue, char *szValueBuf, DWORD *pcchValueBuf )
{
MSISUMMARYINFO *si;
awstring str;
UINT r;
- TRACE("%u, %u, %p, %p, %p, %p, %p\n", handle, uiProperty, puiDataType,
- piValue, pftValue, szValueBuf, pcchValueBuf );
+ TRACE( "%lu, %u, %p, %p, %p, %p, %p\n", handle, uiProperty, puiDataType, piValue, pftValue, szValueBuf,
+ pcchValueBuf );
if (uiProperty >= MSI_MAX_PROPS)
{
@@ -775,16 +772,15 @@ UINT WINAPI MsiSummaryInfoGetPropertyA(
return r;
}
-UINT WINAPI MsiSummaryInfoGetPropertyW(
- MSIHANDLE handle, UINT uiProperty, PUINT puiDataType, LPINT piValue,
- FILETIME *pftValue, LPWSTR szValueBuf, LPDWORD pcchValueBuf)
+UINT WINAPI MsiSummaryInfoGetPropertyW( MSIHANDLE handle, UINT uiProperty, UINT *puiDataType, INT *piValue,
+ FILETIME *pftValue, WCHAR *szValueBuf, DWORD *pcchValueBuf )
{
MSISUMMARYINFO *si;
awstring str;
UINT r;
- TRACE("%u, %u, %p, %p, %p, %p, %p\n", handle, uiProperty, puiDataType,
- piValue, pftValue, szValueBuf, pcchValueBuf );
+ TRACE( "%lu, %u, %p, %p, %p, %p, %p\n", handle, uiProperty, puiDataType, piValue, pftValue, szValueBuf,
+ pcchValueBuf );
if (uiProperty >= MSI_MAX_PROPS)
{
@@ -895,15 +891,14 @@ static UINT msi_set_prop( MSISUMMARYINFO *si, UINT uiProperty, UINT uiDataType,
return set_prop( si, uiProperty, type, iValue, pftValue, str );
}
-UINT WINAPI MsiSummaryInfoSetPropertyW( MSIHANDLE handle, UINT uiProperty, UINT uiDataType,
- INT iValue, FILETIME *pftValue, LPCWSTR szValue )
+UINT WINAPI MsiSummaryInfoSetPropertyW( MSIHANDLE handle, UINT uiProperty, UINT uiDataType, INT iValue,
+ FILETIME *pftValue, const WCHAR *szValue )
{
awcstring str;
MSISUMMARYINFO *si;
UINT ret;
- TRACE("%u, %u, %u, %d, %p, %s\n", handle, uiProperty, uiDataType, iValue, pftValue,
- debugstr_w(szValue) );
+ TRACE( "%lu, %u, %u, %d, %p, %s\n", handle, uiProperty, uiDataType, iValue, pftValue, debugstr_w(szValue) );
if (!(si = msihandle2msiinfo( handle, MSIHANDLETYPE_SUMMARYINFO )))
{
@@ -926,15 +921,14 @@ UINT WINAPI MsiSummaryInfoSetPropertyW( MSIHANDLE handle, UINT uiProperty, UINT
return ret;
}
-UINT WINAPI MsiSummaryInfoSetPropertyA( MSIHANDLE handle, UINT uiProperty, UINT uiDataType,
- INT iValue, FILETIME *pftValue, LPCSTR szValue )
+UINT WINAPI MsiSummaryInfoSetPropertyA( MSIHANDLE handle, UINT uiProperty, UINT uiDataType, INT iValue,
+ FILETIME *pftValue, const char *szValue )
{
awcstring str;
MSISUMMARYINFO *si;
UINT ret;
- TRACE("%u, %u, %u, %d, %p, %s\n", handle, uiProperty, uiDataType, iValue, pftValue,
- debugstr_a(szValue) );
+ TRACE( "%lu, %u, %u, %d, %p, %s\n", handle, uiProperty, uiDataType, iValue, pftValue, debugstr_a(szValue) );
if (!(si = msihandle2msiinfo( handle, MSIHANDLETYPE_SUMMARYINFO )))
{
@@ -1209,7 +1203,7 @@ UINT WINAPI MsiSummaryInfoPersist( MSIHANDLE handle )
MSISUMMARYINFO *si;
UINT ret;
- TRACE("%d\n", handle );
+ TRACE( "%lu\n", handle );
si = msihandle2msiinfo( handle, MSIHANDLETYPE_SUMMARYINFO );
if( !si )
@@ -1221,12 +1215,13 @@ UINT WINAPI MsiSummaryInfoPersist( MSIHANDLE handle )
return ret;
}
-UINT WINAPI MsiCreateTransformSummaryInfoA( MSIHANDLE db, MSIHANDLE db_ref, LPCSTR transform, int error, int validation )
+UINT WINAPI MsiCreateTransformSummaryInfoA( MSIHANDLE db, MSIHANDLE db_ref, const char *transform, int error,
+ int validation )
{
UINT r;
WCHAR *transformW = NULL;
- TRACE("%u, %u, %s, %d, %d\n", db, db_ref, debugstr_a(transform), error, validation);
+ TRACE( "%lu, %lu, %s, %d, %d\n", db, db_ref, debugstr_a(transform), error, validation );
if (transform && !(transformW = strdupAtoW( transform )))
return ERROR_OUTOFMEMORY;
@@ -1236,9 +1231,10 @@ UINT WINAPI MsiCreateTransformSummaryInfoA( MSIHANDLE db, MSIHANDLE db_ref, LPCS
return r;
}
-UINT WINAPI MsiCreateTransformSummaryInfoW( MSIHANDLE db, MSIHANDLE db_ref, LPCWSTR transform, int error, int validation )
+UINT WINAPI MsiCreateTransformSummaryInfoW( MSIHANDLE db, MSIHANDLE db_ref, const WCHAR *transform, int error,
+ int validation )
{
- FIXME("%u, %u, %s, %d, %d\n", db, db_ref, debugstr_w(transform), error, validation);
+ FIXME( "%lu, %lu, %s, %d, %d\n", db, db_ref, debugstr_w(transform), error, validation );
return ERROR_FUNCTION_FAILED;
}
diff --git a/dlls/msi/table.c b/dlls/msi/table.c
index abffe75a1c9..8168e2f837d 100644
--- a/dlls/msi/table.c
+++ b/dlls/msi/table.c
@@ -221,8 +221,7 @@ void enum_stream_names( IStorage *stg )
if( FAILED( r ) || !count )
break;
decode_streamname( stat.pwcsName, name );
- TRACE("stream %2d -> %s %s\n", n,
- debugstr_w(stat.pwcsName), debugstr_w(name) );
+ TRACE( "stream %2lu -> %s %s\n", n, debugstr_w(stat.pwcsName), debugstr_w(name) );
CoTaskMemFree( stat.pwcsName );
n++;
}
@@ -250,14 +249,14 @@ UINT read_stream_data( IStorage *stg, LPCWSTR stname, BOOL table,
msi_free( encname );
if( FAILED( r ) )
{
- WARN("open stream failed r = %08x - empty table?\n", r);
+ WARN( "open stream failed r = %#lx - empty table?\n", r );
return ret;
}
r = IStream_Stat(stm, &stat, STATFLAG_NONAME );
if( FAILED( r ) )
{
- WARN("open stream failed r = %08x!\n", r);
+ WARN( "open stream failed r = %#lx!\n", r );
goto end;
}
@@ -271,7 +270,7 @@ UINT read_stream_data( IStorage *stg, LPCWSTR stname, BOOL table,
data = msi_alloc( sz );
if( !data )
{
- WARN("couldn't allocate memory r=%08x!\n", r);
+ WARN( "couldn't allocate memory r = %#lx!\n", r );
ret = ERROR_NOT_ENOUGH_MEMORY;
goto end;
}
@@ -280,7 +279,7 @@ UINT read_stream_data( IStorage *stg, LPCWSTR stname, BOOL table,
if( FAILED( r ) || ( count != sz ) )
{
msi_free( data );
- WARN("read stream failed r = %08x!\n", r);
+ WARN("read stream failed r = %#lx!\n", r);
goto end;
}
@@ -316,7 +315,7 @@ UINT write_stream_data( IStorage *stg, LPCWSTR stname,
msi_free( encname );
if( FAILED( r ) )
{
- WARN("open stream failed r = %08x\n", r);
+ WARN( "open stream failed r = %#lx\n", r );
return ret;
}
@@ -1929,7 +1928,7 @@ static UINT TABLE_add_ref(struct tagMSIVIEW *view)
{
MSITABLEVIEW *tv = (MSITABLEVIEW*)view;
- TRACE("%p %d\n", view, tv->table->ref_count);
+ TRACE( "%p, %ld\n", view, tv->table->ref_count );
return InterlockedIncrement(&tv->table->ref_count);
}
@@ -2914,7 +2913,7 @@ UINT MSI_CommitTables( MSIDATABASE *db )
hr = IStorage_Commit( db->storage, 0 );
if (FAILED( hr ))
{
- WARN("failed to commit changes 0x%08x\n", hr);
+ WARN( "failed to commit changes %#lx\n", hr );
r = ERROR_FUNCTION_FAILED;
}
return r;
diff --git a/dlls/msi/upgrade.c b/dlls/msi/upgrade.c
index 18649fced3d..c9744e51859 100644
--- a/dlls/msi/upgrade.c
+++ b/dlls/msi/upgrade.c
@@ -142,7 +142,7 @@ static UINT ITERATE_FindRelatedProducts(MSIRECORD *rec, LPVOID param)
HKEY hukey;
INT r;
- TRACE("Looking at index %u product %s\n", index, debugstr_w(product));
+ TRACE( "looking at index %lu product %s\n", index, debugstr_w(product) );
unsquash_guid(product, productid);
if (MSIREG_OpenProductKey(productid, NULL, MSIINSTALLCONTEXT_USERMANAGED, &hukey, FALSE) &&
--
2.30.2
1
0