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.
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 bool InternetGetCookieEx(
string urlName,
string cookieName,
StringBuilder cookieData,
ref uint refCookieSize,
int flags,
IntPtr reserved
)
<DllImportAttribute("WinINet.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function InternetGetCookieEx (
urlName As String,
cookieName As String,
cookieData As StringBuilder,
ByRef refCookieSize As UInteger,
flags As Integer,
reserved As IntPtr
) As Boolean
Dim urlName As String
Dim cookieName As String
Dim cookieData As StringBuilder
Dim refCookieSize As UInteger
Dim flags As Integer
Dim reserved As IntPtr
Dim returnValue As Boolean
returnValue = WinINet.InternetGetCookieEx(urlName,
cookieName, cookieData, refCookieSize,
flags, reserved)
public:
[DllImportAttribute(L"WinINet.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static bool InternetGetCookieEx(
[InAttribute] String^ urlName,
[InAttribute] String^ cookieName,
StringBuilder^ cookieData,
unsigned int% refCookieSize,
int flags,
IntPtr reserved
)
[<DllImportAttribute("WinINet.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member InternetGetCookieEx :
urlName : string *
cookieName : string *
cookieData : StringBuilder *
refCookieSize : uint32 byref *
flags : int *
reserved : IntPtr -> bool
No code example is currently available or this language may not be supported.
- 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.
Boolean
Returns
if successful, or
otherwise.