WinINetInternetSetCookieEx Method

Creates a cookie with a specified name that is associated with a specified URL.

This function differs from the InternetSetCookie(String, String, String) function by being able to create 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 int InternetSetCookieEx(
	string urlName,
	string cookieName,
	string cookieData,
	int flags,
	IntPtr reserved
)

Parameters

urlName  String
The URL for which the cookie should be set.
cookieName  String
The name to be associated with the cookie data. If this parameter is , no name is associated with the cookie.
cookieData  String
Actual data to be associated with the URL.
flags  Int32
Flags that control how the function retrieves cookie data:.
reserved  IntPtr
Zero, or contains a pointer to a Platform-for-Privacy-Protection (P3P) header to be associated with the cookie.

Return Value

Int32
Returns a member of the InternetCookieState enumeration if successful, or zero (0) otherwise.

Remarks

See Also