Click here to Skip to main content
15,885,546 members
Articles / Desktop Programming / MFC

CHttpClient - A Helper Class Using WinInet

Rate me:
Please Sign up or sign in to vote.
4.96/5 (59 votes)
10 Aug 20073 min read 485.6K   24.9K   163  
A C++ class which helps you to interact with a HTTP web server.
/*!
 * \file	RyeolHttpClientCom.idl
 * \brief	An interface definition language file for the HttpClient component edition.
 * \author	Jo Hyeong-ryeol
 * \since	2004.10.17
 * \version	$LastChangedRevision: 100 $
 *			$LastChangedDate: 2006-02-03 23:36:33 +0900 (금, 03 2 2006) $
 * 
 * <dl compact>
 * <dt><b>Requirements:</b></dt>
 * <dd>Requires Internet Explorer 4.0 or later.</dd><br>
 * <dd>Windows Me/98/95 requires Microsoft Layer for Unicode.</dd><br>
 * <dd>UTF-8 encoding support on Windows 95 requires Microsoft Layer for Unicode.</dd>
 * </dl>
 * \n
 * This file contains interfaces and other definitions for the HttpClient component edition.
 * \n\n
 * Copyright &copy; 2006 by <a href="mailto:hyeongryeol@gmail.com">Jo Hyeong-ryeol</a>\n
 * Permission to copy, use, modify, sell and distribute this software is
 * granted provided this copyright notice appears in all copies.
 * This software is provided "as is" without express or implied warranty,
 * and with no claim as to its suitability for any purpose.
 */
import "oaidl.idl";
import "ocidl.idl";

#define CP_ACP							0			//!< default to ANSI code page
#define INTERNET_OPEN_TYPE_PRECONFIG	0			//!< use registry configuration

#define INTERNET_FLAG_PRAGMA_NOCACHE    0x00000100  //!< asking wininet to add "pragma: no-cache"
#define INTERNET_FLAG_NO_CACHE_WRITE    0x04000000  //!< don't write this item to the cache
#define INTERNET_FLAG_KEEP_CONNECTION   0x00400000  //!< use keep-alive semantics
#define INTERNET_FLAG_HYPERLINK         0x00000400  //!< asking wininet to do hyperlinking semantic which works right for scripts
#define INTERNET_FLAG_NO_UI             0x00000200  //!< no cookie popup
#define INTERNET_FLAG_RESYNCHRONIZE     0x00000800  //!< asking wininet to update an item if it is newer
#define INTERNET_FLAG_RELOAD            0x80000000  //!< retrieve the original item

/*!
 * \brief	Default flags used by the CHttpClient class to open a HTTP request
 * 
 * These flags are default flags used by the CHttpClient to open a HTTP request. These flags
 * are actually the dwFlags parameter of the ::HttpOpenRequest function of the WinInet API.
 * For more detailed information about this flags, see microsoft's SDK documentation.
 *
 * \sa IHttpClient2::RequestGetEx, IDispHttpClient2::RequestGetEx
 * \sa IHttpClient2::BeginPostEx, IDispHttpClient2::BeginPostEx
 * \sa IHttpClient2::BeginUploadEx, IDispHttpClient2::BeginUploadEx
 * \sa IHttpClient2::RequestPostEx, IDispHttpClient2::RequestPostEx
 * \sa IHttpClient2::RequestUploadEx, IDispHttpClient2::RequestUploadEx
 */
[
	v1_enum,
	helpstring("HttpClientDefFlag Enumerator")
]
enum HttpClientDefFlag
{
	HTTPCLIENT_DEF_REQUEST_FLAGS				= INTERNET_FLAG_HYPERLINK
												| INTERNET_FLAG_KEEP_CONNECTION
												| INTERNET_FLAG_NO_UI
												| INTERNET_FLAG_RESYNCHRONIZE
	//!< The default flag which causes the CHttpClient to use the cache if a cached copy exists.

	, HTTPCLIENT_DEF_REQUEST_FLAGS_NOCACHE		= INTERNET_FLAG_HYPERLINK
												| INTERNET_FLAG_KEEP_CONNECTION
												| INTERNET_FLAG_NO_UI
												| INTERNET_FLAG_RESYNCHRONIZE
												| INTERNET_FLAG_NO_CACHE_WRITE
												| INTERNET_FLAG_PRAGMA_NOCACHE
												| INTERNET_FLAG_RELOAD
	//!< The default flag which causes the CHttpClient not to use the cache.
} ;

/*!
 * \brief	These error codes represent the error occurred while processing an operation.
 * 
 * These error codes are custom error codes only for classes in this file.
 */
[
	v1_enum,
	helpstring("HttpClientErrorCode Enumerator")
]
enum HttpClientErrorCode
{
	HTTPCLIENT_ERR_NOT_SPECIFIED						= 0		//!< Error was not occurred or not specified.

	// Normal error
	, HTTPCLIENT_ERR_UNEXPECTED_ERROR					= 100	//!< Unknown error occurred.
	, HTTPCLIENT_ERR_OUT_OF_RANGE						= 101	//!< The index is out of range.
	, HTTPCLIENT_ERR_OUT_OF_MEMORY						= 102	//!< The memory has been exhausted.
	, HTTPCLIENT_ERR_INVALID_URL						= 103	//!< The requested URL is not a valid URL.
	, HTTPCLIENT_ERR_POST_NOT_STARTED					= 104	//!< The post context is not started yet.
	, HTTPCLIENT_ERR_READ_UNEXPECTED_SIZE				= 105	//!< Couldn't read expected bytes from a file.
	, HTTPCLIENT_ERR_POST_NOT_FINISHED					= 106	//!< The post context has not been finished yet.
	, HTTPCLIENT_ERR_INTERNET_PORT_NOT_VALID			= 107	//!< The port number is not valid.
	, HTTPCLIENT_ERR_STD_EXCEPTION						= 108	//!< std::exception occurred.
	, HTTPCLIENT_ERR_ENCODED_URL_NOT_VALID				= 109	//!< The encoded URL is not valid.
	, HTTPCLIENT_ERR_INVALID_UTF8_CHARACTER				= 110	//!< The UTF8 string contains an invalid character.
	, HTTPCLIENT_ERR_UNEXPECTED_ARITHMETIC_ERROR		= 111	//!< An unexpected arithmetic error has been occurred.
	, HTTPCLIENT_ERR_ARITHMETIC_OVERFLOW				= 112	//!< An arithmetic overflow error has been occurred.
	, HTTPCLIENT_ERR_INT_DIVIDE_BY_ZERO					= 113	//!< An interger divide by zero exception has been occurred.


	// Normal error (which has a win32 error code) - Reserved


	// WinInet error (which has a win32 error code)
	, HTTPCLIENT_ERR_QUERYINFO_FAILED					= 400	//!< ::HttpQueryInfo failed.
	, HTTPCLIENT_ERR_INTERNETREADFILE_FAILED			= 401	//!< ::InternetReadFile failed.
	, HTTPCLIENT_ERR_INTERNETOPEN_FAILED				= 402	//!< ::InternetOpen failed.
	, HTTPCLIENT_ERR_INTERNETCONNECT_FAILED				= 403	//!< ::InternetConnect failed.
	, HTTPCLIENT_ERR_HTTPOPENREQUEST_FAILED				= 404	//!< ::HttpOpenRequest failed.
	, HTTPCLIENT_ERR_HTTPADDREQUESTHEADERS_FAILED		= 405	//!< ::HttpAddRequestHeaders failed.
	, HTTPCLIENT_ERR_HTTPSENDREQUEST_FAILED				= 406	//!< ::HttpSendRequest failed.
	, HTTPCLIENT_ERR_HTTPSENDREQUESTEX_FAILED			= 407	//!< ::HttpSendRequestEx failed.
	, HTTPCLIENT_ERR_INTERNETWRITEFILE_FAILED			= 408	//!< ::InternetWriteFile failed.
	, HTTPCLIENT_ERR_HTTPENDREQUEST_FAILED				= 409	//!< ::HttpEndRequest failed.
	, HTTPCLIENT_ERR_INTERNETSETOPTION_FAILED			= 410	//!< ::InternetSetOption failed.

	// Win32 API error (which has a win32 error code)
	, HTTPCLIENT_ERR_WIDECHARTOMULTIBYTE_FAILED			= 600	//!< ::WideCharToMultiByte failed.
	, HTTPCLIENT_ERR_MULTIBYTETOWIDECHAR_FAILED			= 601	//!< ::MultiByteToWideChar failed.
	, HTTPCLIENT_ERR_READFILE_FAILED					= 602	//!< ::ReadFile failed.
	, HTTPCLIENT_ERR_OPENFILE_FAILED					= 603	//!< OpenFile (::CreateFile) failed.
	, HTTPCLIENT_ERR_SETFILEPOINTER_FAILED				= 604	//!< ::SetFilePointer failed.
	, HTTPCLIENT_ERR_GETFILESIZE_FAILED					= 605	//!< ::GetFileSize failed.

	// user-defined error
	, HTTPCLIENT_ERR_USER								= 1000	//!< Beginning of the user-defined error code.
																//! \nThe maximum value is HTTPCLIENT_ERR_USER + 99.
} ;

/*!
 * \brief	This macro defines properties and methods for error information.
 * 
 * An interface inherited from IDispatch can include this macro to support additional error information.
 * If the HasErorr property returns TRUE, it means that some error has occurred. If the LastError
 * is not HTTPCLIENT_ERR_NOT_SPECIFIED, it means that an error which is defined by Ryeol::CHttpClient
 * has occurred. If the Win32LastError is not NO_ERROR, it means that an error which has an Win32
 * error code has occurred. The LastError and the Win32LastError is not exclusive.
 */
#define DECLARE_HTTPCLIENT_ERROR_DISPMETHOD()																												\
	[propget, id(1), helpstring("attribute HasError")] HRESULT HasError([out,ref,retval] BOOL* pVal);														\
	[propget, id(2), helpstring("attribute LastError")] HRESULT LastError([out,ref,retval] DWORD* pVal);													\
	[id(3), helpstring("method GetLastErrorMsgLen")] HRESULT GetLastErrorMsgLen([out,ref,retval] DWORD * pdwLen);											\
	[id(4), helpstring("method GetLastErrorMsg")] HRESULT GetLastErrorMsg([out,ref,string,retval] BSTR* pbstrMsg);											\
	[propget, id(5), helpstring("attribute Win32LastError")] HRESULT Win32LastError([out,ref,retval] DWORD* pVal);											\
	[id(6), helpstring("method GetWin32LastErrorMsg")] HRESULT GetWin32LastErrorMsg([out,ref,string,retval] BSTR* pbstrMsg);

/*!
 * \brief	This macro defines properties and methods for error information.
 * 
 * An interface inherited from IUnknown can include this macro to support additional error information.
 * If the HasErorr property returns TRUE, it means that some error has occurred. If the LastError
 * is not HTTPCLIENT_ERR_NOT_SPECIFIED, it means that an error which is defined by Ryeol::CHttpClient
 * has occurred. If the Win32LastError is not NO_ERROR, it means that an error which has an Win32
 * error code has occurred. The LastError and the Win32LastError is not exclusive.
 */
#define DECLARE_HTTPCLIENT_ERROR_METHOD()																													\
	[propget, helpstring("attribute HasError")] HRESULT HasError([out,ref,retval] BOOL* pVal);																\
	[propget, helpstring("attribute LastError")] HRESULT LastError([out,ref,retval] DWORD* pVal);															\
	[helpstring("method GetLastErrorMsgLen")] HRESULT GetLastErrorMsgLen([out,ref,retval] DWORD * pdwLen);													\
	[helpstring("method GetLastErrorMsg")] HRESULT GetLastErrorMsgIntoBuff([out,ref,string,size_is(cchBuff)] OLECHAR * szBuff, [in] DWORD cchBuff);			\
	[helpstring("method GetLastErrorMsg")] HRESULT GetLastErrorMsg([out,ref,string,retval] BSTR* pbstrMsg);													\
	[propget, helpstring("attribute LastError")] HRESULT Win32LastError([out,ref,retval] DWORD* pVal);														\
	[helpstring("method GetLastErrorMsg")] HRESULT GetWin32LastErrorMsgIntoBuff([out,ref,string,size_is(cchBuff)] OLECHAR * szBuff, [in] DWORD cchBuff);	\
	[helpstring("method GetWin32LastErrorMsg")] HRESULT GetWin32LastErrorMsg([out,ref,string,retval] BSTR* pbstrMsg);


/*!
 * \brief	This interface encodes or decodes a string to use in HTTP operation.
 *
 * This interface supports various encoding and decoding methods which can be used in various HTTP operations.
 * Do not use early binding because this interface can be changed in a future release.
 */
[
	object,
	local,
	dual,
	uuid(4F64745D-47A4-4179-BCB0-39A6B3F77438),
	helpstring("IDispHttpEncoder2 interface"),
	pointer_default(unique)
]
interface IDispHttpEncoder2 : IDispatch{
	DECLARE_HTTPCLIENT_ERROR_DISPMETHOD()

