Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

42 lines
1.4 KiB

#include <wininetp.h>
/*
* Object for persisting cookie-decisions made by the user at prompt
* Current implementation uses the registry for storage.
*/
class CCookiePromptHistory {
public:
CCookiePromptHistory(const char *pchRegistryPath, bool fUseHKLM=false);
~CCookiePromptHistory();
BOOL lookupDecision(const char *pchHostName,
const char *pchPolicyID,
unsigned long *pdwDecision);
BOOL saveDecision(const char *pchHostName,
const char *pchPolicyID,
unsigned long dwDecision);
BOOL clearDecision(const char *pchHostName,
const char *pchPolicyID);
BOOL clearAll();
/* Enumerate decisions in the prompt history.
Only supports enumerating the default decision (eg policyID=empty) */
unsigned long enumerateDecisions(char *pchSiteName,
unsigned long *pcbName,
unsigned long *pdwDecision,
unsigned long dwIndex);
private:
HKEY OpenRootKey();
BOOL CloseRootKey(HKEY hkeyRoot);
HKEY lookupSiteKey(HKEY hkHistoryRoot, const char *pchName, bool fCreate=false);
BOOL _fUseHKLM;
char _szRootKeyName[MAX_PATH];
HKEY _hkHistoryRoot;
};