Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function retrieves the cookie for the specified URL.
Syntax
BOOL InternetGetCookie( LPCTSTR lpszUrl, LPCTSTR lpszCookieName, LPSTR lpCookieData, LPDWORD lpdwSize ); |
Parameters
- lpszUrl
-
[in] Address of a string that contains the URL to get cookies for.
- lpszCookieName
-
[in] Address of a string that contains the name of the cookie to get for the specified URL. This has not been implemented in this release.
- lpCookieData
-
[out] Address of the buffer that receives the cookie data. This value can be NULL.
- lpdwSize
-
[in, out] When the function is called, the address of an unsigned long integer variable that specifies the size of the lpszCookieDatabuffer. On return, if the function succeeds, the buffer receives the amount of data copied to the lpszCookieDatabuffer. If lpszCookieDatais NULL, this parameter receives a value that specifies the size of the buffer necessary to copy all the cookie data.
Return Value
Returns TRUE if successful, or FALSE otherwise.
Remarks
This function does not require a call to InternetOpen. To retrieve cookies, it checks for both session cookies and persistent cookies. Session cookies, which do not have an expiration date, are stored in memory and are available only to the process in which they were created. Persistent cookies, which have an expiration date, are stored in the location specified in the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Foldersregistry key. The default location is Windows\Profiles\Guest\Cookies. Because the rules for creating cookie files are internal to WinInet functions and are subject to change, your application should always call InternetGetCookie, rather than attempt to access cookie files directly.
Requirements
Header | wininet.h |
Library | wininet.lib |
Windows Embedded CE | Windows CE 2.12 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |
See Also
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@systemmanager.forsenergy.ru to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.