ReactOS 0.4.15-dev-5672-gf73ac17
urlmon.idl File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

interface  IInternet
 
interface  IBinding
 
interface  IBindStatusCallback
 
struct  IBindStatusCallback::_tagBINDINFO
 
struct  IBindStatusCallback::_REMSECURITY_ATTRIBUTES
 
struct  IBindStatusCallback::_tagRemBINDINFO
 
struct  IBindStatusCallback::tagRemFORMATETC
 
interface  IBindStatusCallbackEx
 
interface  IAuthenticate
 
interface  IHttpNegotiate
 
interface  IHttpNegotiate2
 
interface  IBindHost
 
interface  IWinInetInfo
 
interface  IWinInetHttpInfo
 
interface  IWindowForBindingUI
 
interface  ICodeInstall
 
interface  IHttpSecurity
 
interface  IPersistMoniker
 
interface  IMonikerProp
 
interface  IBindProtocol
 
interface  IInternetBindInfo
 
interface  IInternetPriority
 
interface  IInternetProtocolRoot
 
struct  IInternetProtocolRoot::_tagPROTOCOLDATA
 
interface  IInternetProtocolSink
 
interface  IInternetProtocol
 
interface  IInternetProtocolInfo
 
interface  IInternetSession
 
interface  IInternetSecurityMgrSite
 
interface  IInternetSecurityManager
 
interface  IInternetSecurityManagerEx
 
interface  IInternetSecurityManagerEx2
 
interface  IInternetHostSecurityManager
 
interface  IInternetZoneManager
 
struct  IInternetZoneManager::_ZONEATTRIBUTES
 
interface  IInternetZoneManagerEx
 
interface  struct
 
struct  _tagCODEBASEHOLD
 
interface  enum
 
struct  _tagPROTOCOLFILTERDATA
 
interface  IUri
 
interface  IUriContainer
 
interface  IUriBuilder
 
interface  IUriBuilderFactory
 
interface  IInternetProtocolEx
 
interface  IGetBindHandle
 
interface  IBindCallbackRedirect
 
struct  CONFIRMSAFETY
 

Typedefs

typedef struct _tagCODEBASEHOLD CODEBASEHOLD
 
typedef struct _tagCODEBASEHOLDLPCODEBASEHOLD
 
typedef enum FEATURE_ZONE_ELEVATION
 
typedef enum FEATURE_MIME_HANDLING
 
typedef enum FEATURE_MIME_SNIFFING
 
typedef enum FEATURE_WINDOW_RESTRICTIONS
 
typedef enum FEATURE_WEBOC_POPUPMANAGEMENT
 
typedef enum FEATURE_BEHAVIORS
 
typedef enum FEATURE_DISABLE_MK_PROTOCOL
 
typedef enum FEATURE_LOCALMACHINE_LOCKDOWN
 
typedef enum FEATURE_SECURITYBAND
 
typedef enum FEATURE_RESTRICT_ACTIVEXINSTALL
 
typedef enum FEATURE_VALIDATE_NAVIGATE_URL
 
typedef enum FEATURE_RESTRICT_FILEDOWNLOAD
 
typedef enum FEATURE_ADDON_MANAGEMENT
 
typedef enum FEATURE_PROTOCOL_LOCKDOWN
 
typedef enum FEATURE_HTTP_USERNAME_PASSWORD_DISABLE
 
typedef enum FEATURE_SAFE_BINDTOOBJECT
 
typedef enum FEATURE_UNC_SAVEDFILECHECK
 
typedef enum FEATURE_GET_URL_DOM_FILEPATH_UNENCODED
 
typedef enum FEATURE_TABBED_BROWSING
 
typedef enum FEATURE_SSLUX
 
typedef enum FEATURE_DISABLE_NAVIGATION_SOUNDS
 
typedef enum FEATURE_DISABLE_LEGACY_COMPRESSION
 
typedef enum FEATURE_FORCE_ADDR_AND_STATUS
 
typedef enum FEATURE_XMLHTTP
 
typedef enum FEATURE_DISABLE_TELNET_PROTOCOL
 
typedef enum FEATURE_FEEDS
 
typedef enum FEATURE_BLOCK_INPUT_PROMPTS
 
typedef enum INTERNETFEATURELIST
 
typedef struct _tagPROTOCOLFILTERDATA PROTOCOLFILTERDATA
 

Functions

HRESULT WINAPI CreateUri (LPCWSTR, DWORD, DWORD_PTR, IUri **)
 
HRESULT WINAPI CreateUriWithFragment (LPCWSTR, LPCWSTR, DWORD, DWORD_PTR, IUri **)
 
HRESULT WINAPI CreateUriFromMultiByteString (LPCSTR, DWORD, DWORD, DWORD, DWORD_PTR, IUri **)
 
HRESULT WINAPI CreateIUriBuilder (IUri *, DWORD, DWORD_PTR, IUriBuilder **)
 
 DEFINE_GUID (CLSID_InternetSecurityManager, 0x7b8a2d94, 0x0ac9, 0x11d1, 0x89, 0x6c, 0x00, 0xc0, 0x4f, 0xB6, 0xbf, 0xc4)
 
 DEFINE_GUID (CLSID_InternetZoneManager, 0x7B8A2D95, 0x0AC9, 0x11D1, 0x89, 0x6C, 0x00, 0xC0, 0x4F, 0xB6, 0xBF, 0xC4)
 
 DEFINE_GUID (IID_IAsyncMoniker, 0x79EAC9D3, 0xBAF9, 0x11CE, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B)
 
 DEFINE_GUID (IID_IAsyncBindCtx, 0x79EAC9D4, 0xBAF9, 0x11CE, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B)
 
 DEFINE_GUID (CLSID_StdURLMoniker, 0x79EAC9E0, 0xBAF9, 0x11CE, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B)
 
 DEFINE_GUID (CLSID_DeCompMimeFilter, 0x8f6b0360, 0xb80d, 0x11d0, 0xa9, 0xb3, 0x00, 0x60, 0x97, 0x94, 0x23, 0x11)
 
 DEFINE_GUID (CLSID_CdlProtocol, 0x3dd53d40, 0x7b8b, 0x11D0, 0xb0, 0x13, 0x00, 0xaa, 0x00, 0x59, 0xce, 0x02)
 
 DEFINE_GUID (CLSID_FileProtocol, 0x79EAC9E7, 0xBAF9, 0x11CE, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B)
 
 DEFINE_GUID (CLSID_FtpProtocol, 0x79EAC9E3, 0xBAF9, 0x11CE, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B)
 
 DEFINE_GUID (CLSID_GopherProtocol, 0x79EAC9E4, 0xBAF9, 0x11CE, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B)
 
 DEFINE_GUID (CLSID_HttpProtocol, 0x79EAC9E2, 0xBAF9, 0x11CE, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B)
 
 DEFINE_GUID (CLSID_HttpSProtocol, 0x79EAC9E5, 0xBAF9, 0x11CE, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B)
 
 DEFINE_GUID (CLSID_MkProtocol, 0x79EAC9E6, 0xBAF9, 0x11CE, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B)
 
HRESULT WINAPI CoGetClassObjectFromURL (REFCLSID, LPCWSTR, DWORD, DWORD, LPCWSTR, LPBINDCTX, DWORD, LPVOID, REFIID, LPVOID *)
 
HRESULT WINAPI CreateURLMoniker (IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk)
 
HRESULT WINAPI CreateURLMonikerEx (IMoniker *, LPCWSTR, IMoniker **, DWORD)
 
HRESULT WINAPI CreateURLMonikerEx2 (IMoniker *, IUri *, IMoniker **, DWORD)
 
HRESULT WINAPI RegisterBindStatusCallback (IBindCtx *pbc, IBindStatusCallback *pbsc, IBindStatusCallback **ppbsc, DWORD dwReserved)
 
HRESULT WINAPI CompareSecurityIds (BYTE *, DWORD, BYTE *, DWORD, DWORD)
 
HRESULT WINAPI URLDownloadToFileA (LPUNKNOWN, LPCSTR, LPCSTR, DWORD, LPBINDSTATUSCALLBACK)
 
HRESULT WINAPI URLDownloadToFileW (LPUNKNOWN, LPCWSTR, LPCWSTR, DWORD, LPBINDSTATUSCALLBACK)
 
HRESULT WINAPI URLDownloadToCacheFileA (LPUNKNOWN, LPCSTR, LPSTR, DWORD, DWORD, LPBINDSTATUSCALLBACK)
 
HRESULT WINAPI URLDownloadToCacheFileW (LPUNKNOWN, LPCWSTR, LPWSTR, DWORD, DWORD, LPBINDSTATUSCALLBACK)
 
HRESULT WINAPI CoInternetGetSession (DWORD, IInternetSession **, DWORD)
 
HRESULT WINAPI MkParseDisplayNameEx (IBindCtx *, LPCWSTR, ULONG *, IMoniker **)
 
HRESULT WINAPI IsAsyncMoniker (IMoniker *pmk)
 
HRESULT WINAPI CreateAsyncBindCtx (DWORD, IBindStatusCallback *, IEnumFORMATETC *, IBindCtx **)
 
HRESULT WINAPI CreateAsyncBindCtxEx (IBindCtx *, DWORD, IBindStatusCallback *, IEnumFORMATETC *, IBindCtx **, DWORD)
 
HRESULT WINAPI CoInternetCreateSecurityManager (IServiceProvider *, IInternetSecurityManager **, DWORD)
 
HRESULT WINAPI CoInternetCombineUrl (LPCWSTR, LPCWSTR, DWORD, LPWSTR, DWORD, DWORD *, DWORD)
 
HRESULT WINAPI CoInternetCombineUrlEx (IUri *, LPCWSTR, DWORD, IUri **, DWORD_PTR)
 
HRESULT WINAPI CoInternetCompareUrl (LPCWSTR, LPCWSTR, DWORD)
 
HRESULT WINAPI CoInternetCombineIUri (IUri *, IUri *, DWORD, IUri **, DWORD_PTR)
 
HRESULT WINAPI CoInternetCreateZoneManager (IServiceProvider *, IInternetZoneManager **, DWORD)
 
HRESULT WINAPI CoInternetParseUrl (LPCWSTR, PARSEACTION, DWORD, LPWSTR, DWORD, DWORD *, DWORD)
 
HRESULT WINAPI CoInternetParseIUri (IUri *, PARSEACTION, DWORD, LPWSTR, DWORD, DWORD *, DWORD_PTR)
 
HRESULT WINAPI CoInternetQueryInfo (LPCWSTR, QUERYOPTION, DWORD, LPVOID, DWORD, DWORD *, DWORD)
 
HRESULT WINAPI CoInternetSetFeatureEnabled (INTERNETFEATURELIST, DWORD, BOOL)
 
HRESULT WINAPI CoInternetIsFeatureEnabled (INTERNETFEATURELIST, DWORD dwFlags)
 
HRESULT WINAPI CoInternetIsFeatureEnabledForUrl (INTERNETFEATURELIST, DWORD, LPCWSTR, IInternetSecurityManager *)
 
HRESULT WINAPI CoInternetGetSecurityUrl (LPCWSTR, LPWSTR *, PSUACTION, DWORD)
 
HRESULT WINAPI CoInternetGetSecurityUrlEx (IUri *, IUri **, PSUACTION, DWORD_PTR)
 
HRESULT WINAPI AsyncInstallDistributionUnit (LPCWSTR, LPCWSTR, LPCWSTR, DWORD, DWORD, LPCWSTR, IBindCtx *, LPVOID, DWORD)
 
HRESULT WINAPI CreateFormatEnumerator (UINT, FORMATETC *, IEnumFORMATETC **)
 
HRESULT WINAPI GetSoftwareUpdateInfo (LPCWSTR szDistUnit, LPSOFTDISTINFO psdi)
 
HRESULT WINAPI FaultInIEFeature (HWND, uCLSSPEC *, QUERYCONTEXT *, DWORD)
 
HRESULT WINAPI FindMimeFromData (LPBC, LPCWSTR, LPVOID, DWORD, LPCWSTR, DWORD, LPWSTR *, DWORD)
 
HRESULT WINAPI GetClassFileOrMime (LPBC, LPCWSTR, LPVOID, DWORD, LPCWSTR, DWORD, CLSID *)
 
HRESULT WINAPI HlinkGoBack (IUnknown *)
 
HRESULT WINAPI HlinkGoForward (IUnknown *)
 
HRESULT WINAPI HlinkNavigateMoniker (IUnknown *, IMoniker *)
 
HRESULT WINAPI HlinkNavigateString (IUnknown *, LPCWSTR)
 
HRESULT WINAPI HlinkSimpleNavigateToMoniker (IMoniker *, LPCWSTR, LPCWSTR, IUnknown *, IBindCtx *, IBindStatusCallback *, DWORD, DWORD)
 
HRESULT WINAPI HlinkSimpleNavigateToString (LPCWSTR, LPCWSTR, LPCWSTR, IUnknown *, IBindCtx *, IBindStatusCallback *, DWORD, DWORD)
 
HRESULT WINAPI IsValidURL (LPBC, LPCWSTR, DWORD)
 
HRESULT WINAPI ObtainUserAgentString (DWORD, LPSTR, DWORD *)
 
HRESULT WINAPI RegisterFormatEnumerator (LPBC, IEnumFORMATETC *, DWORD)
 
HRESULT WINAPI RevokeFormatEnumerator (LPBC, IEnumFORMATETC *)
 
HRESULT WINAPI RevokeBindStatusCallback (LPBC, IBindStatusCallback *)
 
HRESULT WINAPI CopyStgMedium (const STGMEDIUM *, STGMEDIUM *)
 
HRESULT WINAPI CopyBindInfo (const BINDINFO *, BINDINFO *)
 
void WINAPI ReleaseBindInfo (BINDINFO *)
 
HRESULT WINAPI UrlMkGetSessionOption (DWORD, LPVOID, DWORD, DWORD *, DWORD)
 
