IEGetProtectedModeCookie function
Calls the standard InternetGetCookieEx from a higher-integrity user context. Retrieves the cookie data from the protected mode cookie store.
Syntax
HRESULT IEGetProtectedModeCookie( _In_ LPCWSTR lpszURL, _In_ LPCWSTR lpszCookieName, _Inout_ LPWSTR pszCookieData, _Inout_ DWORD *pcchCookieData, _In_ DWORD dwFlags );
Parameters
- lpszURL [in]
-
A pointer to a null-terminated string that contains the URL associated with the cookie to be retrieved.
- lpszCookieName [in]
-
A pointer to a null-terminated string that contains the name of the cookie to retrieve. This name is case-sensitive.
- pszCookieData [in, out]
-
A pointer to a buffer to receive the cookie data.
- pcchCookieData [in, out]
-
A pointer to a DWORD variable.
- dwFlags [in]
-
A flag that controls how the function retrieves cookie data. This parameter can be one of the following values.
Return value
If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Examples
The following example shows how to use the IEGetProtectedModeCookie method to read a cookie from the protected mode cookie store.
TCHAR szActualCookie [MAX_PATH];
HRESULT hr = E_FAIL;
DWORD dwSize = MAX_PATH;
if (m_pszURL)
{
hr = IEGetProtectedModeCookie(L"http://contoso.com", L"CookieName",
szActualCookie, &dwSize, NULL);
if (hr != S_OK)
{
hr = HRESULT_FROM_WIN32(GetLastError());
}
}
return hr;
Requirements
|
Minimum supported client |
Windows XP with SP2 |
|---|---|
|
Minimum supported server |
Windows Server 2003 |
|
Product |
Internet Explorer 8 |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
- Reference
- IESetProtectedModeCookie
- Conceptual
- Protected Mode Broker Functions
- Other Resources
- InternetGetCookieEx
- Understanding and Working in Protected Mode Internet Explorer