Source code of Windows XP (NT5)
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.
 
 
 
 
 
 

80 lines
2.1 KiB

/*++
Copyright (c) 1998 Microsoft Corporation
Module Name:
persist.h
Abstract:
Author:
Adriaan Canter (adriaanc) 13-Jan-1998
Revision History:
13-Jan-1998 adriaanc
Created
01-Aug-1998 adriaanc
revised for digest.
--*/
#ifndef PERSIST_HXX
#define PERSIST_HXX
#include <pstore.h>
#define INTERNET_SETTINGS_KEY "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Internet Settings"
#define DISABLE_PASSWORD_CACHE_VALUE "DisablePasswordCaching"
#define CRED_PERSIST_NOT_AVAIL 0
#define CRED_PERSIST_AVAIL 1
#define CRED_PERSIST_UNKNOWN 2
#define MAX_FIELD_LENGTH 64
// PWL related defines.
// Password-cache-entry, this should be in PCACHE.
#define PCE_WWW_BASIC 0x13
#define MAX_AUTH_FIELD_LENGTH MAX_FIELD_LENGTH * 2
#define WNETDLL_MODULE "mpr.dll"
#define PSTORE_MODULE "pstorec.dll"
#define WNETGETCACHEDPASS "WNetGetCachedPassword"
#define WNETCACHEPASS "WNetCachePassword"
#define WNETREMOVECACHEDPASS "WNetRemoveCachedPassword"
// MPR.DLL exports used by top level API.
typedef DWORD (APIENTRY *PFWNETGETCACHEDPASSWORD) (LPSTR, WORD, LPSTR, LPWORD, BYTE);
typedef DWORD (APIENTRY *PFWNETCACHEPASSWORD) (LPSTR, WORD, LPSTR, WORD, BYTE, UINT);
typedef DWORD (APIENTRY *PFWNETREMOVECACHEDPASSWORD) (LPSTR, WORD, BYTE);
// ----------------Public function prototypes----------------------
// Determines availability of credential cache.
DWORD InetInitCredentialPersist();
// Persist credentials (username/password).
DWORD InetSetCachedCredentials (LPSTR szCtx,
LPSTR szRealm,
LPSTR szUser,
LPSTR szPass);
// Get persisted credentials (username/password).
DWORD InetGetCachedCredentials (LPSTR szCtx,
LPSTR szRealm,
LPSTR szUser,
LPSTR szPass);
// Remove persisted credentials (username/password).
DWORD InetRemoveCachedCredentials (LPSTR szCtx, LPSTR szRealm);
#endif //PERSIST_HXX