HRESULT WINAPI UrlMkSetSessionOption (DWORD, LPVOID, DWORD, DWORD)
 
HRESULT WINAPI URLOpenStreamA (LPUNKNOWN, LPCSTR, DWORD, LPBINDSTATUSCALLBACK)
 
HRESULT WINAPI URLOpenStreamW (LPUNKNOWN, LPCWSTR, DWORD, LPBINDSTATUSCALLBACK)
 
HRESULT WINAPI URLOpenPullStreamA (LPUNKNOWN, LPCSTR, DWORD, LPBINDSTATUSCALLBACK)
 
HRESULT WINAPI URLOpenPullStreamW (LPUNKNOWN, LPCWSTR, DWORD, LPBINDSTATUSCALLBACK)
 
HRESULT WINAPI URLOpenBlockingStreamA (LPUNKNOWN, LPCSTR, LPSTREAM *, DWORD, LPBINDSTATUSCALLBACK)
 
HRESULT WINAPI URLOpenBlockingStreamW (LPUNKNOWN, LPCWSTR, LPSTREAM *, DWORD, LPBINDSTATUSCALLBACK)
 
BOOL WINAPI IsLoggingEnabledA (LPCSTR)
 
BOOL WINAPI IsLoggingEnabledW (LPCWSTR)
 

Variables

DWORD dwFlags
 
DWORD dwAdState
 
LPWSTR szTitle
 
LPWSTR szAbstract
 
LPWSTR szHREF
 
DWORD dwInstalledVersionMS
 
DWORD dwInstalledVersionLS
 
DWORD dwUpdateVersionMS
 
DWORD dwUpdateVersionLS
 
DWORD dwAdvertisedVersionMS
 
DWORD dwAdvertisedVersionLS
 
DWORD dwReserved
 
 SOFTDISTINFO
 
LPSOFTDISTINFO
 
EXTERN_C const GUID GUID_CUSTOM_CONFIRMOBJECTSAFETY
 

Typedef Documentation

◆ CODEBASEHOLD

◆ FEATURE_ADDON_MANAGEMENT

◆ FEATURE_BEHAVIORS

◆ FEATURE_BLOCK_INPUT_PROMPTS

◆ FEATURE_DISABLE_LEGACY_COMPRESSION

◆ FEATURE_DISABLE_MK_PROTOCOL

◆ FEATURE_DISABLE_NAVIGATION_SOUNDS

◆ FEATURE_DISABLE_TELNET_PROTOCOL

◆ FEATURE_FEEDS

◆ FEATURE_FORCE_ADDR_AND_STATUS

◆ FEATURE_GET_URL_DOM_FILEPATH_UNENCODED

◆ FEATURE_HTTP_USERNAME_PASSWORD_DISABLE

◆ FEATURE_LOCALMACHINE_LOCKDOWN

◆ FEATURE_MIME_HANDLING

◆ FEATURE_MIME_SNIFFING

◆ FEATURE_PROTOCOL_LOCKDOWN

◆ FEATURE_RESTRICT_ACTIVEXINSTALL

◆ FEATURE_RESTRICT_FILEDOWNLOAD

◆ FEATURE_SAFE_BINDTOOBJECT

◆ FEATURE_SECURITYBAND

◆ FEATURE_SSLUX

◆ FEATURE_TABBED_BROWSING

◆ FEATURE_UNC_SAVEDFILECHECK

◆ FEATURE_VALIDATE_NAVIGATE_URL

◆ FEATURE_WEBOC_POPUPMANAGEMENT

◆ FEATURE_WINDOW_RESTRICTIONS

◆ FEATURE_XMLHTTP

◆ FEATURE_ZONE_ELEVATION

◆ INTERNETFEATURELIST

◆ LPCODEBASEHOLD

◆ PROTOCOLFILTERDATA

Function Documentation

◆ AsyncInstallDistributionUnit()

HRESULT WINAPI AsyncInstallDistributionUnit ( LPCWSTR  ,
LPCWSTR  ,
LPCWSTR  ,
DWORD  ,
DWORD  ,
LPCWSTR  ,
IBindCtx ,
LPVOID  ,
DWORD   
)

◆ CoGetClassObjectFromURL()

HRESULT WINAPI CoGetClassObjectFromURL ( REFCLSID  rclsid,
LPCWSTR  szCodeURL,
DWORD  dwFileVersionMS,
DWORD  dwFileVersionLS,
LPCWSTR  szContentType,
LPBINDCTX  pBindCtx,
DWORD  dwClsContext,
LPVOID  pvReserved,
REFIID  riid,
LPVOID ppv 
)

Definition at line 550 of file urlmon_main.c.

554{
555 FIXME("(%s %s %d %d %s %p %d %p %s %p) Stub!\n", debugstr_guid(rclsid), debugstr_w(szCodeURL),
556 dwFileVersionMS, dwFileVersionLS, debugstr_w(szContentType), pBindCtx, dwClsContext, pvReserved,
558 return E_NOINTERFACE;
559}
#define FIXME(fmt,...)
Definition: debug.h:111
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
static LPCSTR DWORD void * pvReserved
Definition: str.c:196
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ CoInternetCombineIUri()

HRESULT WINAPI CoInternetCombineIUri ( IUri pBaseUri,
IUri pRelativeUri,
DWORD  dwCombineFlags,
IUri **  ppCombinedUri,
DWORD_PTR  dwReserved 
)

Definition at line 6716 of file uri.c.

6718{
6719 HRESULT hr;
6721 Uri *relative, *base;
6722 TRACE("(%p %p %x %p %x)\n", pBaseUri, pRelativeUri, dwCombineFlags, ppCombinedUri, (DWORD)dwReserved);
6723
6724 if(!ppCombinedUri)
6725 return E_INVALIDARG;
6726
6727 if(!pBaseUri || !pRelativeUri) {
6728 *ppCombinedUri = NULL;
6729 return E_INVALIDARG;
6730 }
6731
6732 relative = get_uri_obj(pRelativeUri);
6733 base = get_uri_obj(pBaseUri);
6734 if(!relative || !base) {
6735 *ppCombinedUri = NULL;
6736 FIXME("(%p %p %x %p %x) Unknown IUri types not supported yet.\n",
6737 pBaseUri, pRelativeUri, dwCombineFlags, ppCombinedUri, (DWORD)dwReserved);
6738 return E_NOTIMPL;
6739 }
6740
6741 info = get_protocol_info(base->canon_uri);
6742 if(info) {
6744 DWORD result_len = 0;
6745
6746 hr = IInternetProtocolInfo_CombineUrl(info, base->canon_uri, relative->canon_uri, dwCombineFlags,
6747 result, INTERNET_MAX_URL_LENGTH+1, &result_len, 0);
6748 IInternetProtocolInfo_Release(info);
6749 if(SUCCEEDED(hr)) {
6750 hr = CreateUri(result, Uri_CREATE_ALLOW_RELATIVE, 0, ppCombinedUri);
6751 if(SUCCEEDED(hr))
6752 return hr;
6753 }
6754 }
6755
6756 return combine_uri(base, relative, dwCombineFlags, ppCombinedUri, 0);
6757}
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define NULL
Definition: types.h:112
IInternetProtocolInfo * get_protocol_info(LPCWSTR url)
Definition: session.c:181
HRESULT WINAPI CreateUri(LPCWSTR pwzURI, DWORD dwFlags, DWORD_PTR dwReserved, IUri **ppURI)
Definition: uri.c:5700
static HRESULT combine_uri(Uri *base, Uri *relative, DWORD flags, IUri **result, DWORD extras)
Definition: uri.c:6450
static Uri * get_uri_obj(IUri *uri)
Definition: uri.c:254
#define INTERNET_MAX_URL_LENGTH
Definition: session.c:1418
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint64EXT * result
Definition: glext.h:11304
#define SUCCEEDED(hr)
Definition: intsafe.h:50
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:95
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
Definition: uri.c:50
WCHAR * canon_uri
Definition: uri.c:61
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by CreateURLMonikerEx2().

◆ CoInternetCombineUrl()

HRESULT WINAPI CoInternetCombineUrl ( LPCWSTR  pwzBaseUrl,
LPCWSTR  pwzRelativeUrl,
DWORD  dwCombineFlags,
LPWSTR  pwzResult,
DWORD  cchResult,
DWORD pcchResult,
DWORD  dwReserved 
)

Definition at line 426 of file internet.c.

429{
431 DWORD size = cchResult;
433
434 TRACE("(%s,%s,0x%08x,%p,%d,%p,%d)\n", debugstr_w(pwzBaseUrl),
435 debugstr_w(pwzRelativeUrl), dwCombineFlags, pwzResult, cchResult, pcchResult,
436 dwReserved);
437
438 protocol_info = get_protocol_info(pwzBaseUrl);
439
440 if(protocol_info) {
441 hres = IInternetProtocolInfo_CombineUrl(protocol_info, pwzBaseUrl, pwzRelativeUrl,
442 dwCombineFlags, pwzResult, cchResult, pcchResult, dwReserved);
443 IInternetProtocolInfo_Release(protocol_info);
444 if(SUCCEEDED(hres))
445 return hres;
446 }
447
448
449 hres = UrlCombineW(pwzBaseUrl, pwzRelativeUrl, pwzResult, &size, dwCombineFlags);
450
451 if(pcchResult)
452 *pcchResult = size;
453
454 return hres;
455}
HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative, LPWSTR pszCombined, LPDWORD pcchCombined, DWORD dwFlags)
Definition: url.c:662
GLsizeiptr size
Definition: glext.h:5919
HRESULT hres
Definition: protocol.c:465
static IInternetProtocolInfo protocol_info
Definition: misc.c:947

◆ CoInternetCombineUrlEx()

HRESULT WINAPI CoInternetCombineUrlEx ( IUri pBaseUri,
LPCWSTR  pwzRelativeUrl,
DWORD  dwCombineFlags,
IUri **  ppCombinedUri,
DWORD_PTR  dwReserved 
)

Definition at line 6762 of file uri.c.

6764{
6765 IUri *relative;
6766 Uri *base;
6767 HRESULT hr;
6769
6770 TRACE("(%p %s %x %p %x)\n", pBaseUri, debugstr_w(pwzRelativeUrl), dwCombineFlags,
6771 ppCombinedUri, (DWORD)dwReserved);
6772
6773 if(!ppCombinedUri)
6774 return E_POINTER;
6775
6776 if(!pwzRelativeUrl) {
6777 *ppCombinedUri = NULL;
6778 return E_UNEXPECTED;
6779 }
6780
6781 if(!pBaseUri) {
6782 *ppCombinedUri = NULL;
6783 return E_INVALIDARG;
6784 }
6785
6786 base = get_uri_obj(pBaseUri);
6787 if(!base) {
6788 *ppCombinedUri = NULL;
6789 FIXME("(%p %s %x %p %x) Unknown IUri's not supported yet.\n", pBaseUri, debugstr_w(pwzRelativeUrl),
6790 dwCombineFlags, ppCombinedUri, (DWORD)dwReserved);
6791 return E_NOTIMPL;
6792 }
6793
6794 info = get_protocol_info(base->canon_uri);
6795 if(info) {
6797 DWORD result_len = 0;
6798
6799 hr = IInternetProtocolInfo_CombineUrl(info, base->canon_uri, pwzRelativeUrl, dwCombineFlags,
6800 result, INTERNET_MAX_URL_LENGTH+1, &result_len, 0);
6801 IInternetProtocolInfo_Release(info);
6802 if(SUCCEEDED(hr)) {
6803 hr = CreateUri(result, Uri_CREATE_ALLOW_RELATIVE, 0, ppCombinedUri);
6804 if(SUCCEEDED(hr))
6805 return hr;
6806 }
6807 }
6808
6809 hr = CreateUri(pwzRelativeUrl, Uri_CREATE_ALLOW_RELATIVE|Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME, 0, &relative);
6810 if(FAILED(hr)) {
6811 *ppCombinedUri = NULL;
6812 return hr;
6813 }
6814
6815 hr = combine_uri(base, get_uri_obj(relative), dwCombineFlags, ppCombinedUri, COMBINE_URI_FORCE_FLAG_USE);
6816
6817 IUri_Release(relative);
6818 return hr;
6819}
#define COMBINE_URI_FORCE_FLAG_USE
Definition: uri.c:44
#define FAILED(hr)
Definition: intsafe.h:51
#define E_UNEXPECTED
Definition: winerror.h:2456
#define E_POINTER
Definition: winerror.h:2365

Referenced by check_codebase(), combine_url(), create_relative_uri(), CreateURLMonikerEx(), and navigate_url().

◆ CoInternetCompareUrl()

HRESULT WINAPI CoInternetCompareUrl ( LPCWSTR  pwzUrl1,
LPCWSTR  pwzUrl2,
DWORD  dwCompareFlags 
)

Definition at line 460 of file internet.c.

461{
464
465 TRACE("(%s,%s,%08x)\n", debugstr_w(pwzUrl1), debugstr_w(pwzUrl2), dwCompareFlags);
466
468
469 if(protocol_info) {
470 hres = IInternetProtocolInfo_CompareUrl(protocol_info, pwzUrl1, pwzUrl2, dwCompareFlags);
471 IInternetProtocolInfo_Release(protocol_info);
472 if(SUCCEEDED(hres))
473 return hres;
474 }
475
476 return UrlCompareW(pwzUrl1, pwzUrl2, dwCompareFlags) ? S_FALSE : S_OK;
477}
INT WINAPI UrlCompareW(LPCWSTR pszUrl1, LPCWSTR pszUrl2, BOOL fIgnoreSlash)
Definition: url.c:1537
#define S_OK
Definition: intsafe.h:52
#define S_FALSE
Definition: winerror.h:2357

◆ CoInternetCreateSecurityManager()

HRESULT WINAPI CoInternetCreateSecurityManager ( IServiceProvider pSP,
IInternetSecurityManager **  ppSM,
DWORD  dwReserved 
)

Definition at line 1841 of file sec_mgr.c.

