https://git.reactos.org/?p=reactos.git;a=commitdiff;h=33fde115eb692bb38e5e0…
commit 33fde115eb692bb38e5e083604d5c93372c77cdf
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Tue Dec 8 17:50:33 2020 +0100
Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com>
CommitDate: Tue Jan 5 11:03:13 2021 +0100
[WINESYNC] wininet: Add support for detecting the proxy config URL.
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id a4357043ff9aa14f086207c239f0fc29c0a24b83 by Hans Leidekker
<hans(a)codeweavers.com>
---
dll/win32/wininet/CMakeLists.txt | 10 +-
dll/win32/wininet/inet_ntop.c | 9 +-
dll/win32/wininet/internet.c | 235 +++++++++++++++++++++++++++++++--------
dll/win32/wininet/precomp.h | 10 +-
dll/win32/wininet/utility.c | 14 +--
sdk/include/psdk/dhcpcsdk.h | 158 ++++++++++++++++++++------
sdk/tools/winesync/wininet.cfg | 2 +-
7 files changed, 337 insertions(+), 101 deletions(-)
diff --git a/dll/win32/wininet/CMakeLists.txt b/dll/win32/wininet/CMakeLists.txt
index ef7693f3c7a..a427a8dd5fc 100644
--- a/dll/win32/wininet/CMakeLists.txt
+++ b/dll/win32/wininet/CMakeLists.txt
@@ -1,6 +1,10 @@
-remove_definitions(-DWINVER=0x502)
-add_definitions(-DWINVER=0x600)
+remove_definitions(
+ -DWINVER=0x502
+ -D_WIN32_WINNT=0x502)
+add_definitions(
+ -DWINVER=0x600
+ -D_WIN32_WINNT=0x600)
add_definitions(
-D__WINESRC__
@@ -34,7 +38,7 @@ add_library(wininet MODULE
set_module_type(wininet win32dll)
target_link_libraries(wininet wine ${PSEH_LIB} zlib)
-add_delay_importlibs(wininet secur32 crypt32 cryptui)
+add_delay_importlibs(wininet secur32 crypt32 cryptui iphlpapi dhcpcsvc)
add_importlibs(wininet mpr shlwapi shell32 user32 advapi32 ws2_32 normaliz kernel32_vista
msvcrt kernel32 ntdll)
add_pch(wininet precomp.h "${PCH_SKIP_SOURCE}")
add_cd_file(TARGET wininet DESTINATION reactos/system32 FOR all)
diff --git a/dll/win32/wininet/inet_ntop.c b/dll/win32/wininet/inet_ntop.c
index d082057b0c6..27a388f9146 100644
--- a/dll/win32/wininet/inet_ntop.c
+++ b/dll/win32/wininet/inet_ntop.c
@@ -49,8 +49,13 @@ static const char *inet_ntop6(const u_char *src, char *dst, socklen_t
size);
* author:
* Paul Vixie, 1996.
*/
-const char *
-inet_ntop(int af, const void *src, char *dst, socklen_t size)
+PCSTR
+WSAAPI
+inet_ntop(
+ _In_ INT af,
+ _In_ PVOID src,
+ _Out_writes_(StringBufSize) PSTR dst,
+ _In_ size_t size)
{
switch (af) {
diff --git a/dll/win32/wininet/internet.c b/dll/win32/wininet/internet.c
index fe45030c8c5..8cd54d2b8e1 100644
--- a/dll/win32/wininet/internet.c
+++ b/dll/win32/wininet/internet.c
@@ -1,3 +1,6 @@
+#ifdef __REACTOS__
+#include "precomp.h"
+#else
/*
* Wininet
*
@@ -28,14 +31,6 @@
#include "config.h"
-#ifdef HAVE_CORESERVICES_CORESERVICES_H
-#define GetCurrentThread MacGetCurrentThread
-#define LoadResource MacLoadResource
-#include <CoreServices/CoreServices.h>
-#undef GetCurrentThread
-#undef LoadResource
-#endif
-
#include "winsock2.h"
#include "ws2ipdef.h"
@@ -56,6 +51,10 @@
#include "winerror.h"
#define NO_SHLWAPI_STREAM
#include "shlwapi.h"
+#include "ws2tcpip.h"
+#include "winternl.h"
+#include "iphlpapi.h"
+#include "dhcpcsdk.h"
#include "wine/exception.h"
@@ -63,6 +62,7 @@
#include "resource.h"
#include "wine/unicode.h"
+#endif /* defined(__REACTOS__) */
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
@@ -76,7 +76,7 @@ static DWORD g_dwTlsErrIndex = TLS_OUT_OF_INDEXES;
HMODULE WININET_hModule;
static CRITICAL_SECTION WININET_cs;
-static CRITICAL_SECTION_DEBUG WININET_cs_debug =
+static CRITICAL_SECTION_DEBUG WININET_cs_debug =
{
0, 0, &WININET_cs,
{ &WININET_cs_debug.ProcessLocksList, &WININET_cs_debug.ProcessLocksList },
@@ -740,7 +740,7 @@ static BOOL INTERNET_ConfigureProxy( appinfo_t *lpwai )
* None
*
*/
-static void dump_INTERNET_FLAGS(DWORD dwFlags)
+static void dump_INTERNET_FLAGS(DWORD dwFlags)
{
#define FE(x) { x, #x }
static const wininet_flag_info flag[] = {
@@ -781,7 +781,7 @@ static void dump_INTERNET_FLAGS(DWORD dwFlags)
TRACE(" %s", flag[i].name);
dwFlags &= ~flag[i].val;
}
- }
+ }
if (dwFlags)
TRACE(" Unknown flags (%08x)\n", dwFlags);
else
@@ -1017,7 +1017,7 @@ HINTERNET WINAPI InternetOpenW(LPCWSTR lpszAgent, DWORD
dwAccessType,
#undef FE
DWORD i;
const char *access_type_str = "Unknown";
-
+
TRACE("(%s, %i, %s, %s, %i)\n", debugstr_w(lpszAgent), dwAccessType,
debugstr_w(lpszProxy), debugstr_w(lpszProxyBypass), dwFlags);
for (i = 0; i < ARRAY_SIZE(access_type); i++) {
@@ -1378,7 +1378,7 @@ BOOL WINAPI InternetFindNextFileA(HINTERNET hFind, LPVOID
lpvFindData)
{
BOOL ret;
WIN32_FIND_DATAW fd;
-
+
ret = InternetFindNextFileW(hFind, lpvFindData?&fd:NULL);
if(lpvFindData)
WININET_find_data_WtoA(&fd, (LPWIN32_FIND_DATAA)lpvFindData);
@@ -1436,7 +1436,7 @@ BOOL WINAPI InternetFindNextFileW(HINTERNET hFind, LPVOID
lpvFindData)
BOOL WINAPI InternetCloseHandle(HINTERNET hInternet)
{
object_header_t *obj;
-
+
TRACE("%p\n", hInternet);
obj = get_handle_object( hInternet );
@@ -1697,7 +1697,7 @@ BOOL WINAPI InternetCrackUrlW(const WCHAR *lpszUrl, DWORD
dwUrlLength, DWORD dwF
return ret;
}
lpszap = lpszUrl;
-
+
/* Determine if the URI is absolute. */
while (lpszap - lpszUrl < dwUrlLength)
{
@@ -2298,38 +2298,183 @@ BOOL WINAPI InternetReadFileExW(HINTERNET hFile,
LPINTERNET_BUFFERSW lpBuffer,
return res == ERROR_SUCCESS;
}
-static WCHAR *get_proxy_autoconfig_url(void)
+static IP_ADAPTER_ADDRESSES *get_adapters(void)
{
-#if defined(MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >=
MAC_OS_X_VERSION_10_6
+ ULONG err, size = 1024, flags = GAA_FLAG_SKIP_ANYCAST | GAA_FLAG_SKIP_MULTICAST |
+ GAA_FLAG_SKIP_DNS_SERVER |
GAA_FLAG_SKIP_FRIENDLY_NAME;
+ IP_ADAPTER_ADDRESSES *tmp, *ret;
- CFDictionaryRef settings = CFNetworkCopySystemProxySettings();
- WCHAR *ret = NULL;
- SIZE_T len;
- const void *ref;
+ if (!(ret = heap_alloc( size ))) return NULL;
+ err = GetAdaptersAddresses( AF_UNSPEC, flags, NULL, ret, &size );
+ while (err == ERROR_BUFFER_OVERFLOW)
+ {
+ if (!(tmp = heap_realloc( ret, size ))) break;
+ ret = tmp;
+ err = GetAdaptersAddresses( AF_UNSPEC, flags, NULL, ret, &size );
+ }
+ if (err == ERROR_SUCCESS) return ret;
+ heap_free( ret );
+ return NULL;
+}
- if (!settings) return NULL;
+static WCHAR *detect_proxy_autoconfig_url_dhcp(void)
+{
+ IP_ADAPTER_ADDRESSES *adapters, *ptr;
+ DHCPCAPI_PARAMS_ARRAY send_params, recv_params;
+ DHCPCAPI_PARAMS param;
+ WCHAR name[MAX_ADAPTER_NAME_LENGTH + 1], *ret = NULL;
+ DWORD err, size;
+ BYTE *tmp, *buf = NULL;
+
+ if (!(adapters = get_adapters())) return NULL;
+
+ memset( &send_params, 0, sizeof(send_params) );
+ memset( ¶m, 0, sizeof(param) );
+ param.OptionId = OPTION_MSFT_IE_PROXY;
+ recv_params.nParams = 1;
+ recv_params.Params = ¶m;
+
+ 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 );
+
+ if (ptr->IfType == IF_TYPE_SOFTWARE_LOOPBACK) continue;
+ /* FIXME: also skip adapters where DHCP is disabled */
- if (!(ref = CFDictionaryGetValue( settings, kCFNetworkProxiesProxyAutoConfigURLString
)))
+ size = 256;
+ if (!(buf = heap_alloc( size ))) goto done;
+ err = DhcpRequestParams( DHCPCAPI_REQUEST_SYNCHRONOUS, NULL, name, NULL,
send_params, recv_params,
+ buf, &size, NULL );
+ while (err == ERROR_MORE_DATA)
+ {
+ if (!(tmp = heap_realloc( buf, size ))) goto done;
+ buf = tmp;
+ err = DhcpRequestParams( DHCPCAPI_REQUEST_SYNCHRONOUS, NULL, name, NULL,
send_params, recv_params,
+ buf, &size, NULL );
+ }
+ if (err == ERROR_SUCCESS && param.nBytesData)
+ {
+ int len = MultiByteToWideChar( CP_ACP, 0, (const char *)param.Data,
param.nBytesData, NULL, 0 );
+ if ((ret = heap_alloc( (len + 1) * sizeof(WCHAR) )))
+ {
+ MultiByteToWideChar( CP_ACP, 0, (const char *)param.Data,
param.nBytesData, ret, len );
+ ret[len] = 0;
+ }
+ TRACE("returning %s\n", debugstr_w(ret));
+ break;
+ }
+ }
+
+done:
+ heap_free( buf );
+ heap_free( adapters );
+ return ret;
+}
+
+static char *get_computer_name( COMPUTER_NAME_FORMAT format )
+{
+ char *ret;
+ DWORD size = 0;
+
+ GetComputerNameExA( format, NULL, &size );
+ if (GetLastError() != ERROR_MORE_DATA) return NULL;
+ if (!(ret = heap_alloc( size ))) return NULL;
+ if (!GetComputerNameExA( format, ret, &size ))
{
- CFRelease( settings );
+ heap_free( ret );
return NULL;
}
- len = CFStringGetLength( ref );
- if (len)
- ret = heap_alloc( (len+1) * sizeof(WCHAR) );
- if (ret)
+ return ret;
+}
+
+static BOOL is_domain_suffix( const char *domain, const char *suffix )
+{
+ int len_domain = strlen( domain ), len_suffix = strlen( suffix );
+
+ if (len_suffix > len_domain) return FALSE;
+ if (!_strnicmp( domain + len_domain - len_suffix, suffix, -1 )) return TRUE;
+ return FALSE;
+}
+
+static int reverse_lookup( const struct addrinfo *ai, char *hostname, size_t len )
+{
+ return getnameinfo( ai->ai_addr, ai->ai_addrlen, hostname, len, NULL, 0, 0 );
+}
+
+static WCHAR *build_wpad_url( const char *hostname, const struct addrinfo *ai )
+{
+ static const WCHAR httpW[] =
{'h','t','t','p',':','/','/',0};
+ static const WCHAR wpadW[] =
{'/','w','p','a','d','.','d','a','t',0};
+ char name[NI_MAXHOST];
+ WCHAR *ret, *p;
+ int len;
+
+ while (ai && ai->ai_family != AF_INET && ai->ai_family !=
AF_INET6) ai = ai->ai_next;
+ if (!ai) return NULL;
+
+ if (!reverse_lookup( ai, name, sizeof(name) )) hostname = name;
+
+ len = lstrlenW( httpW ) + strlen( hostname ) + lstrlenW( wpadW );
+ if (!(ret = p = GlobalAlloc( 0, (len + 1) * sizeof(WCHAR) ))) return NULL;
+ lstrcpyW( p, httpW );
+ p += lstrlenW( httpW );
+ while (*hostname) { *p++ = *hostname++; }
+ lstrcpyW( p, wpadW );
+ return ret;
+}
+
+static WCHAR *detect_proxy_autoconfig_url_dns(void)
+{
+ char *fqdn, *domain, *p;
+ WCHAR *ret;
+
+ if (!(fqdn = get_computer_name( ComputerNamePhysicalDnsFullyQualified ))) return
NULL;
+ if (!(domain = get_computer_name( ComputerNamePhysicalDnsDomain )))
{
- CFStringGetCharacters( ref, CFRangeMake(0, len), ret );
- ret[len] = 0;
+ heap_free( fqdn );
+ return NULL;
}
- TRACE( "returning %s\n", debugstr_w(ret) );
- CFRelease( settings );
+ p = fqdn;
+ while ((p = strchr( p, '.' )) && is_domain_suffix( p + 1, domain ))
+ {
+ char *name;
+ struct addrinfo *ai;
+ int res;
+
+ if (!(name = heap_alloc( sizeof("wpad") + strlen(p) )))
+ {
+ heap_free( fqdn );
+ heap_free( domain );
+ return NULL;
+ }
+ strcpy( name, "wpad" );
+ strcat( name, p );
+ res = getaddrinfo( name, NULL, NULL, &ai );
+ if (!res)
+ {
+ ret = build_wpad_url( name, ai );
+ freeaddrinfo( ai );
+ if (ret)
+ {
+ TRACE("returning %s\n", debugstr_w(ret));
+ heap_free( name );
+ break;
+ }
+ }
+ heap_free( name );
+ p++;
+ }
+ heap_free( domain );
+ heap_free( fqdn );
+ return ret;
+}
+
+static WCHAR *get_proxy_autoconfig_url(void)
+{
+ WCHAR *ret = detect_proxy_autoconfig_url_dhcp();
+ if (!ret) ret = detect_proxy_autoconfig_url_dns();
return ret;
-#else
- static int once;
- if (!once++) FIXME( "no support on this platform\n" );
- return NULL;
-#endif
}
static DWORD query_global_option(DWORD option, void *buffer, DWORD *size, BOOL unicode)
@@ -3489,10 +3634,10 @@ static HINTERNET INTERNET_InternetOpenUrlW(appinfo_t *hIC, LPCWSTR
lpszUrl,
WCHAR *host, *user = NULL, *pass = NULL, *path;
HINTERNET client = NULL, client1 = NULL;
DWORD res;
-
+
TRACE("(%p, %s, %s, %08x, %08x, %08lx)\n", hIC, debugstr_w(lpszUrl),
debugstr_w(lpszHeaders),
dwHeadersLength, dwFlags, dwContext);
-
+
urlComponents.dwHostNameLength = 1;
urlComponents.dwUserNameLength = 1;
urlComponents.dwPasswordLength = 1;
@@ -3527,7 +3672,7 @@ static HINTERNET INTERNET_InternetOpenUrlW(appinfo_t *hIC, LPCWSTR
lpszUrl,
break;
}
break;
-
+
case INTERNET_SCHEME_HTTP:
case INTERNET_SCHEME_HTTPS: {
static const WCHAR szStars[] = { '*','/','*', 0 };
@@ -3626,7 +3771,7 @@ HINTERNET WINAPI InternetOpenUrlW(HINTERNET hInternet, LPCWSTR
lpszUrl,
SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE);
goto lend;
}
-
+
if (hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC) {
open_url_task_t *task;
@@ -3636,18 +3781,18 @@ HINTERNET WINAPI InternetOpenUrlW(HINTERNET hInternet, LPCWSTR
lpszUrl,
task->headers_len = dwHeadersLength;
task->flags = dwFlags;
task->context = dwContext;
-
+
INTERNET_AsyncCall(&task->hdr);
SetLastError(ERROR_IO_PENDING);
} else {
ret = INTERNET_InternetOpenUrlW(hIC, lpszUrl, lpszHeaders, dwHeadersLength, dwFlags,
dwContext);
}
-
+
lend:
if( hIC )
WININET_Release( &hIC->hdr );
TRACE(" %p <--\n", ret);
-
+
return ret;
}
@@ -3681,7 +3826,7 @@ HINTERNET WINAPI InternetOpenUrlA(HINTERNET hInternet, LPCSTR
lpszUrl,
return NULL;
}
}
-
+
rc = InternetOpenUrlW(hInternet, szUrl, headers, dwHeadersLength, dwFlags,
dwContext);
heap_free(szUrl);
diff --git a/dll/win32/wininet/precomp.h b/dll/win32/wininet/precomp.h
index 3e26831a160..5c0e05e7da1 100644
--- a/dll/win32/wininet/precomp.h
+++ b/dll/win32/wininet/precomp.h
@@ -1,6 +1,5 @@
-#ifndef _WININET_PRECOMP_H_
-#define _WININET_PRECOMP_H_
+#pragma once
#include <wine/config.h>
@@ -10,9 +9,6 @@
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
-#define NONAMELESSUNION
-#define NONAMELESSSTRUCT
-
#include <windef.h>
#include <winbase.h>
#include <winreg.h>
@@ -57,8 +53,8 @@
#define closesocket close
#define ioctlsocket ioctl
#endif /* __MINGW32__ */
+#include <iphlpapi.h>
+#include <dhcpcsdk.h>
#include "internet.h"
#include "resource.h"
-
-#endif /* !_WININET_PRECOMP_H_ */
diff --git a/dll/win32/wininet/utility.c b/dll/win32/wininet/utility.c
index 1853e398f47..3be370e013f 100644
--- a/dll/win32/wininet/utility.c
+++ b/dll/win32/wininet/utility.c
@@ -1,3 +1,7 @@
+#ifdef __REACTOS__
+#include "precomp.h"
+#include "inet_ntop.c"
+#else
/*
* Wininet - Utility functions
*
@@ -36,11 +40,7 @@
#include "wine/debug.h"
#include "internet.h"
-
-#ifdef __REACTOS__
-#include <stdio.h>
-#include "inet_ntop.c"
-#endif
+#endif /* defined(__REACTOS__) */
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
@@ -268,11 +268,11 @@ void INTERNET_SendCallback(object_header_t *hdr, DWORD_PTR context,
DWORD status
break;
}
}
-
+
TRACE(" callback(%p) (%p (%p), %08lx, %d (%s), %s, %d)\n",
hdr->lpfnStatusCB, hdr->hInternet, hdr, context, status,
get_callback_name(status),
debugstr_status_info(status, new_info), info_len);
-
+
hdr->lpfnStatusCB(hdr->hInternet, context, status, new_info, info_len);
TRACE(" end callback().\n");
diff --git a/sdk/include/psdk/dhcpcsdk.h b/sdk/include/psdk/dhcpcsdk.h
index 602928b05f9..8f96a8212d4 100644
--- a/sdk/include/psdk/dhcpcsdk.h
+++ b/sdk/include/psdk/dhcpcsdk.h
@@ -1,39 +1,125 @@
-#ifndef _DHCPCDSK_H
-#define _DHCPCDSK_H
+/*
+ * Copyright (C) 2017 Alistair Leslie-Hughes
+ *
+ * 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 _DHCPCSDK_
+#define _DHCPCSDK_
-#ifdef __cplusplus
-extern "C" {
-#endif
+#define OPTION_PAD 0
+#define OPTION_SUBNET_MASK 1
+#define OPTION_TIME_OFFSET 2
+#define OPTION_ROUTER_ADDRESS 3
+#define OPTION_TIME_SERVERS 4
+#define OPTION_IEN116_NAME_SERVERS 5
+#define OPTION_DOMAIN_NAME_SERVERS 6
+#define OPTION_LOG_SERVERS 7
+#define OPTION_COOKIE_SERVERS 8
+#define OPTION_LPR_SERVERS 9
+#define OPTION_IMPRESS_SERVERS 10
+#define OPTION_RLP_SERVERS 11
+#define OPTION_HOST_NAME 12
+#define OPTION_BOOT_FILE_SIZE 13
+#define OPTION_MERIT_DUMP_FILE 14
+#define OPTION_DOMAIN_NAME 15
+#define OPTION_SWAP_SERVER 16
+#define OPTION_ROOT_DISK 17
+#define OPTION_EXTENSIONS_PATH 18
+#define OPTION_BE_A_ROUTER 19
+#define OPTION_NON_LOCAL_SOURCE_ROUTING 20
+#define OPTION_POLICY_FILTER_FOR_NLSR 21
+#define OPTION_MAX_REASSEMBLY_SIZE 22
+#define OPTION_DEFAULT_TTL 23
+#define OPTION_PMTU_AGING_TIMEOUT 24
+#define OPTION_PMTU_PLATEAU_TABLE 25
+#define OPTION_MTU 26
+#define OPTION_ALL_SUBNETS_MTU 27
+#define OPTION_BROADCAST_ADDRESS 28
+#define OPTION_PERFORM_MASK_DISCOVERY 29
+#define OPTION_BE_A_MASK_SUPPLIER 30
+#define OPTION_PERFORM_ROUTER_DISCOVERY 31
+#define OPTION_ROUTER_SOLICITATION_ADDR 32
+#define OPTION_STATIC_ROUTES 33
+#define OPTION_TRAILERS 34
+#define OPTION_ARP_CACHE_TIMEOUT 35
+#define OPTION_ETHERNET_ENCAPSULATION 36
+#define OPTION_TTL 37
+#define OPTION_KEEP_ALIVE_INTERVAL 38
+#define OPTION_KEEP_ALIVE_DATA_SIZE 39
+#define OPTION_NETWORK_INFO_SERVICE_DOM 40
+#define OPTION_NETWORK_INFO_SERVERS 41
+#define OPTION_NETWORK_TIME_SERVERS 42
+#define OPTION_VENDOR_SPEC_INFO 43
+#define OPTION_NETBIOS_NAME_SERVER 44
+#define OPTION_NETBIOS_DATAGRAM_SERVER 45
+#define OPTION_NETBIOS_NODE_TYPE 46
+#define OPTION_NETBIOS_SCOPE_OPTION 47
+#define OPTION_XWINDOW_FONT_SERVER 48
+#define OPTION_XWINDOW_DISPLAY_MANAGER 49
+#define OPTION_REQUESTED_ADDRESS 50
+#define OPTION_LEASE_TIME 51
+#define OPTION_OK_TO_OVERLAY 52
+#define OPTION_MESSAGE_TYPE 53
+#define OPTION_SERVER_IDENTIFIER 54
+#define OPTION_PARAMETER_REQUEST_LIST 55
+#define OPTION_MESSAGE 56
+#define OPTION_MESSAGE_LENGTH 57
+#define OPTION_RENEWAL_TIME 58
+#define OPTION_REBIND_TIME 59
+#define OPTION_CLIENT_CLASS_INFO 60
+#define OPTION_CLIENT_ID 61
+
+#define OPTION_TFTP_SERVER_NAME 66
+#define OPTION_BOOTFILE_NAME 67
+
+#define OPTION_MSFT_IE_PROXY 252
+#define OPTION_END 255
+
+typedef struct _DHCPAPI_PARAMS
+{
+ ULONG Flags;
+ ULONG OptionId;
+ BOOL IsVendor;
+ BYTE *Data;
+ DWORD nBytesData;
+} DHCPAPI_PARAMS, *PDHCPAPI_PARAMS, *LPDHCPAPI_PARAMS;
+
+typedef struct _DHCPAPI_PARAMS DHCPCAPI_PARAMS, *PDHCPCAPI_PARAMS, *LPDHCPCAPI_PARAMS;
+
+typedef struct _DHCPCAPI_PARAMS_ARARAY
+{
+ ULONG nParams;
+ LPDHCPCAPI_PARAMS Params;
+} DHCPCAPI_PARAMS_ARRAY, *PDHCPCAPI_PARAMS_ARRAY, *LPDHCPCAPI_PARAMS_ARRAY;
+
+typedef struct _DHCPCAPI_CLASSID
+{
+ ULONG Flags;
+ BYTE *Data;
+ ULONG nBytesData;
+} DHCPCAPI_CLASSID, *PDHCPCAPI_CLASSID, *LPDHCPCAPI_CLASSID;
+
+#define DHCPCAPI_REQUEST_PERSISTENT 0x1
+#define DHCPCAPI_REQUEST_SYNCHRONOUS 0x2
+#define DHCPCAPI_REQUEST_ASYNCHRONOUS 0x4
+#define DHCPCAPI_REQUEST_CANCEL 0x8
+#define DHCPCAPI_REQUEST_MASK 0xf
+
+void WINAPI DhcpCApiCleanup(void);
+DWORD WINAPI DhcpCApiInitialize(DWORD *);
+DWORD WINAPI DhcpRequestParams(DWORD, void *, WCHAR *, DHCPCAPI_CLASSID *,
DHCPCAPI_PARAMS_ARRAY,
+ DHCPCAPI_PARAMS_ARRAY, BYTE *, DWORD *, WCHAR *);
-#if (_WIN32_WINNT >= 0x0500)
-#define DHCPCAPI_REGISTER_HANDLE_EVENT 0x00000001
-#define DHCPCAPI_REQUEST_PERSISTENT 0x00000001
-#define DHCPCAPI_REQUEST_SYNCHRONOUS 0x00000002
-typedef struct _DHCPAPI_CLASSID {
- ULONG Flags;
- LPBYTE Data;
- ULONG nBytesData;
-} DHCPCAPI_CLASSID,*PDHCPCAPI_CLASSID,*LPDHCPCAPI_CLASSID;
-typedef struct _DHCPAPI_PARAMS {
- ULONG Flags;
- ULONG OptionId;
- BOOL IsVendor;
- LPBYTE Data;
- DWORD nBytesData;
-} DHCPAPI_PARAMS,*PDHCPAPI_PARAMS,*LPDHCPAPI_PARAMS;
-typedef struct _DHCPAPI_PARAMS_ARRAY {
- ULONG nParams;
- LPDHCPAPI_PARAMS Params;
-} DHCPCAPI_PARAMS_ARRAY,*PDHCPCAPI_PARAMS_ARRAY,*LPDHCPCAPI_PARAMS_ARRAY;
-VOID WINAPI DhcpCApiCleanup(void);
-DWORD WINAPI DhcpCApiInitialize(LPDWORD);
-DWORD WINAPI DhcpDeRegisterParamChange(DWORD,LPVOID,LPVOID);
-DWORD WINAPI
DhcpRegisterParamChange(DWORD,LPVOID,PWSTR,LPDHCPCAPI_CLASSID,DHCPCAPI_PARAMS_ARRAY,LPVOID);
-DWORD WINAPI DhcpRemoveDNSRegistrations(void);
-DWORD WINAPI DhcpUndoRequestParams(DWORD,LPVOID,LPWSTR,LPWSTR);
-#endif /* (_WIN32_WINNT >= 0x0500) */
-
-#ifdef __cplusplus
-}
-#endif
#endif
diff --git a/sdk/tools/winesync/wininet.cfg b/sdk/tools/winesync/wininet.cfg
index 297357fee1a..84785b16b91 100644
--- a/sdk/tools/winesync/wininet.cfg
+++ b/sdk/tools/winesync/wininet.cfg
@@ -5,4 +5,4 @@ files:
include/wininet.h: sdk/include/psdk/wininet.h
include/winineti.h: sdk/include/psdk/winineti.h
tags:
- wine: 237d5636271a1a78b02a0eb7feaab7dfb9dfed57
+ wine: a4357043ff9aa14f086207c239f0fc29c0a24b83