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
Namespace: DevCase.Win32.NativeMethodsAssembly: 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
)
<DllImportAttribute("WinINet.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function InternetSetCookieEx (
urlName As String,
cookieName As String,
cookieData As String,
flags As Integer,
reserved As IntPtr
) As Integer
Dim urlName As String
Dim cookieName As String
Dim cookieData As String
Dim flags As Integer
Dim reserved As IntPtr
Dim returnValue As Integer
returnValue = WinINet.InternetSetCookieEx(urlName,
cookieName, cookieData, flags, reserved)
public:
[DllImportAttribute(L"WinINet.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static int InternetSetCookieEx(
String^ urlName,
String^ cookieName,
String^ cookieData,
int flags,
IntPtr reserved
)
[<DllImportAttribute("WinINet.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member InternetSetCookieEx :
urlName : string *
cookieName : string *
cookieData : string *
flags : int *
reserved : IntPtr -> int
No code example is currently available or this language may not be supported.
- 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.
Int32
Returns a member of the InternetCookieState enumeration if successful, or zero (0) otherwise.