1843{
1844 TRACE("%p %p %d\n", pSP, ppSM, dwReserved );
1845
1846 if(pSP)
1847 FIXME("pSP not supported\n");
1848
1849 return SecManagerImpl_Construct(NULL, (void**) ppSM);
1850}
HRESULT SecManagerImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
Definition: sec_mgr.c:1241

Referenced by HTMLOuterWindow_Create(), and security_enum_zones().

◆ CoInternetCreateZoneManager()

HRESULT WINAPI CoInternetCreateZoneManager ( IServiceProvider pSP,
IInternetZoneManager **  ppZM,
DWORD  dwReserved 
)

Definition at line 1855 of file sec_mgr.c.

1856{
1857 TRACE("(%p %p %x)\n", pSP, ppZM, dwReserved);
1858 return ZoneMgrImpl_Construct(NULL, (void**)ppZM);
1859}
HRESULT ZoneMgrImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
Definition: sec_mgr.c:1823

Referenced by security_enum_zones().

◆ CoInternetGetSecurityUrl()

HRESULT WINAPI CoInternetGetSecurityUrl ( LPCWSTR  pwzUrl,
LPWSTR ppwzSecUrl,
PSUACTION  psuAction,
DWORD  dwReserved 
)

Definition at line 1977 of file sec_mgr.c.

1978{
1979 WCHAR *secure_url;
1980 HRESULT hres;
1981
1982 TRACE("(%p,%p,%u,%u)\n", pwzUrl, ppwzSecUrl, psuAction, dwReserved);
1983
1984 hres = parse_security_url(pwzUrl, psuAction, &secure_url);
1985 if(FAILED(hres))
1986 return hres;
1987
1988 if(psuAction != PSU_SECURITY_URL_ONLY) {
1989 PARSEDURLW parsed_url = { sizeof(parsed_url) };
1990 DWORD size;
1991
1992 /* FIXME: Use helpers from uri.c */
1993 if(SUCCEEDED(ParseURLW(secure_url, &parsed_url))) {
1994 WCHAR *new_url;
1995
1996 switch(parsed_url.nScheme) {
1997 case URL_SCHEME_FTP:
1998 case URL_SCHEME_HTTP:
1999 case URL_SCHEME_HTTPS:
2000 size = lstrlenW(secure_url)+1;
2001 new_url = CoTaskMemAlloc(size * sizeof(WCHAR));
2002 if(new_url)
2004 else
2006 CoTaskMemFree(secure_url);
2007 if(hres != S_OK) {
2008 WARN("UrlGetPart failed: %08x\n", hres);
2009 CoTaskMemFree(new_url);
2010 return FAILED(hres) ? hres : E_FAIL;
2011 }
2012 secure_url = new_url;
2013 }
2014 }
2015 }
2016
2017 *ppwzSecUrl = secure_url;
2018 return S_OK;
2019}
#define WARN(fmt,...)
Definition: debug.h:112
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_FAIL
Definition: ddrawi.h:102
#define lstrlenW
Definition: compat.h:750
HRESULT WINAPI UrlGetPartW(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut, DWORD dwPart, DWORD dwFlags)
Definition: url.c:2269
HRESULT WINAPI ParseURLW(LPCWSTR x, PARSEDURLW *y)
Definition: url.c:197
static HRESULT parse_security_url(const WCHAR *url, PSUACTION action, WCHAR **result)
Definition: sec_mgr.c:1861
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
@ URL_SCHEME_HTTPS
Definition: shlwapi.h:1157
@ URL_SCHEME_FTP
Definition: shlwapi.h:1147
@ URL_SCHEME_HTTP
Definition: shlwapi.h:1148
@ URL_PART_HOSTNAME
Definition: shlwapi.h:1180
#define URL_PARTFLAG_KEEPSCHEME
Definition: shlwapi.h:1187
UINT nScheme
Definition: shlwapi.h:1437

Referenced by map_url_to_zone().

◆ CoInternetGetSecurityUrlEx()

HRESULT WINAPI CoInternetGetSecurityUrlEx ( IUri pUri,
IUri **  ppSecUri,
PSUACTION  psuAction,
DWORD_PTR  dwReserved 
)

Definition at line 2024 of file sec_mgr.c.

2025{
2026 URL_SCHEME scheme_type;
2027 BSTR secure_uri;
2028 WCHAR *ret_url;
2029 HRESULT hres;
2030
2031 TRACE("(%p,%p,%u,%u)\n", pUri, ppSecUri, psuAction, (DWORD)dwReserved);
2032
2033 if(!pUri || !ppSecUri)
2034 return E_INVALIDARG;
2035
2036 hres = IUri_GetDisplayUri(pUri, &secure_uri);
2037 if(FAILED(hres))
2038 return hres;
2039
2040 hres = parse_security_url(secure_uri, psuAction, &ret_url);
2041 SysFreeString(secure_uri);
2042 if(FAILED(hres))
2043 return hres;
2044
2045 /* File URIs have to hierarchical. */
2046 hres = IUri_GetScheme(pUri, (DWORD*)&scheme_type);
2047 if(SUCCEEDED(hres) && scheme_type == URL_SCHEME_FILE) {
2048 const WCHAR *tmp = ret_url;
2049
2050 /* Check and see if a "//" is after the scheme name. */
2051 tmp += ARRAY_SIZE(fileW);
2052 if(*tmp != '/' || *(tmp+1) != '/')
2054 }
2055
2056 if(SUCCEEDED(hres))
2057 hres = CreateUri(ret_url, Uri_CREATE_ALLOW_IMPLICIT_WILDCARD_SCHEME, 0, ppSecUri);
2058 CoTaskMemFree(ret_url);
2059 return hres;
2060}
#define ARRAY_SIZE(a)
Definition: main.h:24
OLECHAR * BSTR
Definition: compat.h:2293
static const WCHAR fileW[]
Definition: sec_mgr.c:40
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
URL_SCHEME
Definition: shlwapi.h:1144
@ URL_SCHEME_FILE
Definition: shlwapi.h:1155

Referenced by map_uri_to_zone().

◆ CoInternetGetSession()

HRESULT WINAPI CoInternetGetSession ( DWORD  dwSessionMode,
IInternetSession **  ppIInternetSession,
DWORD  dwReserved 
)

Definition at line 485 of file session.c.

487{
488 TRACE("(%d %p %d)\n", dwSessionMode, ppIInternetSession, dwReserved);
489
490 if(dwSessionMode)
491 ERR("dwSessionMode=%d\n", dwSessionMode);
492 if(dwReserved)
493 ERR("dwReserved=%d\n", dwReserved);
494
495 IInternetSession_AddRef(&InternetSession);
496 *ppIInternetSession = &InternetSession;
497 return S_OK;
498}
#define ERR(fmt,...)
Definition: debug.h:110
static IInternetSession InternetSession
Definition: session.c:467

Referenced by register_protocol(), and register_protocols().

◆ CoInternetIsFeatureEnabled()

HRESULT WINAPI CoInternetIsFeatureEnabled ( INTERNETFEATURELIST  FeatureEntry,
DWORD  dwFlags 
)

Definition at line 685 of file internet.c.

686{
687 TRACE("(%d, %08x)\n", FeatureEntry, dwFlags);
688 return get_internet_feature(FeatureEntry, dwFlags);
689}
static HRESULT get_internet_feature(INTERNETFEATURELIST feature, DWORD flags)
Definition: internet.c:656
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176

Referenced by CoInternetIsFeatureEnabledForUrl(), and CoInternetIsFeatureZoneElevationEnabled().

◆ CoInternetIsFeatureEnabledForUrl()

HRESULT WINAPI CoInternetIsFeatureEnabledForUrl ( INTERNETFEATURELIST  FeatureEntry,
DWORD  dwFlags,
LPCWSTR  szURL,
IInternetSecurityManager pSecMgr 
)

Definition at line 694 of file internet.c.

696{
697 DWORD urlaction = 0;
699
700 TRACE("(%d %08x %s %p)\n", FeatureEntry, dwFlags, debugstr_w(szURL), pSecMgr);
701
702 if(FeatureEntry == FEATURE_MIME_SNIFFING)
703 urlaction = URLACTION_FEATURE_MIME_SNIFFING;
704 else if(FeatureEntry == FEATURE_WINDOW_RESTRICTIONS)
705 urlaction = URLACTION_FEATURE_WINDOW_RESTRICTIONS;
706 else if(FeatureEntry == FEATURE_ZONE_ELEVATION)
707 urlaction = URLACTION_FEATURE_ZONE_ELEVATION;
708
709 if(!szURL || !urlaction || !pSecMgr)
710 return CoInternetIsFeatureEnabled(FeatureEntry, dwFlags);
711
712 switch(dwFlags) {
713 case GET_FEATURE_FROM_THREAD:
714 case GET_FEATURE_FROM_THREAD_LOCALMACHINE:
715 case GET_FEATURE_FROM_THREAD_INTRANET:
716 case GET_FEATURE_FROM_THREAD_TRUSTED:
717 case GET_FEATURE_FROM_THREAD_INTERNET:
718 case GET_FEATURE_FROM_THREAD_RESTRICTED:
719 FIXME("unsupported flags %x\n", dwFlags);
720 return E_NOTIMPL;
721
722 case GET_FEATURE_FROM_PROCESS:
723 hres = CoInternetIsFeatureEnabled(FeatureEntry, dwFlags);
724 if(hres != S_OK)
725 return hres;
726 /* fall through */
727
728 default: {
729 DWORD policy = URLPOLICY_DISALLOW;
730
731 hres = IInternetSecurityManager_ProcessUrlAction(pSecMgr, szURL, urlaction,
732 (BYTE*)&policy, sizeof(DWORD), NULL, 0, PUAF_NOUI, 0);
733 if(hres!=S_OK || policy!=URLPOLICY_ALLOW)
734 return S_OK;
735 return S_FALSE;
736 }
737 }
738}
HRESULT WINAPI CoInternetIsFeatureEnabled(INTERNETFEATURELIST FeatureEntry, DWORD dwFlags)
Definition: internet.c:685
WDF_INTERRUPT_POLICY policy
unsigned char BYTE
Definition: xxhash.c:193

◆ CoInternetParseIUri()

HRESULT WINAPI CoInternetParseIUri ( IUri pIUri,
PARSEACTION  ParseAction,
DWORD  dwFlags,
LPWSTR  pwzResult,
DWORD  cchResult,
DWORD pcchResult,
DWORD_PTR  dwReserved 
)

Definition at line 7247 of file uri.c.

7250{
7251 HRESULT hr;
7252 Uri *uri;
7254
7255 TRACE("(%p %d %x %p %d %p %x)\n", pIUri, ParseAction, dwFlags, pwzResult,
7256 cchResult, pcchResult, (DWORD)dwReserved);
7257
7258 if(!pcchResult)
7259 return E_POINTER;
7260
7261 if(!pwzResult || !pIUri) {
7262 *pcchResult = 0;
7263 return E_INVALIDARG;
7264 }
7265
7266 if(!(uri = get_uri_obj(pIUri))) {
7267 *pcchResult = 0;
7268 FIXME("(%p %d %x %p %d %p %x) Unknown IUri's not supported for this action.\n",
7269 pIUri, ParseAction, dwFlags, pwzResult, cchResult, pcchResult, (DWORD)dwReserved);
7270 return E_NOTIMPL;
7271 }
7272
7273 info = get_protocol_info(uri->canon_uri);
7274 if(info) {
7275 hr = IInternetProtocolInfo_ParseUrl(info, uri->canon_uri, ParseAction, dwFlags,
7276 pwzResult, cchResult, pcchResult, 0);
7277 IInternetProtocolInfo_Release(info);
7278 if(SUCCEEDED(hr)) return hr;
7279 }
7280
7281 switch(ParseAction) {
7282 case PARSE_CANONICALIZE:
7283 hr = parse_canonicalize(uri, dwFlags, pwzResult, cchResult, pcchResult);
7284 break;
7285 case PARSE_FRIENDLY:
7286 hr = parse_friendly(pIUri, pwzResult, cchResult, pcchResult);
7287 break;
7288 case PARSE_ROOTDOCUMENT:
7289 hr = parse_rootdocument(uri, pwzResult, cchResult, pcchResult);
7290 break;
7291 case PARSE_DOCUMENT:
7292 hr = parse_document(uri, pwzResult, cchResult, pcchResult);
7293 break;
7294 case PARSE_PATH_FROM_URL:
7295 hr = parse_path_from_url(uri, pwzResult, cchResult, pcchResult);
7296 break;
7297 case PARSE_URL_FROM_PATH:
7298 hr = parse_url_from_path(pIUri, pwzResult, cchResult, pcchResult);
7299 break;
7300 case PARSE_SCHEMA:
7301 hr = parse_schema(pIUri, pwzResult, cchResult, pcchResult);
7302 break;
7303 case PARSE_SITE:
7304 hr = parse_site(pIUri, pwzResult, cchResult, pcchResult);
7305 break;
7306 case PARSE_DOMAIN:
7307 hr = parse_domain(pIUri, pwzResult, cchResult, pcchResult);
7308 break;
7309 case PARSE_LOCATION:
7310 case PARSE_ANCHOR:
7311 hr = parse_anchor(pIUri, pwzResult, cchResult, pcchResult);
7312 break;
7313 case PARSE_SECURITY_URL:
7314 case PARSE_MIME:
7315 case PARSE_SERVER:
7316 case PARSE_SECURITY_DOMAIN:
7317 *pcchResult = 0;
7318 hr = E_FAIL;
7319 break;
7320 default:
7321 *pcchResult = 0;
7322 hr = E_NOTIMPL;
7323 FIXME("(%p %d %x %p %d %p %x) Partial stub.\n", pIUri, ParseAction, dwFlags,
7324 pwzResult, cchResult, pcchResult, (DWORD)dwReserved);
7325 }
7326
7327 return hr;
7328}
static HRESULT parse_site(IUri *uri, LPWSTR output, DWORD output_len, DWORD *result_len)
Definition: uri.c:7160
static HRESULT parse_domain(IUri *uri, LPWSTR output, DWORD output_len, DWORD *result_len)
Definition: uri.c:7188
static HRESULT parse_anchor(IUri *uri, LPWSTR output, DWORD output_len, DWORD *result_len)
Definition: uri.c:7216
static HRESULT parse_path_from_url(const Uri *uri, LPWSTR output, DWORD output_len, DWORD *result_len)
Definition: uri.c:7044
static HRESULT parse_rootdocument(const Uri *uri, LPWSTR output, DWORD output_len, DWORD *result_len)
Definition: uri.c:6960
static HRESULT parse_canonicalize(const Uri *uri, DWORD flags, LPWSTR output, DWORD output_len, DWORD *result_len)
Definition: uri.c:6821
static HRESULT parse_document(const Uri *uri, LPWSTR output, DWORD output_len, DWORD *result_len)
Definition: uri.c:7011
static HRESULT parse_url_from_path(IUri *uri, LPWSTR output, DWORD output_len, DWORD *result_len)
Definition: uri.c:7102
static HRESULT parse_schema(IUri *uri, LPWSTR output, DWORD output_len, DWORD *result_len)
Definition: uri.c:7131
static HRESULT parse_friendly(IUri *uri, LPWSTR output, DWORD output_len, DWORD *result_len)
Definition: uri.c:6932
const char * uri
Definition: sec_mgr.c:1588

