Export (0) Print
Expand All

IXMLHTTPRequest2::GetCookie method

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.

ppCookies [out]

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

Minimum supported client

Windows 8 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Version

MSXML 6.0 and later

Header

Msxml6.h

IDL

Msxml6.idl

See also

SetCookie Method
XHR_COOKIE Structure
XHR_COOKIE_FLAG
CoTaskMemFree Function
IXMLHTTPRequest2

 

 

Community Additions

ADD
Show:
© 2014 Microsoft