InternetEnumPerSiteCookieDecisionA function (wininet.h)
Retrieves the domains and cookie settings of websites for which site-specific cookie regulations are set.
Syntax
BOOL InternetEnumPerSiteCookieDecisionA(
[out] LPSTR pszSiteName,
[in, out] unsigned long *pcSiteNameSize,
[out] unsigned long *pdwDecision,
[in] unsigned long dwIndex
);
Parameters
[out] pszSiteName
An LPSTR that receives a string specifying a website domain.
[in, out] pcSiteNameSize
A pointer to an unsigned long that specifies the size of the pcSiteNameSize parameter provided to the InternetEnumPerSiteCookieDecision function when it is called. When InternetEnumPerSiteCookieDecision returns, pcSiteNameSize receives the actual length of the domain string returned in pszSiteName.
[out] pdwDecision
Pointer to an unsigned long that receives the InternetCookieState enumeration value corresponding to pszSiteName.
[in] dwIndex
An unsigned long that specifies the index of the website and corresponding cookie setting to retrieve.
Return value
TRUE if the function retrieved the cookie setting for the given domain; otherwise, false. FALSE.
Remarks
InternetEnumPerSiteCookieDecision should be initially called with dwIndex equal to 0. Incrementing the dwIndex parameter steps through the list of websites and cookie settings. The end of the list is reached when InternetEnumPerSiteCookieDecision returns FALSE and produces the wininet error, ERROR_NO_MORE_ITEMS.
Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.
Note
The wininet.h header defines InternetEnumPerSiteCookieDecision as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | wininet.h (include Wininet.h, Winineti.h) |
Library | Wininet.lib |
DLL | Wininet.dll |
See also
InternetClearAllPerSiteCookieDecisions
InternetGetPerSiteCookieDecision