Referenced by FileProtocol_StartEx(), and nsFileURL_GetFile().

◆ CoInternetParseUrl()

HRESULT WINAPI CoInternetParseUrl ( LPCWSTR  pwzUrl,
PARSEACTION  ParseAction,
DWORD  dwFlags,
LPWSTR  pszResult,
DWORD  cchResult,
DWORD pcchResult,
DWORD  dwReserved 
)

Definition at line 392 of file internet.c.

394{
395 if(dwReserved)
396 WARN("dwReserved = %d\n", dwReserved);
397
398 switch(ParseAction) {
399 case PARSE_CANONICALIZE:
400 return parse_canonicalize_url(pwzUrl, dwFlags, pszResult, cchResult, pcchResult);
401 case PARSE_SECURITY_URL:
402 return parse_security_url(pwzUrl, dwFlags, pszResult, cchResult, pcchResult);
403 case PARSE_ENCODE:
404 case PARSE_UNESCAPE:
405 return parse_encode(pwzUrl, ParseAction, dwFlags, pszResult, cchResult, pcchResult);
406 case PARSE_PATH_FROM_URL:
407 return parse_path_from_url(pwzUrl, dwFlags, pszResult, cchResult, pcchResult);
408 case PARSE_SCHEMA:
409 return parse_schema(pwzUrl, dwFlags, pszResult, cchResult, pcchResult);
410 case PARSE_SECURITY_DOMAIN:
411 return parse_security_domain(pwzUrl, dwFlags, pszResult, cchResult, pcchResult);
412 case PARSE_DOMAIN:
413 return parse_domain(pwzUrl, dwFlags, pszResult, cchResult, pcchResult);
414 case PARSE_ROOTDOCUMENT:
415 return parse_rootdocument(pwzUrl, dwFlags, pszResult, cchResult, pcchResult);
416 default:
417 FIXME("not supported action %d\n", ParseAction);
418 }
419
420 return E_NOTIMPL;
421}
static HRESULT parse_canonicalize_url(LPCWSTR url, DWORD flags, LPWSTR result, DWORD size, DWORD *rsize)
Definition: internet.c:176
static HRESULT parse_encode(LPCWSTR url, PARSEACTION action, DWORD flags, LPWSTR result, DWORD size, DWORD *rsize)
Definition: internet.c:221
static HRESULT parse_security_domain(LPCWSTR url, DWORD flags, LPWSTR result, DWORD size, DWORD *rsize)
Definition: internet.c:274
static HRESULT parse_rootdocument(LPCWSTR url, DWORD flags, LPWSTR result, DWORD size, DWORD *rsize)
Definition: internet.c:325
static HRESULT parse_schema(LPCWSTR url, DWORD flags, LPWSTR result, DWORD size, DWORD *rsize)
Definition: internet.c:149
static HRESULT parse_domain(LPCWSTR url, DWORD flags, LPWSTR result, DWORD size, DWORD *rsize)
Definition: internet.c:295
static HRESULT parse_path_from_url(LPCWSTR url, DWORD flags, LPWSTR result, DWORD size, DWORD *rsize)
Definition: internet.c:248
static HRESULT parse_security_url(LPCWSTR url, DWORD flags, LPWSTR result, DWORD size, DWORD *rsize)
Definition: internet.c:202

Referenced by get_protocol_info(), is_registered_protocol(), OleLoadPicturePath(), ResProtocol_Start(), try_application_url(), and UniformResourceLocatorW_InvokeCommand().

◆ CoInternetQueryInfo()

HRESULT WINAPI CoInternetQueryInfo ( LPCWSTR  pwzUrl,
QUERYOPTION  QueryOption,
DWORD  dwQueryFlags,
LPVOID  pvBuffer,
DWORD  cbBuffer,
DWORD pcbBuffer,
DWORD  dwReserved 
)

Definition at line 485 of file internet.c.

488{
491
492 TRACE("(%s, %x, %x, %p, %x, %p, %x)\n", debugstr_w(pwzUrl),
493 QueryOption, dwQueryFlags, pvBuffer, cbBuffer, pcbBuffer, dwReserved);
494
496
497 if(protocol_info) {
498 hres = IInternetProtocolInfo_QueryInfo(protocol_info, pwzUrl, QueryOption, dwQueryFlags,
499 pvBuffer, cbBuffer, pcbBuffer, dwReserved);
500 IInternetProtocolInfo_Release(protocol_info);
501
502 return SUCCEEDED(hres) ? hres : E_FAIL;
503 }
504
505 switch(QueryOption) {
506 case QUERY_USES_NETWORK:
507 if(!pvBuffer || cbBuffer < sizeof(DWORD))
508 return E_FAIL;
509
510 *(DWORD*)pvBuffer = 0;
511 if(pcbBuffer)
512 *pcbBuffer = sizeof(DWORD);
513 break;
514
515 default:
516 FIXME("Not supported option %d\n", QueryOption);
517 return E_NOTIMPL;
518 }
519
520 return S_OK;
521}
#define DWORD
Definition: nt_native.h:44

◆ CoInternetSetFeatureEnabled()

HRESULT WINAPI CoInternetSetFeatureEnabled ( INTERNETFEATURELIST  FeatureEntry,
DWORD  dwFlags,
BOOL  fEnable 
)

Definition at line 676 of file internet.c.

677{
678 TRACE("(%d, %08x, %x)\n", FeatureEntry, dwFlags, fEnable);
679 return set_internet_feature(FeatureEntry, dwFlags, fEnable);
680}
static HRESULT set_internet_feature(INTERNETFEATURELIST feature, DWORD flags, BOOL enable)
Definition: internet.c:533

◆ CompareSecurityIds()

HRESULT WINAPI CompareSecurityIds ( BYTE secid1,
DWORD  size1,
BYTE secid2,
DWORD  size2,
DWORD  reserved 
)

Definition at line 2065 of file sec_mgr.c.

2066{
2067 FIXME("(%p %d %p %d %x)\n", secid1, size1, secid2, size2, reserved);
2068 return E_NOTIMPL;
2069}
r reserved
Definition: btrfs.c:3006
static const BYTE secid2[]
Definition: sec_mgr.c:122
static const BYTE secid1[]
Definition: sec_mgr.c:121

◆ CopyBindInfo()

HRESULT WINAPI CopyBindInfo ( const BINDINFO *  pcbiSrc,
BINDINFO *  pcbiDest 
)

Definition at line 654 of file urlmon_main.c.

655{
656 DWORD size;
658
659 TRACE("(%p %p)\n", pcbiSrc, pcbiDest);
660
661 if(!pcbiSrc || !pcbiDest)
662 return E_POINTER;
663 if(!pcbiSrc->cbSize || !pcbiDest->cbSize)
664 return E_INVALIDARG;
665
666 size = pcbiDest->cbSize;
667 if(size > pcbiSrc->cbSize) {
668 memcpy(pcbiDest, pcbiSrc, pcbiSrc->cbSize);
669 memset((char*)pcbiDest+pcbiSrc->cbSize, 0, size-pcbiSrc->cbSize);
670 } else {
671 memcpy(pcbiDest, pcbiSrc, size);
672 }
673 pcbiDest->cbSize = size;
674
675 size = FIELD_OFFSET(BINDINFO, szExtraInfo)+sizeof(void*);
676 if(pcbiSrc->cbSize>=size && pcbiDest->cbSize>=size && pcbiSrc->szExtraInfo) {
677 size = (lstrlenW(pcbiSrc->szExtraInfo)+1)*sizeof(WCHAR);
678 pcbiDest->szExtraInfo = CoTaskMemAlloc(size);
679 if(!pcbiDest->szExtraInfo)
680 return E_OUTOFMEMORY;
681 memcpy(pcbiDest->szExtraInfo, pcbiSrc->szExtraInfo, size);
682 }
683
684 size = FIELD_OFFSET(BINDINFO, stgmedData)+sizeof(STGMEDIUM);
685 if(pcbiSrc->cbSize>=size && pcbiDest->cbSize>=size) {
686 hres = CopyStgMedium(&pcbiSrc->stgmedData, &pcbiDest->stgmedData);
687 if(FAILED(hres)) {
688 CoTaskMemFree(pcbiDest->szExtraInfo);
689 return hres;
690 }
691 }
692
693 size = FIELD_OFFSET(BINDINFO, szCustomVerb)+sizeof(void*);
694 if(pcbiSrc->cbSize>=size && pcbiDest->cbSize>=size && pcbiSrc->szCustomVerb) {
695 size = (lstrlenW(pcbiSrc->szCustomVerb)+1)*sizeof(WCHAR);
696 pcbiDest->szCustomVerb = CoTaskMemAlloc(size);
697 if(!pcbiDest->szCustomVerb) {
698 CoTaskMemFree(pcbiDest->szExtraInfo);
699 ReleaseStgMedium(&pcbiDest->stgmedData);
700 return E_OUTOFMEMORY;
701 }
702 memcpy(pcbiDest->szCustomVerb, pcbiSrc->szCustomVerb, size);
703 }
704
705 size = FIELD_OFFSET(BINDINFO, securityAttributes)+sizeof(SECURITY_ATTRIBUTES);
706 if(pcbiDest->cbSize >= size)
707 memset(&pcbiDest->securityAttributes, 0, sizeof(SECURITY_ATTRIBUTES));
708
709 if(pcbiSrc->pUnk)
710 IUnknown_AddRef(pcbiDest->pUnk);
711
712 return S_OK;
713}
struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES
void WINAPI ReleaseStgMedium(STGMEDIUM *pmedium)
Definition: ole2.c:2033
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define memset(x, y, z)
Definition: compat.h:39
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
HRESULT WINAPI CopyStgMedium(const STGMEDIUM *src, STGMEDIUM *dst)
Definition: urlmon_main.c:597

Referenced by InternetBindInfo_GetBindInfo().

◆ CopyStgMedium()

HRESULT WINAPI CopyStgMedium ( const STGMEDIUM *  src,
STGMEDIUM *  dst 
)

Definition at line 597 of file urlmon_main.c.

598{
599 TRACE("(%p %p)\n", src, dst);
600
601 if(!src || !dst)
602 return E_POINTER;
603
604 *dst = *src;
605
606 switch(dst->tymed) {
607 case TYMED_NULL:
608 break;
609 case TYMED_FILE:
610 if(src->u.lpszFileName && !src->pUnkForRelease) {
611 DWORD size = (lstrlenW(src->u.lpszFileName)+1)*sizeof(WCHAR);
612 dst->u.lpszFileName = CoTaskMemAlloc(size);
613 if(!dst->u.lpszFileName)
614 return E_OUTOFMEMORY;
615 memcpy(dst->u.lpszFileName, src->u.lpszFileName, size);
616 }
617 break;
618 case TYMED_ISTREAM:
619 if(dst->u.pstm)
620 IStream_AddRef(dst->u.pstm);
621 break;
622 case TYMED_ISTORAGE:
623 if(dst->u.pstg)
624 IStorage_AddRef(dst->u.pstg);
625 break;
626 case TYMED_HGLOBAL:
627 if(dst->u.hGlobal) {
628 SIZE_T size = GlobalSize(src->u.hGlobal);
629 char *src_ptr, *dst_ptr;
630
631 dst->u.hGlobal = GlobalAlloc(GMEM_FIXED, size);
632 if(!dst->u.hGlobal)
633 return E_OUTOFMEMORY;
634 dst_ptr = GlobalLock(dst->u.hGlobal);
635 src_ptr = GlobalLock(src->u.hGlobal);
636 memcpy(dst_ptr, src_ptr, size);
637 GlobalUnlock(src_ptr);
638 GlobalUnlock(dst_ptr);
639 }
640 break;
641 default:
642 FIXME("Unimplemented tymed %d\n", src->tymed);
643 }
644
645 if(dst->pUnkForRelease)
646 IUnknown_AddRef(dst->pUnkForRelease);
647
648 return S_OK;
649}
GLenum src
Definition: glext.h:6340
GLenum GLenum dst
Definition: glext.h:6340
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
Definition: heapmem.c:755
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
Definition: heapmem.c:1190
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:368
SIZE_T NTAPI GlobalSize(HGLOBAL hMem)
Definition: heapmem.c:1090
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define GMEM_FIXED
Definition: winbase.h:293

Referenced by CopyBindInfo().

◆ CreateAsyncBindCtx()

HRESULT WINAPI CreateAsyncBindCtx ( DWORD  reserved,
IBindStatusCallback callback,
IEnumFORMATETC format,
IBindCtx **  pbind 
)

Definition at line 899 of file bindctx.c.

901{
902 IBindCtx *bindctx;
904
905 TRACE("(%08x %p %p %p)\n", reserved, callback, format, pbind);
906
907 if(!pbind || !callback)
908 return E_INVALIDARG;
909
910 hres = CreateBindCtx(0, &bindctx);
911 if(FAILED(hres))
912 return hres;
913
914 hres = init_bindctx(bindctx, 0, callback, format);
915 if(FAILED(hres)) {
916 IBindCtx_Release(bindctx);
917 return hres;
918 }
919
920 *pbind = bindctx;
921 return S_OK;
922}
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
static IPrintDialogCallback callback
Definition: printdlg.c:326
HRESULT WINAPI CreateBindCtx(DWORD reserved, LPBC *ppbc)
Definition: bindctx.c:556
static HRESULT init_bindctx(IBindCtx *bindctx, DWORD options, IBindStatusCallback *callback, IEnumFORMATETC *format)
Definition: bindctx.c:867

Referenced by BindAsyncMoniker(), download_to_cache(), download_url(), hlink_frame_navigate(), install_codebase(), MimeHtmlProtocol_Start(), navigate_bsc(), navigate_new_window(), start_binding(), test_BindToObject(), test_BindToStorage(), test_CreateAsyncBindCtx(), test_ReportResult(), test_StdURLMoniker(), and URLDownloadToFileW().

◆ CreateAsyncBindCtxEx()

HRESULT WINAPI CreateAsyncBindCtxEx ( IBindCtx ibind,
DWORD  options,
IBindStatusCallback callback,
IEnumFORMATETC format,
IBindCtx **  pbind,
DWORD  reserved 
)

Definition at line 929 of file bindctx.c.

932{
934 IBindCtx *bindctx;
936
937 TRACE("(%p %08x %p %p %p %d)\n", ibind, options, callback, format, pbind, reserved);
938
939 if(!pbind)
940 return E_INVALIDARG;
941
942 if(reserved)
943 WARN("reserved=%d\n", reserved);
944
945 if(ibind) {
946 IBindCtx_AddRef(ibind);
947 bindctx = ibind;
948 }else {
949 hres = CreateBindCtx(0, &bindctx);
950 if(FAILED(hres))
951 return hres;
952 }
953
954 ret = heap_alloc(sizeof(AsyncBindCtx));
955
956 ret->IBindCtx_iface.lpVtbl = &AsyncBindCtxVtbl;
957 ret->ref = 1;
958 ret->bindctx = bindctx;
959
960 hres = init_bindctx(&ret->IBindCtx_iface, options, callback, format);
961 if(FAILED(hres)) {
962 IBindCtx_Release(&ret->IBindCtx_iface);
963 return hres;
964 }
965
966 *pbind = &ret->IBindCtx_iface;
967 return S_OK;
968}
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
static const IBindCtxVtbl AsyncBindCtxVtbl
Definition: bindctx.c:850
int ret

Referenced by load_doc_mon().

◆ CreateFormatEnumerator()

HRESULT WINAPI CreateFormatEnumerator ( UINT  cfmtetc,
FORMATETC *  rgfmtetc,
IEnumFORMATETC **  ppenumfmtetc 
)

Definition at line 177 of file format.c.

179{
180 TRACE("(%d %p %p)\n", cfmtetc, rgfmtetc, ppenumfmtetc);
181
182 if(!ppenumfmtetc)
183 return E_INVALIDARG;
184 if(!cfmtetc)
185 return E_FAIL;
186
187 *ppenumfmtetc = EnumFORMATETC_Create(cfmtetc, rgfmtetc, 0);
188 return S_OK;
189}
static IEnumFORMATETC * EnumFORMATETC_Create(UINT cfmtetc, const FORMATETC *rgfmtetc, UINT it)
Definition: format.c:157

Referenced by RegisterDefaultAcceptHeaders(), test_CreateFormatEnum(), and test_RegisterFormatEnumerator().

◆ CreateIUriBuilder()

HRESULT WINAPI CreateIUriBuilder ( IUri pIUri,
DWORD  dwFlags,
DWORD_PTR  dwReserved,
IUriBuilder **  ppIUriBuilder 
)

Definition at line 6353 of file uri.c.

6354{
6355 UriBuilder *ret;
6356
6357 TRACE("(%p %x %x %p)\n", pIUri, dwFlags, (DWORD)dwReserved, ppIUriBuilder);
6358
6359 if(!ppIUriBuilder)
6360 return E_POINTER;
6361
6362 ret = heap_alloc_zero(sizeof(UriBuilder));
6363 if(!ret)
6364 return E_OUTOFMEMORY;
6365
6366 ret->IUriBuilder_iface.lpVtbl = &UriBuilderVtbl;
6367 ret->ref = 1;
6368
6369 if(pIUri) {
6370 Uri *uri;
6371
6372 if((uri = get_uri_obj(pIUri))) {
6373 if(!uri->create_flags) {
6374 heap_free(ret);
6375 return E_UNEXPECTED;
6376 }
6377 IUri_AddRef(pIUri);
6378 ret->uri = uri;
6379
6380 if(uri->has_port)
6381 /* Windows doesn't set 'has_port' to TRUE in this case. */
6382 ret->port = uri->port;
6383
6384 } else {
6385 heap_free(ret);
6386 *ppIUriBuilder = NULL;
6387 FIXME("(%p %x %x %p): Unknown IUri types not supported yet.\n", pIUri, dwFlags,
6388 (DWORD)dwReserved, ppIUriBuilder);
6389 return E_NOTIMPL;
6390 }
6391 }
6392
6393 *ppIUriBuilder = &ret->IUriBuilder_iface;
6394 return S_OK;
6395}
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
static const IUriBuilderVtbl UriBuilderVtbl
Definition: uri.c:6321
Definition: uri.c:99

Referenced by ensure_uri_builder(), get_uri_nofrag(), nsURI_GetPrePath(), UriBuilderFactory_CreateInitializedIUriBuilder(), and UriBuilderFactory_CreateIUriBuilder().

◆ CreateUri()

HRESULT WINAPI CreateUri ( LPCWSTR  pwzURI,
DWORD  dwFlags,
DWORD_PTR  dwReserved,
IUri **  ppURI 
)

Definition at line 5700 of file uri.c.

5701{
5702 const DWORD supported_flags = Uri_CREATE_ALLOW_RELATIVE|Uri_CREATE_ALLOW_IMPLICIT_WILDCARD_SCHEME|
5703 Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME|Uri_CREATE_NO_CANONICALIZE|Uri_CREATE_CANONICALIZE|
5704 Uri_CREATE_DECODE_EXTRA_INFO|Uri_CREATE_NO_DECODE_EXTRA_INFO|Uri_CREATE_CRACK_UNKNOWN_SCHEMES|
5705 Uri_CREATE_NO_CRACK_UNKNOWN_SCHEMES|Uri_CREATE_PRE_PROCESS_HTML_URI|Uri_CREATE_NO_PRE_PROCESS_HTML_URI|
5706 Uri_CREATE_NO_IE_SETTINGS|Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS|Uri_CREATE_FILE_USE_DOS_PATH;
5707 Uri *ret;
5708 HRESULT hr;
5710
5711 TRACE("(%s %x %x %p)\n", debugstr_w(pwzURI), dwFlags, (DWORD)dwReserved, ppURI);
5712
5713 if(!ppURI)
5714 return E_INVALIDARG;
5715
5716 if(!pwzURI) {
5717 *ppURI = NULL;
5718 return E_INVALIDARG;
5719 }
5720
5721 /* Check for invalid flags. */
5723 *ppURI = NULL;
5724 return E_INVALIDARG;
5725 }
5726
5727 /* Currently unsupported. */
5728 if(dwFlags & ~supported_flags)
5729 FIXME("Ignoring unsupported flag(s) %x\n", dwFlags & ~supported_flags);
5730
5731 hr = Uri_Construct(NULL, (void**)&ret);
5732 if(FAILED(hr)) {
5733 *ppURI = NULL;
5734 return hr;
5735 }
5736
5737 /* Explicitly set the default flags if it doesn't cause a flag conflict. */
5739
5740 /* Pre process the URI, unless told otherwise. */
5741 if(!(dwFlags & Uri_CREATE_NO_PRE_PROCESS_HTML_URI))
5742 ret->raw_uri = pre_process_uri(pwzURI);
5743 else
5744 ret->raw_uri = SysAllocString(pwzURI);
5745
5746 if(!ret->raw_uri) {
5747 heap_free(ret);
5748 return E_OUTOFMEMORY;
5749 }
5750
5751 memset(&data, 0, sizeof(parse_data));
5752 data.uri = ret->raw_uri;
5753
5754 /* Validate and parse the URI into its components. */
5755 if(!parse_uri(&data, dwFlags)) {
5756 /* Encountered an unsupported or invalid URI */
5757 IUri_Release(&ret->IUri_iface);
5758 *ppURI = NULL;
5759 return E_INVALIDARG;
5760 }
5761
5762 /* Canonicalize the URI. */
5764 if(FAILED(hr)) {
5765 IUri_Release(&ret->IUri_iface);
5766 *ppURI = NULL;
5767 return hr;
5768 }
5769
5770 ret->create_flags = dwFlags;
5771
5772 *ppURI = &ret->IUri_iface;
5773 return S_OK;
5774}
static BOOL has_invalid_flag_combination(DWORD flags)
Definition: uri.c:387
HRESULT Uri_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
Definition: uri.c:5656
static void apply_default_flags(DWORD *flags)
Definition: uri.c:398
static BOOL parse_uri(parse_data *data, DWORD flags)
Definition: uri.c:2120
static BSTR pre_process_uri(LPCWSTR uri)
Definition: uri.c:767
static HRESULT canonicalize_uri(const parse_data *data, Uri *uri, DWORD flags)
Definition: uri.c:3373
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238

Referenced by AsyncInstallDistributionUnit(), BindProtocol_Start(), CoInternetCombineIUri(), CoInternetCombineUrlEx(), CoInternetGetSecurityUrlEx(), create_uri(), CreateUriWithFragment(), CreateURLMonikerEx(), FileProtocol_Start(), FtpProtocol_Start(), get_security_id_for_url(), GopherProtocol_Start(), HttpProtocol_Start(), map_url_to_zone(), MkProtocol_Start(), and URLMoniker_Load().

◆ CreateUriFromMultiByteString()

HRESULT WINAPI CreateUriFromMultiByteString ( LPCSTR  ,
DWORD  ,
DWORD  ,
DWORD  ,
DWORD_PTR  ,
IUri **   
)

◆ CreateUriWithFragment()

HRESULT WINAPI CreateUriWithFragment ( LPCWSTR  pwzURI,
LPCWSTR  pwzFragment,
DWORD  dwFlags,
DWORD_PTR  dwReserved,
IUri **  ppURI 
)

Definition at line 5795 of file uri.c.

5797{
5798 HRESULT hres;
5799 TRACE("(%s %s %x %x %p)\n", debugstr_w(pwzURI), debugstr_w(pwzFragment), dwFlags, (DWORD)dwReserved, ppURI);
5800
5801 if(!ppURI)
5802 return E_INVALIDARG;
5803
5804 if(!pwzURI) {
5805 *ppURI = NULL;
5806 return E_INVALIDARG;
5807 }
5808
5809 /* Check if a fragment should be appended to the URI string. */
5810 if(pwzFragment) {
5811 WCHAR *uriW;
5812 DWORD uri_len, frag_len;
5813 BOOL add_pound;
5814
5815 /* Check if the original URI already has a fragment component. */
5816 if(StrChrW(pwzURI, '#')) {
5817 *ppURI = NULL;
5818 return E_INVALIDARG;
5819 }
5820
5821 uri_len = lstrlenW(pwzURI);
5822 frag_len = lstrlenW(pwzFragment);
5823
5824 /* If the fragment doesn't start with a '#', one will be added. */
5825 add_pound = *pwzFragment != '#';
5826
5827 if(add_pound)
5828 uriW = heap_alloc((uri_len+frag_len+2)*sizeof(WCHAR));
5829 else
5830 uriW = heap_alloc((uri_len+frag_len+1)*sizeof(WCHAR));
5831
5832 if(!uriW)
5833 return E_OUTOFMEMORY;
5834
5835 memcpy(uriW, pwzURI, uri_len*sizeof(WCHAR));
5836 if(add_pound)
5837 uriW[uri_len++] = '#';
5838 memcpy(uriW+uri_len, pwzFragment, (frag_len+1)*sizeof(WCHAR));
5839
5840 hres = CreateUri(uriW, dwFlags, 0, ppURI);
5841
5842 heap_free(uriW);
5843 } else
5844 /* A fragment string wasn't specified, so just forward the call. */
5845 hres = CreateUri(pwzURI, dwFlags, 0, ppURI);
5846
5847 return hres;
5848}
LPWSTR WINAPI StrChrW(LPCWSTR lpszStr, WCHAR ch)
Definition: string.c:468
unsigned int BOOL
Definition: ntddk_ex.h:94

◆ CreateURLMoniker()

◆ CreateURLMonikerEx()

HRESULT WINAPI CreateURLMonikerEx ( IMoniker pmkContext,
LPCWSTR  szURL,
IMoniker **  ppmk,
DWORD  dwFlags 
)

Definition at line 616 of file umon.c.

617{
618 IUri *uri, *base_uri = NULL;
621
622 TRACE("(%p, %s, %p, %08x)\n", pmkContext, debugstr_w(szURL), ppmk, dwFlags);
623
624 if (ppmk)
625 *ppmk = NULL;
626
627 if (!szURL || !ppmk)
628 return E_INVALIDARG;
629
631 FIXME("Unsupported flags %x\n", dwFlags);
632 return E_INVALIDARG;
633 }
634
635 if(pmkContext) {
636 IUriContainer *uri_container;
637
638 hres = IMoniker_QueryInterface(pmkContext, &IID_IUriContainer, (void**)&uri_container);
639 if(SUCCEEDED(hres)) {
640 hres = IUriContainer_GetIUri(uri_container, &base_uri);
641 IUriContainer_Release(uri_container);
642 if(FAILED(hres))
643 return hres;
644 }
645 }
646
647 if(base_uri) {
648 hres = CoInternetCombineUrlEx(base_uri, szURL, combine_flags_map[dwFlags], &uri, 0);
649 IUri_Release(base_uri);
650 }else {
651 hres = CreateUri(szURL, Uri_CREATE_ALLOW_RELATIVE|Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME|create_flags_map[dwFlags], 0, &uri);
652 }
653 if(FAILED(hres))
654 return hres;
655
657 IUri_Release(uri);
658 if(FAILED(hres))
659 return hres;
660
661 *ppmk = &obj->IMoniker_iface;
662 return S_OK;
663}
HRESULT WINAPI CoInternetCombineUrlEx(IUri *pBaseUri, LPCWSTR pwzRelativeUrl, DWORD dwCombineFlags, IUri **ppCombinedUri, DWORD_PTR dwReserved)
Definition: uri.c:6762
static const DWORD create_flags_map[3]
Definition: umon.c:588
static HRESULT create_moniker(IUri *uri, URLMoniker **ret)
Definition: umon.c:540
static const DWORD combine_flags_map[3]
Definition: umon.c:594

Referenced by CreateURLMoniker().

◆ CreateURLMonikerEx2()

HRESULT WINAPI CreateURLMonikerEx2 ( IMoniker pmkContext,
IUri pUri,
IMoniker **  ppmk,
DWORD  dwFlags 
)

Definition at line 668 of file umon.c.

669{
670 IUri *context_uri = NULL, *uri;
671 IUriContainer *uri_container;
674
675 TRACE("(%p %p %p %x)\n", pmkContext, pUri, ppmk, dwFlags);
676
677 if (ppmk)
678 *ppmk = NULL;
679
680 if (!pUri || !ppmk)
681 return E_INVALIDARG;
682
684 FIXME("Unsupported flags %x\n", dwFlags);
685 return E_INVALIDARG;
686 }
687
688 if(pmkContext) {
689 hres = IMoniker_QueryInterface(pmkContext, &IID_IUriContainer, (void**)&uri_container);
690 if(SUCCEEDED(hres)) {
691 hres = IUriContainer_GetIUri(uri_container, &context_uri);
692 if(FAILED(hres))
693 context_uri = NULL;
694 IUriContainer_Release(uri_container);
695 }
696 }
697
698 if(context_uri) {
699 hres = CoInternetCombineIUri(context_uri, pUri, combine_flags_map[dwFlags], &uri, 0);
700 IUri_Release(context_uri);
701 if(FAILED(hres))
702 return hres;
703 }else {
704 uri = pUri;
705 IUri_AddRef(uri);
706 }
707
709 IUri_Release(uri);
710 if(FAILED(hres))
711 return hres;
712
713 *ppmk = &ret->IMoniker_iface;
714 return S_OK;
715}
HRESULT WINAPI CoInternetCombineIUri(IUri *pBaseUri, IUri *pRelativeUri, DWORD dwCombineFlags, IUri **ppCombinedUri, DWORD_PTR dwReserved)
Definition: uri.c:6716

Referenced by async_open(), bind_script_to_text(), create_moniker_from_url(), download_to_cache(), super_navigate(), and TargetFramePriv2_AggregatedNavigation2().

◆ DEFINE_GUID() [1/13]

DEFINE_GUID ( CLSID_CdlProtocol  ,
0x3dd53d40  ,
0x7b8b  ,
0x11D0  ,
0xb0  ,
0x13  ,
0x00  ,
0xaa  ,
0x00  ,
0x59  ,
0xce  ,
0x02   
)

◆ DEFINE_GUID() [2/13]

DEFINE_GUID ( CLSID_DeCompMimeFilter  ,
0x8f6b0360  ,
0xb80d  ,
0x11d0  ,
0xa9  ,
0xb3  ,
0x00  ,
0x60  ,
0x97  ,
0x94  ,
0x23  ,
0x11   
)

◆ DEFINE_GUID() [3/13]

DEFINE_GUID ( CLSID_FileProtocol  ,
0x79EAC9E7  ,
0xBAF9  ,
0x11CE  ,
0x8C  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0x4B  ,
0xA9  ,
0x0B   
)

◆ DEFINE_GUID() [4/13]

DEFINE_GUID ( CLSID_FtpProtocol  ,
0x79EAC9E3  ,
0xBAF9  ,
0x11CE  ,
0x8C  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0x4B  ,
0xA9  ,
0x0B   
)

◆ DEFINE_GUID() [5/13]

DEFINE_GUID ( CLSID_GopherProtocol  ,
0x79EAC9E4  ,
0xBAF9  ,
0x11CE  ,
0x8C  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0x4B  ,
0xA9  ,
0x0B   
)

◆ DEFINE_GUID() [6/13]

DEFINE_GUID ( CLSID_HttpProtocol  ,
0x79EAC9E2  ,
0xBAF9  ,
0x11CE  ,
0x8C  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0x4B  ,
0xA9  ,
0x0B   
)

◆ DEFINE_GUID() [7/13]

DEFINE_GUID ( CLSID_HttpSProtocol  ,
0x79EAC9E5  ,
0xBAF9  ,
0x11CE  ,
0x8C  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0x4B  ,
0xA9  ,
0x0B   
)

◆ DEFINE_GUID() [8/13]

DEFINE_GUID ( CLSID_InternetSecurityManager  ,
0x7b8a2d94  ,
0x0ac9  ,
0x11d1  ,
0x89  ,
0x6c  ,
0x00  ,
0xc0  ,
0x4f  ,
0xB6  ,
0xbf  ,
0xc4   
)

◆ DEFINE_GUID() [9/13]

DEFINE_GUID ( CLSID_InternetZoneManager  ,
0x7B8A2D95  ,
0x0AC9  ,
0x11D1  ,
0x89  ,
0x6C  ,
0x00  ,
0xC0  ,
0x4F  ,
0xB6  ,
0xBF  ,
0xC4   
)

◆ DEFINE_GUID() [10/13]

DEFINE_GUID ( CLSID_MkProtocol  ,
0x79EAC9E6  ,
0xBAF9  ,
0x11CE  ,
0x8C  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0x4B  ,
0xA9  ,
0x0B   
)

◆ DEFINE_GUID() [11/13]

DEFINE_GUID ( CLSID_StdURLMoniker  ,
0x79EAC9E0  ,
0xBAF9  ,
0x11CE  ,
0x8C  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0x4B  ,
0xA9  ,
0x0B   
)

◆ DEFINE_GUID() [12/13]

DEFINE_GUID ( IID_IAsyncBindCtx  ,
0x79EAC9D4  ,
0xBAF9  ,
0x11CE  ,
0x8C  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0x4B  ,
0xA9  ,
0x0B   
)

◆ DEFINE_GUID() [13/13]

DEFINE_GUID ( IID_IAsyncMoniker  ,
0x79EAC9D3  ,
0xBAF9  ,
0x11CE  ,
0x8C  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0x4B  ,
0xA9  ,
0x0B   
)

◆ FaultInIEFeature()

HRESULT WINAPI FaultInIEFeature ( HWND  hwnd,
uCLSSPEC *  pClassSpec,
QUERYCONTEXT *  pQuery,
DWORD  flags 
)

Definition at line 540 of file urlmon_main.c.

542{
543 FIXME("%p %p %p %08x\n", hwnd, pClassSpec, pQuery, flags);
544 return E_NOTIMPL;
545}
GLbitfield flags
Definition: glext.h:7161
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

◆ FindMimeFromData()

HRESULT WINAPI FindMimeFromData ( LPBC  pBC,
LPCWSTR  pwzUrl,
LPVOID  pBuffer,
DWORD  cbSize,
LPCWSTR  pwzMimeProposed,
DWORD  dwMimeFlags,
LPWSTR ppwzMimeOut,
DWORD  dwReserved 
)

Definition at line 680 of file mimefilter.c.

683{
684 TRACE("(%p,%s,%p,%d,%s,0x%x,%p,0x%x)\n", pBC, debugstr_w(pwzUrl), pBuffer, cbSize,
685 debugstr_w(pwzMimeProposed), dwMimeFlags, ppwzMimeOut, dwReserved);
686
687 if(dwMimeFlags)
688 WARN("dwMimeFlags=%08x\n", dwMimeFlags);
689 if(dwReserved)
690 WARN("dwReserved=%d\n", dwReserved);
691
692 /* pBC seems to not be used */
693
694 if(!ppwzMimeOut || (!pwzUrl && !pBuffer))
695 return E_INVALIDARG;
696
697 if(pwzMimeProposed || pBuffer)
698 return find_mime_from_buffer(pBuffer, cbSize, pwzMimeProposed, pwzUrl, ppwzMimeOut);
699
700 return find_mime_from_url(pwzUrl, ppwzMimeOut);
701}
static HRESULT find_mime_from_buffer(const BYTE *buf, DWORD size, const WCHAR *proposed_mime, const WCHAR *url, WCHAR **ret_mime)
Definition: mimefilter.c:563
static HRESULT find_mime_from_url(const WCHAR *url, WCHAR **ret)
Definition: mimefilter.c:450
PVOID pBuffer

Referenced by ITSProtocol_Start(), MkProtocol_StartEx(), ProtocolSinkHandler_ReportData(), read_stream_data(), and ResProtocol_Start().

◆ GetClassFileOrMime()

HRESULT WINAPI GetClassFileOrMime ( LPBC  pBC,
LPCWSTR  pszFilename,
LPVOID  pBuffer,
DWORD  cbBuffer,
LPCWSTR  pszMimeType,
DWORD  dwReserved,
CLSID pclsid 
)

Definition at line 720 of file urlmon_main.c.

723{
724 FIXME("(%p, %s, %p, %d, %s, 0x%08x, %p): stub\n", pBC, debugstr_w(pszFilename), pBuffer,
725 cbBuffer, debugstr_w(pszMimeType), dwReserved, pclsid);
726 return E_NOTIMPL;
727}

◆ GetSoftwareUpdateInfo()

HRESULT WINAPI GetSoftwareUpdateInfo ( LPCWSTR  szDistUnit,
LPSOFTDISTINFO  psdi 
)

Definition at line 963 of file umon.c.

964{
965 FIXME("%s %p\n", debugstr_w(szDistUnit), psdi );
966 return E_FAIL;
967}

◆ HlinkGoBack()

HRESULT WINAPI HlinkGoBack ( IUnknown )

◆ HlinkGoForward()

HRESULT WINAPI HlinkGoForward ( IUnknown )

◆ HlinkNavigateMoniker()

HRESULT WINAPI HlinkNavigateMoniker ( IUnknown ,
IMoniker  
)

◆ HlinkNavigateString()

HRESULT WINAPI HlinkNavigateString ( IUnknown pUnk,
LPCWSTR  szTarget 
)

Definition at line 953 of file umon.c.

954{
955 TRACE("%p %s\n", pUnk, debugstr_w( szTarget ) );
957 szTarget, NULL, NULL, pUnk, NULL, NULL, 0, 0 );
958}
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
Definition: dplayx.c:30
HRESULT WINAPI HlinkSimpleNavigateToString(LPCWSTR szTarget, LPCWSTR szLocation, LPCWSTR szTargetFrameName, IUnknown *pUnk, IBindCtx *pbc, IBindStatusCallback *pbsc, DWORD grfHLNF, DWORD dwReserved)
Definition: umon.c:922

◆ HlinkSimpleNavigateToMoniker()

HRESULT WINAPI HlinkSimpleNavigateToMoniker ( IMoniker pmkTarget,
LPCWSTR  szLocation,
LPCWSTR  szTargetFrameName,
IUnknown pUnk,
IBindCtx pbc,
IBindStatusCallback pbsc,
DWORD  grfHLNF,
DWORD  dwReserved 
)

Definition at line 901 of file umon.c.

904{
907
908 TRACE("\n");
909
910 hres = IMoniker_GetDisplayName(pmkTarget, pbc, 0, &target);
911 if(hres == S_OK)
912 hres = HlinkSimpleNavigateToString( target, szLocation, szTargetFrameName,
913 pUnk, pbc, pbsc, grfHLNF, dwReserved );
915
916 return hres;
917}
GLenum target
Definition: glext.h:7315
WCHAR * LPWSTR
Definition: xmlstorage.h:184

◆ HlinkSimpleNavigateToString()

HRESULT WINAPI HlinkSimpleNavigateToString ( LPCWSTR  szTarget,
LPCWSTR  szLocation,
LPCWSTR  szTargetFrameName,
IUnknown pUnk,
IBindCtx pbc,
IBindStatusCallback pbsc,
DWORD  grfHLNF,
DWORD  dwReserved 
)

Definition at line 922 of file umon.c.

925{
926 FIXME("%s %s %s %p %p %p %u %u partial stub\n", debugstr_w( szTarget ), debugstr_w( szLocation ),
927 debugstr_w( szTargetFrameName ), pUnk, pbc, pbsc, grfHLNF, dwReserved);
928
929 /* undocumented: 0 means HLNF_OPENINNEWWINDOW*/
930 if (!grfHLNF) grfHLNF = HLNF_OPENINNEWWINDOW;
931
932 if (grfHLNF == HLNF_OPENINNEWWINDOW)
933 {
935 static const WCHAR openW[] = { 'o', 'p', 'e', 'n', 0 };
936
937 memset(&sei, 0, sizeof(sei));
938 sei.cbSize = sizeof(sei);
939 sei.lpVerb = openW;
940 sei.nShow = SW_SHOWNORMAL;
942 sei.lpFile = szTarget;
943
944 if (ShellExecuteExW(&sei)) return S_OK;
945 }
946
947 return E_NOTIMPL;
948}
#define SEE_MASK_FLAG_NO_UI
Definition: shellapi.h:36
#define SEE_MASK_NO_CONSOLE
Definition: shellapi.h:38
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
Definition: shlexec.cpp:2335
#define SW_SHOWNORMAL
Definition: winuser.h:764

