📄 urlmon.idl
字号:
{
typedef [unique] IInternetSession *LPIINTERNETSESSION;
typedef enum _tagOIBDG_FLAGS
{
// default is free threaded
OIBDG_APARTMENTTHREADED = 0x00000100
} OIBDG_FLAGS;
HRESULT RegisterNameSpace(
[in] IClassFactory *pCF,
[in] REFCLSID rclsid,
[in] LPCWSTR pwzProtocol,
[in] ULONG cPatterns,
[in] const LPCWSTR *ppwzPatterns,
[in] DWORD dwReserved
);
HRESULT UnregisterNameSpace(
[in] IClassFactory *pCF,
[in] LPCWSTR pszProtocol
);
HRESULT RegisterMimeFilter(
[in] IClassFactory *pCF,
[in] REFCLSID rclsid,
[in] LPCWSTR pwzType
);
HRESULT UnregisterMimeFilter(
[in] IClassFactory *pCF,
[in] LPCWSTR pwzType
);
HRESULT CreateBinding(
[in] LPBC pBC,
[in] LPCWSTR szUrl,
[in] IUnknown *pUnkOuter,
[out, unique] IUnknown **ppUnk,
[out, unique] IInternetProtocol **ppOInetProt,
[in] DWORD dwOption
);
HRESULT SetSessionOption(
[in] DWORD dwOption,
[in] LPVOID pBuffer,
[in] DWORD dwBufferLength,
[in] DWORD dwReserved
);
HRESULT GetSessionOption(
[in] DWORD dwOption,
[in, out] LPVOID pBuffer,
[in, out] DWORD *pdwBufferLength,
[in] DWORD dwReserved
);
}
cpp_quote("#endif")
//+---------------------------------------------------------------------------
//
// Copyright (C) Microsoft Corporation, 1995 - 1997.
//
// Contents: IInternetThreadSwitch interface definition
//
//----------------------------------------------------------------------------
cpp_quote("#ifndef _LPIINTERNETTHREADSWITCH_DEFINED")
cpp_quote("#define _LPIINTERNETTHREADSWITCH_DEFINED")
[
local,
object,
uuid(79eac9e8-baf9-11ce-8c82-00aa004ba90b),
pointer_default(unique)
]
interface IInternetThreadSwitch : IUnknown
{
typedef [unique] IInternetThreadSwitch *LPIINTERNETTHREADSWITCH;
HRESULT Prepare();
HRESULT Continue();
}
cpp_quote("#endif")
//+---------------------------------------------------------------------------
//
// Copyright (C) Microsoft Corporation, 1995 - 1997.
//
// Contents: IInternetPriority interface definition
//
//----------------------------------------------------------------------------
cpp_quote("#ifndef _LPIINTERNETPRIORITY_DEFINED")
cpp_quote("#define _LPIINTERNETPRIORITY_DEFINED")
[
local,
object,
uuid(79eac9eb-baf9-11ce-8c82-00aa004ba90b),
pointer_default(unique)
]
interface IInternetPriority : IUnknown
{
typedef [unique] IInternetPriority *LPIINTERNETPRIORITY;
HRESULT SetPriority(
[in] LONG nPriority
);
HRESULT GetPriority(
[out] LONG * pnPriority
);
}
cpp_quote("#endif")
//+---------------------------------------------------------------------------
//
// Copyright (C) Microsoft Corporation, 1995 - 1997.
//
// Contents: IInternetProtocolInfo interface definition
//
//----------------------------------------------------------------------------
cpp_quote("#ifndef _LPIINTERNETPROTOCOLINFO_DEFINED")
cpp_quote("#define _LPIINTERNETPROTOCOLINFO_DEFINED")
[
local,
object,
uuid(79eac9ec-baf9-11ce-8c82-00aa004ba90b),
pointer_default(unique)
]
interface IInternetProtocolInfo : IUnknown
{
typedef [unique] IInternetProtocolInfo *LPIINTERNETPROTOCOLINFO;
typedef enum _tagPARSEACTION
{
PARSE_CANONICALIZE = 1 // compute canonical URL
,PARSE_FRIENDLY // get user friendly name from URL
,PARSE_SECURITY_URL // get security URL.
,PARSE_ROOTDOCUMENT // returns URL of root document for site
,PARSE_DOCUMENT // Strips of #anchor
,PARSE_ANCHOR // Strips of everything before #anchor
,PARSE_ENCODE // encode the url
,PARSE_DECODE // decode the url
,PARSE_PATH_FROM_URL // get the path if apply
,PARSE_URL_FROM_PATH // create a url from the path
,PARSE_MIME // return mime of this url
,PARSE_SERVER // return server
,PARSE_SCHEMA
,PARSE_SITE
,PARSE_DOMAIN
,PARSE_LOCATION
,PARSE_SECURITY_DOMAIN // returns the canonical security form of the URL.
} PARSEACTION;
// Actions for CoInternetGetSecurityURL function.
typedef enum _tagPSUACTION
{
PSU_DEFAULT = 1 // gets security URL and returns its domain.
,PSU_SECURITY_URL_ONLY // gets just the security URL
} PSUACTION;
//
// Query options - needs more work on possible options
//
typedef enum _tagQUERYOPTION
{
QUERY_EXPIRATION_DATE = 1 // the expiration date in form of systemtime
,QUERY_TIME_OF_LAST_CHANGE // time of last change in form of systemtime
,QUERY_CONTENT_ENCODING // the content concoding schema
,QUERY_CONTENT_TYPE // the content type header (mime and charset)
,QUERY_REFRESH // the refresh
,QUERY_RECOMBINE // combine the page URL with the nearest base if TRUE
,QUERY_CAN_NAVIGATE // does the protocol navigate (unlike mailto)
,QUERY_USES_NETWORK // will URL hit network
,QUERY_IS_CACHED // is data cached locally?
,QUERY_IS_INSTALLEDENTRY // Is the entry installed locally (on cdrom)
,QUERY_IS_CACHED_OR_MAPPED // is the entry in cache or is it on a mapped drive
// It may be mapped but may not actually be present
,QUERY_USES_CACHE // does the protocol use the internet cache
} QUERYOPTION;
//
// returns:
// S_OK on success
// S_FALSE on success but buffer is too small
// INET_E_DEFAULT_ACTION if action is not know should be handled be default implementation
//
HRESULT ParseUrl(
[in] LPCWSTR pwzUrl,
[in] PARSEACTION ParseAction,
[in] DWORD dwParseFlags,
[out] LPWSTR pwzResult,
[in] DWORD cchResult,
[out] DWORD *pcchResult,
[in] DWORD dwReserved
);
//
// returns:
// S_OK on success
// S_FALSE on success but buffer is too small
// INET_E_DEFAULT_ACTION if action is not know should be handled be default implementation
//
HRESULT CombineUrl(
[in] LPCWSTR pwzBaseUrl,
[in] LPCWSTR pwzRelativeUrl,
[in] DWORD dwCombineFlags,
[out] LPWSTR pwzResult,
[in] DWORD cchResult,
[out] DWORD *pcchResult,
[in] DWORD dwReserved
);
//
// returns:
// S_OK if equal
// S_FALSE otherwise
//
HRESULT CompareUrl(
[in] LPCWSTR pwzUrl1,
[in] LPCWSTR pwzUrl2,
[in] DWORD dwCompareFlags
);
//
// returns:
// S_OK on success
// S_FALSE on success but buffer is too small
// INET_E_QUERYOPTION_UNKNOWN
//
HRESULT QueryInfo(
[in] LPCWSTR pwzUrl,
[in] QUERYOPTION OueryOption,
[in] DWORD dwQueryFlags,
[in, out,size_is(*pcbBuf)] LPVOID pBuffer,
[in] DWORD cbBuffer,
[in, out] DWORD *pcbBuf,
[in] DWORD dwReserved
);
}
cpp_quote("#endif")
//
// compatablility defines
//
cpp_quote("#define IOInet IInternet ")
cpp_quote("#define IOInetBindInfo IInternetBindInfo ")
cpp_quote("#define IOInetProtocolRoot IInternetProtocolRoot")
cpp_quote("#define IOInetProtocol IInternetProtocol ")
cpp_quote("#define IOInetProtocolSink IInternetProtocolSink")
cpp_quote("#define IOInetProtocolInfo IInternetProtocolInfo")
cpp_quote("#define IOInetSession IInternetSession ")
cpp_quote("#define IOInetPriority IInternetPriority ")
cpp_quote("#define IOInetThreadSwitch IInternetThreadSwitch")
cpp_quote("#define LPOINET LPIINTERNET ")
cpp_quote("#define LPOINETPROTOCOLINFO LPIINTERNETPROTOCOLINFO ")
cpp_quote("#define LPOINETBINDINFO LPIINTERNETBINDINFO ")
cpp_quote("#define LPOINETPROTOCOLROOT LPIINTERNETPROTOCOLROOT ")
cpp_quote("#define LPOINETPROTOCOL LPIINTERNETPROTOCOL ")
cpp_quote("#define LPOINETPROTOCOLSINK LPIINTERNETPROTOCOLSINK ")
cpp_quote("#define LPOINETSESSION LPIINTERNETSESSION ")
cpp_quote("#define LPOINETTHREADSWITCH LPIINTERNETTHREADSWITCH ")
cpp_quote("#define LPOINETPRIORITY LPIINTERNETPRIORITY ")
cpp_quote("#define LPOINETPROTOCOLINFO LPIINTERNETPROTOCOLINFO ")
cpp_quote("#define IID_IOInet IID_IInternet ")
cpp_quote("#define IID_IOInetBindInfo IID_IInternetBindInfo ")
cpp_quote("#define IID_IOInetProtocolRoot IID_IInternetProtocolRoot")
cpp_quote("#define IID_IOInetProtocol IID_IInternetProtocol ")
cpp_quote("#define IID_IOInetProtocolSink IID_IInternetProtocolSink")
cpp_quote("#define IID_IOInetProtocolInfo IID_IInternetProtocolInfo")
cpp_quote("#define IID_IOInetSession IID_IInternetSession ")
cpp_quote("#define IID_IOInetPriority IID_IInternetPriority ")
cpp_quote("#define IID_IOInetThreadSwitch IID_IInternetThreadSwitch")
//
// OInet helper functions for url parsing
//
#pragma midl_echo("STDAPI CoInternetParseUrl( ")
#pragma midl_echo(" LPCWSTR pwzUrl, ")
#pragma midl_echo(" PARSEACTION ParseAction, ")
#pragma midl_echo(" DWORD dwFlags, ")
#pragma midl_echo(" LPWSTR pszResult, ")
#pragma midl_echo(" DWORD cchResult, ")
#pragma midl_echo(" DWORD *pcchResult, ")
#pragma midl_echo(" DWORD dwReserved ")
#pragma midl_echo(" ); ")
#pragma midl_echo("STDAPI CoInternetCombineUrl( ")
#pragma midl_echo(" LPCWSTR pwzBaseUrl, ")
#pragma midl_echo(" LPCWSTR pwzRelativeUrl, ")
#pragma midl_echo(" DWORD dwCombineFlags, ")
#pragma midl_echo(" LPWSTR pszResult, ")
#pragma midl_echo(" DWORD cchResult, ")
#pragma midl_echo(" DWORD *pcchResult, ")
#pragma midl_echo(" DWORD dwReserved ")
#pragma midl_echo(" ); ")
#pragma midl_echo("STDAPI CoInternetCompareUrl( ")
#pragma midl_echo(" LPCWSTR pwzUrl1, ")
#pragma midl_echo(" LPCWSTR pwzUrl2, ")
#pragma midl_echo(" DWORD dwFlags ")
#pragma midl_echo(" ); ")
#pragma midl_echo("STDAPI CoInternetGetProtocolFlags( ")
#pragma midl_echo(" LPCWSTR pwzUrl, ")
#pragma midl_echo(" DWORD
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -