winhttp: Build without -DWINE_NO_LONG_TYPES.
Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3c695e3ce9
commit
120244aefe
|
@ -1,4 +1,3 @@
|
|||
EXTRADEFS = -DWINE_NO_LONG_TYPES
|
||||
MODULE = winhttp.dll
|
||||
IMPORTLIB = winhttp
|
||||
IMPORTS = uuid jsproxy user32 advapi32 ws2_32
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 )))
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue