[URLMON] Sync with Wine Staging 3.3. CORE-14434

This commit is contained in:
Amine Khaldi 2018-03-23 12:35:23 +01:00
parent 06f94a685c
commit 143d4fdbd2
26 changed files with 190 additions and 65 deletions

View file

@ -43,7 +43,7 @@ list(APPEND SOURCE
uri.c
urlmon_main.c
usrmarshal.c
urlmon_main.h)
precomp.h)
add_library(urlmon SHARED
${SOURCE}
@ -56,5 +56,5 @@ add_library(urlmon SHARED
set_module_type(urlmon win32dll)
target_link_libraries(urlmon uuid wine ${PSEH_LIB})
add_importlibs(urlmon rpcrt4 propsys ole32 oleaut32 shlwapi shell32 wininet user32 advapi32 advpack kernel32_vista msvcrt kernel32 ntdll)
add_pch(urlmon urlmon_main.h SOURCE)
add_pch(urlmon precomp.h SOURCE)
add_cd_file(TARGET urlmon DESTINATION reactos/system32 FOR all)

View file

@ -16,12 +16,20 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "urlmon_main.h"
#define OEMRESOURCE
#include <assert.h>
#include "urlmon_main.h"
#include "resource.h"
#include "advpub.h"
#include "fdi.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
static const WCHAR ctxW[] = {'c','t','x',0};
static const WCHAR cab_extW[] = {'.','c','a','b',0};
static const WCHAR infW[] = {'i','n','f',0};

View file

@ -16,7 +16,12 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdio.h>
#include "urlmon_main.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
static WCHAR bscb_holderW[] = { '_','B','S','C','B','_','H','o','l','d','e','r','_',0 };

View file

@ -16,7 +16,15 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define NONAMELESSUNION
#include "urlmon_main.h"
#include "winreg.h"
#include "shlwapi.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
static WCHAR cbinding_contextW[] = {'C','B','i','n','d','i','n','g',' ','C','o','n','t','e','x','t',0};
static WCHAR bscb_holderW[] = { '_','B','S','C','B','_','H','o','l','d','e','r','_',0 };

View file

@ -17,6 +17,9 @@
*/
#include "urlmon_main.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
typedef void (*task_proc_t)(BindProtocol*,task_header_t*);

View file

@ -17,6 +17,9 @@
*/
#include "urlmon_main.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
typedef struct {
IBindStatusCallback IBindStatusCallback_iface;

View file

@ -17,6 +17,12 @@
*/
#include "urlmon_main.h"
#include "winreg.h"
#include "shlwapi.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
typedef struct {
IInternetProtocolEx IInternetProtocolEx_iface;

View file

@ -17,6 +17,9 @@
*/
#include "urlmon_main.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
static WCHAR wszEnumFORMATETC[] = {'_','E','n','u','m','F','O','R','M','A','T','E','T','C','_',0};

View file

@ -18,6 +18,13 @@
#include "urlmon_main.h"
#define NO_SHLWAPI_REG
#include "shlwapi.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
typedef struct {
Protocol base;

View file

@ -17,6 +17,9 @@
*/
#include "urlmon_main.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
typedef struct {
Protocol base;

View file

@ -17,7 +17,17 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define NONAMELESSUNION
#include "urlmon_main.h"
#include "wininet.h"
#define NO_SHLWAPI_REG
#include "shlwapi.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
typedef struct {
Protocol base;
@ -902,11 +912,9 @@ static HRESULT WINAPI HttpInfo_QueryInfo(IWinInetHttpInfo *iface, DWORD dwOption
if(!This->base.request)
return E_FAIL;
if(!HttpQueryInfoW(This->base.request, dwOption, pBuffer, pcbBuffer, pdwFlags)) {
if(pBuffer)
memset(pBuffer, 0, *pcbBuffer);
return S_OK;
}
if(!HttpQueryInfoA(This->base.request, dwOption, pBuffer, pcbBuffer, pdwFlags))
return S_FALSE;
return S_OK;
}

View file

@ -18,6 +18,12 @@
*/
#include "urlmon_main.h"
#include "winreg.h"
#include "shlwapi.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
static const WCHAR feature_control_keyW[] =
{'S','o','f','t','w','a','r','e','\\',

View file

@ -17,6 +17,9 @@
*/
#include "urlmon_main.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
typedef struct {
IInternetProtocol IInternetProtocol_iface;

View file

@ -17,6 +17,12 @@
*/
#include "urlmon_main.h"
#include "wine/debug.h"
#define NO_SHLWAPI_REG
#include "shlwapi.h"
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
typedef struct {
IInternetProtocolEx IInternetProtocolEx_iface;

View file

@ -0,0 +1,21 @@
#ifndef _URLMON_PRECOMP_H
#define _URLMON_PRECOMP_H
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "urlmon_main.h"
#include <winreg.h>
#include <advpub.h>
#define NO_SHLWAPI_REG
#include <shlwapi.h>
#include <wine/debug.h>
#endif /* !_URLMON_PRECOMP_H */

View file

@ -19,6 +19,10 @@
#include "urlmon_main.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
static inline HRESULT report_progress(Protocol *protocol, ULONG status_code, LPCWSTR status_text)
{
return IInternetProtocolSink_ReportProgress(protocol->protocol_sink, status_code, status_text);

View file

@ -21,7 +21,18 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdio.h>
#include "urlmon_main.h"
#include "winreg.h"
#include "wininet.h"
#define NO_SHLWAPI_REG
#include "shlwapi.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
static const WCHAR currentlevelW[] = {'C','u','r','r','e','n','t','L','e','v','e','l',0};
static const WCHAR descriptionW[] = {'D','e','s','c','r','i','p','t','i','o','n',0};

View file

@ -17,6 +17,11 @@
*/
#include "urlmon_main.h"
#include "winreg.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
typedef struct {
LPWSTR protocol;

View file

@ -22,8 +22,14 @@
#include "urlmon_main.h"
#include <shellapi.h>
#include <hlink.h>
#include "winreg.h"
#include "shlwapi.h"
#include "hlink.h"
#include "shellapi.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
typedef struct {
IMoniker IMoniker_iface;

View file

@ -21,6 +21,15 @@
#include "urlmon_main.h"
#include "winreg.h"
#include "wine/winternl.h"
#include "wininet.h"
#include "shlwapi.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
typedef struct ProxyBindStatusCallback
{
IBindStatusCallback IBindStatusCallback_iface;

View file

@ -17,9 +17,15 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "urlmon_main.h"
#include <limits.h>
#include <strsafe.h>
#include "urlmon_main.h"
#include "wine/debug.h"
#define NO_SHLWAPI_REG
#include "shlwapi.h"
#include "strsafe.h"
#define URI_DISPLAY_NO_ABSOLUTE_URI 0x1
#define URI_DISPLAY_NO_DEFAULT_PORT_AUTH 0x2
@ -36,6 +42,8 @@
#define COMBINE_URI_FORCE_FLAG_USE 0x1
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
static const IID IID_IUriObj = {0x4b364760,0x9f51,0x11df,{0x98,0x1c,0x08,0x00,0x20,0x0c,0x9a,0x66}};
typedef struct {
@ -349,6 +357,11 @@ static inline BOOL is_slash(WCHAR c)
return c == '/' || c == '\\';
}
static inline BOOL is_ascii(WCHAR c)
{
return c < 0x80;
}
static BOOL is_default_port(URL_SCHEME scheme, DWORD port) {
DWORD i;
@ -2156,7 +2169,7 @@ static BOOL canonicalize_username(const parse_data *data, Uri *uri, DWORD flags,
continue;
}
}
} else if(!is_reserved(*ptr) && !is_unreserved(*ptr) && *ptr != '\\') {
} else if(is_ascii(*ptr) && !is_reserved(*ptr) && !is_unreserved(*ptr) && *ptr != '\\') {
/* Only percent encode forbidden characters if the NO_ENCODE_FORBIDDEN_CHARACTERS flag
* is NOT set.
*/
@ -2214,7 +2227,7 @@ static BOOL canonicalize_password(const parse_data *data, Uri *uri, DWORD flags,
continue;
}
}
} else if(!is_reserved(*ptr) && !is_unreserved(*ptr) && *ptr != '\\') {
} else if(is_ascii(*ptr) && !is_reserved(*ptr) && !is_unreserved(*ptr) && *ptr != '\\') {
/* Only percent encode forbidden characters if the NO_ENCODE_FORBIDDEN_CHARACTERS flag
* is NOT set.
*/
@ -2349,7 +2362,7 @@ static BOOL canonicalize_reg_name(const parse_data *data, Uri *uri,
if(!computeOnly)
uri->canon_uri[uri->canon_len] = *ptr;
++uri->canon_len;
} else if(!(flags & Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS) &&
} else if(!(flags & Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS) && is_ascii(*ptr) &&
!is_unreserved(*ptr) && !is_reserved(*ptr) && known_scheme) {
if(!computeOnly) {
pct_encode_val(*ptr, uri->canon_uri+uri->canon_len);
@ -2919,7 +2932,7 @@ static DWORD canonicalize_path_hierarchical(const WCHAR *path, DWORD path_len, U
len++;
do_default_action = FALSE;
}
} else if(known_scheme && !is_res && !is_unreserved(*ptr) && !is_reserved(*ptr) &&
} else if(known_scheme && !is_res && is_ascii(*ptr) && !is_unreserved(*ptr) && !is_reserved(*ptr) &&
(!(flags & Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS) || is_file)) {
if(!is_file || !(flags & Uri_CREATE_FILE_USE_DOS_PATH)) {
/* Escape the forbidden character. */
@ -3045,7 +3058,7 @@ static BOOL canonicalize_path_opaque(const parse_data *data, Uri *uri, DWORD fla
}
} else if(is_mk && *ptr == ':' && ptr + 1 < data->path + data->path_len && *(ptr + 1) == ':') {
flags &= ~Uri_CREATE_FILE_USE_DOS_PATH;
} else if(known_scheme && !is_unreserved(*ptr) && !is_reserved(*ptr) &&
} else if(known_scheme && is_ascii(*ptr) && !is_unreserved(*ptr) && !is_reserved(*ptr) &&
!(flags & Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS)) {
if(!(is_file && (flags & Uri_CREATE_FILE_USE_DOS_PATH))) {
if(!computeOnly)
@ -3199,7 +3212,7 @@ static BOOL canonicalize_query(const parse_data *data, Uri *uri, DWORD flags, BO
continue;
}
}
} else if(known_scheme && !is_unreserved(*ptr) && !is_reserved(*ptr)) {
} else if(known_scheme && is_ascii(*ptr) && !is_unreserved(*ptr) && !is_reserved(*ptr)) {
if(!(flags & Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS) &&
!(flags & Uri_CREATE_NO_DECODE_EXTRA_INFO)) {
if(!computeOnly)
@ -3249,7 +3262,7 @@ static BOOL canonicalize_fragment(const parse_data *data, Uri *uri, DWORD flags,
continue;
}
}
} else if(known_scheme && !is_unreserved(*ptr) && !is_reserved(*ptr)) {
} else if(known_scheme && is_ascii(*ptr) && !is_unreserved(*ptr) && !is_reserved(*ptr)) {
if(!(flags & Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS) &&
!(flags & Uri_CREATE_NO_DECODE_EXTRA_INFO)) {
if(!computeOnly)
@ -6882,7 +6895,7 @@ static HRESULT parse_canonicalize(const Uri *uri, DWORD flags, LPWSTR output,
len += 3;
do_default_action = FALSE;
}
} else if(!is_reserved(*ptr) && !is_unreserved(*ptr)) {
} else if(is_ascii(*ptr) && !is_reserved(*ptr) && !is_unreserved(*ptr)) {
if(flags & URL_ESCAPE_UNSAFE) {
if(len + 3 < output_len)
pct_encode_val(*ptr, output+len);

View file

@ -18,6 +18,7 @@
#include <windef.h>
#include <winuser.h>
#include <commctrl.h>
#include "resource.h"

View file

@ -18,11 +18,25 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#define NONAMELESSUNION
#include "urlmon_main.h"
#include <ole2.h>
#include "winreg.h"
#define NO_SHLWAPI_REG
#include "shlwapi.h"
#include "advpub.h"
#include "initguid.h"
#include "wine/debug.h"
#include "urlmon.h"
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
#include <initguid.h>
DEFINE_GUID(CLSID_CUri, 0xDF2FCE13, 0x25EC, 0x45BB, 0x9D,0x4C, 0xCE,0xCD,0x47,0xC2,0x43,0x0C);
LONG URLMON_refCount = 0;

View file

@ -22,30 +22,18 @@
#include <stdarg.h>
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#define COBJMACROS
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include <windef.h>
#include <winbase.h>
#include <winreg.h>
#include <objbase.h>
#include <oleauto.h>
#include <urlmon.h>
#include <wininet.h>
#include <advpub.h>
#define NO_SHLWAPI_REG
#include <shlwapi.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "urlmon.h"
#include "wininet.h"
#include <wine/debug.h>
#include <wine/list.h>
#include <wine/unicode.h>
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
#include "wine/unicode.h"
#include "wine/heap.h"
#include "wine/list.h"
extern HINSTANCE hProxyDll DECLSPEC_HIDDEN;
extern HRESULT SecManagerImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN;
@ -247,31 +235,11 @@ void release_notif_hwnd(HWND) DECLSPEC_HIDDEN;
const char *debugstr_bindstatus(ULONG) DECLSPEC_HIDDEN;
static inline void* __WINE_ALLOC_SIZE(1) heap_alloc(size_t size)
{
return HeapAlloc(GetProcessHeap(), 0, size);
}
static inline void* __WINE_ALLOC_SIZE(1) heap_alloc_zero(size_t size)
{
return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
}
static inline void* __WINE_ALLOC_SIZE(2) heap_realloc(void *mem, size_t size)
{
return HeapReAlloc(GetProcessHeap(), 0, mem, size);
}
static inline void* __WINE_ALLOC_SIZE(2) heap_realloc_zero(void *mem, size_t size)
{
return HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, mem, size);
}
static inline BOOL heap_free(void *mem)
{
return HeapFree(GetProcessHeap(), 0, mem);
}
static inline LPWSTR heap_strdupW(LPCWSTR str)
{
LPWSTR ret = NULL;

View file

@ -16,9 +16,13 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define NONAMELESSUNION
#include "urlmon_main.h"
#include <ole2.h>
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
HRESULT CALLBACK IWinInetHttpInfo_QueryInfo_Proxy(IWinInetHttpInfo* This,
DWORD dwOption, LPVOID pBuffer, DWORD *pcbBuf, DWORD *pdwFlags,

View file

@ -188,7 +188,7 @@ reactos/dll/win32/traffic # Synced to WineStaging-3.3
reactos/dll/win32/twain_32 # Synced to WineStaging-3.3
reactos/dll/win32/updspapi # Synced to WineStaging-3.3
reactos/dll/win32/url # Synced to WineStaging-3.3
reactos/dll/win32/urlmon # Synced to Wine-3.0
reactos/dll/win32/urlmon # Synced to WineStaging-3.3
reactos/dll/win32/usp10 # Synced to Wine-3.0
reactos/dll/win32/uxtheme # Forked
reactos/dll/win32/vbscript # Synced to Wine-3.0