Referenced by general_dlg_proc(), HlinkNavigateString(), HlinkSimpleNavigateToMoniker(), and user_notice_dlg_proc().

◆ IsAsyncMoniker()

HRESULT WINAPI IsAsyncMoniker ( IMoniker pmk)

Definition at line 740 of file umon.c.

741{
742 IUnknown *am;
743
744 TRACE("(%p)\n", pmk);
745 if(!pmk)
746 return E_INVALIDARG;
747 if(SUCCEEDED(IMoniker_QueryInterface(pmk, &IID_IAsyncMoniker, (void**)&am))) {
748 IUnknown_Release(am);
749 return S_OK;
750 }
751 return S_FALSE;
752}

◆ IsLoggingEnabledA()

BOOL WINAPI IsLoggingEnabledA ( LPCSTR  url)

Definition at line 749 of file urlmon_main.c.

750{
751 FIXME("(%s)\n", debugstr_a(url));
752 return FALSE;
753}
#define FALSE
Definition: types.h:117
#define debugstr_a
Definition: kernel32.h:31
static const WCHAR url[]
Definition: encode.c:1432

◆ IsLoggingEnabledW()

BOOL WINAPI IsLoggingEnabledW ( LPCWSTR  url)

Definition at line 758 of file urlmon_main.c.

759{
760 FIXME("(%s)\n", debugstr_w(url));
761 return FALSE;
762}

◆ IsValidURL()

HRESULT WINAPI IsValidURL ( LPBC  pBC,
LPCWSTR  szURL,
DWORD  dwReserved 
)

Definition at line 525 of file urlmon_main.c.

526{
527 FIXME("(%p, %s, %d): stub\n", pBC, debugstr_w(szURL), dwReserved);
528
529 if (dwReserved || !szURL)
530 return E_INVALIDARG;
531
532 return S_OK;
533}

Referenced by test_IsValidURL().

◆ MkParseDisplayNameEx()

HRESULT WINAPI MkParseDisplayNameEx ( IBindCtx ,
LPCWSTR  ,
ULONG ,
IMoniker **   
)

◆ ObtainUserAgentString()

HRESULT WINAPI ObtainUserAgentString ( DWORD  dwOption,
LPSTR  pcszUAOut,
DWORD cbSize 
)

Definition at line 725 of file session.c.

726{
727 DWORD size;
729
730 TRACE("(%d %p %p)\n", dwOption, pcszUAOut, cbSize);
731
732 if(!pcszUAOut || !cbSize)
733 return E_INVALIDARG;
734
736
738 if(user_agent) {
740
741 if(size <= *cbSize) {
742 WideCharToMultiByte(CP_ACP, 0, user_agent, -1, pcszUAOut, *cbSize, NULL, NULL);
743 hres = S_OK;
744 }else {
746 }
747
748 *cbSize = size;
749 }
750
752 return hres;
753}
#define CP_ACP
Definition: compat.h:109
#define WideCharToMultiByte
Definition: compat.h:111
static CRITICAL_SECTION session_cs
Definition: session.c:46
static void ensure_useragent(void)
Definition: session.c:522
static LPWSTR user_agent
Definition: session.c:520
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)

Referenced by OmNavigator_get_appVersion(), OmNavigator_get_userAgent(), and test_navigator().

◆ RegisterBindStatusCallback()

HRESULT WINAPI RegisterBindStatusCallback ( IBindCtx pbc,
IBindStatusCallback pbsc,
IBindStatusCallback **  ppbsc,
DWORD  dwReserved 
)

Definition at line 615 of file bindctx.c.

617{
618 BindStatusCallback *holder;
619 IBindStatusCallback *bsc, *prev = NULL;
621
622 TRACE("(%p %p %p %x)\n", pbc, pbsc, ppbscPrevious, dwReserved);
623
624 if (!pbc || !pbsc)
625 return E_INVALIDARG;
626
627 bsc = bsch_from_bctx(pbc);
628 if(bsc) {
629 hres = IBindStatusCallback_QueryInterface(bsc, &IID_IBindStatusCallbackHolder, (void**)&holder);
630 if(SUCCEEDED(hres)) {
631 if(ppbscPrevious) {
632 IBindStatusCallback_AddRef(holder->callback);
633 *ppbscPrevious = holder->callback;
634 }
635
636 set_callback(holder, pbsc);
637
638 IBindStatusCallback_Release(bsc);
639 IBindStatusCallbackEx_Release(&holder->IBindStatusCallbackEx_iface);
640 return S_OK;
641 }else {
642 prev = bsc;
643 }
644
645 IBindCtx_RevokeObjectParam(pbc, bscb_holderW);
646 }
647
648 hres = wrap_callback(pbsc, &bsc);
649 if(SUCCEEDED(hres)) {
650 hres = IBindCtx_RegisterObjectParam(pbc, bscb_holderW, (IUnknown*)bsc);
651 IBindStatusCallback_Release(bsc);
652 }
653 if(FAILED(hres)) {
654 if(prev)
655 IBindStatusCallback_Release(prev);
656 return hres;
657 }
658
659 if(ppbscPrevious)
660 *ppbscPrevious = prev;
661 return S_OK;
662}
static IBindStatusCallbackEx bsc
Definition: url.c:2150
IBindStatusCallback * callback
Definition: bindctx.c:39
IBindStatusCallbackEx IBindStatusCallbackEx_iface
Definition: bindctx.c:31
static IBindStatusCallback * bsch_from_bctx(IBindCtx *bctx)
Definition: bindctx.c:55
static WCHAR bscb_holderW[]
Definition: bindctx.c:26
HRESULT wrap_callback(IBindStatusCallback *bsc, IBindStatusCallback **ret_iface)
Definition: bindctx.c:578
IID IID_IBindStatusCallbackHolder
static void set_callback(BindStatusCallback *This, IBindStatusCallback *bsc)
Definition: bindctx.c:561

Referenced by bind_url(), HlinkResolveMonikerForData(), IHlink_fnNavigate(), init_bindctx(), PersistMoniker_Load(), start_binding(), test_BindToStorage(), test_RegisterBindStatusCallback(), and URLStartDownload().

◆ RegisterFormatEnumerator()

HRESULT WINAPI RegisterFormatEnumerator ( LPBC  pBC,
IEnumFORMATETC pEFetc,
DWORD  reserved 
)

Definition at line 194 of file format.c.

195{
196 TRACE("(%p %p %d)\n", pBC, pEFetc, reserved);
197
198 if(reserved)
199 WARN("reserved != 0\n");
200
201 if(!pBC || !pEFetc)
202 return E_INVALIDARG;
203
204 return IBindCtx_RegisterObjectParam(pBC, wszEnumFORMATETC, (IUnknown*)pEFetc);
205}
static WCHAR wszEnumFORMATETC[]
Definition: format.c:24

Referenced by RegisterDefaultAcceptHeaders(), and test_RegisterFormatEnumerator().

◆ ReleaseBindInfo()

void WINAPI ReleaseBindInfo ( BINDINFO *  pbindinfo)

Definition at line 572 of file urlmon_main.c.

573{
574 DWORD size;
575
576 TRACE("(%p)\n", pbindinfo);
577
578 if(!pbindinfo || !(size = pbindinfo->cbSize))
579 return;
580
581 CoTaskMemFree(pbindinfo->szExtraInfo);
582 ReleaseStgMedium(&pbindinfo->stgmedData);
583
584 if(offsetof(BINDINFO, szExtraInfo) < size)
585 CoTaskMemFree(pbindinfo->szCustomVerb);
586
587 if(pbindinfo->pUnk && offsetof(BINDINFO, pUnk) < size)
588 IUnknown_Release(pbindinfo->pUnk);
589
590 memset(pbindinfo, 0, size);
591 pbindinfo->cbSize = size;
592}
#define offsetof(TYPE, MEMBER)

Referenced by AboutProtocol_Start(), Binding_Release(), DownloadBSC_GetBindInfo(), FileProtocol_StartEx(), internet_status_callback(), ITSProtocol_Start(), MkProtocol_StartEx(), navigate_hlink(), ResProtocol_Start(), and test_bsc_marshaling().

◆ RevokeBindStatusCallback()

HRESULT WINAPI RevokeBindStatusCallback ( LPBC  ,
IBindStatusCallback  
)

◆ RevokeFormatEnumerator()

HRESULT WINAPI RevokeFormatEnumerator ( LPBC  pbc,
IEnumFORMATETC pEFetc 
)

Definition at line 210 of file format.c.

211{
212 TRACE("(%p %p)\n", pbc, pEFetc);
213
214 if(!pbc)
215 return E_INVALIDARG;
216
217 return IBindCtx_RevokeObjectParam(pbc, wszEnumFORMATETC);
218}

Referenced by test_RegisterFormatEnumerator().

◆ URLDownloadToCacheFileA()

HRESULT WINAPI URLDownloadToCacheFileA ( LPUNKNOWN  lpUnkCaller,
LPCSTR  szURL,
LPSTR  szFileName,
DWORD  dwBufLength,
DWORD  dwReserved,
LPBINDSTATUSCALLBACK  pBSC 
)

Definition at line 819 of file umon.c.

821{
823 int len;
825
826 TRACE("(%p %s %p %d %d %p)\n", lpUnkCaller, debugstr_a(szURL), szFileName,
827 dwBufLength, dwReserved, pBSC);
828
829 if(szURL) {
830 len = MultiByteToWideChar(CP_ACP, 0, szURL, -1, NULL, 0);
831 url = heap_alloc(len*sizeof(WCHAR));
832 MultiByteToWideChar(CP_ACP, 0, szURL, -1, url, len);
833 }
834
835 if(szFileName)
836 file_name = heap_alloc(dwBufLength*sizeof(WCHAR));
837
838 hres = URLDownloadToCacheFileW(lpUnkCaller, url, file_name, dwBufLength*sizeof(WCHAR),
839 dwReserved, pBSC);
840
841 if(SUCCEEDED(hres) && file_name)
842 WideCharToMultiByte(CP_ACP, 0, file_name, -1, szFileName, dwBufLength, NULL, NULL);
843
844 heap_free(url);
846
847 return hres;
848}
#define MultiByteToWideChar
Definition: compat.h:110
GLenum GLsizei len
Definition: glext.h:6722
static LPCWSTR file_name
Definition: protocol.c:147
HRESULT WINAPI URLDownloadToCacheFileW(LPUNKNOWN lpUnkCaller, LPCWSTR szURL, LPWSTR szFileName, DWORD dwBufLength, DWORD dwReserved, LPBINDSTATUSCALLBACK pBSC)
Definition: umon.c:853

◆ URLDownloadToCacheFileW()

HRESULT WINAPI URLDownloadToCacheFileW ( LPUNKNOWN  lpUnkCaller,
LPCWSTR  szURL,
LPWSTR  szFileName,
DWORD  dwBufLength,
DWORD  dwReserved,
LPBINDSTATUSCALLBACK  pBSC 
)

Definition at line 853 of file umon.c.

855{
856 WCHAR cache_path[MAX_PATH + 1];
857 FILETIME expire, modified;
858 HRESULT hr;
859 LPWSTR ext;
860
861 static WCHAR header[] = {
862 'H','T','T','P','/','1','.','0',' ','2','0','0',' ',
863 'O','K','\\','r','\\','n','\\','r','\\','n',0
864 };
865
866 TRACE("(%p, %s, %p, %d, %d, %p)\n", lpUnkCaller, debugstr_w(szURL),
867 szFileName, dwBufLength, dwReserved, pBSC);
868
869 if (!szURL || !szFileName)
870 return E_INVALIDARG;
871
872 ext = PathFindExtensionW(szURL);
873
874 if (!CreateUrlCacheEntryW(szURL, 0, ext, cache_path, 0))
875 return E_FAIL;
876
877 hr = URLDownloadToFileW(lpUnkCaller, szURL, cache_path, 0, pBSC);
878 if (FAILED(hr))
879 return hr;
880
881 expire.dwHighDateTime = 0;
882 expire.dwLowDateTime = 0;
883 modified.dwHighDateTime = 0;
884 modified.dwLowDateTime = 0;
885
886 if (!CommitUrlCacheEntryW(szURL, cache_path, expire, modified, NORMAL_CACHE_ENTRY,
887 header, sizeof(header), NULL, NULL))
888 return E_FAIL;
889
890 if (lstrlenW(cache_path) > dwBufLength)
891 return E_OUTOFMEMORY;
892
893 lstrcpyW(szFileName, cache_path);
894
895 return S_OK;
896}
#define MAX_PATH
Definition: compat.h:34
#define lstrcpyW
Definition: compat.h:749
static const WCHAR *const ext[]
Definition: module.c:53
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
Definition: path.c:447
BOOL WINAPI CreateUrlCacheEntryW(LPCWSTR lpszUrlName, DWORD dwExpectedFileSize, LPCWSTR lpszFileExtension, LPWSTR lpszFileName, DWORD dwReserved)
Definition: urlcache.c:2815
BOOL WINAPI CommitUrlCacheEntryW(LPCWSTR lpszUrlName, LPCWSTR lpszLocalFileName, FILETIME ExpireTime, FILETIME LastModifiedTime, DWORD CacheEntryType, LPWSTR lpHeaderInfo, DWORD dwHeaderSize, LPCWSTR lpszFileExtension, LPCWSTR lpszOriginalUrl)
Definition: urlcache.c:3085
DWORD dwHighDateTime
Definition: mapidefs.h:66
DWORD dwLowDateTime
Definition: mapidefs.h:65
HRESULT WINAPI URLDownloadToFileW(LPUNKNOWN pCaller, LPCWSTR szURL, LPCWSTR szFileName, DWORD dwReserved, LPBINDSTATUSCALLBACK lpfnCB)
Definition: download.c:427
#define NORMAL_CACHE_ENTRY
Definition: wininet.h:2087

Referenced by msi_download_file(), and URLDownloadToCacheFileA().

◆ URLDownloadToFileA()

HRESULT WINAPI URLDownloadToFileA ( LPUNKNOWN  pCaller,
LPCSTR  szURL,
LPCSTR  szFileName,
DWORD  dwReserved,
LPBINDSTATUSCALLBACK  lpfnCB 
)

Definition at line 482 of file download.c.

484{
485 LPWSTR urlW, file_nameW;
487
488 TRACE("(%p %s %s %d %p)\n", pCaller, debugstr_a(szURL), debugstr_a(szFileName), dwReserved, lpfnCB);
489
490 urlW = heap_strdupAtoW(szURL);
491 file_nameW = heap_strdupAtoW(szFileName);
492
493 hres = URLDownloadToFileW(pCaller, urlW, file_nameW, dwReserved, lpfnCB);
494
495 heap_free(urlW);
496 heap_free(file_nameW);
497
498 return hres;
499}
static WCHAR * heap_strdupAtoW(const char *str)
Definition: appwiz.h:80

◆ URLDownloadToFileW()

HRESULT WINAPI URLDownloadToFileW ( LPUNKNOWN  pCaller,
LPCWSTR  szURL,
LPCWSTR  szFileName,
DWORD  dwReserved,
LPBINDSTATUSCALLBACK  lpfnCB 
)

Definition at line 427 of file download.c.

429{
431 IUnknown *unk;
432 IMoniker *mon;
433 IBindCtx *bindctx;
435
436 TRACE("(%p %s %s %d %p)\n", pCaller, debugstr_w(szURL), debugstr_w(szFileName), dwReserved, lpfnCB);
437
438 if(pCaller)
439 FIXME("pCaller not supported\n");
440
441 hres = DownloadBSC_Create(lpfnCB, szFileName, &callback);
442 if(FAILED(hres))
443 return hres;
444
445 hres = CreateAsyncBindCtx(0, &callback->IBindStatusCallback_iface, NULL, &bindctx);
446 IBindStatusCallback_Release(&callback->IBindStatusCallback_iface);
447 if(FAILED(hres))
448 return hres;
449
450 hres = CreateURLMoniker(NULL, szURL, &mon);
451 if(FAILED(hres)) {
452 IBindCtx_Release(bindctx);
453 return hres;
454 }
455
456 hres = IMoniker_BindToStorage(mon, bindctx, NULL, &IID_IUnknown, (void**)&unk);
457 IMoniker_Release(mon);
458 IBindCtx_Release(bindctx);
459
460 if(unk)
461 IUnknown_Release(unk);
462
463 return hres == MK_S_ASYNCHRONOUS ? S_OK : hres;
464}
const GUID IID_IUnknown
HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk)
Definition: umon.c:732
HRESULT WINAPI CreateAsyncBindCtx(DWORD reserved, IBindStatusCallback *callback, IEnumFORMATETC *format, IBindCtx **pbind)
Definition: bindctx.c:899
static HRESULT DownloadBSC_Create(IBindStatusCallback *callback, LPCWSTR file_name, DownloadBSC **ret_callback)
Definition: download.c:333

Referenced by download_proc(), test_URLDownloadToFile(), test_URLDownloadToFile_abort(), URLDownloadToCacheFileW(), and URLDownloadToFileA().

◆ UrlMkGetSessionOption()

HRESULT WINAPI UrlMkGetSessionOption ( DWORD  dwOption,
LPVOID  pBuffer,
DWORD  dwBufferLength,
DWORD pdwBufferLength,
DWORD  dwReserved 
)

Definition at line 622 of file session.c.

624{
625 TRACE("(%x, %p, %d, %p)\n", dwOption, pBuffer, dwBufferLength, pdwBufferLength);
626
627 if(dwReserved)
628 WARN("dwReserved = %d\n", dwReserved);
629
630 switch(dwOption) {
631 case URLMON_OPTION_USERAGENT: {
633 DWORD size;
634
635 if(!pdwBufferLength)
636 return E_INVALIDARG;
637
639
641 if(user_agent) {
643 *pdwBufferLength = size;
644 if(size <= dwBufferLength) {
645 if(pBuffer)
647 else
649 }
650 }
651
653
654 /* Tests prove that we have to return E_OUTOFMEMORY on success. */
655 return hres;
656 }
657 case URLMON_OPTION_URL_ENCODING: {
658 DWORD encoding = 0;
659
660 if(!pBuffer || dwBufferLength < sizeof(DWORD) || !pdwBufferLength)
661 return E_INVALIDARG;
662
665
666 *pdwBufferLength = sizeof(DWORD);
667 *(DWORD*)pBuffer = encoding ? URL_ENCODING_DISABLE_UTF8 : URL_ENCODING_ENABLE_UTF8;
668 return S_OK;
669 }
670 default:
671 FIXME("unsupported option %x\n", dwOption);
672 }
673
674 return E_INVALIDARG;
675}
static BOOL get_url_encoding(HKEY root, DWORD *encoding)
Definition: session.c:503
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define HKEY_CURRENT_USER
Definition: winreg.h:11
static char * encoding
Definition: xmllint.c:155

◆ UrlMkSetSessionOption()

HRESULT WINAPI UrlMkSetSessionOption ( DWORD  dwOption,
LPVOID  pBuffer,
DWORD  dwBufferLength,
DWORD  Reserved 
)

Definition at line 680 of file session.c.

682{
683 TRACE("(%x %p %x)\n", dwOption, pBuffer, dwBufferLength);
684
685 switch(dwOption) {
686 case URLMON_OPTION_USERAGENT: {
687 LPWSTR new_user_agent;
688 char *buf = pBuffer;
689 DWORD len, size;
690
691 if(!pBuffer || !dwBufferLength)
692 return E_INVALIDARG;
693
694 for(len=0; len<dwBufferLength && buf[len]; len++);
695
696 TRACE("Setting user agent %s\n", debugstr_an(buf, len));
697
699 new_user_agent = heap_alloc((size+1)*sizeof(WCHAR));
700 if(!new_user_agent)
701 return E_OUTOFMEMORY;
702 MultiByteToWideChar(CP_ACP, 0, buf, len, new_user_agent, size);
703 new_user_agent[size] = 0;
704
706
708 user_agent = new_user_agent;
710
712 break;
713 }
714 default:
715 FIXME("Unknown option %x\n", dwOption);
716 return E_INVALIDARG;
717 }
718
719 return S_OK;
720}
static __inline const char * debugstr_an(const char *s, int n)
Definition: compat.h:55
void update_user_agent(WCHAR *user_agent)
Definition: protocol.c:307
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751

Referenced by test_user_agent().

◆ URLOpenBlockingStreamA()

HRESULT WINAPI URLOpenBlockingStreamA ( LPUNKNOWN  pCaller,
LPCSTR  szURL,
LPSTREAM ppStream,
DWORD  dwReserved,
LPBINDSTATUSCALLBACK  lpfnCB 
)

Definition at line 258 of file umstream.c.

261{
262 LPWSTR szURLW;
263 int len;
264 HRESULT hr;
265
266 TRACE("(%p, %s, %p, 0x%x, %p)\n", pCaller, szURL, ppStream, dwReserved, lpfnCB);
267
268 if (!szURL || !ppStream)
269 return E_INVALIDARG;
270
271 len = MultiByteToWideChar(CP_ACP, 0, szURL, -1, NULL, 0);
272 szURLW = heap_alloc(len * sizeof(WCHAR));
273 if (!szURLW)
274 {
275 *ppStream = NULL;
276 return E_OUTOFMEMORY;
277 }
278 MultiByteToWideChar(CP_ACP, 0, szURL, -1, szURLW, len);
279
280 hr = URLOpenBlockingStreamW(pCaller, szURLW, ppStream, dwReserved, lpfnCB);
281
282 heap_free(szURLW);
283
284 return hr;
285}
HRESULT WINAPI URLOpenBlockingStreamW(LPUNKNOWN pCaller, LPCWSTR szURL, LPSTREAM *ppStream, DWORD dwReserved, LPBINDSTATUSCALLBACK lpfnCB)
Definition: umstream.c:290

◆ URLOpenBlockingStreamW()

HRESULT WINAPI URLOpenBlockingStreamW ( LPUNKNOWN  pCaller,
LPCWSTR  szURL,
LPSTREAM ppStream,
DWORD  dwReserved,
LPBINDSTATUSCALLBACK  lpfnCB 
)

Definition at line 290 of file umstream.c.

293{
294 ProxyBindStatusCallback blocking_bsc;
295
296 TRACE("(%p, %s, %p, 0x%x, %p)\n", pCaller, debugstr_w(szURL), ppStream,
297 dwReserved, lpfnCB);
298
299 if (!szURL || !ppStream)
300 return E_INVALIDARG;
301
303 blocking_bsc.pBSC = lpfnCB;
304
305 return URLStartDownload(szURL, ppStream, &blocking_bsc.IBindStatusCallback_iface);
306}
IBindStatusCallback IBindStatusCallback_iface
Definition: umstream.c:35
IBindStatusCallback * pBSC
Definition: umstream.c:37
static HRESULT URLStartDownload(LPCWSTR szURL, LPSTREAM *ppStream, IBindStatusCallback *pBSC)
Definition: umstream.c:217
static const IBindStatusCallbackVtbl BlockingBindStatusCallbackVtbl
Definition: umstream.c:167

Referenced by test_URLOpenBlockingStreamW(), and URLOpenBlockingStreamA().

◆ URLOpenPullStreamA()

HRESULT WINAPI URLOpenPullStreamA ( LPUNKNOWN  ,
LPCSTR  ,
DWORD  ,
LPBINDSTATUSCALLBACK   
)

◆ URLOpenPullStreamW()

HRESULT WINAPI URLOpenPullStreamW ( LPUNKNOWN  ,
LPCWSTR  ,
DWORD  ,
LPBINDSTATUSCALLBACK   
)

◆ URLOpenStreamA()

HRESULT WINAPI URLOpenStreamA ( LPUNKNOWN  pCaller,
LPCSTR  szURL,
DWORD  dwReserved,
LPBINDSTATUSCALLBACK  lpfnCB 
)

Definition at line 311 of file umstream.c.

313{
314 LPWSTR szURLW;
315 int len;
316 HRESULT hr;
317
318 TRACE("(%p, %s, 0x%x, %p)\n", pCaller, szURL, dwReserved, lpfnCB);
319
320 if (!szURL)
321 return E_INVALIDARG;
322
323 len = MultiByteToWideChar(CP_ACP, 0, szURL, -1, NULL, 0);
324 szURLW = heap_alloc(len * sizeof(WCHAR));
325 if (!szURLW)
326 return E_OUTOFMEMORY;
327 MultiByteToWideChar(CP_ACP, 0, szURL, -1, szURLW, len);
328
329 hr = URLOpenStreamW(pCaller, szURLW, dwReserved, lpfnCB);
330
331 heap_free(szURLW);
332
333 return hr;
334}
HRESULT WINAPI URLOpenStreamW(LPUNKNOWN pCaller, LPCWSTR szURL, DWORD dwReserved, LPBINDSTATUSCALLBACK lpfnCB)
Definition: umstream.c:339

◆ URLOpenStreamW()

HRESULT WINAPI URLOpenStreamW ( LPUNKNOWN  pCaller,
LPCWSTR  szURL,
DWORD  dwReserved,
LPBINDSTATUSCALLBACK  lpfnCB 
)

Definition at line 339 of file umstream.c.

341{
342 HRESULT hr;
343 ProxyBindStatusCallback async_bsc;
344 IStream *pStream;
345
346 TRACE("(%p, %s, 0x%x, %p)\n", pCaller, debugstr_w(szURL), dwReserved,
347 lpfnCB);
348
349 if (!szURL)
350 return E_INVALIDARG;
351
353 async_bsc.pBSC = lpfnCB;
354
355 hr = URLStartDownload(szURL, &pStream, &async_bsc.IBindStatusCallback_iface);
356 if (SUCCEEDED(hr) && pStream)
357 IStream_Release(pStream);
358
359 return hr;
360}
static const IBindStatusCallbackVtbl AsyncBindStatusCallbackVtbl
Definition: umstream.c:202

Referenced by test_URLOpenStreamW(), and URLOpenStreamA().

Variable Documentation

◆ dwAdState

DWORD dwAdState

Definition at line 1592 of file urlmon.idl.

◆ dwAdvertisedVersionLS

DWORD dwAdvertisedVersionLS

Definition at line 1601 of file urlmon.idl.

◆ dwAdvertisedVersionMS

DWORD dwAdvertisedVersionMS

Definition at line 1600 of file urlmon.idl.

◆ dwFlags

Definition at line 1591 of file urlmon.idl.

◆ dwInstalledVersionLS

DWORD dwInstalledVersionLS

Definition at line 1597 of file urlmon.idl.

◆ dwInstalledVersionMS

DWORD dwInstalledVersionMS

Definition at line 1596 of file urlmon.idl.

◆ dwReserved

Definition at line 1602 of file urlmon.idl.

◆ dwUpdateVersionLS

DWORD dwUpdateVersionLS

Definition at line 1599 of file urlmon.idl.

◆ dwUpdateVersionMS

DWORD dwUpdateVersionMS

Definition at line 1598 of file urlmon.idl.

◆ GUID_CUSTOM_CONFIRMOBJECTSAFETY

EXTERN_C const GUID GUID_CUSTOM_CONFIRMOBJECTSAFETY

Definition at line 2097 of file urlmon.idl.

◆ LPSOFTDISTINFO

* LPSOFTDISTINFO

Definition at line 1603 of file urlmon.idl.

◆ SOFTDISTINFO

SOFTDISTINFO

Definition at line 1603 of file urlmon.idl.

◆ szAbstract

LPWSTR szAbstract

Definition at line 1594 of file urlmon.idl.

◆ szHREF

LPWSTR szHREF

Definition at line 1595 of file urlmon.idl.

◆ szTitle

LPWSTR szTitle

Definition at line 1593 of file urlmon.idl.

Referenced by EventDetailsCtrl().