2005-07-31 12:11:56 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2002 Huw D M Davies for CodeWeavers
|
2009-03-04 15:29:32 +00:00
|
|
|
* Copyright 2009 Jacek Caban for CodeWeavers
|
2005-07-31 12:11:56 +00:00
|
|
|
*
|
|
|
|
* 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
|
2007-07-27 10:11:12 +00:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2005-07-31 12:11:56 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WINE_URLMON_MAIN_H
|
|
|
|
#define __WINE_URLMON_MAIN_H
|
|
|
|
|
2013-12-27 23:11:32 +00:00
|
|
|
#include <stdarg.h>
|
|
|
|
|
2013-01-24 23:00:42 +00:00
|
|
|
#define WIN32_NO_STATUS
|
|
|
|
#define _INC_WINDOWS
|
|
|
|
#define COM_NO_WINDOWS_H
|
|
|
|
|
2008-01-14 16:39:00 +00:00
|
|
|
#define COBJMACROS
|
|
|
|
#define NONAMELESSUNION
|
|
|
|
#define NONAMELESSSTRUCT
|
|
|
|
|
2013-01-24 23:00:42 +00:00
|
|
|
#include <windef.h>
|
|
|
|
#include <winbase.h>
|
|
|
|
#include <winreg.h>
|
2014-01-25 20:24:12 +00:00
|
|
|
#include <objbase.h>
|
|
|
|
#include <oleauto.h>
|
2013-01-24 23:00:42 +00:00
|
|
|
#include <urlmon.h>
|
|
|
|
#include <wininet.h>
|
2013-12-27 23:11:32 +00:00
|
|
|
#include <advpub.h>
|
|
|
|
#define NO_SHLWAPI_REG
|
|
|
|
#include <shlwapi.h>
|
2008-01-14 16:39:00 +00:00
|
|
|
|
2014-01-25 20:24:12 +00:00
|
|
|
#include <wine/debug.h>
|
2013-01-24 23:00:42 +00:00
|
|
|
#include <wine/list.h>
|
2013-12-27 23:11:32 +00:00
|
|
|
#include <wine/unicode.h>
|
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
|
2005-07-31 12:11:56 +00:00
|
|
|
|
2010-04-20 21:18:54 +00:00
|
|
|
extern HINSTANCE hProxyDll DECLSPEC_HIDDEN;
|
2011-06-05 21:29:41 +00:00
|
|
|
extern HRESULT SecManagerImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT ZoneMgrImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT StdURLMoniker_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT FileProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT HttpProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT HttpSProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT FtpProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT GopherProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT MkProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT MimeFilter_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN;
|
2013-03-22 14:29:11 +00:00
|
|
|
extern HRESULT Uri_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN;
|
2005-07-31 12:11:56 +00:00
|
|
|
|
2010-04-20 21:18:54 +00:00
|
|
|
extern BOOL WINAPI URLMON_DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) DECLSPEC_HIDDEN;
|
2010-03-04 15:24:17 +00:00
|
|
|
extern HRESULT WINAPI URLMON_DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *ppv) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT WINAPI URLMON_DllRegisterServer(void) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT WINAPI URLMON_DllUnregisterServer(void) DECLSPEC_HIDDEN;
|
|
|
|
|
|
|
|
extern GUID const CLSID_PSFactoryBuffer DECLSPEC_HIDDEN;
|
2013-03-22 14:29:11 +00:00
|
|
|
extern GUID const CLSID_CUri DECLSPEC_HIDDEN;
|
2010-03-04 15:24:17 +00:00
|
|
|
|
2005-07-31 12:11:56 +00:00
|
|
|
/**********************************************************************
|
|
|
|
* Dll lifetime tracking declaration for urlmon.dll
|
|
|
|
*/
|
2011-06-05 21:29:41 +00:00
|
|
|
extern LONG URLMON_refCount DECLSPEC_HIDDEN;
|
2005-08-05 20:48:26 +00:00
|
|
|
static inline void URLMON_LockModule(void) { InterlockedIncrement( &URLMON_refCount ); }
|
|
|
|
static inline void URLMON_UnlockModule(void) { InterlockedDecrement( &URLMON_refCount ); }
|
2005-07-31 12:11:56 +00:00
|
|
|
|
2013-03-22 14:29:11 +00:00
|
|
|
extern HINSTANCE urlmon_instance;
|
|
|
|
|
2011-06-05 21:29:41 +00:00
|
|
|
IInternetProtocolInfo *get_protocol_info(LPCWSTR) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT get_protocol_handler(IUri*,CLSID*,BOOL*,IClassFactory**) DECLSPEC_HIDDEN;
|
|
|
|
IInternetProtocol *get_mime_filter(LPCWSTR) DECLSPEC_HIDDEN;
|
|
|
|
BOOL is_registered_protocol(LPCWSTR) DECLSPEC_HIDDEN;
|
2013-03-22 14:29:11 +00:00
|
|
|
HRESULT register_namespace(IClassFactory*,REFIID,LPCWSTR,BOOL) DECLSPEC_HIDDEN;
|
2011-06-05 21:29:41 +00:00
|
|
|
HINTERNET get_internet_session(IInternetBindInfo*) DECLSPEC_HIDDEN;
|
2015-04-09 12:42:05 +00:00
|
|
|
WCHAR *get_useragent(void) DECLSPEC_HIDDEN;
|
|
|
|
void update_user_agent(WCHAR*) DECLSPEC_HIDDEN;
|
2011-06-05 21:29:41 +00:00
|
|
|
void free_session(void) DECLSPEC_HIDDEN;
|
2005-07-31 12:11:56 +00:00
|
|
|
|
2015-04-09 12:42:05 +00:00
|
|
|
HRESULT find_mime_from_ext(const WCHAR*,WCHAR**) DECLSPEC_HIDDEN;
|
|
|
|
|
2011-06-05 21:29:41 +00:00
|
|
|
HRESULT bind_to_storage(IUri*,IBindCtx*,REFIID,void**) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT bind_to_object(IMoniker*,IUri*,IBindCtx*,REFIID,void**ppv) DECLSPEC_HIDDEN;
|
2005-11-20 14:51:28 +00:00
|
|
|
|
2011-06-05 21:29:41 +00:00
|
|
|
HRESULT create_default_callback(IBindStatusCallback**) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT wrap_callback(IBindStatusCallback*,IBindStatusCallback**) DECLSPEC_HIDDEN;
|
2013-03-22 14:29:11 +00:00
|
|
|
IBindStatusCallback *bsc_from_bctx(IBindCtx*) DECLSPEC_HIDDEN;
|
|
|
|
|
|
|
|
typedef HRESULT (*stop_cache_binding_proc_t)(void*,const WCHAR*,HRESULT,const WCHAR*);
|
|
|
|
HRESULT download_to_cache(IUri*,stop_cache_binding_proc_t,void*,IBindStatusCallback*) DECLSPEC_HIDDEN;
|
2007-07-27 10:11:12 +00:00
|
|
|
|
2009-03-04 15:29:32 +00:00
|
|
|
typedef struct ProtocolVtbl ProtocolVtbl;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
const ProtocolVtbl *vtbl;
|
|
|
|
|
|
|
|
IInternetProtocol *protocol;
|
|
|
|
IInternetProtocolSink *protocol_sink;
|
|
|
|
|
|
|
|
DWORD bindf;
|
|
|
|
BINDINFO bind_info;
|
|
|
|
|
|
|
|
HINTERNET request;
|
|
|
|
HINTERNET connection;
|
|
|
|
DWORD flags;
|
|
|
|
HANDLE lock;
|
|
|
|
|
|
|
|
ULONG current_position;
|
|
|
|
ULONG content_length;
|
|
|
|
ULONG available_bytes;
|
2013-03-22 14:29:11 +00:00
|
|
|
ULONG query_available;
|
2009-03-04 15:29:32 +00:00
|
|
|
|
2010-12-20 21:29:55 +00:00
|
|
|
IStream *post_stream;
|
|
|
|
|
2009-03-04 15:29:32 +00:00
|
|
|
LONG priority;
|
|
|
|
} Protocol;
|
|
|
|
|
|
|
|
struct ProtocolVtbl {
|
2010-10-09 21:52:25 +00:00
|
|
|
HRESULT (*open_request)(Protocol*,IUri*,DWORD,HINTERNET,IInternetBindInfo*);
|
2010-12-20 21:29:55 +00:00
|
|
|
HRESULT (*end_request)(Protocol*);
|
2009-03-04 15:29:32 +00:00
|
|
|
HRESULT (*start_downloading)(Protocol*);
|
|
|
|
void (*close_connection)(Protocol*);
|
2011-06-05 21:29:41 +00:00
|
|
|
void (*on_error)(Protocol*,DWORD);
|
2009-03-04 15:29:32 +00:00
|
|
|
};
|
|
|
|
|
2011-06-05 21:29:41 +00:00
|
|
|
/* Flags are needed for, among other things, return HRESULTs from the Read function
|
|
|
|
* to conform to native. For example, Read returns:
|
|
|
|
*
|
|
|
|
* 1. E_PENDING if called before the request has completed,
|
|
|
|
* (flags = 0)
|
|
|
|
* 2. S_FALSE after all data has been read and S_OK has been reported,
|
|
|
|
* (flags = FLAG_REQUEST_COMPLETE | FLAG_ALL_DATA_READ | FLAG_RESULT_REPORTED)
|
|
|
|
* 3. INET_E_DATA_NOT_AVAILABLE if InternetQueryDataAvailable fails. The first time
|
|
|
|
* this occurs, INET_E_DATA_NOT_AVAILABLE will also be reported to the sink,
|
|
|
|
* (flags = FLAG_REQUEST_COMPLETE)
|
|
|
|
* but upon subsequent calls to Read no reporting will take place, yet
|
|
|
|
* InternetQueryDataAvailable will still be called, and, on failure,
|
|
|
|
* INET_E_DATA_NOT_AVAILABLE will still be returned.
|
|
|
|
* (flags = FLAG_REQUEST_COMPLETE | FLAG_RESULT_REPORTED)
|
|
|
|
*
|
|
|
|
* FLAG_FIRST_DATA_REPORTED and FLAG_LAST_DATA_REPORTED are needed for proper
|
|
|
|
* ReportData reporting. For example, if OnResponse returns S_OK, Continue will
|
|
|
|
* report BSCF_FIRSTDATANOTIFICATION, and when all data has been read Read will
|
|
|
|
* report BSCF_INTERMEDIATEDATANOTIFICATION|BSCF_LASTDATANOTIFICATION. However,
|
|
|
|
* if OnResponse does not return S_OK, Continue will not report data, and Read
|
|
|
|
* will report BSCF_FIRSTDATANOTIFICATION|BSCF_LASTDATANOTIFICATION when all
|
|
|
|
* data has been read.
|
|
|
|
*/
|
|
|
|
#define FLAG_REQUEST_COMPLETE 0x0001
|
|
|
|
#define FLAG_FIRST_CONTINUE_COMPLETE 0x0002
|
|
|
|
#define FLAG_FIRST_DATA_REPORTED 0x0004
|
|
|
|
#define FLAG_ALL_DATA_READ 0x0008
|
|
|
|
#define FLAG_LAST_DATA_REPORTED 0x0010
|
|
|
|
#define FLAG_RESULT_REPORTED 0x0020
|
|
|
|
#define FLAG_ERROR 0x0040
|
2013-03-22 14:29:11 +00:00
|
|
|
#define FLAG_SYNC_READ 0x0080
|
2011-06-05 21:29:41 +00:00
|
|
|
|
|
|
|
HRESULT protocol_start(Protocol*,IInternetProtocol*,IUri*,IInternetProtocolSink*,IInternetBindInfo*) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT protocol_continue(Protocol*,PROTOCOLDATA*) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT protocol_read(Protocol*,void*,ULONG,ULONG*) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT protocol_lock_request(Protocol*) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT protocol_unlock_request(Protocol*) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT protocol_abort(Protocol*,HRESULT) DECLSPEC_HIDDEN;
|
2013-03-22 14:29:11 +00:00
|
|
|
HRESULT protocol_syncbinding(Protocol*) DECLSPEC_HIDDEN;
|
2011-06-05 21:29:41 +00:00
|
|
|
void protocol_close_connection(Protocol*) DECLSPEC_HIDDEN;
|
|
|
|
|
|
|
|
void find_domain_name(const WCHAR*,DWORD,INT*) DECLSPEC_HIDDEN;
|
2009-03-04 15:29:32 +00:00
|
|
|
|
2011-06-05 21:29:41 +00:00
|
|
|
typedef struct _task_header_t task_header_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
IInternetProtocolEx IInternetProtocolEx_iface;
|
|
|
|
IInternetBindInfo IInternetBindInfo_iface;
|
|
|
|
IInternetPriority IInternetPriority_iface;
|
|
|
|
IServiceProvider IServiceProvider_iface;
|
|
|
|
IInternetProtocolSink IInternetProtocolSink_iface;
|
|
|
|
IWinInetHttpInfo IWinInetHttpInfo_iface;
|
|
|
|
|
|
|
|
LONG ref;
|
|
|
|
|
|
|
|
IInternetProtocol *protocol;
|
2017-09-17 22:58:01 +00:00
|
|
|
IWinInetInfo *wininet_info;
|
|
|
|
IWinInetHttpInfo *wininet_http_info;
|
|
|
|
|
2011-06-05 21:29:41 +00:00
|
|
|
IInternetBindInfo *bind_info;
|
|
|
|
IInternetProtocolSink *protocol_sink;
|
|
|
|
IServiceProvider *service_provider;
|
2017-09-17 22:58:01 +00:00
|
|
|
IBindCallbackRedirect *redirect_callback;
|
2011-06-05 21:29:41 +00:00
|
|
|
|
|
|
|
struct {
|
|
|
|
IInternetProtocol IInternetProtocol_iface;
|
2013-03-22 14:29:11 +00:00
|
|
|
IInternetProtocolSink IInternetProtocolSink_iface;
|
2011-06-05 21:29:41 +00:00
|
|
|
} default_protocol_handler;
|
|
|
|
IInternetProtocol *protocol_handler;
|
2013-03-22 14:29:11 +00:00
|
|
|
IInternetProtocolSink *protocol_sink_handler;
|
2011-06-05 21:29:41 +00:00
|
|
|
|
|
|
|
LONG priority;
|
|
|
|
|
|
|
|
BOOL reported_result;
|
|
|
|
BOOL reported_mime;
|
|
|
|
BOOL from_urlmon;
|
|
|
|
DWORD pi;
|
|
|
|
|
|
|
|
DWORD bscf;
|
|
|
|
ULONG progress;
|
|
|
|
ULONG progress_max;
|
|
|
|
|
|
|
|
DWORD apartment_thread;
|
|
|
|
HWND notif_hwnd;
|
|
|
|
DWORD continue_call;
|
|
|
|
|
|
|
|
CRITICAL_SECTION section;
|
|
|
|
task_header_t *task_queue_head, *task_queue_tail;
|
|
|
|
|
|
|
|
BYTE *buf;
|
|
|
|
DWORD buf_size;
|
|
|
|
LPWSTR mime;
|
|
|
|
IUri *uri;
|
2013-03-22 14:29:11 +00:00
|
|
|
BSTR display_uri;
|
2011-06-05 21:29:41 +00:00
|
|
|
} BindProtocol;
|
2009-05-23 10:20:22 +00:00
|
|
|
|
2011-06-05 21:29:41 +00:00
|
|
|
HRESULT create_binding_protocol(BOOL,BindProtocol**) DECLSPEC_HIDDEN;
|
|
|
|
void set_binding_sink(BindProtocol*,IInternetProtocolSink*,IInternetBindInfo*) DECLSPEC_HIDDEN;
|
2009-05-23 10:20:22 +00:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
HWND notif_hwnd;
|
|
|
|
DWORD notif_hwnd_cnt;
|
|
|
|
|
|
|
|
struct list entry;
|
|
|
|
} tls_data_t;
|
|
|
|
|
2011-06-05 21:29:41 +00:00
|
|
|
tls_data_t *get_tls_data(void) DECLSPEC_HIDDEN;
|
2009-05-23 10:20:22 +00:00
|
|
|
|
2014-09-25 15:39:47 +00:00
|
|
|
void unregister_notif_wnd_class(void) DECLSPEC_HIDDEN;
|
2011-06-05 21:29:41 +00:00
|
|
|
HWND get_notif_hwnd(void) DECLSPEC_HIDDEN;
|
|
|
|
void release_notif_hwnd(HWND) DECLSPEC_HIDDEN;
|
2009-05-23 10:20:22 +00:00
|
|
|
|
2013-03-22 14:29:11 +00:00
|
|
|
const char *debugstr_bindstatus(ULONG) DECLSPEC_HIDDEN;
|
|
|
|
|
2017-06-04 01:46:26 +00:00
|
|
|
static inline void* __WINE_ALLOC_SIZE(1) heap_alloc(size_t size)
|
2007-11-29 11:20:31 +00:00
|
|
|
{
|
2017-06-04 01:46:26 +00:00
|
|
|
return HeapAlloc(GetProcessHeap(), 0, size);
|
2007-11-29 11:20:31 +00:00
|
|
|
}
|
|
|
|
|
2017-06-04 01:46:26 +00:00
|
|
|
static inline void* __WINE_ALLOC_SIZE(1) heap_alloc_zero(size_t size)
|
2007-11-29 11:20:31 +00:00
|
|
|
{
|
2017-06-04 01:46:26 +00:00
|
|
|
return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
|
2007-11-29 11:20:31 +00:00
|
|
|
}
|
|
|
|
|
2017-06-04 01:46:26 +00:00
|
|
|
static inline void* __WINE_ALLOC_SIZE(2) heap_realloc(void *mem, size_t size)
|
2007-11-29 11:20:31 +00:00
|
|
|
{
|
2017-06-04 01:46:26 +00:00
|
|
|
return HeapReAlloc(GetProcessHeap(), 0, mem, size);
|
2007-11-29 11:20:31 +00:00
|
|
|
}
|
|
|
|
|
2017-06-04 01:46:26 +00:00
|
|
|
static inline void* __WINE_ALLOC_SIZE(2) heap_realloc_zero(void *mem, size_t size)
|
2009-10-19 17:22:21 +00:00
|
|
|
{
|
2017-06-04 01:46:26 +00:00
|
|
|
return HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, mem, size);
|
2009-10-19 17:22:21 +00:00
|
|
|
}
|
|
|
|
|
2008-01-14 16:39:00 +00:00
|
|
|
static inline BOOL heap_free(void *mem)
|
2007-11-29 11:20:31 +00:00
|
|
|
{
|
|
|
|
return HeapFree(GetProcessHeap(), 0, mem);
|
|
|
|
}
|
|
|
|
|
2008-01-14 16:39:00 +00:00
|
|
|
static inline LPWSTR heap_strdupW(LPCWSTR str)
|
|
|
|
{
|
|
|
|
LPWSTR ret = NULL;
|
|
|
|
|
|
|
|
if(str) {
|
|
|
|
DWORD size;
|
|
|
|
|
|
|
|
size = (strlenW(str)+1)*sizeof(WCHAR);
|
|
|
|
ret = heap_alloc(size);
|
2013-03-22 14:29:11 +00:00
|
|
|
if(ret)
|
|
|
|
memcpy(ret, str, size);
|
2008-01-14 16:39:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2009-03-04 15:29:32 +00:00
|
|
|
static inline LPWSTR heap_strndupW(LPCWSTR str, int len)
|
|
|
|
{
|
|
|
|
LPWSTR ret = NULL;
|
|
|
|
|
|
|
|
if(str) {
|
|
|
|
ret = heap_alloc((len+1)*sizeof(WCHAR));
|
|
|
|
if(ret) {
|
|
|
|
memcpy(ret, str, len*sizeof(WCHAR));
|
|
|
|
ret[len] = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2008-04-04 14:41:46 +00:00
|
|
|
static inline LPWSTR heap_strdupAtoW(const char *str)
|
|
|
|
{
|
|
|
|
LPWSTR ret = NULL;
|
|
|
|
|
|
|
|
if(str) {
|
|
|
|
DWORD len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
|
|
|
|
ret = heap_alloc(len*sizeof(WCHAR));
|
2013-03-22 14:29:11 +00:00
|
|
|
if(ret)
|
|
|
|
MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline char *heap_strdupWtoA(const WCHAR *str)
|
|
|
|
{
|
|
|
|
char *ret = NULL;
|
|
|
|
|
|
|
|
if(str) {
|
|
|
|
size_t size = WideCharToMultiByte(CP_ACP, 0, str, -1, NULL, 0, NULL, NULL);
|
|
|
|
ret = heap_alloc(size);
|
|
|
|
if(ret)
|
|
|
|
WideCharToMultiByte(CP_ACP, 0, str, -1, ret, size, NULL, NULL);
|
2008-04-04 14:41:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2005-07-31 12:11:56 +00:00
|
|
|
#endif /* __WINE_URLMON_MAIN_H */
|