Düzenle

Aracılığıyla paylaş


IXMLHTTPRequest2::GetCookie method (msxml6.h)

Gets a cookie associated with the specified URL from the HTTP cookie jar.

Syntax

HRESULT GetCookie(
        const WCHAR *pwszUrl,
        const WCHAR *pwszName,
        DWORD       dwFlags,
        ULONG       *pcCookies,
  [out] XHR_COOKIE  **ppCookies
);

Parameters

pwszUrl

A null-terminated string that specifies the URL in the cookie.

pwszName

A null-terminated string that specifies the name in the cookie.

dwFlags

A set of bit flags that specifies how this method retrieves the cookies. This parameter can be a set values from the XHR_COOKIE_FLAG enumeration type defined in the Msxml6.h header file.

pcCookies

A count of cookies pointed to by the ppCookies if the call is successful.

[out] ppCookies

A pointer to the cookies associated with the specified pwszUrl and pwszName.

Return value

Returns S_OK on success; E_FAIL indicates an error.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps | UWP apps],MSXML 6.0 and later
Minimum supported server Windows Server 2012 [desktop apps | UWP apps]
Target Platform Windows
Header msxml6.h

See also

CoTaskMemFree Function

IXMLHTTPRequest2

SetCookie Method

XHR_COOKIE Structure

XHR_COOKIE_FLAG