	/*!
	 * \brief	Returns the number of characters required to encode a string in UTF-8.
	 *
	 * This method returns the number of characters required to encode an Unicode string using UTF-8 encoding.
	 * The returned value does not include the terminating NULL character.
	 *
	 * \param[in] bstrStr	A string to encode.
	 * \param[out] pdwLen	The number of characters required. (Not including the terminating NULL character)
	 */
	[id(21), helpstring("method Utf8EncodeLen")] HRESULT Utf8EncodeLen([in,ref,string] const BSTR bstrStr, [out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Encodes a string in UTF-8.
	 *
	 * This method encodes an Unicode string using UTF-8 encoding.
	 *
	 * \param[in] bstrStr		A string to encode.
	 * \param[out] pbstrEncoded	An encoded string.
	 */
	[id(22), helpstring("method Utf8Encode")] HRESULT Utf8Encode([in,ref,string] const BSTR bstrStr, [out,ref,string,retval] BSTR * pbstrEncoded);
	/*!
	 * \brief	Returns the number of characters required to decode an UTF-8 string.
	 *
	 * This method returns the number of unicode characters required to decode an UTF-8 string in unicode.
	 * The returned value does not include the terminating NULL character.
	 *
	 * \param[in] bstrStr	An UTF-8 string to decode.
	 * \param[out] pdwLen	The number of characters required. (Not including the terminating NULL character)
	 */
	[id(23), helpstring("method Utf8DecodeLen")] HRESULT Utf8DecodeLen([in,ref,string] const BSTR bstrStr, [out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Decodes an UTF-8 string.
	 *
	 * This method decodes an UTF-8 string in unicode.
	 *
	 * \param[in] bstrStr		An UTF-8 string to decode.
	 * \param[out] pbstrDecoded	A decoded string.
	 */
	[id(24), helpstring("method Utf8Decode")] HRESULT Utf8Decode([in,ref,string] const BSTR bstrStr, [out,ref,string,retval] BSTR * pbstrDecoded);
	/*!
	 * \brief	Returns the number of characters required to encode a string using URL encoding.
	 *
	 * This method returns the number of characters required to encode an Unicode string using URL encoding.
	 * The returned value does not include the terminating NULL character.
	 * For more infomation about the Code-Page Identifiers, see the MSDN documentation.
	 *
	 * \param[in] bstrStr	A string to encode.
	 * \param[in] CodePage	A code page which is used to convert bstrStr into a multibyte character string.
	 *                      This is required because the URL encoding uses Ansi or UTF-8 string as a source.
	 *						The default is CP_ACP.
	 * \param[out] pdwLen	The number of characters required. (Not including the terminating NULL character)
	 */
	[id(25), helpstring("method UrlEncodeLen")] HRESULT UrlEncodeLen([in,ref,string] const BSTR bstrStr, [in,defaultvalue(CP_ACP)] UINT CodePage, [out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Encodes a string using URL encoding.
	 *
	 * This method encodes a Unicode string using URL encoding.
	 * For more infomation about the Code-Page Identifiers, see the MSDN documentation.
	 *
	 * \param[in] bstrStr		A string to encode.
	 * \param[in] CodePage		A code page which is used to convert bstrStr into a multibyte character string.
	 *						    This is required because the URL encoding uses Ansi or UTF-8 string as a source.
	 *							The default is CP_ACP.
	 * \param[out] pbstrEncoded	A URL encoded string.
	 */
	[id(26), helpstring("method UrlEncode")] HRESULT UrlEncode([in,ref,string] const BSTR bstrStr, [in,defaultvalue(CP_ACP)] UINT CodePage, [out,ref,string,retval] BSTR * pbstrEncoded);
	/*!
	 * \brief	Returns the number of characters required to decode an URL-encoded string.
	 *
	 * This method returns the number of characters required to decode an URL-encoded string.
	 * The returned value does not include the terminating NULL character.
	 * This method does not support the URL-encoded string which contains a unicode character by using the %u or %x prefix.
	 * For more infomation about the Code-Page Identifiers, see the MSDN documentation.
	 *
	 * \param[in] bstrStr	A string to decode.
	 * \param[in] CodePage	A code page of the source string of the URL encoded string.
	 *					    This is required because the URL encoding uses Ansi or UTF-8 string as a source.
	 *						The default is CP_ACP.
	 * \param[out] pdwLen	The number of characters required. (Not including the terminating NULL character)
	 */
	[id(27), helpstring("method UrlDecodeLen")] HRESULT UrlDecodeLen([in,ref,string] const BSTR bstrStr, [in,defaultvalue(CP_ACP)] UINT CodePage, [out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Decodes an URL-encoded string.
	 *
	 * This method decodes an URL-encoded string.
	 * This method does not support the URL-encoded string which contains a unicode character by using the %u or %x prefix.
	 * For more infomation about the Code-Page Identifiers, see the MSDN documentation.
	 *
	 * \param[in] bstrStr		A string to decode.
	 * \param[in] CodePage		A code page of the source string of the URL encoded string.
	 *						    This is required because the URL encoding uses Ansi or UTF-8 string as a source.
	 *							The default is CP_ACP.
	 * \param[out] pbstrDecoded	A decoded string.
	 */
	[id(28), helpstring("method UrlDecode")] HRESULT UrlDecode([in,ref,string] const BSTR bstrStr, [in,defaultvalue(CP_ACP)] UINT CodePage, [out,ref,string,retval] BSTR * pbstrDecoded);
};

/*!
 * \brief	This interface encodes or decodes a string to use in HTTP operation.
 *
 * This interface supports various encoding and decoding methods which can be used in various HTTP operations.
 */
[
	object,
	local,
	uuid(7B369416-A803-4074-9B09-BC55E0CE5067),
	helpstring("IHttpEncoder2 interface"),
	pointer_default(unique)
]
interface IHttpEncoder2 : IUnknown{
	DECLARE_HTTPCLIENT_ERROR_METHOD()

	/*!
	 * \brief	Returns the number of characters required to encode a string in UTF-8.
	 *
	 * This method returns the number of characters required to encode an Unicode string using UTF-8 encoding.
	 * The returned value does not include the terminating NULL character.
	 *
	 * \param[in] szStr		A string to encode.
	 * \param[out] pdwLen	The number of characters required. (Not including the terminating NULL character)
	 */
	[helpstring("method Utf8EncodeLen")] HRESULT Utf8EncodeLen([in,ref,string] LPCOLESTR szStr, [out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Encodes a string in UTF-8.
	 *
	 * This method encodes an Unicode string using UTF-8 encoding.
	 *
	 * \param[out] szBuff		A buffer to save the encoded string. The buffer can not be NULL.
	 * \param[in] cchBuff		A buffer size in character.
	 * \param[in] szStr			A string to encode.
	 */
	[helpstring("method Utf8EncodeIntoBuff")] HRESULT Utf8EncodeIntoBuff([out,ref,string,size_is(cchBuff)] OLECHAR * szBuff, [in] DWORD cchBuff, [in,string,unique] LPCOLESTR szStr);
	/*!
	 * \brief	Encodes a string in UTF-8.
	 *
	 * This method encodes an Unicode string using UTF-8 encoding.
	 *
	 * \param[in] szStr			A string to encode.
	 * \param[out] pbstrEncoded	An encoded string.
	 */
	[helpstring("method Utf8Encode")] HRESULT Utf8Encode([in,ref,string] LPCOLESTR szStr, [out,ref,string,retval] BSTR * pbstrEncoded);
	/*!
	 * \brief	Returns the number of characters required to decode an UTF-8 string.
	 *
	 * This method returns the number of unicode characters required to decode an UTF-8 string in unicode.
	 * The returned value does not include the terminating NULL character.
	 *
	 * \param[in] szStr		An UTF-8 string to decode.
	 * \param[out] pdwLen	The number of characters required. (Not including the terminating NULL character)
	 */
	[helpstring("method Utf8DecodeLen")] HRESULT Utf8DecodeLen([in,ref,string] LPCOLESTR szStr, [out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Decodes an UTF-8 string.
	 *
	 * This method decodes an UTF-8 string in unicode.
	 *
	 * \param[out] szBuff		A buffer to save the decoded string. The buffer can not be NULL.
	 * \param[in] cchBuff		A buffer size in character.
	 * \param[in] szStr			An UTF-8 string to decode.
	 * \param[out] pbstrDecoded	A decoded string.
	 */
	[helpstring("method Utf8DecodeIntoBuff")] HRESULT Utf8DecodeIntoBuff([out,ref,string,size_is(cchBuff)] OLECHAR * szBuff, [in] DWORD cchBuff, [in,string,unique] LPCOLESTR szStr);
	/*!
	 * \brief	Decodes an UTF-8 string.
	 *
	 * This method decodes an UTF-8 string in unicode.
	 *
	 * \param[in] szStr			An UTF-8 string to decode.
	 * \param[out] pbstrDecoded	A decoded string.
	 */
	[helpstring("method Utf8Decode")] HRESULT Utf8Decode([in,ref,string] LPCOLESTR szStr, [out,ref,string,retval] BSTR * pbstrDecoded);
	/*!
	 * \brief	Returns the number of characters required to encode a string using URL encoding.
	 *
	 * This method returns the number of characters required to encode an Unicode string using URL encoding.
	 * The returned value does not include the terminating NULL character.
	 * For more infomation about the Code-Page Identifiers, see the MSDN documentation.
	 *
	 * \param[in] szStr		A string to encode.
	 * \param[in] CodePage	A code page which is used to convert bstrStr into a multibyte character string.
	 *                      This is required because the URL encoding uses Ansi or UTF-8 string as a source.
	 *						The default is CP_ACP.
	 * \param[out] pdwLen	The number of characters required. (Not including the terminating NULL character)
	 */
	[helpstring("method UrlEncodeLen")] HRESULT UrlEncodeLen([in,ref,string] LPCOLESTR szStr, [in,defaultvalue(CP_ACP)] UINT CodePage, [out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Encodes a string using URL encoding.
	 *
	 * This method encodes a Unicode string using URL encoding.
	 * For more infomation about the Code-Page Identifiers, see the MSDN documentation.
	 *
	 * \param[out] szBuff		A buffer to save the encoded string. The buffer can not be NULL.
	 * \param[in] cchBuff		A buffer size in character.
	 * \param[in] szStr			A string to encode.
	 * \param[in] CodePage		A code page which is used to convert bstrStr into a multibyte character string.
	 *						    This is required because the URL encoding uses Ansi or UTF-8 string as a source.
	 *							The default is CP_ACP.
	 */
	[helpstring("method UrlEncodeIntoBuff")] HRESULT UrlEncodeIntoBuff([out,ref,string,size_is(cchBuff)] OLECHAR * szBuff, [in] DWORD cchBuff, [in,string,unique] LPCOLESTR szStr, [in,defaultvalue(CP_ACP)] UINT CodePage);
	/*!
	 * \brief	Encodes a string using URL encoding.
	 *
	 * This method encodes a Unicode string using URL encoding.
	 * For more infomation about the Code-Page Identifiers, see the MSDN documentation.
	 *
	 * \param[in] szStr			A string to encode.
	 * \param[in] CodePage		A code page which is used to convert bstrStr into a multibyte character string.
	 *						    This is required because the URL encoding uses Ansi or UTF-8 string as a source.
	 *							The default is CP_ACP.
	 * \param[out] pbstrEncoded	A URL encoded string.
	 */
	[helpstring("method UrlEncode")] HRESULT UrlEncode([in,ref,string] LPCOLESTR szStr, [in,defaultvalue(CP_ACP)] UINT CodePage, [out,ref,string,retval] BSTR * pbstrEncoded);
	/*!
	 * \brief	Returns the number of characters required to decode an URL-encoded string.
	 *
	 * This method returns the number of characters required to decode an URL-encoded string.
	 * The returned value does not include the terminating NULL character.
	 * This method does not support the URL-encoded string which contains a unicode character by using the %u or %x prefix.
	 * For more infomation about the Code-Page Identifiers, see the MSDN documentation.
	 *
	 * \param[in] szStr		A string to decode.
	 * \param[in] CodePage	A code page of the source string of the URL encoded string.
	 *					    This is required because the URL encoding uses Ansi or UTF-8 string as a source.
	 *						The default is CP_ACP.
	 * \param[out] pdwLen	The number of characters required. (Not including the terminating NULL character)
	 */
	[helpstring("method UrlDecodeLen")] HRESULT UrlDecodeLen([in,ref,string] LPCOLESTR szStr, [in,defaultvalue(CP_ACP)] UINT CodePage, [out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Decodes an URL-encoded string.
	 *
	 * This method decodes an URL-encoded string.
	 * This method does not support the URL-encoded string which contains a unicode character by using the %u or %x prefix.
	 * For more infomation about the Code-Page Identifiers, see the MSDN documentation.
	 *
	 * \param[out] szBuff		A buffer to save the decoded string. The buffer can not be NULL.
	 * \param[in] cchBuff		A buffer size in character.
	 * \param[in] szStr			A string to decode.
	 * \param[in] CodePage		A code page of the source string of the URL encoded string.
	 *						    This is required because the URL encoding uses Ansi or UTF-8 string as a source.
	 *							The default is CP_ACP.
	 */
	[helpstring("method UrlDecodeIntoBuff")] HRESULT UrlDecodeIntoBuff([out,ref,string,size_is(cchBuff)] OLECHAR * szBuff, [in] DWORD cchBuff, [in,string,unique] LPCOLESTR szStr, [in,defaultvalue(CP_ACP)] UINT CodePage);
	/*!
	 * \brief	Decodes an URL-encoded string.
	 *
	 * This method decodes an URL-encoded string.
	 * This method does not support the URL-encoded string which contains a unicode character by using the %u or %x prefix.
	 * For more infomation about the Code-Page Identifiers, see the MSDN documentation.
	 *
	 * \param[in] szStr			A string to decode.
	 * \param[in] CodePage		A code page of the source string of the URL encoded string.
	 *						    This is required because the URL encoding uses Ansi or UTF-8 string as a source.
	 *							The default is CP_ACP.
	 * \param[out] pbstrDecoded	A decoded string.
	 */
	[helpstring("method UrlDecode")] HRESULT UrlDecode([in,ref,string] LPCOLESTR szStr, [in,defaultvalue(CP_ACP)] UINT CodePage, [out,ref,string,retval] BSTR * pbstrDecoded);
};

/*!
 * \internal
 * \brief	This interface is used to store an internal object.
 *
 * This interface is used internally.
 */
[
	object,
	local,
	uuid(0B4446D6-DFCB-451a-ACC6-4014F61B218B),
	helpstring("IHttpResponseInternal2 interface"),
	pointer_default(unique)
]
interface IHttpResponseInternal2 : IUnknown{
	DECLARE_HTTPCLIENT_ERROR_METHOD()
	[helpstring("method SetInternalObject")] HRESULT SetInternalObject([in,ref] void * pObj);
	[helpstring("method GetInternalObject")] HRESULT GetInternalObject([out,ref] void ** ppObj);
};


/*!
 * \brief	This interface represents a response returned by a HTTP web server.
 *
 * This interface provides functionalities to handle a response which is returned by a HTTP web server.
 * This interface is returned if the request methods of the IDispHttpClient2 interface succeeds.
 * Do not use early binding because this interface can be changed in a future release.
 *
 * \sa		IDispHttpClient2, IDispHttpPostStat2
 */
[
	object,
	local,
	dual,
	uuid(B9B0CF95-EF33-4445-A5CC-144C001E667B),
	helpstring("IDispHttpResponse2 interface"),
	pointer_default(unique)
]
interface IDispHttpResponse2 : IDispatch{
	DECLARE_HTTPCLIENT_ERROR_DISPMETHOD()
	/*!
	 * \brief	Returns the number of headers of which name is bstrName.
	 *
	 * This method returns the number of headers of which name is bstrName.
	 *
	 * \param[in] bstrName		A case-insensitive header name. NULL is not allowed.
	 * \param[out] pdwCount		The number of headers of which name is bstrName.
	 */
	[id(21), helpstring("method GetHeaderCount")] HRESULT GetHeaderCount([in,ref,string] const BSTR bstrName, [out,ref,retval] DWORD * pdwCount);
	/*!
	 * \brief	Returns the length of the header of which name is bstrName.
	 *
	 * This method returns the length of the header of which name is bstrName.
	 *
	 * \param[in] bstrName		A case-insensitive header name. NULL is not allowed.
	 * \param[out] pdwLen		The length of the header of which name is bstrName.
	 */
	[id(22), helpstring("method GetHeaderLen")] HRESULT GetHeaderLen([in,ref,string] const BSTR bstrName, [in,defaultvalue(0)] DWORD nIdx, [out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Returns the header of which name is bstrName.
	 *
	 * This method returns the header of which name is bstrName.
	 * If a header name has multiple values, you can specify a zero-based index for a specific value.
	 * If a header specified by bstrName is not found or the index is out of range, it will return NULL.
	 * Otherwise it always returns a null-terminated string.
	 *
	 * \param[in] bstrName		A case-insensitive header name. NULL is not allowed.
	 * \param[in] nIdx			A zero-based index for a header which has multiple values.
	 *							The default is zero.
	 * \param[out] pbstrHeader	The requested header.
	 */
	[id(23), helpstring("method GetHeader")] HRESULT GetHeader([in,ref,string] const BSTR bstrName, [in,defaultvalue(0)] DWORD nIdx, [out,ref,string,retval] BSTR * pbstrHeader);
	/*!
	 * \brief	Returns whether the header exists or not.
	 *
	 * This method returns whether the header specified by bstrName exists.
	 * If a header name has multiple values, you can specify a zero-based index for a specific value.
	 *
	 * \param[in] bstrName		A case-insensitive header name. NULL is not allowed.
	 * \param[in] nIdx			A zero-based index for a header which has multiple values.
	 *							The default is zero.
	 * \param[out] pbExist		TRUE if the requested header is found, otherwise FALSE.
	 */
	[id(24), helpstring("method HeaderExists")] HRESULT HeaderExists([in,ref,string] const BSTR bstrName, [in,defaultvalue(0)] DWORD nIdx, [out,ref,retval] BOOL * pbExist);
	/*!
	 * \brief	Returns the HTTP status code.
	 *
	 * This property returns the HTTP status code of a HTTP response.
	 *
	 * \param[out] pdwStatus	The HTTP status code.
	 */
	[propget, id(25), helpstring("attribute Status")] HRESULT Status([out,ref,retval] DWORD * pdwStatus);
	/*!
	 * \brief	Returns the HTTP status text.
	 *
	 * This property returns the HTTP status text of a HTTP response.
	 *
	 * \param[out] pbstrStatusText	The HTTP status text.
	 */
	[propget, id(27), helpstring("attribute StatusText")] HRESULT StatusText([out,ref,string,retval] BSTR * pbstrStatusText);
	/*!
	 * \brief	Returns whether the content length is available.
	 *
	 * This method returns whether the content length is available.
	 * The content is the data stream except the HTTP headers. 
	 *
	 * \param[out] pbHasContentLength	TRUE if the content length is available, otherwise FALSE.
	 */
	[id(28), helpstring("method HasContentLength")] HRESULT HasContentLength([out,ref,retval] BOOL * pbHasContentLength);
	/*!
	 * \brief	Returns the content length of a returned HTTP response.
	 *
	 * This property returns the content length of a returned HTTP response.
	 * The content is the data stream except the HTTP headers. 
	 * If HasContentLength return FALSE, it will return 0.
	 *
	 * \param[out] pcbContLen	the content length of a returned HTTP response.
	 */
	[propget, id(29), helpstring("attribute ContentLength")] HRESULT ContentLength([out,ref,retval] DWORD * pcbContLen);
	/*!
	 * \brief	Reads the content of a returned HTTP response.
	 *
	 * This method reads the content (the data stream except headers) of a returned HTTP response.
	 *
	 * \param[out] ppsaBuff		A safe array to save the read content.
	 * \param[out] pcbRead		The number of bytes read. If all content is read, 0 is returned. 
	 */
	[id(30), helpstring("method ReadContent")] HRESULT ReadContent([in,out,ref] SAFEARRAY(BYTE) * ppsaBuff, [out,ref,retval] DWORD * pcbRead);
	/*!
	 * \brief	Returns the content of a returned HTTP response.
	 *
	 * This method returns the content (the data stream except headers) of a returned HTTP response.
	 *
	 * \param[in] cbDesire		A desired number of bytes to read.
	 * \param[out] pvarArray	The read content in safe array. 
	 */
	[id(31), helpstring("method ReturnContent")] HRESULT ReturnContent([in] DWORD cbDesire, [out,ref,retval] VARIANT * pvarArray);
	/*!
	 * \brief	Saves the content of a returned HTTP response to a file.
	 *
	 * This method saves the content (the data stream except headers) of a returned HTTP response
	 * to a file which is specified by bstrFilePath.
	 *
	 * \param[in] bstrFilePath	A file path to save.
	 * \param[in] bOverwrite	If this is TRUE, a file is overwritten if aleady exists. otherwise an error is occurred.
	 *							The default is TRUE.
	 */
	[id(32), helpstring("method SaveContent")] HRESULT SaveContent([in,ref,string] const BSTR bstrFilePath, [in,defaultvalue(TRUE)] BOOL bOverwrite);
	/*!
	 * \brief	Returns the entire content of a returned HTTP response as a string.
	 *
	 * This method returns the entire content of a returned HTTP response as a string.
	 * For more infomation about the Code-Page Identifiers, see the MSDN documentation.
	 *
	 * \param[in] nCodePage				A code page of the content of a returned HTTP response.
	 *									The default is CP_ACP.
	 * \param[out] pbstrContentString	The read content.
	 */
	[id(33), helpstring("method ReturnAsString")] HRESULT ReturnAsString([in,defaultvalue(CP_ACP)] UINT nCodePage, [out,ref,string,retval] BSTR * pbstrContentString);
};

/*!
 * \brief	This interface represents a response returned by a HTTP web server.
 *
 * This interface provides functionalities to handle a response which is returned by a HTTP web server.
 * This interface is returned if the request methods of the IHttpClient2 interface succeeds.
 *
 * \sa		IHttpClient2, IHttpPostStat2
 */
[
	object,
	local,
	uuid(1971188B-8F42-40fa-B863-CFE3FB4D0EE3),
	helpstring("IHttpResponse2 interface"),
	pointer_default(unique)
]
interface IHttpResponse2 : IUnknown{
	DECLARE_HTTPCLIENT_ERROR_METHOD()
	/*!
	 * \brief	Returns the number of headers of which name is szName.
	 *
	 * This method returns the number of headers of which name is szName.
	 *
	 * \param[in] szName		A case-insensitive header name. NULL is not allowed.
	 * \param[out] pdwCount		The number of headers of which name is szName.
	 */
	[helpstring("method GetHeaderCount")] HRESULT GetHeaderCount([in,ref,string] LPCOLESTR szName, [out,ref,retval] DWORD * pdwCount);
	/*!
	 * \brief	Returns the length of the header of which name is bstrName.
	 *
	 * This method returns the length of the header of which name is bstrName.
	 *
	 * \param[in] bstrName		A case-insensitive header name. NULL is not allowed.
	 * \param[out] pdwLen		The length of the header of which name is bstrName.
	 */
	[helpstring("method GetHeaderLen")] HRESULT GetHeaderLen([in,ref,string] LPCOLESTR szName, [in,defaultvalue(0)] DWORD nIdx, [out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Returns the header of which name is bstrName.
	 *
	 * This method returns the header of which name is bstrName.
	 * If a header name has multiple values, you can specify the zero-based index for a specific value.
	 * If a header specified by bstrName is not found or the index is out of range, it will return NULL.
	 * Otherwise it always returns a null-terminated string.
	 *
	 * \param[out] szBuff		A buffer to save the requested header. The buffer can not be NULL.
	 * \param[in] cchBuff		A buffer size in character.
	 * \param[in] bstrName		A case-insensitive header name. NULL is not allowed.
	 * \param[in] nIdx			A zero-based index for a header which has multiple values.
	 *							The default is zero.
	 */
	[helpstring("method GetHeaderIntoBuff")] HRESULT GetHeaderIntoBuff([out,ref,string,size_is(cchBuff)] OLECHAR * szBuff, [in] DWORD cchBuff, [in,ref,string] LPCOLESTR szName, [in,defaultvalue(0)] DWORD nIdx);
	/*!
	 * \brief	Returns the header of which name is szName.
	 *
	 * This method returns the header of which name is szName.
	 * If a header name has multiple values, you can specify a zero-based index for a specific value.
	 * If a header specified by szName is not found or the index is out of range, it will return NULL.
	 * Otherwise it always returns a null-terminated string.
	 *
	 * \param[in] bstrName		A case-insensitive header name. NULL is not allowed.
	 * \param[in] nIdx			A zero-based index for a header which has multiple values.
	 *							The default is zero.
	 * \param[out] pbstrHeader	The requested header.
	 */
	[helpstring("method GetHeader")] HRESULT GetHeader([in,ref,string] LPCOLESTR szName, [in,defaultvalue(0)] DWORD nIdx, [out,ref,string,retval] BSTR * pbstrHeader);
	/*!
	 * \brief	Returns whether the header exists or not.
	 *
	 * This method returns whether the header specified by szName exists.
	 * If a header name has multiple values, you can specify a zero-based index for a specific value.
	 *
	 * \param[in] szName		A case-insensitive header name. NULL is not allowed.
	 * \param[in] nIdx			A zero-based index for a header which has multiple values.
	 *							The default is zero.
	 * \param[out] pbExist		TRUE if the requested header is found, otherwise FALSE.
	 */
	[helpstring("method HeaderExists")] HRESULT HeaderExists([in,ref,string] LPCOLESTR szName, [in,defaultvalue(0)] DWORD nIdx, [out,ref,retval] BOOL * pbExist);
	/*!
	 * \brief	Returns the HTTP status code.
	 *
	 * This method returns the HTTP status code of a HTTP response.
	 *
	 * \param[out] pdwStatus	The HTTP status code.
	 */
	[helpstring("method GetStatus")] HRESULT GetStatus([out,ref,retval] DWORD * pdwStatus);
	/*!
	 * \brief	Returns the length of the HTTP status text.
	 *
	 * This method returns the length of the HTTP status text of a HTTP response.
	 *
	 * \param[out] pdwLen	The length of the HTTP status text.
	 */
	[helpstring("method GetStatusTextLen")] HRESULT GetStatusTextLen([out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Returns the HTTP status text.
	 *
	 * This method returns the HTTP status text of a HTTP response.
	 *
	 * \param[out] szBuff		A buffer to save the HTTP status text. The buffer can not be NULL.
	 * \param[in] cchBuff		A buffer size in character.
	 */
	[helpstring("method GetStatusTextIntoBuff")] HRESULT GetStatusTextIntoBuff([out,ref,string,size_is(cchBuff)] OLECHAR * szBuff, [in] DWORD cchBuff);
	/*!
	 * \brief	Returns the HTTP status text.
	 *
	 * This method returns the HTTP status text of a HTTP response.
	 *
	 * \param[out] pbstrStatusText	The HTTP status text.
	 */
	[helpstring("method GetStatusText")] HRESULT GetStatusText([out,ref,string,retval] BSTR * pbstrStatusText);
	/*!
	 * \brief	Retrieves the content length of a returned HTTP response.
	 *
	 * This method retrieves the content length of a returned HTTP response.
	 * The content is the data stream except the HTTP headers. 
	 * If the content length is not available, pbRetrieved will be set to FALSE.
	 *
	 * \param[out] pcbContLen	the content length of a returned HTTP response.
	 * \param[out] pbRetrieved	FALSE if the content length is not available, otherwise TRUE.
	 */
	[helpstring("method GetContentLength")] HRESULT GetContentLength([out,ref] DWORD * pcbContLen, [out,ref,retval] BOOL * pbRetrieved);
	/*!
	 * \brief	Reads the content of a returned HTTP response.
	 *
	 * This method reads the content (the data stream except headers) of a returned HTTP response.
	 *
	 * \param[out] pbyBuff		A buffer to save the read content.
	 * \param[in] cbBuff		A buffer size in byte.
	 * \param[out] pcbRead		The number of bytes read. If all content is read, 0 is returned. 
	 */
	[helpstring("method ReadContent")] HRESULT ReadContent([out,ref,size_is(cbBuff),length_is(*pcbRead)] BYTE * pbyBuff, [in] DWORD cbBuff, [out,ref,retval] DWORD * pcbRead);
	/*!
	 * \brief	Saves the content of a returned HTTP response to a file.
	 *
	 * This method saves the content (the data stream except headers) of a returned HTTP response
	 * to a file which is specified by bstrFilePath.
	 *
	 * \param[in] szFilePath	A file path to save.
	 * \param[in] bOverwrite	If this is TRUE, a file is overwritten if aleady exists. otherwise an error is occurred.
	 *							The default is TRUE.
	 */
	[helpstring("method SaveContent")] HRESULT SaveContent([in,ref,string] LPCOLESTR szFilePath, [in,defaultvalue(TRUE)] BOOL bOverwrite);
};

/*!
 * \internal
 * \brief	This interface is used to store an internal object.
 *
 * This interface is used internally.
 */
[
	object,
	local,
	uuid(9B03D6E4-3167-43c8-B8F6-94AC4EDD093B),
	helpstring("IHttpPostStatInternal2 interface"),
	pointer_default(unique)
]
interface IHttpPostStatInternal2 : IUnknown{
	DECLARE_HTTPCLIENT_ERROR_METHOD()
	[helpstring("method SetInternalObject")] HRESULT SetInternalObject([in,ref] void * pObj);
	[helpstring("method GetInternalObject")] HRESULT GetInternalObject([out,ref] void ** ppObj);
};

/*!
 * \brief	This interface represents progress information of the HTTP POST operation.
 *
 * The purpose of this interface is to provide progress information to user.
 * If you call BeginPost or BeginUpload method of the IDispHttpClient2 interface, you can retrieve
 * progress information by using the Query method of the IDispHttpClient2 interface.
 * Do not use early binding because this interface can be changed in a future release.
 *
 * \sa		IDispHttpClient2, IDispHttpResponse2
 */
[
	object,
	local,
	dual,
	uuid(F5F2D0EA-0C83-4d44-8A80-370E08666752),
	helpstring("IDispHttpPostStat2 interface"),
	pointer_default(unique)
]
interface IDispHttpPostStat2 : IDispatch{
	DECLARE_HTTPCLIENT_ERROR_DISPMETHOD()

	/*!
	 * \brief	Indicates whether the POST is in progress or not.
	 *
	 * This method returns a boolean which indicates whether the POST is in progress or not.
	 *
	 * \param[out] pbIsActive	TRUE if the POST is in progress, otherwise FALSE
	 */
	[propget, id(21), helpstring("attribute IsActive")] HRESULT IsActive([out,ref,retval] BOOL * pbIsActive);
	/*!
	 * \brief	Returns the actual number of bytes to send to a HTTP web server.
	 *
	 * This method returns the actual number of bytes to send to a HTTP web server.
	 * The returned size includes the size of boundaries, parameter names, and other elements.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pullActualTotalByte	The actual number of bytes to send to a HTTP web server
	 */
	[propget, id(22), helpstring("attribute ActualTotalByte")] HRESULT ActualTotalByte([out,ref,retval] ULONGLONG * pullActualTotalByte);
	/*!
	 * \brief	Returns the actual number of bytes posted to a HTTP web server.
	 *
	 * This method returns the actual number of bytes posted to a HTTP web server.
	 * The returned size includes the size of boundaries, parameter names, and other elements.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pullActualPostedByte	The actual number of bytes posted to a HTTP web server
	 */
	[propget, id(23), helpstring("attribute ActualPostedByte")] HRESULT ActualPostedByte([out,ref,retval] ULONGLONG * pullActualPostedByte);
	/*!
	 * \brief	Returns the number of bytes to send to a HTTP web server.
	 *
	 * This method returns the number of bytes to send to a HTTP web server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pullTotalByte		The number of bytes to send to a HTTP web server
	 */
	[propget, id(24), helpstring("attribute TotalByte")] HRESULT TotalByte([out,ref,retval] ULONGLONG * pullTotalByte);
	/*!
	 * \brief	Returns the number of bytes posted to a HTTP web server.
	 *
	 * This method returns the number of bytes posted to a HTTP web server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pullPostedByte		The number of bytes posted to a HTTP web server
	 */
	[propget, id(25), helpstring("attribute PostedByte")] HRESULT PostedByte([out,ref,retval] ULONGLONG * pullPostedByte);
	/*!
	 * \brief	Returns the actual number of bytes to send to a HTTP web server.
	 *
	 * This method returns the actual number of bytes to send to a HTTP web server.
	 * The returned size includes the size of boundaries, parameter names, and other elements.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pdwActualTotalByte	The actual number of bytes to send to a HTTP web server (in DWORD)
	 */
	[propget, id(26), helpstring("attribute ActualTotalByteD")] HRESULT ActualTotalByteD([out,ref,retval] DWORD * pdwActualTotalByte);
	/*!
	 * \brief	Returns the actual number of bytes posted to a HTTP web server.
	 *
	 * This method returns the actual number of bytes posted to a HTTP web server.
	 * The returned size includes the size of boundaries, parameter names, and other elements.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pdwActualPostedByte	The actual number of bytes posted to a HTTP web server (in DWORD)
	 */
	[propget, id(27), helpstring("attribute ActualPostedByteD")] HRESULT ActualPostedByteD([out,ref,retval] DWORD * pdwActualPostedByte);
	/*!
	 * \brief	Returns the number of bytes to send to a HTTP web server.
	 *
	 * This method returns the number of bytes to send to a HTTP web server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pdwTotalByte			The number of bytes to send to a HTTP web server (in DWORD)
	 */
	[propget, id(28), helpstring("attribute TotalByteD")] HRESULT TotalByteD([out,ref,retval] DWORD * pdwTotalByte);
	/*!
	 * \brief	Returns the number of bytes posted to a HTTP web server.
	 *
	 * This method returns the number of bytes posted to a HTTP web server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pdwPostedByte		The number of bytes posted to a HTTP web server (in DWORD)
	 */
	[propget, id(29), helpstring("attribute PostedByteD")] HRESULT PostedByteD([out,ref,retval] DWORD * pdwPostedByte);
	/*!
	 * \brief	Returns the total number of parameters.
	 *
	 * This method returns the total number of parameters to send to a HTTP web server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pdwTotalCount		The total number of parameters
	 */
	[propget, id(30), helpstring("attribute TotalCount")] HRESULT TotalCount([out,ref,retval] DWORD * pdwTotalCount);
	/*!
	 * \brief	Returns the number of posted parameters.
	 *
	 * This method returns the number of posted parameters.
	 * The count includes the current parameter which is being sent to the server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pdwPostedCount		The number of posted parameters
	 */
	[propget, id(31), helpstring("attribute PostedCount")] HRESULT PostedCount([out,ref,retval] DWORD * pdwPostedCount);
	/*!
	 * \brief	Returns the number of file parameters.
	 *
	 * This method returns the number of file parameters.
	 * The file parameter is a parameter which contains a file path to upload.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pdwFileCount			The number of file parameters
	 */
	[propget, id(32), helpstring("attribute FileCount")] HRESULT FileCount([out,ref,retval] DWORD * pdwFileCount);
	/*!
	 * \brief	Returns the number of posted file parameters.
	 *
	 * This method returns the number of posted file parameters.
	 * The file parameter is a parameter which contains a file path to upload.
	 * If the current parameter is a file parameter, then the count includes the current parameter.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pdwPostedFileCount	The number of posted file parameters
	 */
	[propget, id(33), helpstring("attribute PostedFileCount")] HRESULT PostedFileCount([out,ref,retval] DWORD * pdwPostedFileCount);
	/*!
	 * \brief	Returns the current parameter name.
	 *
	 * This method returns the current parameter name.
	 * The current parameter is a parameter which is being sent to the server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pbstrCurrParam	The current parameter name
	 */
	[propget, id(35), helpstring("attribute CurrParam")] HRESULT CurrParam([out,ref,string,retval] BSTR * pbstrCurrParam);
	/*!
	 * \brief	Returns the current file path.
	 *
	 * This method returns the file path which is currently being uploaded.
	 * If the current parameter is not a file parameter or the system fails to allocate
	 * memory for the current file path, it will return "NULL".
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pbstrCurrFile	The current file path
	 */
	[propget, id(37), helpstring("attribute CurrFile")] HRESULT CurrFile([out,ref,string,retval] BSTR * pbstrCurrFile);
	/*!
	 * \brief	Returns the number of bytes of the current parameter.
	 *
	 * This method returns the number of bytes of the current parameter.
	 * The current parameter is a parameter which is being sent to the server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pullCurrParamTotalByte		The number of bytes of the current parameter
	 */
	[propget, id(38), helpstring("attribute CurrParamTotalByte")] HRESULT CurrParamTotalByte([out,ref,retval] ULONGLONG * pullCurrParamTotalByte);
	/*!
	 * \brief	Returns the number of posted bytes of the current parameter.
	 *
	 * This method returns the number of posted bytes of the current parameter.
	 * The current parameter is a parameter which is being sent to the server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pullCurrParamPostedByte	The number of posted bytes of the current parameter
	 */
	[propget, id(39), helpstring("attribute CurrParamPostedByte")] HRESULT CurrParamPostedByte([out,ref,retval] ULONGLONG * pullCurrParamPostedByte);
	/*!
	 * \brief	Returns the number of remained bytes of the current parameter.
	 *
	 * This method returns the number of remained bytes of the current parameter.
	 * The current parameter is a parameter which is being sent to the server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pullCurrParamRemainByte	The number of remained bytes of the current parameter
	 */
	[propget, id(40), helpstring("attribute CurrParamRemainByte")] HRESULT CurrParamRemainByte([out,ref,retval] ULONGLONG * pullCurrParamRemainByte);
	/*!
	 * \brief	Returns the number of bytes of the current parameter.
	 *
	 * This method returns the number of bytes of the current parameter.
	 * The current parameter is a parameter which is being sent to the server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pdwCurrParamTotalByte	The number of bytes of the current parameter (in DWORD)
	 */
	[propget, id(41), helpstring("attribute CurrParamTotalByteD")] HRESULT CurrParamTotalByteD([out,ref,retval] DWORD * pdwCurrParamTotalByte);
	/*!
	 * \brief	Returns the number of posted bytes of the current parameter.
	 *
	 * This method returns the number of posted bytes of the current parameter.
	 * The current parameter is a parameter which is being sent to the server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pdwCurrParamPostedByte	The number of posted bytes of the current parameter (in DWORD)
	 */
	[propget, id(42), helpstring("attribute CurrParamPostedByteD")] HRESULT CurrParamPostedByteD([out,ref,retval] DWORD * pdwCurrParamPostedByte);
	/*!
	 * \brief	Returns the number of remained bytes of the current parameter.
	 *
	 * This method returns the number of remained bytes of the current parameter.
	 * The current parameter is a parameter which is being sent to the server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pdwCurrParamRemainByte	The number of remained bytes of the current parameter (in DWORD)
	 */
	[propget, id(43), helpstring("attribute CurrParamRemainByteD")] HRESULT CurrParamRemainByteD([out,ref,retval] DWORD * pdwCurrParamRemainByte);
	/*!
	 * \brief	Returns whether the current parameter is a file parameter.
	 *
	 * This method returns TRUE if the current parameter is a file parameter, otherwise it will return FALSE.
	 * The current parameter is a parameter which is being sent to the server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pbCurrParamIsFile	TRUE if the current parameter is a file parameter, otherwise FALSE.
	 */
	[propget, id(44), helpstring("attribute CurrParamIsFile")] HRESULT CurrParamIsFile([out,ref,retval] BOOL * pbCurrParamIsFile);
	/*!
	 * \brief	Returns whether the current parameter is completely posted.
	 *
	 * This method returns TRUE if the current parameter is completely posted, otherwise it will return FALSE.
	 * The current parameter is a parameter which is being sent to the server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pbCurrParamIsComplete	TRUE if the current parameter is completely posted, otherwise FALSE.
	 */
	[propget, id(45), helpstring("attribute CurrParamIsComplete")] HRESULT CurrParamIsComplete([out,ref,retval] BOOL * pbCurrParamIsComplete);
};

/*!
 * \brief	This interface represents progress information of the HTTP POST operation.
 *
 * The purpose of this interface is to provide progress information to user.
 * If you call BeginPost or BeginUpload method of the IHttpClient2 interface, you can retrieve
 * progress information by using the Query method of the IHttpClient2 interface.
 *
 * \sa		IHttpClient2, IHttpResponse2
 */
[
	object,
	local,
	uuid(0008A12C-8154-48ad-9774-F08E08A3593F),
	helpstring("IHttpPostStat2 interface"),
	pointer_default(unique)
]
interface IHttpPostStat2 : IUnknown{
	DECLARE_HTTPCLIENT_ERROR_METHOD()

	/*!
	 * \brief	Indicates whether the POST is in progress or not.
	 *
	 * This method returns a boolean which indicates whether the POST is in progress or not.
	 *
	 * \param[out] pbIsActive	TRUE if the POST is in progress, otherwise FALSE
	 */
	[helpstring("method GetIsActive")] HRESULT GetIsActive([out,ref,retval] BOOL * pbIsActive);
	/*!
	 * \brief	Returns the actual number of bytes to send to a HTTP web server.
	 *
	 * This method returns the actual number of bytes to send to a HTTP web server.
	 * The returned size includes the size of boundaries, parameter names, and other elements.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pullActualTotalByte	The actual number of bytes to send to a HTTP web server
	 */
	[helpstring("method GetActualTotalByte")] HRESULT GetActualTotalByte([out,ref,retval] ULONGLONG * pullActualTotalByte);
	/*!
	 * \brief	Returns the actual number of bytes posted to a HTTP web server.
	 *
	 * This method returns the actual number of bytes posted to a HTTP web server.
	 * The returned size includes the size of boundaries, parameter names, and other elements.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pullActualPostedByte	The actual number of bytes posted to a HTTP web server
	 */
	[helpstring("method GetActualPostedByte")] HRESULT GetActualPostedByte([out,ref,retval] ULONGLONG * pullActualPostedByte);
	/*!
	 * \brief	Returns the number of bytes to send to a HTTP web server.
	 *
	 * This method returns the number of bytes to send to a HTTP web server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pullTotalByte		The number of bytes to send to a HTTP web server
	 */
	[helpstring("method GetTotalByte")] HRESULT GetTotalByte([out,ref,retval] ULONGLONG * pullTotalByte);
	/*!
	 * \brief	Returns the number of bytes posted to a HTTP web server.
	 *
	 * This method returns the number of bytes posted to a HTTP web server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pullPostedByte		The number of bytes posted to a HTTP web server
	 */
	[helpstring("method GetPostedByte")] HRESULT GetPostedByte([out,ref,retval] ULONGLONG * pullPostedByte);
	/*!
	 * \brief	Returns the total number of parameters.
	 *
	 * This method returns the total number of parameters to send to a HTTP web server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pdwTotalCount		The total number of parameters
	 */
	[helpstring("method GetTotalCount")] HRESULT GetTotalCount([out,ref,retval] DWORD * pdwTotalCount);
	/*!
	 * \brief	Returns the number of posted parameters.
	 *
	 * This method returns the number of posted parameters.
	 * The count includes the current parameter which is being sent to the server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pdwPostedCount		The number of posted parameters
	 */
	[helpstring("method GetPostedCount")] HRESULT GetPostedCount([out,ref,retval] DWORD * pdwPostedCount);
	/*!
	 * \brief	Returns the number of file parameters.
	 *
	 * This method returns the number of file parameters.
	 * The file parameter is a parameter which contains a file path to upload.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pdwFileCount			The number of file parameters
	 */
	[helpstring("method GetFileCount")] HRESULT GetFileCount([out,ref,retval] DWORD * pdwFileCount);
	/*!
	 * \brief	Returns the number of posted file parameters.
	 *
	 * This method returns the number of posted file parameters.
	 * The file parameter is a parameter which contains a file path to upload.
	 * If the current parameter is a file parameter, then the count includes the current parameter.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pdwPostedFileCount	The number of posted file parameters
	 */
	[helpstring("method GetPostedFileCount")] HRESULT GetPostedFileCount([out,ref,retval] DWORD * pdwPostedFileCount);
	/*!
	 * \brief	Returns the length of the current parameter name.
	 *
	 * This method returns the length of the current parameter name.
	 * The current parameter is a parameter which is being sent to the server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pdwLen		The length of the current parameter name
	 */
	[helpstring("method GetCurrParamLen")] HRESULT GetCurrParamLen([out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Returns the current parameter name.
	 *
	 * This method returns the current parameter name.
	 * The current parameter is a parameter which is being sent to the server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] szBuff		A buffer to save the requested string. The buffer can not be NULL.
	 * \param[in] cchBuff		A buffer size in character.
	 */
	[helpstring("method GetCurrParamIntoBuff")] HRESULT GetCurrParamIntoBuff([out,ref,string,size_is(cchBuff)] OLECHAR * szBuff, [in] DWORD cchBuff);
	/*!
	 * \brief	Returns the current parameter name.
	 *
	 * This method returns the current parameter name.
	 * The current parameter is a parameter which is being sent to the server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pbstrCurrParam	The current parameter name
	 */
	[helpstring("method GetCurrParam")] HRESULT GetCurrParam([out,ref,string,retval] BSTR * pbstrCurrParam);
	/*!
	 * \brief	Returns the length of the current file path.
	 *
	 * This method returns the length of the file path which is currently being uploaded.
	 * If the current parameter is not a file parameter or the system fails to allocate
	 * memory for the current file path, it will return 4 (::wcslen ("NULL")).
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pdwLen		The length of the current file path
	 */
	[helpstring("method GetCurrFileLen")] HRESULT GetCurrFileLen([out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Returns the current file path.
	 *
	 * This method returns the file path which is currently being uploaded.
	 * If the current parameter is not a file parameter or the system fails to allocate
	 * memory for the current file path, it will return "NULL".
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] szBuff		A buffer to save the current file path. The buffer can not be NULL.
	 * \param[in] cchBuff		A buffer size in character.
	 */
	[helpstring("method GetCurrFileIntoBuff")] HRESULT GetCurrFileIntoBuff([out,ref,string,size_is(cchBuff)] OLECHAR * szBuff, [in] DWORD cchBuff);
	/*!
	 * \brief	Returns the current file path.
	 *
	 * This method returns the file path which is currently being uploaded.
	 * If the current parameter is not a file parameter or the system fails to allocate
	 * memory for the current file path, it will return "NULL".
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pbstrCurrFile	The current file path
	 */
	[helpstring("method GetCurrFile")] HRESULT GetCurrFile([out,ref,string,retval] BSTR * pbstrCurrFile);
	/*!
	 * \brief	Returns the number of bytes of the current parameter.
	 *
	 * This method returns the number of bytes of the current parameter.
	 * The current parameter is a parameter which is being sent to the server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pullCurrParamTotalByte	The number of bytes of the current parameter
	 */
	[helpstring("method GetCurrParamTotalByte")] HRESULT GetCurrParamTotalByte([out,ref,retval] ULONGLONG * pullCurrParamTotalByte);
	/*!
	 * \brief	Returns the number of posted bytes of the current parameter.
	 *
	 * This method returns the number of posted bytes of the current parameter.
	 * The current parameter is a parameter which is being sent to the server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pullCurrParamPostedByte	The number of posted bytes of the current parameter
	 */
	[helpstring("method GetCurrParamPostedByte")] HRESULT GetCurrParamPostedByte([out,ref,retval] ULONGLONG * pullCurrParamPostedByte);
	/*!
	 * \brief	Returns the number of remained bytes of the current parameter.
	 *
	 * This method returns the number of remained bytes of the current parameter.
	 * The current parameter is a parameter which is being sent to the server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pullCurrParamRemainByte	The number of remained bytes of the current parameter
	 */
	[helpstring("method GetCurrParamRemainByte")] HRESULT GetCurrParamRemainByte([out,ref,retval] ULONGLONG * pullCurrParamRemainByte);
	/*!
	 * \brief	Returns whether the current parameter is a file parameter.
	 *
	 * This method returns TRUE if the current parameter is a file parameter, otherwise it will return FALSE.
	 * The current parameter is a parameter which is being sent to the server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pbCurrParamIsFile	TRUE if the current parameter is a file parameter, otherwise FALSE.
	 */
	[helpstring("method GetCurrParamIsFile")] HRESULT GetCurrParamIsFile([out,ref,retval] BOOL * pbCurrParamIsFile);
	/*!
	 * \brief	Returns whether the current parameter is completely posted.
	 *
	 * This method returns TRUE if the current parameter is completely posted, otherwise it will return FALSE.
	 * The current parameter is a parameter which is being sent to the server.
	 * If the IsActive is FALSE, you shouldn't call this method.
	 *
	 * \param[out] pbCurrParamIsComplete	TRUE if the current parameter is completely posted, otherwise FALSE.
	 */
	[helpstring("method GetCurrParamIsComplete")] HRESULT GetCurrParamIsComplete([out,ref,retval] BOOL * pbCurrParamIsComplete);
};

/*!
 * \brief	This interface analyzes a URL into its component parts.
 *
 * This interface analyzes a URL into its component parts and saves information about each parts.
 * It always try to analyze the URL to get the best result. It does not check whether the URL is valid. 
 * The URL itself is not saved.
 * Do not use early binding because this interface can be changed in a future release.
 *
 */
[
	object,
	local,
	dual,
	uuid(11A3FDFE-FD8D-483e-9242-37FE98F0998C),
	helpstring("IDispHttpUrlAnalyzer2 interface"),
	pointer_default(unique)
]
interface IDispHttpUrlAnalyzer2 : IDispatch{
	DECLARE_HTTPCLIENT_ERROR_DISPMETHOD()

	/*!
	 * \brief	Resets all internal states.
	 *
	 * This method clears all saved information and sets to 0.
	 */
	[id(20), helpstring("method Reset")] HRESULT Reset();
	/*!
	 * \brief	Analyzes a URL into its component parts.
	 *
	 * This method analyzes a URL and saves information about its component parts.
	 * It does not check whether the URL is valid. The URL itself is not saved.
	 *
	 * \param[in] bstrUrl	An URL to analyze.
	 */
	[id(21), helpstring("method Analyze")] HRESULT Analyze([in,ref,string] const BSTR bstrUrl);
	/*!
	 * \brief	Returns the start index of the protocol part in the URL.
	 *
	 * This method returns the start index of the protocol part in the URL.
	 *
	 * \param[out] pnProtocolIdx	The start index of the protocol part.
	 */
	[propget, id(22), helpstring("attribute ProtocolIdx")] HRESULT ProtocolIdx([out,ref,retval] DWORD * pnProtocolIdx);
	/*!
	 * \brief	Returns the length of the protocol part in the URL.
	 *
	 * This method returns the length of the protocol part in the URL.
	 *
	 * \param[out] pnProtocolLen	The length of the protocol part.
	 */
	[propget, id(23), helpstring("attribute ProtocolLen")] HRESULT ProtocolLen([out,ref,retval] DWORD * pnProtocolLen);
	/*!
	 * \brief	Returns the start index of the address part in the URL.
	 *
	 * This method returns the start index of the address part in the URL.
	 *
	 * \param[out] pnAddressIdx		The start index of the address part.
	 */
	[propget, id(24), helpstring("attribute AddressIdx")] HRESULT AddressIdx([out,ref,retval] DWORD * pnAddressIdx);
	/*!
	 * \brief	Returns the length of the address part in the URL.
	 *
	 * This method returns the length of the address part in the URL.
	 *
	 * \param[out] pnAddressLen		The length of the address part.
	 */
	[propget, id(25), helpstring("attribute AddressLen")] HRESULT AddressLen([out,ref,retval] DWORD * pnAddressLen);
	/*!
	 * \brief	Returns the start index of the port part in the URL.
	 *
	 * This method returns the start index of the port part in the URL.
	 *
	 * \param[out] pnPortIdx		The start index of the port part.
	 */
	[propget, id(26), helpstring("attribute PortIdx")] HRESULT PortIdx([out,ref,retval] DWORD * pnPortIdx);
	/*!
	 * \brief	Returns the length of the port part in the URL.
	 *
	 * This method returns the length of the port part in the URL.
	 *
	 * \param[out] pnPortLen		The length of the port part.
	 */
	[propget, id(27), helpstring("attribute PortLen")] HRESULT PortLen([out,ref,retval] DWORD * pnPortLen);
	/*!
	 * \brief	Returns the start index of the path part in the URL.
	 *
	 * This method returns the start index of the path part in the URL.
	 *
	 * \param[out] pnPathIdx		The start index of the path part.
	 */
	[propget, id(28), helpstring("attribute PathIdx")] HRESULT PathIdx([out,ref,retval] DWORD * pnPathIdx);
	/*!
	 * \brief	Returns the length of the path part in the URL.
	 *
	 * This method returns the length of the path part in the URL.
	 *
	 * \param[out] pnPathLen		The length of the path part.
	 */
	[propget, id(29), helpstring("attribute PathLen")] HRESULT PathLen([out,ref,retval] DWORD * pnPathLen);
	/*!
	 * \brief	Returns the start index of the search string part in the URL.
	 *
	 * This method returns the start index of the search string part in the URL.
	 *
	 * \param[out] pnSearchIdx		The start index of the search string part.
	 */
	[propget, id(30), helpstring("attribute SearchIdx")] HRESULT SearchIdx([out,ref,retval] DWORD * pnSearchIdx);
	/*!
	 * \brief	Returns the length of the search string part in the URL.
	 *
	 * This method returns the length of the search string part in the URL.
	 *
	 * \param[out] pnSearchLen		The length of the search string part.
	 */
	[propget, id(31), helpstring("attribute SearchLen")] HRESULT SearchLen([out,ref,retval] DWORD * pnSearchLen);
	/*!
	 * \brief	Returns the start index of the bookmark part in the URL.
	 *
	 * This method returns the start index of the bookmark part in the URL.
	 *
	 * \param[out] pnBookmarkIdx		The start index of the bookmark part.
	 */
	[propget, id(32), helpstring("attribute BookmarkIdx")] HRESULT BookmarkIdx([out,ref,retval] DWORD * pnBookmarkIdx);
	/*!
	 * \brief	Returns the length of the bookmark part in the URL.
	 *
	 * This method returns the length of the bookmark part in the URL.
	 *
	 * \param[out] pnSearchLen		The length of the bookmark part.
	 */
	[propget, id(33), helpstring("attribute BookmarkLen")] HRESULT BookmarkLen([out,ref,retval] DWORD * pnBookmarkLen);
};

/*!
 * \brief	This interface analyzes a URL into its component parts.
 *
 * This interface analyzes a URL into its component parts and saves information about each parts.
 * It always try to analyze the URL to get the best result. It does not check whether the URL is valid. 
 * The URL itself is not saved.
 *
 */
[
	object,
	local,
	uuid(EA5D172A-7998-406f-944E-20DF5E80B30C),
	helpstring("IHttpUrlAnalyzer2 interface"),
	pointer_default(unique)
]
interface IHttpUrlAnalyzer2 : IUnknown{
	DECLARE_HTTPCLIENT_ERROR_METHOD()

	/*!
	 * \brief	Resets all internal states.
	 *
	 * This method clears all saved information and sets to 0.
	 */
	[helpstring("method Reset")] HRESULT Reset();
	/*!
	 * \brief	Analyzes a URL into its component parts.
	 *
	 * This method analyzes a URL and saves information about its component parts.
	 * It does not check whether the URL is valid. The URL itself is not saved.
	 *
	 * \param[in] szUrl		An URL to analyze.
	 */
	[helpstring("method Analyze")] HRESULT Analyze([in,ref,string] LPCOLESTR szUrl);
	/*!
	 * \brief	Returns the start index of the protocol part in the URL.
	 *
	 * This method returns the start index of the protocol part in the URL.
	 *
	 * \param[out] pnProtocolIdx	The start index of the protocol part.
	 */
	[helpstring("method GetProtocolIdx")] HRESULT GetProtocolIdx([out,ref,retval] DWORD * pnProtocolIdx);
	/*!
	 * \brief	Returns the length of the protocol part in the URL.
	 *
	 * This method returns the length of the protocol part in the URL.
	 *
	 * \param[out] pnProtocolLen	The length of the protocol part.
	 */
	[helpstring("method GetProtocolLen")] HRESULT GetProtocolLen([out,ref,retval] DWORD * pnProtocolLen);
	/*!
	 * \brief	Returns the start index of the address part in the URL.
	 *
	 * This method returns the start index of the address part in the URL.
	 *
	 * \param[out] pnAddressIdx		The start index of the address part.
	 */
	[helpstring("method GetAddressIdx")] HRESULT GetAddressIdx([out,ref,retval] DWORD * pnAddressIdx);
	/*!
	 * \brief	Returns the length of the address part in the URL.
	 *
	 * This method returns the length of the address part in the URL.
	 *
	 * \param[out] pnAddressLen		The length of the address part.
	 */
	[helpstring("method GetAddressLen")] HRESULT GetAddressLen([out,ref,retval] DWORD * pnAddressLen);
	/*!
	 * \brief	Returns the start index of the port part in the URL.
	 *
	 * This method returns the start index of the port part in the URL.
	 *
	 * \param[out] pnPortIdx		The start index of the port part.
	 */
	[helpstring("method GetPortIdx")] HRESULT GetPortIdx([out,ref,retval] DWORD * pnPortIdx);
	/*!
	 * \brief	Returns the length of the port part in the URL.
	 *
	 * This method returns the length of the port part in the URL.
	 *
	 * \param[out] pnPortLen		The length of the port part.
	 */
	[helpstring("method GetPortLen")] HRESULT GetPortLen([out,ref,retval] DWORD * pnPortLen);
	/*!
	 * \brief	Returns the start index of the path part in the URL.
	 *
	 * This method returns the start index of the path part in the URL.
	 *
	 * \param[out] pnPathIdx		The start index of the path part.
	 */
	[helpstring("method GetPathIdx")] HRESULT GetPathIdx([out,ref,retval] DWORD * pnPathIdx);
	/*!
	 * \brief	Returns the length of the path part in the URL.
	 *
	 * This method returns the length of the path part in the URL.
	 *
	 * \param[out] pnPathLen		The length of the path part.
	 */
	[helpstring("method GetPathLen")] HRESULT GetPathLen([out,ref,retval] DWORD * pnPathLen);
	/*!
	 * \brief	Returns the start index of the search string part in the URL.
	 *
	 * This method returns the start index of the search string part in the URL.
	 *
	 * \param[out] pnSearchIdx		The start index of the search string part.
	 */
	[helpstring("method GetSearchIdx")] HRESULT GetSearchIdx([out,ref,retval] DWORD * pnSearchIdx);
	/*!
	 * \brief	Returns the length of the search string part in the URL.
	 *
	 * This method returns the length of the search string part in the URL.
	 *
	 * \param[out] pnSearchLen		The length of the search string part.
	 */
	[helpstring("method GetSearchLen")] HRESULT GetSearchLen([out,ref,retval] DWORD * pnSearchLen);
	/*!
	 * \brief	Returns the start index of the bookmark part in the URL.
	 *
	 * This method returns the start index of the bookmark part in the URL.
	 *
	 * \param[out] pnBookmarkIdx		The start index of the bookmark part.
	 */
	[helpstring("method GetBookmarkIdx")] HRESULT GetBookmarkIdx([out,ref,retval] DWORD * pnBookmarkIdx);
	/*!
	 * \brief	Returns the length of the bookmark part in the URL.
	 *
	 * This method returns the length of the bookmark part in the URL.
	 *
	 * \param[out] pnSearchLen		The length of the bookmark part.
	 */
	[helpstring("method GetBookmarkLen")] HRESULT GetBookmarkLen([out,ref,retval] DWORD * pnBookmarkLen);
};


/*!
 * \brief	An enum for attributes of the HTTP parameter.
 * 
 * This enumerator specifies several attributes for the HTTP parameter.
 * You can specify a combination of the following flag constants.
 *
 * \sa IHttpClient2::AddParam, IDispHttpClient2::AddParam
 * \sa IHttpClient2::SetParam, IDispHttpClient2::SetParam
 */
[
	v1_enum,
	helpstring("HttpClientParamAttr Enumerator")
]
enum HttpClientParamAttr
{
	HttpClientParamNormal			= 0x00000000					//!< The parameter is a normal parameter.
	, HttpClientParamFile			= 0x00000001					//!< The parameter is a file parameter.
																	//!  This means that the parameter's value contains the file path
																	//!  and the file specified by the file path is uploaded when the HTTP UPLOAD is started.
	, HttpClientParamEncodedName	= 0x00000002					//!< The parameter's name is a URL-Encoded string.
																	//!  This means that the parameter's name is not encoded using URL-encoding
																	//!  before sending to the web server when the HTTP GET or POST is started.
	, HttpClientParamEncodedValue	= 0x00000004					//!< The parameter's value is a URL-Encoded string.
																	//!  This means that the parameter's value is not encoded using URL-encoding
																	//!  before sending to the web server when the HTTP GET or POST is started.
	, HttpClientParamEncoded		= HttpClientParamEncodedName
									| HttpClientParamEncodedValue	//!< The parameter's name and value are URL-Encoded strings.
																	//!  This means that the parameter's name and value are not encoded using URL-encoding
																	//!  before sending to the web server when the HTTP GET or POST is started.
} ;


/*!
 * \brief	This interface helps you to interact with a HTTP web server.
 * 
 * This interface supports HTTP GET, POST and UPLOAD (multipart/form-data).
 * Do not use early binding because this interface can be changed in a future release.
 *
 * \sa IHttpResponse2, IDispHttpResponse2
 * \sa IHttpPostStat2, IDispHttpPostStat2
 */
[
	object,
	local,
	dual,
	uuid(D0CE0D3C-41FF-4331-8670-4AF5FC9A16EB),
	helpstring("IDispHttpClient2 interface"),
	pointer_default(unique)
]
interface IDispHttpClient2 : IDispatch{
	DECLARE_HTTPCLIENT_ERROR_DISPMETHOD()

	/*!
	 * \brief	Returns the current StrictFileCheck property.
	 *
	 * This method returns the current StrictFileCheck property.
	 * If the StrictFileCheck is TRUE, an exception will be thrown
	 * when it fails to open a file which is going to be uploaded.
	 * If FALSE, it does nothing. The default is FALSE.
	 *
	 * \param[out] pbStrict		StrictFileCheck property.
	 */
	[propget, id(20), helpstring("attribute StrictFileCheck")] HRESULT StrictFileCheck([out,ref,retval] BOOL * pbStrict);
	/*!
	 * \brief	Sets the StrictFileCheck property.
	 *
	 * This method sets the current StrictFileCheck property.
	 * If the StrictFileCheck is TRUE, an exception will be thrown
	 * when it fails to open a file which is going to be uploaded,
	 * otherwise, it does nothing. The default is FALSE.
	 *
	 * \param[in] bStrict		A boolean value which specifies StrictFileCheck.
	 */
	[propput, id(20), helpstring("attribute StrictFileCheck")] HRESULT StrictFileCheck([in] BOOL bStrict);
	/*!
	 * \brief	Returns the current UseUtf8 property.
	 *
	 * This method returns the current UseUtf8 property.
	 * If the UseUtf8 is TRUE, all request will be sent in UTF-8 encoding,
	 * otherwise, all request will be sent in ANSI encoding.
	 * If a web server uses UTF-8 encoding, you should set TRUE.
	 * The default is FALSE.
	 *
	 * \param[out] pbUseUtf8	UseUtf8 property.
	 */
	[propget, id(21), helpstring("attribute UseUtf8")] HRESULT UseUtf8([out,ref,retval] BOOL * pbUseUtf8);
	/*!
	 * \brief	Sets the UseUtf8 property.
	 *
	 * This method sets the current UseUtf8 property.
	 * If the UseUtf8 is TRUE, all request will be sent in UTF-8 encoding,
	 * otherwise, all request will be sent in ANSI encoding.
	 * If a web server uses UTF-8 encoding, you should set TRUE.
	 * It is not allowed to call this method if the BeginPost or BeginUpload method is not finished.
	 * The default is FALSE.
	 *
	 * \param[in] bUseUtf8		A boolean value which specifies UseUtf8.
	 */
	[propput, id(21), helpstring("attribute UseUtf8")] HRESULT UseUtf8([in] BOOL bUseUtf8);
	/*!
	 * \brief	Returns the current ANSI code page.
	 *
	 * This method returns the current ANSI code page which is used for all non-unicode strings.
	 * If a web server uses an ANSI character set, you should set an appropriate ANSI code page.
	 * For more infomation about the Code-Page Identifiers, see the MSDN documentation.
	 * The default is CP_ACP (which is the system's ANSI code page).
	 *
	 * \param[out] pnAnsiCodePage	The current ANSI code page.
	 *
	 * \sa	::WideCharToMultiByte, ::MultiByteToWideChar
	 */
	[propget, id(22), helpstring("attribute AnsiCodePage")] HRESULT AnsiCodePage([out,ref,retval] UINT * pnAnsiCodePage);
	/*!
	 * \brief	Sets the current ANSI code page.
	 *
	 * This method sets the current ANSI code page which is used for all non-unicode strings.
	 * If a web server uses an ANSI character set, you should set an appropriate ANSI code page.
	 * It is not allowed to call this method if the BeginPost or BeginUpload method is not finished.
	 * For more infomation about the Code-Page Identifiers, see the MSDN documentation.
	 * The default is CP_ACP (which is the system's ANSI code page).
	 *
	 * \param[in] nAnsiCodePage		An ANSI code page to set.
	 *
	 * \sa	::WideCharToMultiByte, ::MultiByteToWideChar
	 */
	[propput, id(22), helpstring("attribute AnsiCodePage")] HRESULT AnsiCodePage([in] UINT nAnsiCodePage);

	/*!
	 * \brief	Erases all HTTP headers.
	 *
	 * This method erases all HTTP headers which is sent to a web server.
	 *
	 * \param[out] pbCleared		FALSE if all header is aleady erased, otherwise TRUE.
	 */
	[id(26), helpstring("method ClearHeader")] HRESULT ClearHeader([out,ref,retval] BOOL * pbCleared);
	/*!
	 * \brief	Erases a HTTP header at the given index.
	 *
	 * This method erases a HTTP header at the given index specified by nIdx.
	 *
	 * \param[in] nIdx				A zero-based header index to remove.
	 * \param[out] pbRemoved		TRUE if the header is found and removed, otherwise FALSE.
	 */
	[id(27), helpstring("method RemoveHeaderAt")] HRESULT RemoveHeaderAt([in] DWORD nIdx, [out,ref,retval] BOOL * pbRemoved);
	/*!
	 * \brief	Erases a HTTP header at the specified position.
	 *
	 * This method erases a HTTP header of which name is bstrName.
	 * If the header has multiple values, you can specify a zero-based index for a specific value.
	 *
	 * \param[in] bstrName			A case-insensitive header name to remove. NULL is not allowed.
	 * \param[in] nIdx				A zero-based value index if the header has multiple values. The default is zero.
	 * \param[out] pbRemoved		TRUE if the header is found and removed, otherwise FALSE.
	 */
	[id(28), helpstring("method RemoveHeader")] HRESULT RemoveHeader([in,ref,string] const BSTR bstrName, [in,defaultvalue(0)] DWORD nIdx, [out,ref,retval] BOOL * pbRemoved);
	/*!
	 * \brief	Erases all HTTP headers of which name is bstrName.
	 *
	 * This method erases all HTTP headers of which name is bstrName.
	 *
	 * \param[in] bstrName			A case-insensitive header name to remove. NULL is not allowed.
	 * \param[out] pbRemoved		TRUE if the header is found and removed, otherwise FALSE.
	 */
	[id(29), helpstring("method RemoveAllHeader")] HRESULT RemoveAllHeader([in,ref,string] const BSTR bstrName, [out,ref,retval] BOOL * pbRemoved);
	/*!
	 * \brief	Adds a new HTTP header.
	 *
	 * This method adds a new HTTP header.
	 * The header's name and the header's value can not be NULL or an empty string.
	 *
	 * \param[in] bstrName			A case-insensitive header name. NULL or an empty string is not allowed.
	 * \param[in] bstrValue			A header value. NULL or an empty string is not allowed.
	 */
	[id(30), helpstring("method AddHeader")] HRESULT AddHeader([in,ref,string] const BSTR bstrName, [in,ref,string] const BSTR bstrValue);
	/*!
	 * \brief	Sets a HTTP header at the specified position.
	 *
	 * This method modifies the HTTP header value of which name is bstrName.
	 * If the header has multiple values, you can specify a zero-based index for a specific value.
	 * If the header is not found and the nIdx is zero, it will add a new header.
	 * The header's name and the header's value can not be NULL or an empty string.
	 *
	 * \param[in] bstrName			A case-insensitive header name. NULL or an empty string is not allowed.
	 * \param[in] bstrValue			A header value. NULL or an empty string is not allowed.
	 * \param[in] nIdx				A zero-based value index if the header has multiple values. The default is zero.
	 */
	[id(31), helpstring("method SetHeader")] HRESULT SetHeader([in,ref,string] const BSTR bstrName, [in,ref,string] const BSTR bstrValue, [in,defaultvalue(0)] DWORD nIdx);
	/*!
	 * \brief	Returns the length of a HTTP header name at the given index.
	 *
	 * This method returns the length of a HTTP header name at the given index specified by nIdx.
	 * If the index is out of range, it will return zero.
	 *
	 * \param[in] nIdx				A zero-based header index.
	 * \param[out] pdwLen			The length of a HTTP header name.
	 */
	[id(32), helpstring("method GetHeaderNameAtLen")] HRESULT GetHeaderNameAtLen([in] DWORD nIdx, [out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Returns a HTTP header name at the given index.
	 *
	 * This method returns a HTTP header name at the given index specified by nIdx.
	 * If the index is out of range, it will return NULL.
	 *
	 * \param[in] nIdx				A zero-based header index.
	 * \param[out] pbstrName		A header name.
	 */
	[id(33), helpstring("method GetHeaderNameAt")] HRESULT GetHeaderNameAt([in] DWORD nIdx, [out,ref,string,retval] BSTR * pbstrName);
	/*!
	 * \brief	Returns the length of a HTTP header at the given index.
	 *
	 * This method returns the length of a HTTP header at the given index specified by nIdx.
	 * If the index is out of range, it will return zero.
	 *
	 * \param[in] nIdx				A zero-based header index.
	 * \param[out] pdwLen			The length of a HTTP header.
	 */
	[id(34), helpstring("method GetHeaderAtLen")] HRESULT GetHeaderAtLen([in] DWORD nIdx, [out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Returns a HTTP header at the given index.
	 *
	 * This method returns a HTTP header at the given index specified by nIdx.
	 * If the index is out of range, it will return NULL.
	 *
	 * \param[in] nIdx				A zero-based header index.
	 * \param[out] pbstrHeader		A header.
	 */
	[id(35), helpstring("method GetHeaderAt")] HRESULT GetHeaderAt([in] DWORD nIdx, [out,ref,string,retval] BSTR * pbstrHeader);
	/*!
	 * \brief	Returns the length of a HTTP header at the specified position.
	 *
	 * This method returns the length of a HTTP header of which name is bstrName.
	 * If the header has multiple values, you can specify a zero-based index for a specific value.
	 * If the header is not found, it will return zero.
	 *
	 * \param[in] bstrName			A case-insensitive header name to find. NULL is not allowed.
	 * \param[in] nIdx				A zero-based value index if the header has multiple values. The default is zero.
	 * \param[out] pdwLen			The length of a header.
	 */
	[id(36), helpstring("method GetHeaderLen")] HRESULT GetHeaderLen([in,ref,string] const BSTR bstrName, [in,defaultvalue(0)] DWORD nIdx, [out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Returns a HTTP header at the specified position.
	 *
	 * This method returns a HTTP header of which name is bstrName.
	 * If the header has multiple values, you can specify a zero-based index for a specific value.
	 * If the header is not found, it will return NULL.
	 *
	 * \param[in] bstrName			A case-insensitive header name to find. NULL is not allowed.
	 * \param[in] nIdx				A zero-based value index if the header has multiple values. The default is zero.
	 * \param[out] pbstrHeader		A header.
	 */
	[id(37), helpstring("method GetHeader")] HRESULT GetHeader([in,ref,string] const BSTR bstrName, [in,defaultvalue(0)] DWORD nIdx, [out,ref,string,retval] BSTR * pbstrHeader);
	/*!
	 * \brief	Returns whether the specified HTTP header exists.
	 *
	 * This method returns whether the HTTP header of which name is bstrName exists.
	 * If the header has multiple values, you can specify a zero-based index for a specific value.
	 *
	 * \param[in] bstrName			A case-insensitive header name to find. NULL is not allowed.
	 * \param[in] nIdx				A zero-based value index if the header has multiple values. The default is zero.
	 * \param[out] pbExist			TRUE if the header is found, otherwise FALSE.
	 */
	[id(38), helpstring("method HeaderExists")] HRESULT HeaderExists([in,ref,string] const BSTR bstrName, [in,defaultvalue(0)] DWORD nIdx, [out,ref,retval] BOOL * pbExist);
	/*!
	 * \brief	Returns the number of HTTP headers of which name is bstrName.
	 *
	 * This method returns the number of HTTP headers of which name is bstrName.
	 *
	 * \param[in] bstrName			A case-insensitive header name to find.
	 * \param[out] pdwCount			The number of headers.
	 */
	[id(39), helpstring("method GetHeaderCount")] HRESULT GetHeaderCount([in,unique,string] const BSTR bstrName, [out,ref,retval] DWORD * pdwCount);
	/*!
	 * \brief	Returns the number of HTTP headers.
	 *
	 * This method returns the number of HTTP headers.
	 *
	 * \param[out] pdwCount			The number of headers.
	 */
	[id(40), helpstring("method GetAllHeaderCount")] HRESULT GetAllHeaderCount([out,ref,retval] DWORD * pdwCount);

	/*!
	 * \brief	Erases all HTTP parameters.
	 *
	 * This method erases all HTTP parameters.
	 * It is not allowed to call this method if the BeginPost or BeginUpload method is not finished.
	 *
	 * \param[out] pbCleared		FALSE if all parameter is aleady erased, otherwise TRUE.
	 */
	[id(41), helpstring("method ClearParam")] HRESULT ClearParam([out,ref,retval] BOOL * pbCleared);
	/*!
	 * \brief	Erases a HTTP parameter at the given index.
	 *
	 * This method erases a HTTP parameter at the given index specified by nIdx.
	 * It is not allowed to call this method if the BeginPost or BeginUpload method is not finished.
	 *
	 * \param[in] nIdx				A zero-based parameter index to remove.
	 * \param[out] pbRemoved		TRUE if the parameter is found and removed, otherwise FALSE.
	 */
	[id(42), helpstring("method RemoveParamAt")] HRESULT RemoveParamAt([in] DWORD nIdx, [out,ref,retval] BOOL * pbRemoved);
	/*!
	 * \brief	Erases a HTTP parameter at the specified position.
	 *
	 * This method erases a HTTP parameter of which name is bstrName.
	 * If the parameter has multiple values, you can specify a zero-based index for a specific value.
	 * It is not allowed to call this method if the BeginPost or BeginUpload method is not finished.
	 *
	 * \param[in] bstrName			A case-insensitive parameter name to remove. NULL is not allowed.
	 * \param[in] nIdx				A zero-based value index if the parameter has multiple values. The default is zero.
	 * \param[out] pbRemoved		TRUE if the parameter is found and removed, otherwise FALSE.
	 */
	[id(43), helpstring("method RemoveParam")] HRESULT RemoveParam([in,ref,string] const BSTR bstrName, [in,defaultvalue(0)] DWORD nIdx, [out,ref,retval] BOOL * pbRemoved);
	/*!
	 * \brief	Erases all HTTP parameters of which name is bstrName.
	 *
	 * This method erases all HTTP parameters of which name is bstrName.
	 * It is not allowed to call this method if the BeginPost or BeginUpload method is not finished.
	 *
	 * \param[in] bstrName			A case-insensitive parameter name to remove. NULL is not allowed.
	 * \param[out] pbRemoved		TRUE if the parameter is found and removed, otherwise FALSE.
	 */
	[id(44), helpstring("method RemoveAllParam")] HRESULT RemoveAllParam([in,ref,string] const BSTR bstrName, [out,ref,retval] BOOL * pbRemoved);
	/*!
	 * \brief	Adds a new HTTP parameter.
	 *
	 * This method adds a new HTTP parameter. The dwParamAttr specifies parameter attributes.
	 * For more information about parameter attributes, see the HttpClientParamAttr enumerator.
	 * It is not allowed to call this method if the BeginPost or BeginUpload method is not finished.
	 *
	 * \param[in] bstrName			A case-insensitive parameter name. NULL is not allowed.
	 * \param[in] bstrValue			A parameter value.
	 * \param[in] dwParamAttr		A parameter attribute. This is a bitwise Ored value of the HttpClientParamAttr enumerator.
	 *								The default is HttpClientParamNormal.
	 *
	 * \sa	HttpClientParamAttr
	 */
	[id(45), helpstring("method AddParam")] HRESULT AddParam([in,ref,string] const BSTR bstrName, [in,ptr,string] const BSTR bstrValue, [in,defaultvalue(HttpClientParamNormal)] DWORD dwParamAttr);
	/*!
	 * \brief	Sets a HTTP parameter at the specified position.
	 *
	 * This method modifies the HTTP parameter value of which name is bstrName.
	 * If the parameter has multiple values, you can specify a zero-based index for a specific value.
	 * If the parameter is not found and the nIdx is zero, it will add a new parameter.
	 * The dwParamAttr specifies parameter attributes.
	 * For more information about parameter attributes, see the HttpClientParamAttr enumerator.
	 * It is not allowed to call this method if the BeginPost or BeginUpload method is not finished.
	 *
	 * \param[in] bstrName			A case-insensitive parameter name. NULL is not allowed.
	 * \param[in] bstrValue			A parameter value.
	 * \param[in] dwParamAttr		A parameter attribute. This is a bitwise Ored value of the HttpClientParamAttr enumerator.
	 *								The default is HttpClientParamNormal.
	 * \param[in] nIdx				A zero-based value index if the parameter has multiple values. The default is zero.
	 *
	 * \sa	HttpClientParamAttr
	 */
	[id(46), helpstring("method SetParam")] HRESULT SetParam([in,ref,string] const BSTR bstrName, [in,ptr,string] const BSTR bstrValue, [in,defaultvalue(HttpClientParamNormal)] DWORD dwParamAttr, [in,defaultvalue(0)] DWORD nIdx);
	/*!
	 * \brief	Returns the length of a HTTP parameter name at the given index.
	 *
	 * This method returns the length of a HTTP parameter name at the given index specified by nIdx.
	 * If the index is out of range, it will return zero.
	 *
	 * \param[in] nIdx				A zero-based parameter index.
	 * \param[out] pdwLen			The length of a HTTP parameter name.
	 */
	[id(47), helpstring("method GetParamNameAtLen")] HRESULT GetParamNameAtLen([in] DWORD nIdx, [out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Returns a HTTP parameter name at the given index.
	 *
	 * This method returns a HTTP parameter name at the given index specified by nIdx.
	 * If the index is out of range, it will return NULL.
	 *
	 * \param[in] nIdx				A zero-based parameter index.
	 * \param[out] pbstrName		A parameter name.
	 */
	[id(48), helpstring("method GetParamNameAt")] HRESULT GetParamNameAt([in] DWORD nIdx, [out,ref,string,retval] BSTR * pbstrName);
	/*!
	 * \brief	Returns the length of a HTTP parameter at the given index.
	 *
	 * This method returns the length of a HTTP parameter at the given index specified by nIdx.
	 * If the index is out of range, it will return zero.
	 *
	 * \param[in] nIdx				A zero-based parameter index.
	 * \param[out] pdwLen			The length of a HTTP parameter.
	 */
	[id(49), helpstring("method GetParamAtLen")] HRESULT GetParamAtLen([in] DWORD nIdx, [out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Returns a HTTP parameter at the given index.
	 *
	 * This method returns a HTTP parameter at the given index specified by nIdx.
	 * If the index is out of range, it will return NULL.
	 *
	 * \param[in] nIdx				A zero-based parameter index.
	 * \param[out] pbstrParam		A parameter.
	 */
	[id(50), helpstring("method GetParamAt")] HRESULT GetParamAt([in] DWORD nIdx, [out,ref,string,retval] BSTR * pbstrParam);
	/*!
	 * \brief	Returns the length of a HTTP parameter at the specified position.
	 *
	 * This method returns the length of a HTTP parameter of which name is bstrName.
	 * If the parameter has multiple values, you can specify a zero-based index for a specific value.
	 * If the parameter is not found, it will return zero.
	 *
	 * \param[in] bstrName			A case-insensitive parameter name to find. NULL is not allowed.
	 * \param[in] nIdx				A zero-based value index if the parameter has multiple values. The default is zero.
	 * \param[out] pdwLen			The length of a parameter.
	 */
	[id(51), helpstring("method GetParamLen")] HRESULT GetParamLen([in,ref,string] const BSTR bstrName, [in,defaultvalue(0)] DWORD nIdx, [out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Returns a HTTP parameter at the specified position.
	 *
	 * This method returns a HTTP parameter of which name is bstrName.
	 * If the parameter has multiple values, you can specify a zero-based index for a specific value.
	 * If the parameter is not found, it will return NULL.
	 *
	 * \param[in] bstrName			A case-insensitive parameter name to find. NULL is not allowed.
	 * \param[in] nIdx				A zero-based value index if the parameter has multiple values. The default is zero.
	 * \param[out] pbstrParam		A parameter.
	 */
	[id(52), helpstring("method GetParam")] HRESULT GetParam([in,ref,string] const BSTR bstrName, [in,defaultvalue(0)] DWORD nIdx, [out,ref,string,retval] BSTR * pbstrParam);
	/*!
	 * \brief	Returns a HTTP parameter attribute at the given index.
	 *
	 * This method returns a HTTP parameter attribute at the given index specified by nIdx.
	 * If the index is out of range or the attribute is 0, it will return 0.
	 *
	 * \param[in] nIdx				A zero-based parameter index.
	 * \param[out] pdwAttr			A parameter attribute.
	 *
	 * \sa	HttpClientParamAttr
	 */
	[id(53), helpstring("method GetParamAttrAt")] HRESULT GetParamAttrAt([in] DWORD nIdx, [out,ref,retval] DWORD * pdwAttr);
	/*!
	 * \brief	Returns a HTTP parameter attribute at the specified position.
	 *
	 * This method returns an attribute of the HTTP parameter of which name is bstrName.
	 * If the parameter has multiple values, you can specify a zero-based index for a specific value.
	 * If the parameter is not found or the attribute is 0, it will return 0.
	 *
	 * \param[in] bstrName			A case-insensitive parameter name to find. NULL is not allowed.
	 * \param[in] nIdx				A zero-based value index if the parameter has multiple values. The default is zero.
	 * \param[out] pdwAttr			A parameter attribute.
	 *
	 * \sa	HttpClientParamAttr
	 */
	[id(54), helpstring("method GetParamAttr")] HRESULT GetParamAttr([in,ref,string] const BSTR bstrName, [in,defaultvalue(0)] DWORD nIdx, [out,ref,retval] DWORD * pdwAttr);
	/*!
	 * \brief	Returns whether the specified HTTP parameter exists.
	 *
	 * This method returns whether the HTTP parameter of which name is bstrName exists.
	 * If the parameter has multiple values, you can specify a zero-based index for a specific value.
	 *
	 * \param[in] bstrName			A case-insensitive parameter name to find. NULL is not allowed.
	 * \param[in] nIdx				A zero-based value index if the parameter has multiple values. The default is zero.
	 * \param[out] pbExist			TRUE if the parameter is found, otherwise FALSE.
	 */
	[id(55), helpstring("method ParamExists")] HRESULT ParamExists([in,ref,string] const BSTR bstrName, [in,defaultvalue(0)] DWORD nIdx, [out,ref,retval] BOOL * pbExist);
	/*!
	 * \brief	Returns the number of HTTP parameters of which name is bstrName.
	 *
	 * This method returns the number of HTTP parameters of which name is bstrName.
	 *
	 * \param[in] bstrName			A case-insensitive parameter name to find.
	 * \param[out] pdwCount			The number of parameters.
	 */
	[id(56), helpstring("method GetParamCount")] HRESULT GetParamCount([in,unique,string] const BSTR bstrName, [out,ref,retval] DWORD * pdwCount);
	/*!
	 * \brief	Returns the number of HTTP parameters.
	 *
	 * This method returns the number of HTTP parameters.
	 *
	 * \param[out] pdwCount			The number of parameters.
	 */
	[id(57), helpstring("method GetAllParamCount")] HRESULT GetAllParamCount([out,ref,retval] DWORD * pdwCount);

	/*!
	 * \brief	Sets parameters for the ::InternetOpen function
	 *
	 * This method sets parameters for the ::InternetOpen function which is called internally before sending a request.
	 * All parameters passed to this method is forwarded to the ::InternetOpen function.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[in] bstrUserAgent		A User Agent which corresponds to the lpszAgent parameter of the ::InternetOpen function.
	 * \param[in] dwAccessType		A type of access which corresponds to the dwAccessType parameter of the ::InternetOpen function.
	 * \param[in] bstrProxyName		A name of a proxy server which corresponds to the lpszProxyName parameter of the ::InternetOpen function.
	 * \param[in] bstrProxyBypass	A proxy bypass list which corresponds to the lpszProxyBypass parameter of the ::InternetOpen function.
	 * \param[in] dwFlags			Options which corresponds to the dwFlags parameter of the ::InternetOpen function.
	 *
	 * \sa	::InternetOpen
	 */
	[id(58), helpstring("method SetInternet")] HRESULT SetInternet([in,ptr,string] const BSTR bstrUserAgent, [in] DWORD dwAccessType, [in,ptr,string] const BSTR bstrProxyName, [in,ptr,string] const BSTR bstrProxyBypass, [in,defaultvalue(0)] DWORD dwFlags);
	/*!
	 * \brief	Returns the lpszAgent parameter for the ::InternetOpen function
	 *
	 * This property returns the lpszAgent parameter for the ::InternetOpen function which is called internally before sending a request.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[out] pbstrUserAgent	A User Agent which corresponds to the lpszAgent parameter of the ::InternetOpen function.
	 *
	 * \sa	::InternetOpen, SetInternet
	 */
	[propget, id(59), helpstring("attribute InternetUserAgent")] HRESULT InternetUserAgent([out,ref,string,retval] BSTR * pbstrUserAgent);
	/*!
	 * \brief	Sets the lpszAgent parameter for the ::InternetOpen function
	 *
	 * This property sets the lpszAgent parameter for the ::InternetOpen function which is called internally before sending a request.
	 * The value passed to this property is forwarded to the ::InternetOpen function.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[in] bstrUserAgent		A User Agent which corresponds to the lpszAgent parameter of the ::InternetOpen function.
	 *                              If this is NULL, The default is used.
	 *
	 * \sa	::InternetOpen, SetInternet
	 */
	[propput, id(59), helpstring("attribute InternetUserAgent")] HRESULT InternetUserAgent([in,ptr,string] const BSTR bstrUserAgent);
	/*!
	 * \brief	Returns the dwAccessType parameter for the ::InternetOpen function
	 *
	 * This property returns the dwAccessType parameter for the ::InternetOpen function which is called internally before sending a request.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[out] pdwAccessType	A type of access which corresponds to the dwAccessType parameter of the ::InternetOpen function.
	 *
	 * \sa	::InternetOpen, SetInternet
	 */
	[propget, id(60), helpstring("attribute InternetAccessType")] HRESULT InternetAccessType([out,ref,retval] DWORD * pdwAccessType);
	/*!
	 * \brief	Sets the dwAccessType parameter for the ::InternetOpen function
	 *
	 * This property sets the dwAccessType parameter for the ::InternetOpen function which is called internally before sending a request.
	 * The value passed to this property is forwarded to the ::InternetOpen function.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[in] dwAccessType		A type of access which corresponds to the dwAccessType parameter of the ::InternetOpen function.
	 *
	 * \sa	::InternetOpen, SetInternet
	 */
	[propput, id(60), helpstring("attribute InternetAccessType")] HRESULT InternetAccessType([in] DWORD dwAccessType);
	/*!
	 * \brief	Returns the lpszProxyName parameter for the ::InternetOpen function
	 *
	 * This property returns the lpszProxyName parameter for the ::InternetOpen function which is called internally before sending a request.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[out] pbstrProxyName	A proxy server name which corresponds to the lpszProxyName parameter of the ::InternetOpen function.
	 *
	 * \sa	::InternetOpen, SetInternet
	 */
	[propget, id(61), helpstring("attribute InternetProxyName")] HRESULT InternetProxyName([out,ref,retval,string] BSTR * pbstrProxyName);
	/*!
	 * \brief	Sets the lpszProxyName parameter for the ::InternetOpen function
	 *
	 * This property sets the lpszProxyName parameter for the ::InternetOpen function which is called internally before sending a request.
	 * The value passed to this property is forwarded to the ::InternetOpen function.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[in] bstrProxyName		A proxy server name which corresponds to the lpszProxyName parameter of the ::InternetOpen function.
	 *
	 * \sa	::InternetOpen, SetInternet
	 */
	[propput, id(61), helpstring("attribute InternetProxyName")] HRESULT InternetProxyName([in,ptr,string] const BSTR bstrProxyName);
	/*!
	 * \brief	Returns the lpszProxyBypass parameter for the ::InternetOpen function
	 *
	 * This property returns the lpszProxyBypass parameter for the ::InternetOpen function which is called internally before sending a request.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[out] pbstrProxyBypass	A proxy bypass list which corresponds to the lpszProxyBypass parameter of the ::InternetOpen function.
	 *
	 * \sa	::InternetOpen, SetInternet
	 */
	[propget, id(62), helpstring("attribute InternetProxyBypass")] HRESULT InternetProxyBypass([out,ref,retval,string] BSTR * pbstrProxyBypass);
	/*!
	 * \brief	Sets the lpszProxyBypass parameter for the ::InternetOpen function
	 *
	 * This property sets the lpszProxyBypass parameter for the ::InternetOpen function which is called internally before sending a request.
	 * The value passed to this property is forwarded to the ::InternetOpen function.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[in] bstrProxyBypass	A proxy bypass list which corresponds to the lpszProxyBypass parameter of the ::InternetOpen function.
	 *
	 * \sa	::InternetOpen, SetInternet
	 */
	[propput, id(62), helpstring("attribute InternetProxyBypass")] HRESULT InternetProxyBypass([in,ptr,string] const BSTR bstrProxyBypass);
	/*!
	 * \brief	Returns the dwFlags parameter for the ::InternetOpen function
	 *
	 * This property returns the dwFlags parameter for the ::InternetOpen function which is called internally before sending a request.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[out] pdwFlags			Options which corresponds to the dwFlags parameter of the ::InternetOpen function.
	 *
	 * \sa	::InternetOpen, SetInternet
	 */
	[propget, id(63), helpstring("attribute InternetFlags")] HRESULT InternetFlags([out,ref,retval] DWORD * pdwFlags);
	/*!
	 * \brief	Sets the dwFlags parameter for the ::InternetOpen function
	 *
	 * This property sets the dwFlags parameter for the ::InternetOpen function which is called internally before sending a request.
	 * The value passed to this property is forwarded to the ::InternetOpen function.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[in] dwFlags			Options which corresponds to the dwFlags parameter of the ::InternetOpen function.
	 *
	 * \sa	::InternetOpen, SetInternet
	 */
	[propput, id(63), helpstring("attribute InternetFlags")] HRESULT InternetFlags([in] DWORD dwFlags);

	/*!
	 * \brief	Returns the number of characters required to make a URL for a HTTP GET request
	 *
	 * This method returns the number of characters required to make a URL for a HTTP GET request.
	 * If you want to pass some parameters to a web server using HTTP GET, you have to append parameters to the requested URL.
	 * This method calculates the length of the URL for that situation.
	 * If there are no HTTP parameters, it returns the length of the bstrUrl. Otherwise it returns the calculated length.
	 * It does not check whether the bstrUrl is valid.
	 * If the bstrUrl is NULL, it returns the length of the appended parameters. (Not including the beginning '?' character)
	 * The returned value does not include the terminating NULL character.
	 *
	 * \param[in] bstrUrl			An URL which is used to calculate the length of the GET URL.
	 * \param[out] pdwLen			The number of characters required. (Not including the terminating NULL character)
	 */
	[id(64), helpstring("method MakeGetUrlLen")] HRESULT MakeGetUrlLen([in,unique,string] const BSTR bstrUrl, [out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Returns a URL for a HTTP GET request
	 *
	 * This method returns a URL for a HTTP GET request.
	 * If you want to pass some parameters to a web server using HTTP GET, you have to append parameters to the requested URL.
	 * This method creates a URL for that situation. If there are no HTTP parameters, it returns the bstrUrl.
	 * It does not check whether the bstrUrl is valid.
	 * If the bstrUrl is NULL, it returns only the appended parameters. (Not including the beginning '?' character)
	 * If the bstrUrl is NULL and the parameters do not exist, it returns an empty string.
	 *
	 * \param[in] bstrUrl			An URL which is used to make a URL for a HTTP GET request.
	 * \param[out] pbstrGetUrl		A generated URL.
	 */
	[id(65), helpstring("method MakeGetUrl")] HRESULT MakeGetUrl([in,unique,string] const BSTR bstrUrl, [out,ref,string,retval] BSTR * pbstrGetUrl);

	/*!
	 * \brief	Sets a proxy user name and a password
	 *
	 * This method sets a user name and a password which are used to access HTTP proxy server.
	 * If the bstrUserName parameter is NULL, the proxy account saved in an instance will be removed.
	 * You can handle proxy authorization using this method, but there are some restrictions.
	 * First, The HTTP POST is not safe if you are not an authorized user.
	 * (It is possible that the proxy server closes the connection before the request is finished).
	 * Second, Only the HTTP GET can be used to request proxy authorization.
	 * (This restriction is caused by the WinInet API).
	 *
	 * \param[in] bstrUserName		A proxy user name. Empty string is not allowed.
	 *								If it is NULL, account information saved in an instance will be removed.
	 * \param[in] bstrPassword		A proxy password. NULL and empty string are not allowed.
	 */
	[id(66), helpstring("method SetProxyAccount")] HRESULT SetProxyAccount([in,ptr,string] const BSTR bstrUserName, [in,ptr,string] const BSTR bstrPassword);
	/*!
	 * \brief	Returns a proxy user name which is used to access HTTP proxy server
	 *
	 * This method returns a proxy user name which is used to access HTTP proxy server.
	 * If the proxy user name is not set, an empty string is returned.
	 *
	 * \param[out] pbstrProxyUserName	A proxy user name.
	 *
	 * \sa	SetProxyAccount
	 */
	[propget, id(68), helpstring("method ProxyUserName")] HRESULT ProxyUserName([out,ref,string,retval] BSTR * pbstrProxyUserName);
	/*!
	 * \brief	Returns a proxy password which is used to access HTTP proxy server
	 *
	 * This method returns a proxy password which is used to access HTTP proxy server.
	 * If the proxy password is NULL, an empty string is returned.
	 *
	 * \param[out] pbstrProxyPassword	A proxy password.
	 *
	 * \sa	SetProxyAccount
	 */
	[propget, id(70), helpstring("method ProxyPassword")] HRESULT ProxyPassword([out,ref,string,retval] BSTR * pbstrProxyPassword);

	/*!
	 * \brief	Retrieves the resource specified by the bstrUrl using HTTP GET request
	 *
	 * This method retrieves the resource specified by the bstrUrl using HTTP GET request.
	 * If the bstrUrl does not start with "https://", "http" is used as the protocol.
	 *
	 * \param[in] bstrUrl				A HTTP URL.
	 * \param[in] bUseCache				Specifies whether to use cache.
	 *									The default is FALSE.
	 * \param[out] ppIDispHttpResponse2	A IDispHttpResponse2 interface.
	 *
	 * \sa	IDispHttpResponse2
	 */
	[id(71), helpstring("method RequestGet")] HRESULT RequestGet([in,string,ref] const BSTR bstrUrl, [in,defaultvalue(FALSE)] BOOL bUseCache, [out,ref,retval] IDispHttpResponse2 ** ppIDispHttpResponse2);
	/*!
	 * \brief	Retrieves the resource specified by the bstrUrl using HTTP GET request
	 *
	 * This method retrieves the resource specified by the bstrUrl using HTTP GET request.
	 * If the bstrUrl does not start with "https://", "http" is used as the protocol.
	 *
	 * \param[in] bstrUrl				A HTTP URL.
	 * \param[in] dwFlags				A flags which corresponds to the dwFlags parameter of the ::HttpOpenRequest function.
	 * \param[in] bstrReferer			A referer which corresponds to the lpszReferer parameter of the ::HttpOpenRequest function.
	 * \param[in] bstrUsrName			An user name which corresponds to the lpszUsername parameter of the ::InternetConnect function.
	 * \param[in] bstrUsrPwd			An user password which corresponds to the lpszPassword parameter of the ::InternetConnect function.
	 * \param[out] ppIDispHttpResponse2	A IDispHttpResponse2 interface.
	 *
	 * \sa	IDispHttpResponse2, ::InternetConnect, ::HttpOpenRequest
	 */
	[id(72), helpstring("method RequestGetEx")] HRESULT RequestGetEx([in,string,ref] const BSTR bstrUrl, [in] DWORD dwFlags, [in,string,ptr] const BSTR bstrReferer, [in,string,ptr] const BSTR bstrUsrName, [in,string,ptr] const BSTR bstrUsrPwd, [out,ref,retval] IDispHttpResponse2 ** ppIDispHttpResponse2);

	/*!
	 * \brief	Starts a new HTTP POST request
	 *
	 * This method starts a new HTTP POST request. If you call this method, you can retrieve progress
	 * information of the POST request by using the Query method.
	 * To finish the request, you have to call the Proceed method.
	 * If the bstrUrl does not start with "https://", "http" is used as the protocol.
	 *
	 * \param[in] bstrUrl				A HTTP URL.
	 * \param[in] bUseCache				Specifies whether to use cache.
	 *									The default is FALSE.
	 * \sa	Query, Proceed
	 */
	[id(73), helpstring("method BeginPost")] HRESULT BeginPost([in,string,ref] const BSTR bstrUrl, [in,defaultvalue(FALSE)] BOOL bUseCache);
	/*!
	 * \brief	Starts a new HTTP POST request
	 *
	 * This method starts a new HTTP POST request. If you call this method, you can retrieve progress
	 * information of the POST request by using the Query method.
	 * To finish the request, you have to call the Proceed method.
	 * If the bstrUrl does not start with "https://", "http" is used as the protocol.
	 *
	 * \param[in] bstrUrl				A HTTP URL.
	 * \param[in] dwFlags				A flags which corresponds to the dwFlags parameter of the ::HttpOpenRequest function.
	 * \param[in] bstrReferer			A referer which corresponds to the lpszReferer parameter of the ::HttpOpenRequest function.
	 * \param[in] bstrUsrName			An user name which corresponds to the lpszUsername parameter of the ::InternetConnect function.
	 * \param[in] bstrUsrPwd			An user password which corresponds to the lpszPassword parameter of the ::InternetConnect function.
	 *
	 * \sa	Query, Proceed, ::InternetConnect, ::HttpOpenRequest
	 */
	[id(74), helpstring("method BeginPostEx")] HRESULT BeginPostEx([in,string,ref] const BSTR bstrUrl, [in] DWORD dwFlags, [in,string,ptr] const BSTR bstrReferer, [in,string,ptr] const BSTR bstrUsrName, [in,string,ptr] const BSTR bstrUsrPwd);

	/*!
	 * \brief	Starts a new HTTP UPLOAD request
	 *
	 * This method starts a new HTTP UPLOAD request which is a HTTP POST request with another content-type (multipart/form-data).
	 * If you call this method, you can retrieve progress information of the POST request by using the Query method.
	 * To finish the request, you have to call the Proceed method.
	 * If the bstrUrl does not start with "https://", "http" is used as the protocol.
	 *
	 * \param[in] bstrUrl				A HTTP URL.
	 * \param[in] bUseCache				Specifies whether to use cache.
	 *									The default is FALSE.
	 * \sa	Query, Proceed
	 */
	[id(75), helpstring("method BeginUpload")] HRESULT BeginUpload([in,string,ref] const BSTR bstrUrl, [in,defaultvalue(FALSE)] BOOL bUseCache);
	/*!
	 * \brief	Starts a new HTTP UPLOAD request
	 *
	 * This method starts a new HTTP UPLOAD request which is a HTTP POST request with another content-type (multipart/form-data).
	 * If you call this method, you can retrieve progress information of the POST request by using the Query method.
	 * To finish the request, you have to call the Proceed method.
	 * If the bstrUrl does not start with "https://", "http" is used as the protocol.
	 *
	 * \param[in] bstrUrl				A HTTP URL.
	 * \param[in] dwFlags				A flags which corresponds to the dwFlags parameter of the ::HttpOpenRequest function.
	 * \param[in] bstrReferer			A referer which corresponds to the lpszReferer parameter of the ::HttpOpenRequest function.
	 * \param[in] bstrUsrName			An user name which corresponds to the lpszUsername parameter of the ::InternetConnect function.
	 * \param[in] bstrUsrPwd			An user password which corresponds to the lpszPassword parameter of the ::InternetConnect function.
	 *
	 * \sa	Query, Proceed, ::InternetConnect, ::HttpOpenRequest
	 */
	[id(76), helpstring("method BeginUploadEx")] HRESULT BeginUploadEx([in,string,ref] const BSTR bstrUrl, [in] DWORD dwFlags, [in,string,ptr] const BSTR bstrReferer, [in,string,ptr] const BSTR bstrUsrName, [in,string,ptr] const BSTR bstrUsrPwd);

	/*!
	 * \brief	Queries progress information of the current POST context
	 *
	 * This method queries progress information of the current POST context.
	 * If you call the BeginPost or the BeginUpload method which starts a new POST context,
	 * you can retrieve progress information by using this method.
	 * If an exception occurs, the current POST context is automatically canceled.
	 *
	 * \param[in] pIDispHttpPostStat2	A IDispHttpPostStat2 interface.
	 *
	 * \sa	IDispHttpPostStat2, BeginPost, BeginPostEx, BeginUpload, BeginUploadEx, Cancel, Proceed
	 */
	[id(77), helpstring("method Query")] HRESULT Query([in] IDispHttpPostStat2 * pIDispHttpPostStat2);
	/*!
	 * \brief	Cancels the current POST context
	 *
	 * This method cancels the current POST context which is started by
	 * the BeginPost or the BeginUpload method.
	 *
	 * \param[out] pbCanceled			Whether the operation canceled.
	 *
	 * \sa	BeginPost, BeginPostEx, BeginUpload, BeginUploadEx, Query, Proceed
	 */
	[id(78), helpstring("method Cancel")] HRESULT Cancel([out,ref,retval] BOOL * pbCanceled);
	/*!
	 * \brief	Proceeds with the current POST context
	 *
	 * This method proceeds with the current POST context which is started by
	 * the BeginPost or the BeginUpload method.
	 * It transmits data of the current POST context to the web server.
	 * If all bytes are transmitted, a IDispHttpResponse2 interface is returned.
	 * If an exception occurs, the current POST context is automatically canceled.
	 *
	 * \param[in] cbDesired				The number of bytes to be transmitted.
	 * \param[out] ppIDispHttpResponse2	A IDispHttpResponse2 interface if all bytes are transmitted,
	 *									otherwise NULL.
	 *
	 * \sa	IDispHttpResponse2, BeginPost, BeginPostEx, BeginUpload, BeginUploadEx, Query, Cancel
	 */
	[id(79), helpstring("method Proceed")] HRESULT Proceed([in] DWORD cbDesired, [out,ref,retval] IDispHttpResponse2 ** ppIDispHttpResponse2);

	/*!
	 * \brief	Retrieves the resource specified by the bstrUrl using HTTP POST request
	 *
	 * This method retrieves the resource specified by the bstrUrl using HTTP POST request.
	 * If the bstrUrl does not start with "https://", "http" is used as the protocol.
	 *
	 * \param[in] bstrUrl				A HTTP URL.
	 * \param[in] bUseCache				Specifies whether to use cache.
	 *									The default is FALSE.
	 * \param[out] ppIDispHttpResponse2	A IDispHttpResponse2 interface.
	 *
	 * \sa	IDispHttpResponse2
	 */
	[id(80), helpstring("method RequestPost")] HRESULT RequestPost([in,string,ref] const BSTR bstrUrl, [in,defaultvalue(FALSE)] BOOL bUseCache, [out,ref,retval] IDispHttpResponse2 ** ppIDispHttpResponse2);
	/*!
	 * \brief	Retrieves the resource specified by the bstrUrl using HTTP POST request
	 *
	 * This method retrieves the resource specified by the bstrUrl using HTTP POST request.
	 * If the bstrUrl does not start with "https://", "http" is used as the protocol.
	 *
	 * \param[in] bstrUrl				A HTTP URL.
	 * \param[in] dwFlags				A flags which corresponds to the dwFlags parameter of the ::HttpOpenRequest function.
	 * \param[in] bstrReferer			A referer which corresponds to the lpszReferer parameter of the ::HttpOpenRequest function.
	 * \param[in] bstrUsrName			An user name which corresponds to the lpszUsername parameter of the ::InternetConnect function.
	 * \param[in] bstrUsrPwd			An user password which corresponds to the lpszPassword parameter of the ::InternetConnect function.
	 * \param[out] ppIDispHttpResponse2	A IDispHttpResponse2 interface.
	 *
	 * \sa	IDispHttpResponse2, ::InternetConnect, ::HttpOpenRequest
	 */
	[id(81), helpstring("method RequestPostEx")] HRESULT RequestPostEx([in,string,ref] const BSTR bstrUrl, [in] DWORD dwFlags, [in,string,ptr] const BSTR bstrReferer, [in,string,ptr] const BSTR bstrUsrName, [in,string,ptr] const BSTR bstrUsrPwd, [out,ref,retval] IDispHttpResponse2 ** ppIDispHttpResponse2);

	/*!
	 * \brief	Retrieves the resource specified by the bstrUrl using HTTP UPLOAD request
	 *
	 * This method retrieves the resource specified by the bstrUrl using HTTP UPLOAD request
	 * which is a HTTP POST request with another content-type (multipart/form-data).
	 * If the bstrUrl does not start with "https://", "http" is used as the protocol.
	 *
	 * \param[in] bstrUrl				A HTTP URL.
	 * \param[in] bUseCache				Specifies whether to use cache.
	 *									The default is FALSE.
	 * \param[out] ppIDispHttpResponse2	A IDispHttpResponse2 interface.
	 *
	 * \sa	IDispHttpResponse2
	 */
	[id(82), helpstring("method RequestUpload")] HRESULT RequestUpload([in,string,ref] const BSTR bstrUrl, [in,defaultvalue(FALSE)] BOOL bUseCache, [out,ref,retval] IDispHttpResponse2 ** ppIDispHttpResponse2);
	/*!
	 * \brief	Retrieves the resource specified by the bstrUrl using HTTP UPLOAD request
	 *
	 * This method retrieves the resource specified by the bstrUrl using HTTP UPLOAD request
	 * which is a HTTP POST request with another content-type (multipart/form-data).
	 * If the bstrUrl does not start with "https://", "http" is used as the protocol.
	 *
	 * \param[in] bstrUrl				A HTTP URL.
	 * \param[in] dwFlags				A flags which corresponds to the dwFlags parameter of the ::HttpOpenRequest function.
	 * \param[in] bstrReferer			A referer which corresponds to the lpszReferer parameter of the ::HttpOpenRequest function.
	 * \param[in] bstrUsrName			An user name which corresponds to the lpszUsername parameter of the ::InternetConnect function.
	 * \param[in] bstrUsrPwd			An user password which corresponds to the lpszPassword parameter of the ::InternetConnect function.
	 * \param[out] ppIDispHttpResponse2	A IDispHttpResponse2 interface.
	 *
	 * \sa	IDispHttpResponse2, ::InternetConnect, ::HttpOpenRequest
	 */
	[id(83), helpstring("method RequestUploadEx")] HRESULT RequestUploadEx([in,string,ref] const BSTR bstrUrl, [in] DWORD dwFlags, [in,string,ptr] const BSTR bstrReferer, [in,string,ptr] const BSTR bstrUsrName, [in,string,ptr] const BSTR bstrUsrPwd, [out,ref,retval] IDispHttpResponse2 ** ppIDispHttpResponse2);
};

/*!
 * \brief	This interface helps you to interact with a HTTP web server.
 * 
 * This interface supports HTTP GET, POST and UPLOAD (multipart/form-data).
 *
 * \sa IHttpResponse2, IDispHttpResponse2
 * \sa IHttpPostStat2, IDispHttpPostStat2
 */
[
	object,
	uuid(11329E51-5CEE-48fa-BD02-8ECDD4F9C0B2),
	helpstring("IHttpClient2 interface"),
	pointer_default(unique)
]
interface IHttpClient2 : IUnknown{
	DECLARE_HTTPCLIENT_ERROR_METHOD()

	/*!
	 * \brief	Returns the current StrictFileCheck property.
	 *
	 * This method returns the current StrictFileCheck property.
	 * If the StrictFileCheck is TRUE, an exception will be thrown
	 * when it fails to open a file which is going to be uploaded.
	 * If FALSE, it does nothing. The default is FALSE.
	 *
	 * \param[out] pbStrict		StrictFileCheck property.
	 */
	[helpstring("method GetStrictFileCheck")] HRESULT GetStrictFileCheck([out,ref,retval] BOOL * pbStrict);
	/*!
	 * \brief	Sets the StrictFileCheck property.
	 *
	 * This method sets the current StrictFileCheck property.
	 * If the StrictFileCheck is TRUE, an exception will be thrown
	 * when it fails to open a file which is going to be uploaded.
	 * If FALSE, it does nothing. The default is FALSE.
	 *
	 * \param[in] bStrict		A boolean value which specifies StrictFileCheck.
	 */
	[helpstring("method SetStrictFileCheck")] HRESULT SetStrictFileCheck([in] BOOL bStrict);
	/*!
	 * \brief	Returns the current UseUtf8 property.
	 *
	 * This method returns the current UseUtf8 property.
	 * If the UseUtf8 is TRUE, all request will be sent in UTF-8 encoding,
	 * otherwise, all request will be sent in ANSI encoding.
	 * If a web server uses UTF-8 encoding, you should set TRUE.
	 * The default is FALSE.
	 *
	 * \param[out] pbUseUtf8	UseUtf8 property.
	 */
	[helpstring("method GetUseUtf8")] HRESULT GetUseUtf8([out,ref,retval] BOOL * pbUseUtf8);
	/*!
	 * \brief	Sets the UseUtf8 property.
	 *
	 * This method sets the current UseUtf8 property.
	 * If the UseUtf8 is TRUE, all request will be sent in UTF-8 encoding,
	 * otherwise, all request will be sent in ANSI encoding.
	 * If a web server uses UTF-8 encoding, you should set TRUE.
	 * It is not allowed to call this method if the BeginPost or BeginUpload method is not finished.
	 * The default is FALSE.
	 *
	 * \param[in] bUseUtf8		A boolean value which specifies UseUtf8.
	 */
	[helpstring("method SetUseUtf8")] HRESULT SetUseUtf8([in] BOOL bUseUtf8);
	/*!
	 * \brief	Returns the current ANSI code page.
	 *
	 * This method returns the current ANSI code page which is used for all non-unicode strings.
	 * If a web server uses an ANSI character set, you should set an appropriate ANSI code page.
	 * For more infomation about the Code-Page Identifiers, see the MSDN documentation.
	 * The default is CP_ACP (which is the system's ANSI code page).
	 *
	 * \param[out] pnAnsiCodePage	The current ANSI code page.
	 *
	 * \sa	::WideCharToMultiByte, ::MultiByteToWideChar
	 */
	[helpstring("method GetAnsiCodePage")] HRESULT GetAnsiCodePage([out,ref,retval] UINT * pnAnsiCodePage);
	/*!
	 * \brief	Sets the current ANSI code page.
	 *
	 * This method sets the current ANSI code page which is used for all non-unicode strings.
	 * If a web server uses an ANSI character set, you should set an appropriate ANSI code page.
	 * It is not allowed to call this method if the BeginPost or BeginUpload method is not finished.
	 * For more infomation about the Code-Page Identifiers, see the MSDN documentation.
	 * The default is CP_ACP (which is the system's ANSI code page).
	 *
	 * \param[in] nAnsiCodePage		An ANSI code page to set.
	 *
	 * \sa	::WideCharToMultiByte, ::MultiByteToWideChar
	 */
	[helpstring("method SetAnsiCodePage")] HRESULT SetAnsiCodePage([in] UINT nAnsiCodePage);

	/*!
	 * \brief	Erases all HTTP headers.
	 *
	 * This method erases all HTTP headers which is sent to a web server.
	 *
	 * \param[out] pbCleared		FALSE if all header is aleady erased, otherwise TRUE.
	 */
	[helpstring("method ClearHeader")] HRESULT ClearHeader([out,ref,retval] BOOL * pbCleared);
	/*!
	 * \brief	Erases a HTTP header at the given index.
	 *
	 * This method erases a HTTP header at the given index specified by nIdx.
	 *
	 * \param[in] nIdx				A zero-based header index to remove.
	 * \param[out] pbRemoved		TRUE if the header is found and removed, otherwise FALSE.
	 */
	[helpstring("method RemoveHeaderAt")] HRESULT RemoveHeaderAt([in] DWORD nIdx, [out,ref,retval] BOOL * pbRemoved);
	/*!
	 * \brief	Erases a HTTP header at the specified position.
	 *
	 * This method erases a HTTP header of which name is szName.
	 * If the header has multiple values, you can specify a zero-based index for a specific value.
	 *
	 * \param[in] szName			A case-insensitive header name to remove. NULL is not allowed.
	 * \param[in] nIdx				A zero-based value index if the header has multiple values. The default is zero.
	 * \param[out] pbRemoved		TRUE if the header is found and removed, otherwise FALSE.
	 */
	[helpstring("method RemoveHeader")] HRESULT RemoveHeader([in,ref,string] LPCOLESTR szName, [in,defaultvalue(0)] DWORD nIdx, [out,ref,retval] BOOL * pbRemoved);
	/*!
	 * \brief	Erases all HTTP headers of which name is szName.
	 *
	 * This method erases all HTTP headers of which name is szName.
	 *
	 * \param[in] szName			A case-insensitive header name to remove. NULL is not allowed.
	 * \param[out] pbRemoved		TRUE if the header is found and removed, otherwise FALSE.
	 */
	[helpstring("method RemoveAllHeader")] HRESULT RemoveAllHeader([in,ref,string] LPCOLESTR szName, [out,ref,retval] BOOL * pbRemoved);
	/*!
	 * \brief	Adds a new HTTP header.
	 *
	 * This method adds a new HTTP header.
	 * The header's name and the header's value can not be NULL or an empty string.
	 *
	 * \param[in] szName			A case-insensitive header name. NULL or an empty string is not allowed.
	 * \param[in] szValue			A header value. NULL or an empty string is not allowed.
	 */
	[helpstring("method AddHeader")] HRESULT AddHeader([in,ref,string] LPCOLESTR szName, [in,ref,string] LPCOLESTR szValue);
	/*!
	 * \brief	Sets a HTTP header at the specified position.
	 *
	 * This method modifies the HTTP header value of which name is szName.
	 * If the header has multiple values, you can specify a zero-based index for a specific value.
	 * If the header is not found and the nIdx is zero, it will add a new header.
	 * The header's name and the header's value can not be NULL or an empty string.
	 *
	 * \param[in] bstrName			A case-insensitive header name. NULL or an empty string is not allowed.
	 * \param[in] bstrValue			A header value. NULL or an empty string is not allowed.
	 * \param[in] nIdx				A zero-based value index if the header has multiple values. The default is zero.
	 */
	[helpstring("method SetHeader")] HRESULT SetHeader([in,ref,string] LPCOLESTR szName, [in,ref,string] LPCOLESTR szValue, [in,defaultvalue(0)] DWORD nIdx);
	/*!
	 * \brief	Returns the length of a HTTP header name at the given index.
	 *
	 * This method returns the length of a HTTP header name at the given index specified by nIdx.
	 * If the index is out of range, it will return zero.
	 *
	 * \param[in] nIdx				A zero-based header index.
	 * \param[out] pdwLen			The length of a HTTP header name.
	 */
	[helpstring("method GetHeaderNameAtLen")] HRESULT GetHeaderNameAtLen([in] DWORD nIdx, [out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Returns a HTTP header name at the given index.
	 *
	 * This method returns a HTTP header name at the given index specified by nIdx.
	 * If the index is out of range, it will copy an empty string.
	 *
	 * \param[out] szBuff			A buffer to save the header name. The buffer can not be NULL.
	 * \param[in] cchBuff			A buffer size in character.
	 * \param[in] nIdx				A zero-based header index.
	 */
	[helpstring("method GetHeaderNameAtIntoBuff")] HRESULT GetHeaderNameAtIntoBuff([out,ref,string,size_is(cchBuff)] OLECHAR * szBuff, [in] DWORD cchBuff, [in] DWORD nIdx);
	/*!
	 * \brief	Returns a HTTP header name at the given index.
	 *
	 * This method returns a HTTP header name at the given index specified by nIdx.
	 * If the index is out of range, it will return NULL.
	 *
	 * \param[in] nIdx				A zero-based header index.
	 * \param[out] pbstrName		A header name.
	 */
	[helpstring("method GetHeaderNameAt")] HRESULT GetHeaderNameAt([in] DWORD nIdx, [out,ref,string,retval] BSTR * pbstrName);
	/*!
	 * \brief	Returns the length of a HTTP header at the given index.
	 *
	 * This method returns the length of a HTTP header at the given index specified by nIdx.
	 * If the index is out of range, it will return zero.
	 *
	 * \param[in] nIdx				A zero-based header index.
	 * \param[out] pdwLen			The length of a HTTP header.
	 */
	[helpstring("method GetHeaderAtLen")] HRESULT GetHeaderAtLen([in] DWORD nIdx, [out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Returns a HTTP header at the given index.
	 *
	 * This method returns a HTTP header at the given index specified by nIdx.
	 * If the index is out of range, it will copy an empty string.
	 *
	 * \param[out] szBuff			A buffer to save the header. The buffer can not be NULL.
	 * \param[in] cchBuff			A buffer size in character.
	 * \param[in] nIdx				A zero-based header index.
	 */
	[helpstring("method GetHeaderAtIntoBuff")] HRESULT GetHeaderAtIntoBuff([out,ref,string,size_is(cchBuff)] OLECHAR * szBuff, [in] DWORD cchBuff, [in] DWORD nIdx);
	/*!
	 * \brief	Returns a HTTP header at the given index.
	 *
	 * This method returns a HTTP header at the given index specified by nIdx.
	 * If the index is out of range, it will return NULL.
	 *
	 * \param[in] nIdx				A zero-based header index.
	 * \param[out] pbstrHeader		A header.
	 */
	[helpstring("method GetHeaderAt")] HRESULT GetHeaderAt([in] DWORD nIdx, [out,ref,string,retval] BSTR * pbstrHeader);
	/*!
	 * \brief	Returns the length of a HTTP header at the specified position.
	 *
	 * This method returns the length of a HTTP header of which name is szName.
	 * If the header has multiple values, you can specify a zero-based index for a specific value.
	 * If the header is not found, it will return zero.
	 *
	 * \param[in] szName			A case-insensitive header name to find. NULL is not allowed.
	 * \param[in] nIdx				A zero-based value index if the header has multiple values. The default is zero.
	 * \param[out] pdwLen			The length of a HTTP header.
	 */
	[helpstring("method GetHeaderLen")] HRESULT GetHeaderLen([in,ref,string] LPCOLESTR szName, [in,defaultvalue(0)] DWORD nIdx, [out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Returns a HTTP header at the specified position.
	 *
	 * This method returns a HTTP header of which name is szName.
	 * If the header has multiple values, you can specify a zero-based index for a specific value.
	 * If the header is not found, it will return NULL.
	 *
	 * \param[out] szBuff			A buffer to save the header. The buffer can not be NULL.
	 * \param[in] cchBuff			A buffer size in character.
	 * \param[in] szName			A case-insensitive header name to find. NULL is not allowed.
	 * \param[in] nIdx				A zero-based value index if the header has multiple values. The default is zero.
	 */
	[helpstring("method GetHeaderIntoBuff")] HRESULT GetHeaderIntoBuff([out,ref,string,size_is(cchBuff)] OLECHAR * szBuff, [in] DWORD cchBuff, [in,ref,string] LPCOLESTR szName, [in,defaultvalue(0)] DWORD nIdx);
	/*!
	 * \brief	Returns a HTTP header at the specified position.
	 *
	 * This method returns a HTTP header of which name is szName.
	 * If the header has multiple values, you can specify a zero-based index for a specific value.
	 * If the header is not found, it will return NULL.
	 *
	 * \param[in] szName			A case-insensitive header name to find. NULL is not allowed.
	 * \param[in] nIdx				A zero-based value index if the header has multiple values. The default is zero.
	 * \param[out] pbstrHeader		A header.
	 */
	[helpstring("method GetHeader")] HRESULT GetHeader([in,ref,string] LPCOLESTR szName, [in,defaultvalue(0)] DWORD nIdx, [out,ref,string,retval] BSTR * pbstrHeader);
	/*!
	 * \brief	Returns whether the specified HTTP header exists.
	 *
	 * This method returns whether the HTTP header of which name is bstrName exists.
	 * If the header has multiple values, you can specify a zero-based index for a specific value.
	 *
	 * \param[in] bstrName			A case-insensitive header name to find. NULL is not allowed.
	 * \param[in] nIdx				A zero-based value index if the header has multiple values. The default is zero.
	 * \param[out] pbExist			TRUE if the header is found, otherwise FALSE.
	 */
	[helpstring("method HeaderExists")] HRESULT HeaderExists([in,ref,string] LPCOLESTR szName, [in,defaultvalue(0)] DWORD nIdx, [out,ref,retval] BOOL * pbExist);
	/*!
	 * \brief	Returns the number of HTTP headers of which name is szName.
	 *
	 * This method returns the number of HTTP headers of which name is szName.
	 * If the szName is NULL, it will return the number of all headers.
	 *
	 * \param[in] szName			A case-insensitive header name to find.
	 * \param[out] pdwCount			The number of headers.
	 */
	[helpstring("method GetHeaderCount")] HRESULT GetHeaderCount([in,unique,string] LPCOLESTR szName, [out,ref,retval] DWORD * pdwCount);
	/*!
	 * \brief	Returns the number of HTTP headers.
	 *
	 * This method returns the number of HTTP headers.
	 *
	 * \param[out] pdwCount			The number of headers.
	 */
	[helpstring("method GetAllHeaderCount")] HRESULT GetAllHeaderCount([out,ref,retval] DWORD * pdwCount);

	/*!
	 * \brief	Erases all HTTP parameters.
	 *
	 * This method erases all HTTP parameters.
	 * It is not allowed to call this method if the BeginPost or BeginUpload method is not finished.
	 *
	 * \param[out] pbCleared		FALSE if all parameter is aleady erased, otherwise TRUE.
	 */
	[helpstring("method ClearParam")] HRESULT ClearParam([out,ref,retval] BOOL * pbCleared);
	/*!
	 * \brief	Erases a HTTP parameter at the given index.
	 *
	 * This method erases a HTTP parameter at the given index specified by nIdx.
	 * It is not allowed to call this method if the BeginPost or BeginUpload method is not finished.
	 *
	 * \param[in] nIdx				A zero-based parameter index to remove.
	 * \param[out] pbRemoved		TRUE if the parameter is found and removed, otherwise FALSE.
	 */
	[helpstring("method RemoveParamAt")] HRESULT RemoveParamAt([in] DWORD nIdx, [out,ref,retval] BOOL * pbRemoved);
	/*!
	 * \brief	Erases a HTTP parameter at the specified position.
	 *
	 * This method erases a HTTP parameter of which name is szName.
	 * If the parameter has multiple values, you can specify a zero-based index for a specific value.
	 * It is not allowed to call this method if the BeginPost or BeginUpload method is not finished.
	 *
	 * \param[in] szName			A case-insensitive parameter name to remove. NULL is not allowed.
	 * \param[in] nIdx				A zero-based value index if the parameter has multiple values. The default is zero.
	 * \param[out] pbRemoved		TRUE if the parameter is found and removed, otherwise FALSE.
	 */
	[helpstring("method RemoveParam")] HRESULT RemoveParam([in,ref,string] LPCOLESTR szName, [in,defaultvalue(0)] DWORD nIdx, [out,ref,retval] BOOL * pbRemoved);
	/*!
	 * \brief	Erases all HTTP parameters of which name is szName.
	 *
	 * This method erases all HTTP parameters of which name is szName.
	 * It is not allowed to call this method if the BeginPost or BeginUpload method is not finished.
	 *
	 * \param[in] szName			A case-insensitive parameter name to remove. NULL is not allowed.
	 * \param[out] pbRemoved		TRUE if the parameter is found and removed, otherwise FALSE.
	 */
	[helpstring("method RemoveAllParam")] HRESULT RemoveAllParam([in,ref,string] LPCOLESTR szName, [out,ref,retval] BOOL * pbRemoved);
	/*!
	 * \brief	Adds a new HTTP parameter.
	 *
	 * This method adds a new HTTP parameter. The dwParamAttr specifies parameter attributes.
	 * For more information about parameter attributes, see the HttpClientParamAttr enumerator.
	 * It is not allowed to call this method if the BeginPost or BeginUpload method is not finished.
	 *
	 * \param[in] szName			A case-insensitive parameter name. NULL is not allowed.
	 * \param[in] szValue			A parameter value.
	 * \param[in] dwParamAttr		A parameter attribute. This is a bitwise Ored value of the HttpClientParamAttr enumerator.
	 *								The default is HttpClientParamNormal.
	 *
	 * \sa	HttpClientParamAttr
	 */
	[helpstring("method AddParam")] HRESULT AddParam([in,ref,string] LPCOLESTR szName, [in,ptr,string] LPCOLESTR szValue, [in,defaultvalue(HttpClientParamNormal)] DWORD dwParamAttr);
	/*!
	 * \brief	Sets a HTTP parameter at the specified position.
	 *
	 * This method modifies the HTTP parameter value of which name is szName.
	 * If the parameter has multiple values, you can specify a zero-based index for a specific value.
	 * If the parameter is not found and the nIdx is zero, it will add a new parameter.
	 * The dwParamAttr specifies parameter attributes.
	 * For more information about parameter attributes, see the HttpClientParamAttr enumerator.
	 * It is not allowed to call this method if the BeginPost or BeginUpload method is not finished.
	 *
	 * \param[in] szName			A case-insensitive parameter name. NULL is not allowed.
	 * \param[in] szValue			A parameter value.
	 * \param[in] dwParamAttr		A parameter attribute. This is a bitwise Ored value of the HttpClientParamAttr enumerator.
	 *								The default is HttpClientParamNormal.
	 * \param[in] nIdx				A zero-based value index if the parameter has multiple values. The default is zero.
	 *
	 * \sa	HttpClientParamAttr
	 */
	[helpstring("method SetParam")] HRESULT SetParam([in,ref,string] LPCOLESTR szName, [in,ptr,string] LPCOLESTR szValue, [in,defaultvalue(HttpClientParamNormal)] DWORD dwParamAttr, [in,defaultvalue(0)] DWORD nIdx);
	/*!
	 * \brief	Returns the length of a HTTP parameter name at the given index.
	 *
	 * This method returns the length of a HTTP parameter name at the given index specified by nIdx.
	 * If the index is out of range, it will return zero.
	 *
	 * \param[in] nIdx				A zero-based parameter index.
	 * \param[out] pdwLen			The length of a HTTP parameter name.
	 */
	[helpstring("method GetParamNameAtLen")] HRESULT GetParamNameAtLen([in] DWORD nIdx, [out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Returns a HTTP parameter name at the given index.
	 *
	 * This method returns a HTTP parameter name at the given index specified by nIdx.
	 * If the index is out of range, it will copy an empty string.
	 *
	 * \param[out] szBuff			A buffer to save the parameter name. The buffer can not be NULL.
	 * \param[in] cchBuff			A buffer size in character.
	 * \param[in] nIdx				A zero-based parameter index.
	 */
	[helpstring("method GetParamNameAtIntoBuff")] HRESULT GetParamNameAtIntoBuff([out,ref,string,size_is(cchBuff)] OLECHAR * szBuff, [in] DWORD cchBuff, [in] DWORD nIdx);
	/*!
	 * \brief	Returns a HTTP parameter name at the given index.
	 *
	 * This method returns a HTTP parameter name at the given index specified by nIdx.
	 * If the index is out of range, it will return NULL.
	 *
	 * \param[in] nIdx				A zero-based parameter index.
	 * \param[out] pbstrName		A parameter name.
	 */
	[helpstring("method GetParamNameAt")] HRESULT GetParamNameAt([in] DWORD nIdx, [out,ref,string,retval] BSTR * pbstrName);
	/*!
	 * \brief	Returns the length of a HTTP parameter at the given index.
	 *
	 * This method returns the length of a HTTP parameter at the given index specified by nIdx.
	 * If the index is out of range, it will return zero.
	 *
	 * \param[in] nIdx				A zero-based parameter index.
	 * \param[out] pdwLen			The length of a HTTP parameter.
	 */
	[helpstring("method GetParamAtLen")] HRESULT GetParamAtLen([in] DWORD nIdx, [out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Returns a HTTP parameter at the given index.
	 *
	 * This method returns a HTTP parameter at the given index specified by nIdx.
	 * If the index is out of range, it will copy an empty string.
	 *
	 * \param[out] szBuff			A buffer to save the parameter. The buffer can not be NULL.
	 * \param[in] cchBuff			A buffer size in character.
	 * \param[in] nIdx				A zero-based parameter index.
	 */
	[helpstring("method GetParamAtIntoBuff")] HRESULT GetParamAtIntoBuff([out,ref,string,size_is(cchBuff)] OLECHAR * szBuff, [in] DWORD cchBuff, [in] DWORD nIdx);
	/*!
	 * \brief	Returns a HTTP parameter at the given index.
	 *
	 * This method returns a HTTP parameter at the given index specified by nIdx.
	 * If the index is out of range, it will return NULL.
	 *
	 * \param[in] nIdx				A zero-based parameter index.
	 * \param[out] pbstrParam		A parameter.
	 */
	[helpstring("method GetParamAt")] HRESULT GetParamAt([in] DWORD nIdx, [out,ref,string,retval] BSTR * pbstrParam);
	/*!
	 * \brief	Returns the length of a HTTP parameter at the specified position.
	 *
	 * This method returns the length of a HTTP parameter of which name is szName.
	 * If the parameter has multiple values, you can specify a zero-based index for a specific value.
	 * If the parameter is not found, it will return zero.
	 *
	 * \param[in] szName			A case-insensitive parameter name to find. NULL is not allowed.
	 * \param[in] nIdx				A zero-based value index if the parameter has multiple values. The default is zero.
	 * \param[out] pdwLen			The length of a parameter.
	 */
	[helpstring("method GetParamLen")] HRESULT GetParamLen([in,ref,string] LPCOLESTR szName, [in,defaultvalue(0)] DWORD nIdx, [out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Returns a HTTP parameter at the specified position.
	 *
	 * This method returns a HTTP parameter of which name is szName.
	 * If the parameter has multiple values, you can specify a zero-based index for a specific value.
	 * If the parameter is not found, it will return NULL.
	 *
	 * \param[out] szBuff			A buffer to save the parameter. The buffer can not be NULL.
	 * \param[in] cchBuff			A buffer size in character.
	 * \param[in] szName			A case-insensitive parameter name to find. NULL is not allowed.
	 * \param[in] nIdx				A zero-based value index if the parameter has multiple values. The default is zero.
	 */
	[helpstring("method GetParamIntoBuff")] HRESULT GetParamIntoBuff([out,ref,string,size_is(cchBuff)] OLECHAR * szBuff, [in] DWORD cchBuff, [in,ref,string] LPCOLESTR szName, [in,defaultvalue(0)] DWORD nIdx);
	/*!
	 * \brief	Returns a HTTP parameter at the specified position.
	 *
	 * This method returns a HTTP parameter of which name is szName.
	 * If the parameter has multiple values, you can specify a zero-based index for a specific value.
	 * If the parameter is not found, it will return NULL.
	 *
	 * \param[in] szName			A case-insensitive parameter name to find. NULL is not allowed.
	 * \param[in] nIdx				A zero-based value index if the parameter has multiple values. The default is zero.
	 * \param[out] pbstrParam		A parameter.
	 */
	[helpstring("method GetParam")] HRESULT GetParam([in,ref,string] LPCOLESTR szName, [in,defaultvalue(0)] DWORD nIdx, [out,ref,string,retval] BSTR * pbstrParam);
	/*!
	 * \brief	Returns a HTTP parameter attribute at the given index.
	 *
	 * This method returns a HTTP parameter attribute at the given index specified by nIdx.
	 * If the index is out of range or the attribute is 0, it will return 0.
	 *
	 * \param[in] nIdx				A zero-based parameter index.
	 * \param[out] pdwAttr			A parameter attribute.
	 *
	 * \sa	HttpClientParamAttr
	 */
	[helpstring("method GetParamAttrAt")] HRESULT GetParamAttrAt([in] DWORD nIdx, [out,ref,retval] DWORD * pdwAttr);
	/*!
	 * \brief	Returns a HTTP parameter attribute at the specified position.
	 *
	 * This method returns an attribute of the HTTP parameter of which name is szName.
	 * If the parameter has multiple values, you can specify a zero-based index for a specific value.
	 * If the parameter is not found or the attribute is 0, it will return 0.
	 *
	 * \param[in] szName			A case-insensitive parameter name to find. NULL is not allowed.
	 * \param[in] nIdx				A zero-based value index if the parameter has multiple values. The default is zero.
	 * \param[out] pdwAttr			A parameter attribute.
	 *
	 * \sa	HttpClientParamAttr
	 */
	[helpstring("method GetParamAttr")] HRESULT GetParamAttr([in,ref,string] LPCOLESTR szName, [in,defaultvalue(0)] DWORD nIdx, [out,ref,retval] DWORD * pdwAttr);
	/*!
	 * \brief	Returns whether the specified HTTP parameter exists.
	 *
	 * This method returns whether the HTTP parameter of which name is szName exists.
	 * If the parameter has multiple values, you can specify a zero-based index for a specific value.
	 *
	 * \param[in] szName			A case-insensitive parameter name to find. NULL is not allowed.
	 * \param[in] nIdx				A zero-based value index if the parameter has multiple values. The default is zero.
	 * \param[out] pbExist			TRUE if the parameter is found, otherwise FALSE.
	 */
	[helpstring("method ParamExists")] HRESULT ParamExists([in,ref,string] LPCOLESTR szName, [in,defaultvalue(0)] DWORD nIdx, [out,ref,retval] BOOL * pbExist);
	/*!
	 * \brief	Returns the number of HTTP parameters of which name is szName.
	 *
	 * This method returns the number of HTTP parameters of which name is szName.
	 * If the szName is NULL, it will return the number of all parameters.
	 *
	 * \param[in] szName			A case-insensitive parameter name to find.
	 * \param[out] pdwCount			The number of parameters.
	 */
	[helpstring("method GetParamCount")] HRESULT GetParamCount([in,unique,string] LPCOLESTR szName, [out,ref,retval] DWORD * pdwCount);
	/*!
	 * \brief	Returns the number of HTTP parameters.
	 *
	 * This method returns the number of HTTP parameters.
	 *
	 * \param[out] pdwCount			The number of parameters.
	 */
	[helpstring("method GetAllParamCount")] HRESULT GetAllParamCount([out,ref,retval] DWORD * pdwCount);

	/*!
	 * \brief	Sets parameters for the ::InternetOpen function
	 *
	 * This method sets parameters for the ::InternetOpen function which is called internally before sending a request.
	 * All parameters passed to this method is forwarded to the ::InternetOpen function.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[in] szUserAgent		A User Agent which corresponds to the lpszAgent parameter of the ::InternetOpen function.
	 * \param[in] dwAccessType		A type of access which corresponds to the dwAccessType parameter of the ::InternetOpen function.
	 * \param[in] szProxyName		A name of a proxy server which corresponds to the lpszProxyName parameter of the ::InternetOpen function.
	 * \param[in] szProxyBypass		A proxy bypass list which corresponds to the lpszProxyBypass parameter of the ::InternetOpen function.
	 * \param[in] dwFlags			Options which corresponds to the dwFlags parameter of the ::InternetOpen function.
	 *
	 * \sa	::InternetOpen
	 */
	[helpstring("method SetInternet")] HRESULT SetInternet([in,ptr,string] LPCOLESTR szUserAgent, [in] DWORD dwAccessType, [in,ptr,string] LPCOLESTR szProxyName, [in,ptr,string] LPCOLESTR szProxyBypass, [in,defaultvalue(0)] DWORD dwFlags);
	/*!
	 * \brief	Returns the length of the lpszAgent parameter for the ::InternetOpen function
	 *
	 * This method returns the length of the lpszAgent parameter for the ::InternetOpen function which is called internally before sending a request.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[out] pdwLen			The length of a User Agent which corresponds to the lpszAgent parameter of the ::InternetOpen function.
	 *
	 * \sa	::InternetOpen, SetInternet
	 */
	[helpstring("method GetInternetUserAgentLen")] HRESULT GetInternetUserAgentLen([out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Returns the lpszAgent parameter for the ::InternetOpen function
	 *
	 * This method returns the lpszAgent parameter for the ::InternetOpen function which is called internally before sending a request.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[out] szBuff			A buffer to save a User Agent. The buffer can not be NULL.
	 * \param[in] cchBuff			A buffer size in character.
	 *
	 * \sa	::InternetOpen, SetInternet
	 */
	[helpstring("method GetInternetUserAgentIntoBuff")] HRESULT GetInternetUserAgentIntoBuff([out,ref,string,size_is(cchBuff)] OLECHAR * szBuff, [in] DWORD cchBuff);
	/*!
	 * \brief	Returns the lpszAgent parameter for the ::InternetOpen function
	 *
	 * This method returns the lpszAgent parameter for the ::InternetOpen function which is called internally before sending a request.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[out] pbstrUserAgent	A User Agent which corresponds to the lpszAgent parameter of the ::InternetOpen function.
	 *
	 * \sa	::InternetOpen, SetInternet
	 */
	[helpstring("method GetInternetUserAgent")] HRESULT GetInternetUserAgent([out,ref,string,retval] BSTR * pbstrUserAgent);
	/*!
	 * \brief	Sets the lpszAgent parameter for the ::InternetOpen function
	 *
	 * This method sets the lpszAgent parameter for the ::InternetOpen function which is called internally before sending a request.
	 * The parameter passed to this method is forwarded to the ::InternetOpen function.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[in] szUserAgent		A User Agent which corresponds to the lpszAgent parameter of the ::InternetOpen function.
	 *                              If this is NULL, The default is used.
	 *
	 * \sa	::InternetOpen, SetInternet
	 */
	[helpstring("method SetInternetUserAgent")] HRESULT SetInternetUserAgent([in,ptr,string] LPCOLESTR szUserAgent);
	/*!
	 * \brief	Returns the dwAccessType parameter for the ::InternetOpen function
	 *
	 * This method returns the dwAccessType parameter for the ::InternetOpen function which is called internally before sending a request.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[out] pdwAccessType	A type of access which corresponds to the dwAccessType parameter of the ::InternetOpen function.
	 *
	 * \sa	::InternetOpen, SetInternet
	 */
	[helpstring("method GetInternetAccessType")] HRESULT GetInternetAccessType([out,ref,retval] DWORD * pdwAccessType);
	/*!
	 * \brief	Sets the dwAccessType parameter for the ::InternetOpen function
	 *
	 * This method sets the dwAccessType parameter for the ::InternetOpen function which is called internally before sending a request.
	 * The parameter passed to this method is forwarded to the ::InternetOpen function.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[in] dwAccessType		A type of access which corresponds to the dwAccessType parameter of the ::InternetOpen function.
	 *
	 * \sa	::InternetOpen, SetInternet
	 */
	[helpstring("method SetInternetAccessType")] HRESULT SetInternetAccessType([in] DWORD dwAccessType);
	/*!
	 * \brief	Returns the length of the lpszProxyName parameter for the ::InternetOpen function
	 *
	 * This method returns the length of the lpszProxyName parameter for the ::InternetOpen function which is called internally before sending a request.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[out] pdwLen			The length of a proxy server name which corresponds to the lpszProxyName parameter of the ::InternetOpen function.
	 *
	 * \sa	::InternetOpen, SetInternet
	 */
	[helpstring("method GetInternetProxyNameLen")] HRESULT GetInternetProxyNameLen([out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Returns the lpszProxyName parameter for the ::InternetOpen function
	 *
	 * This property returns the lpszProxyName parameter for the ::InternetOpen function which is called internally before sending a request.
	 * If the proxy name is NULL, an empty string is returned.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[out] szBuff			A buffer to save a proxy server name. The buffer can not be NULL.
	 * \param[in] cchBuff			A buffer size in character.
	 *
	 * \sa	::InternetOpen, SetInternet
	 */
	[helpstring("method GetInternetProxyNameIntoBuff")] HRESULT GetInternetProxyNameIntoBuff([out,ref,string,size_is(cchBuff)] OLECHAR * szBuff, [in] DWORD cchBuff);
	/*!
	 * \brief	Returns the lpszProxyName parameter for the ::InternetOpen function
	 *
	 * This method returns the lpszProxyName parameter for the ::InternetOpen function which is called internally before sending a request.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[out] pbstrProxyName	A proxy server name which corresponds to the lpszProxyName parameter of the ::InternetOpen function.
	 *
	 * \sa	::InternetOpen, SetInternet
	 */
	[helpstring("method GetInternetProxyName")] HRESULT GetInternetProxyName([out,ref,string,retval] BSTR * pbstrProxyName);
	/*!
	 * \brief	Sets the lpszProxyName parameter for the ::InternetOpen function
	 *
	 * This method sets the lpszProxyName parameter for the ::InternetOpen function which is called internally before sending a request.
	 * The parameter passed to this method is forwarded to the ::InternetOpen function.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[in] szProxyName		A proxy server name which corresponds to the lpszProxyName parameter of the ::InternetOpen function.
	 *
	 * \sa	::InternetOpen, SetInternet
	 */
	[helpstring("method SetInternetProxyName")] HRESULT SetInternetProxyName([in,ptr,string] LPCOLESTR szProxyName);
	/*!
	 * \brief	Returns the length of the lpszProxyBypass parameter for the ::InternetOpen function
	 *
	 * This method returns the length of the lpszProxyBypass parameter for the ::InternetOpen function which is called internally before sending a request.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[out] pdwLen			The length of A proxy bypass list which corresponds to the lpszProxyBypass parameter of the ::InternetOpen function.
	 *
	 * \sa	::InternetOpen, SetInternet
	 */
	[helpstring("method GetInternetProxyBypassLen")] HRESULT GetInternetProxyBypassLen([out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Returns the lpszProxyBypass parameter for the ::InternetOpen function
	 *
	 * This method returns the lpszProxyBypass parameter for the ::InternetOpen function which is called internally before sending a request.
	 * If the proxy bypass is NULL, an empty string is returned.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[out] szBuff			A buffer to save a proxy bypass list. The buffer can not be NULL.
	 * \param[in] cchBuff			A buffer size in character.
	 *
	 * \sa	::InternetOpen, SetInternet
	 */
	[helpstring("method GetInternetProxyBypassIntoBuff")] HRESULT GetInternetProxyBypassIntoBuff([out,ref,string,size_is(cchBuff)] OLECHAR * szBuff, [in] DWORD cchBuff);
	/*!
	 * \brief	Returns the lpszProxyBypass parameter for the ::InternetOpen function
	 *
	 * This method returns the lpszProxyBypass parameter for the ::InternetOpen function which is called internally before sending a request.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[out] pbstrProxyBypass	A proxy bypass list which corresponds to the lpszProxyBypass parameter of the ::InternetOpen function.
	 *
	 * \sa	::InternetOpen, SetInternet
	 */
	[helpstring("method GetInternetProxyBypass")] HRESULT GetInternetProxyBypass([out,ref,string,retval] BSTR * pbstrProxyBypass);
	/*!
	 * \brief	Sets the lpszProxyBypass parameter for the ::InternetOpen function
	 *
	 * This method sets the lpszProxyBypass parameter for the ::InternetOpen function which is called internally before sending a request.
	 * The parameter passed to this method is forwarded to the ::InternetOpen function.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[in] szProxyBypass		A proxy bypass list which corresponds to the lpszProxyBypass parameter of the ::InternetOpen function.
	 *
	 * \sa	::InternetOpen, SetInternet
	 */
	[helpstring("method SetInternetProxyBypass")] HRESULT SetInternetProxyBypass([in,ptr,string] LPCOLESTR szProxyBypass);
	/*!
	 * \brief	Returns the dwFlags parameter for the ::InternetOpen function
	 *
	 * This method returns the dwFlags parameter for the ::InternetOpen function which is called internally before sending a request.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[out] pdwFlags			Options which corresponds to the dwFlags parameter of the ::InternetOpen function.
	 *
	 * \sa	::InternetOpen, SetInternet
	 */
	[helpstring("method GetInternetFlags")] HRESULT GetInternetFlags([out,ref,retval] DWORD * pdwFlags);
	/*!
	 * \brief	Sets the dwFlags parameter for the ::InternetOpen function
	 *
	 * This method sets the dwFlags parameter for the ::InternetOpen function which is called internally before sending a request.
	 * The parameter passed to this method is forwarded to the ::InternetOpen function.
	 * For more infomation about the ::InternetOpen function, see the MSDN documentation.
	 *
	 * \param[in] dwFlags			Options which corresponds to the dwFlags parameter of the ::InternetOpen function.
	 *
	 * \sa	::InternetOpen, SetInternet
	 */
	[helpstring("method SetInternetFlags")] HRESULT SetInternetFlags([in] DWORD dwFlags);

	/*!
	 * \brief	Returns the number of characters required to make a URL for a HTTP GET request
	 *
	 * This method returns the number of characters required to make a URL for a HTTP GET request.
	 * If you want to pass some parameters to a web server using HTTP GET, you have to append parameters to the requested URL.
	 * This method calculates the length of the URL for that situation.
	 * If there are no HTTP parameters, it returns the length of the szUrl. Otherwise it returns the calculated length.
	 * It does not check whether the szUrl is valid.
	 * If the szUrl is NULL, it returns the length of the appended parameters. (Not including the beginning '?' character)
	 * The returned value does not include the terminating NULL character.
	 *
	 * \param[in] szUrl				An URL which is used to calculate the length of the GET URL.
	 * \param[out] pdwLen			The number of characters required. (Not including the terminating NULL character)
	 */
	[helpstring("method MakeGetUrlLen")] HRESULT MakeGetUrlLen([in,unique,string] LPCOLESTR szUrl, [out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Returns a URL for a HTTP GET request
	 *
	 * This method returns a URL for a HTTP GET request.
	 * If you want to pass some parameters to a web server using HTTP GET, you have to append parameters to the requested URL.
	 * This method creates a URL for that situation. If there are no HTTP parameters, it returns the szUrl.
	 * It does not check whether the szUrl is valid.
	 * If the szUrl is NULL, it returns only the appended parameters. (Not including the beginning '?' character)
	 * If the bstrUrl is NULL and the parameters do not exist, it returns an empty string.
	 *
	 * \param[in] bstrUrl			An URL which is used to make a URL for a HTTP GET request.
	 * \param[out] pbstrGetUrl		A generated URL.
	 */
	[helpstring("method MakeGetUrlIntoBuff")] HRESULT MakeGetUrlIntoBuff([out,ref,string,size_is(cchBuff)] OLECHAR * szBuff, [in] DWORD cchBuff, [in,unique,string] LPCOLESTR szUrl);
	/*!
	 * \brief	Returns a URL for a HTTP GET request
	 *
	 * This method returns a URL for a HTTP GET request.
	 * If you want to pass some parameters to a web server using HTTP GET, you have to append parameters to the requested URL.
	 * This method creates a URL for that situation. If there are no HTTP parameters, it returns the szUrl.
	 * It does not check whether the szUrl is valid.
	 * If the szUrl is NULL, it returns only the appended parameters. (Not including the beginning '?' character)
	 * If the bstrUrl is NULL and the parameters do not exist, it returns an empty string.
	 *
	 * \param[in] szUrl				An URL which is used to make a URL for a HTTP GET request.
	 * \param[out] pbstrGetUrl		A generated URL.
	 */
	[helpstring("method MakeGetUrl")] HRESULT MakeGetUrl([in,unique,string] LPCOLESTR szUrl, [out,ref,string,retval] BSTR * pbstrGetUrl);

	/*!
	 * \brief	Sets a proxy user name and a password
	 *
	 * This method sets a user name and a password which are used to access HTTP proxy server.
	 * If the szUserName parameter is NULL, the proxy account saved in an instance will be removed.
	 * You can handle proxy authorization using this method, but there are some restrictions.
	 * First, The HTTP POST is not safe if you are not an authorized user.
	 * (It is possible that the proxy server closes the connection before the request is finished).
	 * Second, Only the HTTP GET can be used to request proxy authorization.
	 * (This restriction is caused by the WinInet API).
	 *
	 * \param[in] szUserName		A proxy user name. Empty string is not allowed.
	 *								If it is NULL, account information saved in an instance will be removed.
	 * \param[in] szPassword		A proxy password. NULL and empty string are not allowed.
	 */
	[helpstring("method SetProxyAccount")] HRESULT SetProxyAccount([in,ptr,string] LPCOLESTR szUserName, [in,ptr,string] LPCOLESTR szPassword);
	/*!
	 * \brief	Returns the length of a proxy user name which is used to access HTTP proxy server
	 *
	 * This method returns the length of a proxy user name which is used to access HTTP proxy server.
	 * If the proxy user name is not set, zero is returned.
	 *
	 * \param[out] pdwLen			The length of a proxy user name.
	 *
	 * \sa	SetProxyAccount
	 */
	[helpstring("method GetProxyUserNameLen")] HRESULT GetProxyUserNameLen([out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Returns ta proxy user name which is used to access HTTP proxy server
	 *
	 * This method returns a proxy user name which is used to access HTTP proxy server.
	 * If the proxy user name is not set, an empty string is returned.
	 *
	 * \param[out] szBuff			A buffer to save a proxy user name. The buffer can not be NULL.
	 * \param[in] cchBuff			A buffer size in character.
	 *
	 * \sa	SetProxyAccount
	 */
	[helpstring("method GetProxyUserNameIntoBuff")] HRESULT GetProxyUserNameIntoBuff([out,ref,string,size_is(cchBuff)] OLECHAR * szBuff, [in] DWORD cchBuff);
	/*!
	 * \brief	Returns a proxy user name which is used to access HTTP proxy server
	 *
	 * This method returns a proxy user name which is used to access HTTP proxy server.
	 * If the proxy user name is not set, an empty string is returned.
	 *
	 * \param[out] pbstrProxyUserName	A proxy user name.
	 *
	 * \sa	SetProxyAccount
	 */
	[helpstring("method GetProxyUserName")] HRESULT GetProxyUserName([out,ref,string,retval] BSTR * pbstrProxyUserName);
	/*!
	 * \brief	Returns the length of a proxy password which is used to access HTTP proxy server
	 *
	 * This method returns the length of a proxy password which is used to access HTTP proxy server.
	 * If the proxy password is NULL, zero is returned.
	 *
	 * \param[out] pdwLen			The length of a proxy password.
	 *
	 * \sa	SetProxyAccount
	 */
	[helpstring("method GetProxyPasswordLen")] HRESULT GetProxyPasswordLen([out,ref,retval] DWORD * pdwLen);
	/*!
	 * \brief	Returns a proxy password which is used to access HTTP proxy server
	 *
	 * This method returns a proxy password which is used to access HTTP proxy server.
	 * If the proxy password is NULL, an empty string is returned.
	 *
	 * \param[out] szBuff			A buffer to save a proxy password. The buffer can not be NULL.
	 * \param[in] cchBuff			A buffer size in character.
	 *
	 * \sa	SetProxyAccount
	 */
	[helpstring("method GetProxyPasswordIntoBuff")] HRESULT GetProxyPasswordIntoBuff([out,ref,string,size_is(cchBuff)] OLECHAR * szBuff, [in] DWORD cchBuff);
	/*!
	 * \brief	Returns a proxy password which is used to access HTTP proxy server
	 *
	 * This method returns a proxy password which is used to access HTTP proxy server.
	 * If the proxy password is NULL, an empty string is returned.
	 *
	 * \param[out] pbstrProxyPassword	A proxy password.
	 *
	 * \sa	SetProxyAccount
	 */
	[helpstring("method GetProxyPassword")] HRESULT GetProxyPassword([out,ref,string,retval] BSTR * pbstrProxyPassword);

	/*!
	 * \brief	Retrieves the resource specified by the szUrl using HTTP GET request
	 *
	 * This method retrieves the resource specified by the szUrl using HTTP GET request.
	 * If the szUrl does not start with "https://", "http" is used as the protocol.
	 *
	 * \param[in] szUrl					A HTTP URL.
	 * \param[in] bUseCache				Specifies whether to use cache.
	 *									The default is FALSE.
	 * \param[out] ppIHttpResponse2		A IHttpResponse2 interface.
	 *
	 * \sa	IHttpResponse2
	 */
	[helpstring("method RequestGet")] HRESULT RequestGet([in,string,ref] LPCOLESTR szUrl, [in,defaultvalue(FALSE)] BOOL bUseCache, [out,ref,retval] IHttpResponse2 ** ppIHttpResponse2);
	/*!
	 * \brief	Retrieves the resource specified by the szUrl using HTTP GET request
	 *
	 * This method retrieves the resource specified by the szUrl using HTTP GET request.
	 * If the szUrl does not start with "https://", "http" is used as the protocol.
	 *
	 * \param[in] szUrl					A HTTP URL.
	 * \param[in] dwFlags				A flags which corresponds to the dwFlags parameter of the ::HttpOpenRequest function.
	 * \param[in] szReferer				A referer which corresponds to the lpszReferer parameter of the ::HttpOpenRequest function.
	 * \param[in] szUsrName				An user name which corresponds to the lpszUsername parameter of the ::InternetConnect function.
	 * \param[in] szUsrPwd				An user password which corresponds to the lpszPassword parameter of the ::InternetConnect function.
	 * \param[out] ppIHttpResponse2		A IHttpResponse2 interface.
	 *
	 * \sa	IHttpResponse2, ::InternetConnect, ::HttpOpenRequest
	 */
	[helpstring("method RequestGetEx")] HRESULT RequestGetEx([in,string,ref] LPCOLESTR szUrl, [in] DWORD dwFlags, [in,string,ptr] LPCOLESTR szReferer, [in,string,ptr] LPCOLESTR szUsrName, [in,string,ptr] LPCOLESTR szUsrPwd, [out,ref,retval] IHttpResponse2 ** ppIHttpResponse2);

	/*!
	 * \brief	Starts a new HTTP POST request
	 *
	 * This method starts a new HTTP POST request. If you call this method, you can retrieve progress
	 * information of the POST request by using the Query method.
	 * To finish the request, you have to call the Proceed method.
	 * If the szUrl does not start with "https://", "http" is used as the protocol.
	 *
	 * \param[in] szUrl					A HTTP URL.
	 * \param[in] bUseCache				Specifies whether to use cache.
	 *									The default is FALSE.
	 * \sa	Query, Proceed
	 */
	[helpstring("method BeginPost")] HRESULT BeginPost([in,string,ref] LPCOLESTR szUrl, [in,defaultvalue(FALSE)] BOOL bUseCache);
	/*!
	 * \brief	Starts a new HTTP POST request
	 *
	 * This method starts a new HTTP POST request. If you call this method, you can retrieve progress
	 * information of the POST request by using the Query method.
	 * To finish the request, you have to call the Proceed method.
	 * If the bstrUrl does not start with "https://", "http" is used as the protocol.
	 *
	 * \param[in] szUrl					A HTTP URL.
	 * \param[in] dwFlags				A flags which corresponds to the dwFlags parameter of the ::HttpOpenRequest function.
	 * \param[in] szReferer				A referer which corresponds to the lpszReferer parameter of the ::HttpOpenRequest function.
	 * \param[in] szUsrName				An user name which corresponds to the lpszUsername parameter of the ::InternetConnect function.
	 * \param[in] szUsrPwd				An user password which corresponds to the lpszPassword parameter of the ::InternetConnect function.
	 *
	 * \sa	Query, Proceed, ::InternetConnect, ::HttpOpenRequest
	 */
	[helpstring("method BeginPostEx")] HRESULT BeginPostEx([in,string,ref] LPCOLESTR szUrl, [in] DWORD dwFlags, [in,string,ptr] LPCOLESTR szReferer, [in,string,ptr] LPCOLESTR szUsrName, [in,string,ptr] LPCOLESTR szUsrPwd);

	/*!
	 * \brief	Starts a new HTTP UPLOAD request
	 *
	 * This method starts a new HTTP UPLOAD request which is a HTTP POST request with another content-type (multipart/form-data).
	 * If you call this method, you can retrieve progress information of the POST request by using the Query method.
	 * To finish the request, you have to call the Proceed method.
	 * If the szUrl does not start with "https://", "http" is used as the protocol.
	 *
	 * \param[in] szUrl					A HTTP URL.
	 * \param[in] bUseCache				Specifies whether to use cache.
	 *									The default is FALSE.
	 * \sa	Query, Proceed
	 */
	[helpstring("method BeginUpload")] HRESULT BeginUpload([in,string,ref] LPCOLESTR szUrl, [in,defaultvalue(FALSE)] BOOL bUseCache);
	/*!
	 * \brief	Starts a new HTTP UPLOAD request
	 *
	 * This method starts a new HTTP UPLOAD request which is a HTTP POST request with another content-type (multipart/form-data).
	 * If you call this method, you can retrieve progress information of the POST request by using the Query method.
	 * To finish the request, you have to call the Proceed method.
	 * If the bstrUrl does not start with "https://", "http" is used as the protocol.
	 *
	 * \param[in] szUrl					A HTTP URL.
	 * \param[in] dwFlags				A flags which corresponds to the dwFlags parameter of the ::HttpOpenRequest function.
	 * \param[in] szReferer				A referer which corresponds to the lpszReferer parameter of the ::HttpOpenRequest function.
	 * \param[in] szUsrName				An user name which corresponds to the lpszUsername parameter of the ::InternetConnect function.
	 * \param[in] szUsrPwd				An user password which corresponds to the lpszPassword parameter of the ::InternetConnect function.
	 *
	 * \sa	Query, Proceed, ::InternetConnect, ::HttpOpenRequest
	 */
	[helpstring("method BeginUploadEx")] HRESULT BeginUploadEx([in,string,ref] LPCOLESTR szUrl, [in] DWORD dwFlags, [in,string,ptr] LPCOLESTR szReferer, [in,string,ptr] LPCOLESTR szUsrName, [in,string,ptr] LPCOLESTR szUsrPwd);

	/*!
	 * \brief	Queries progress information of the current POST context
	 *
	 * This method queries progress information of the current POST context.
	 * If you call the BeginPost or the BeginUpload method which starts a new POST context,
	 * you can retrieve progress information by using this method.
	 * If an exception occurs, the current POST context is automatically canceled.
	 *
	 * \param[in] pIHttpPostStat2		A IDispHttpPostStat2 interface.
	 *
	 * \sa	IHttpPostStat2, BeginPost, BeginPostEx, BeginUpload, BeginUploadEx, Cancel, Proceed
	 */
	[helpstring("method Query")] HRESULT Query([in] IHttpPostStat2 * pIHttpPostStat2);
	/*!
	 * \brief	Cancels the current POST context
	 *
	 * This method cancels the current POST context which is started by
	 * the BeginPost or the BeginUpload method.
	 *
	 * \param[out] pbCanceled			Whether the operation canceled.
	 *
	 * \sa	BeginPost, BeginPostEx, BeginUpload, BeginUploadEx, Query, Proceed
	 */
	[helpstring("method Cancel")] HRESULT Cancel([out,ref,retval] BOOL * pbCanceled);
	/*!
	 * \brief	Proceeds with the current POST context
	 *
	 * This method proceeds with the current POST context which is started by
	 * the BeginPost or the BeginUpload method.
	 * It transmits data of the current POST context to the web server.
	 * If all bytes are transmitted, a IHttpResponse2 interface is returned.
	 * If an exception occurs, the current POST context is automatically canceled.
	 *
	 * \param[in] cbDesired				The number of bytes to be transmitted.
	 * \param[out] ppIHttpResponse2		A IHttpResponse2 interface if all bytes are transmitted,
	 *									otherwise NULL.
	 *
	 * \sa	IHttpResponse2, BeginPost, BeginPostEx, BeginUpload, BeginUploadEx, Query, Cancel
	 */
	[helpstring("method Proceed")] HRESULT Proceed([in] DWORD cbDesired, [out,ref,retval] IHttpResponse2 ** ppIHttpResponse2);

	/*!
	 * \brief	Retrieves the resource specified by the szUrl using HTTP POST request
	 *
	 * This method retrieves the resource specified by the szUrl using HTTP POST request.
	 * If the szUrl does not start with "https://", "http" is used as the protocol.
	 *
	 * \param[in] szUrl					A HTTP URL.
	 * \param[in] bUseCache				Specifies whether to use cache.
	 *									The default is FALSE.
	 * \param[out] ppIHttpResponse2		A IHttpResponse2 interface.
	 *
	 * \sa	IHttpResponse2
	 */
	[helpstring("method RequestPost")] HRESULT RequestPost([in,string,ref] LPCOLESTR szUrl, [in,defaultvalue(FALSE)] BOOL bUseCache, [out,ref,retval] IHttpResponse2 ** ppIHttpResponse2);
	/*!
	 * \brief	Retrieves the resource specified by the szUrl using HTTP POST request
	 *
	 * This method retrieves the resource specified by the szUrl using HTTP POST request.
	 * If the szUrl does not start with "https://", "http" is used as the protocol.
	 *
	 * \param[in] szUrl					A HTTP URL.
	 * \param[in] dwFlags				A flags which corresponds to the dwFlags parameter of the ::HttpOpenRequest function.
	 * \param[in] szReferer				A referer which corresponds to the lpszReferer parameter of the ::HttpOpenRequest function.
	 * \param[in] szUsrName				An user name which corresponds to the lpszUsername parameter of the ::InternetConnect function.
	 * \param[in] szUsrPwd				An user password which corresponds to the lpszPassword parameter of the ::InternetConnect function.
	 * \param[out] ppIHttpResponse2		A IHttpResponse2 interface.
	 *
	 * \sa	IHttpResponse2, ::InternetConnect, ::HttpOpenRequest
	 */
	[helpstring("method RequestPostEx")] HRESULT RequestPostEx([in,string,ref] LPCOLESTR szUrl, [in] DWORD dwFlags, [in,string,ptr] LPCOLESTR szReferer, [in,string,ptr] LPCOLESTR szUsrName, [in,string,ptr] LPCOLESTR szUsrPwd, [out,ref,retval] IHttpResponse2 ** ppIHttpResponse2);

	/*!
	 * \brief	Retrieves the resource specified by the szUrl using HTTP UPLOAD request
	 *
	 * This method retrieves the resource specified by the szUrl using HTTP UPLOAD request
	 * which is a HTTP POST request with another content-type (multipart/form-data).
	 * If the szUrl does not start with "https://", "http" is used as the protocol.
	 *
	 * \param[in] szUrl					A HTTP URL.
	 * \param[in] bUseCache				Specifies whether to use cache.
	 *									The default is FALSE.
	 * \param[out] ppIHttpResponse2		A IHttpResponse2 interface.
	 *
	 * \sa	IHttpResponse2
	 */
	[helpstring("method RequestUpload")] HRESULT RequestUpload([in,string,ref] LPCOLESTR szUrl, [in,defaultvalue(FALSE)] BOOL bUseCache, [out,ref,retval] IHttpResponse2 ** ppIHttpResponse2);
	/*!
	 * \brief	Retrieves the resource specified by the szUrl using HTTP UPLOAD request
	 *
	 * This method retrieves the resource specified by the szUrl using HTTP UPLOAD request
	 * which is a HTTP POST request with another content-type (multipart/form-data).
	 * If the szUrl does not start with "https://", "http" is used as the protocol.
	 *
	 * \param[in] szUrl					A HTTP URL.
	 * \param[in] dwFlags				A flags which corresponds to the dwFlags parameter of the ::HttpOpenRequest function.
	 * \param[in] szReferer				A referer which corresponds to the lpszReferer parameter of the ::HttpOpenRequest function.
	 * \param[in] szUsrName				An user name which corresponds to the lpszUsername parameter of the ::InternetConnect function.
	 * \param[in] szUsrPwd				An user password which corresponds to the lpszPassword parameter of the ::InternetConnect function.
	 * \param[out] ppIHttpResponse2		A IHttpResponse2 interface.
	 *
	 * \sa	IHttpResponse2, ::InternetConnect, ::HttpOpenRequest
	 */
	[helpstring("method RequestUploadEx")] HRESULT RequestUploadEx([in,string,ref] LPCOLESTR szUrl, [in] DWORD dwFlags, [in,string,ptr] LPCOLESTR szReferer, [in,string,ptr] LPCOLESTR szUsrName, [in,string,ptr] LPCOLESTR szUsrPwd, [out,ref,retval] IHttpResponse2 ** ppIHttpResponse2);
};

[
	uuid(57C6BDB3-D4AD-4af2-98F9-CD7C2DE8DA9B),
	version(1.0),
	helpstring("RyeolHttpClientCom2 1.0 Type Library")
]
library RyeolHttpClientCom2Lib
{
	importlib("stdole2.tlb");

	enum HttpClientDefFlag ;
	enum HttpClientErrorCode ;
	enum HttpClientParamAttr ;

	[
		uuid(449B1A30-E342-4dee-A07C-2CBBFE5FCD6D),
		helpstring("HttpEncoder2 Class")
	]
	coclass HttpEncoder2
	{
		[default] interface IDispHttpEncoder2;
		interface IHttpEncoder2;
	};
	[
		uuid(9D81970E-FAE0-4549-BB14-6A67FF55165E),
		helpstring("HttpResponse2 Class")
	]
	coclass HttpResponse2
	{
		[default] interface IDispHttpResponse2;
		interface IHttpResponse2;
		interface IHttpResponseInternal2;
	};
	[
		uuid(DD31D7D6-9F7E-4817-8B52-78F9AA998763),
		helpstring("HttpPostStat2 Class")
	]
	coclass HttpPostStat2
	{
		[default] interface IDispHttpPostStat2;
		interface IHttpPostStat2;
		interface IHttpPostStatInternal2;
	};
	[
		uuid(D9AB6A58-62A9-4d35-959C-E4E2A5058DF3),
		helpstring("HttpUrlAnalyzer2 Class")
	]
	coclass HttpUrlAnalyzer2
	{
		[default] interface IDispHttpUrlAnalyzer2;
		interface IHttpUrlAnalyzer2;
	};
	[
		uuid(3819787F-A676-471d-A109-B74AA7A811EE),
		helpstring("HttpClient2 Class")
	]
	coclass HttpClient2
	{
		[default] interface IDispHttpClient2;
		interface IHttpClient2;
	};
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Software Developer
Korea (Republic of) Korea (Republic of)
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions