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.

78 lines
2.1 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. persist.h
  5. Abstract:
  6. Author:
  7. Adriaan Canter (adriaanc) 13-Jan-1998
  8. Revision History:
  9. 13-Jan-1998 adriaanc
  10. Created
  11. --*/
  12. #ifndef PERSIST_H
  13. #define PERSIST_H
  14. #include <pstore.h>
  15. #define DISABLE_PASSWORD_CACHE_VALUE "DisablePasswordCaching"
  16. #define DISABLE_PASSWORD_CACHE 1
  17. #define CRED_PERSIST_NOT_AVAIL 0
  18. #define CRED_PERSIST_AVAIL 1
  19. #define CRED_PERSIST_UNKNOWN 2
  20. // PWL related defines.
  21. // Password-cache-entry, this should be in PCACHE.
  22. #define PCE_WWW_BASIC 0x13
  23. #define MAX_AUTH_FIELD_LENGTH MAX_FIELD_LENGTH * 2
  24. #define WNETDLL_MODULE "mpr.dll"
  25. #define PSTORE_MODULE "pstorec.dll"
  26. #define WNETGETCACHEDPASS "WNetGetCachedPassword"
  27. #define WNETCACHEPASS "WNetCachePassword"
  28. #define WNETREMOVECACHEDPASS "WNetRemoveCachedPassword"
  29. // MPR.DLL exports used by top level API.
  30. typedef DWORD (APIENTRY *PFWNETGETCACHEDPASSWORD) (LPSTR, WORD, LPSTR, LPWORD, BYTE);
  31. typedef DWORD (APIENTRY *PFWNETCACHEPASSWORD) (LPSTR, WORD, LPSTR, WORD, BYTE, UINT);
  32. typedef DWORD (APIENTRY *PFWNETREMOVECACHEDPASSWORD) (LPSTR, WORD, BYTE);
  33. // ----------------Public function prototypes----------------------
  34. // Determines availability of credential cache.
  35. DWORD InetInitCredentialPersist();
  36. // Persist credentials (username/password).
  37. DWORD InetSetCachedCredentials (LPSTR szHost,
  38. LPSTR szRealmOrDomain,
  39. LPSTR szUser,
  40. LPSTR szPass);
  41. // Get persisted credentials (username/password).
  42. DWORD InetGetCachedCredentials (LPSTR szHost,
  43. LPSTR szRealmOrDomain,
  44. LPSTR szUser,
  45. LPSTR szPass);
  46. // Remove persisted credentials (username/password).
  47. DWORD InetRemoveCachedCredentials (LPSTR szHost, LPSTR szRealmOrDomain);
  48. #endif //PERSIST_H