WinINetInternetGetCookieEx Method

Retrieves data stored in cookies associated with a specified URL.

Unlike InternetGetCookie(String, String, StringBuilder, UInt32) function, InternetGetCookieEx(String, String, StringBuilder, UInt32, Int32, IntPtr) can be used to restrict data retrieved to a single cookie name or, by policy, associated with untrusted sites or third-party cookies.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("WinINet.dll", CharSet = CharSet.Auto, BestFitMapping = false, 
	ThrowOnUnmappableChar = true, SetLastError = true)]
public static bool InternetGetCookieEx(
	string urlName,
	string cookieName,
	StringBuilder cookieData,
	ref uint refCookieSize,
	int flags,
	IntPtr reserved
)

Parameters

urlName  String
The URL for which cookies are to be retrieved.
cookieName  String
Not implemented.
cookieData  StringBuilder
A buffer that receives the cookie data. This parameter can be NULL.
refCookieSize  UInt32
A variable that specifies the size of the cookieData parameter buffer, in characters.

If the function succeeds, the buffer receives the amount of data copied to the cookieData buffer.

If cookieData is , this parameter receives a value that specifies the size of the buffer necessary to copy all the cookie data, expressed as a byte count.

flags  Int32
A flag that controls how the function retrieves cookie data.
reserved  IntPtr
Reserved for future use. Set to Zero.

Return Value

Boolean
Returns if successful, or otherwise.

Remarks

See Also