netmpr.h
Upload User: xhy777
Upload Date: 2007-02-14
Package Size: 24088k
Code Size: 2k
Category:

Windows Kernel

Development Platform:

Visual C++

  1. /*++
  2. Copyright (c) 1991-1995  Microsoft Corporation
  3. Module Name:
  4.     netmpr.h
  5. Abstract:
  6.     DDK WINNET Header File for WIN32
  7. Environment:
  8.     User Mode -Win32
  9. Notes:
  10. Revision History:
  11.     20-Mar-1995     LenS
  12.         Created.
  13. --*/
  14. #ifndef _INC_NETMPR_
  15. #define _INC_NETMPR_
  16. //
  17. //  Authentication and Logon/Logoff.
  18. //
  19. #define LOGON_DONE              0x00000001
  20. #define LOGON_PRIMARY           0x00000002
  21. #define LOGON_MUST_VALIDATE     0x00000004
  22. #define LOGOFF_PENDING  1
  23. #define LOGOFF_COMMIT   2
  24. #define LOGOFF_CANCEL   3
  25. //
  26. //  Password Cache.
  27. //
  28. #ifndef PCE_STRUCT_DEFINED
  29. #define PCE_STRUCT_DEFINED
  30. struct PASSWORD_CACHE_ENTRY {
  31.     WORD cbEntry;               /* size of this entry in bytes, incl. pad */
  32.     WORD cbResource;            /* size of resource name in bytes */
  33.     WORD cbPassword;            /* size of password in bytes */
  34.     BYTE iEntry;                /* index number of this entry, for MRU */
  35.     BYTE nType;                 /* type of entry (see below) */
  36.     char abResource[1];         /* resource name (may not be ASCIIZ at all) */
  37. };
  38. #define PCE_MEMORYONLY          0x01    /* for flags field when adding */
  39. /*
  40.     Typedef for the callback routine passed to the enumeration functions.
  41.     It will be called once for each entry that matches the criteria
  42.     requested.  It returns TRUE if it wants the enumeration to
  43.     continue, FALSE to stop.
  44. */
  45. typedef BOOL (FAR PASCAL *CACHECALLBACK)( struct PASSWORD_CACHE_ENTRY FAR *pce, DWORD dwRefData );
  46. #endif  /* PCE_STRUCT_DEFINED */
  47. DWORD APIENTRY
  48. WNetCachePassword(
  49.     LPSTR pbResource,
  50.     WORD  cbResource,
  51.     LPSTR pbPassword,
  52.     WORD  cbPassword,
  53.     BYTE  nType,
  54.     UINT  fnFlags
  55.     );
  56. DWORD APIENTRY
  57. WNetGetCachedPassword(
  58.     LPSTR  pbResource,
  59.     WORD   cbResource,
  60.     LPSTR  pbPassword,
  61.     LPWORD pcbPassword,
  62.     BYTE   nType
  63.     );
  64. DWORD APIENTRY
  65. WNetRemoveCachedPassword(
  66.     LPSTR pbResource,
  67.     WORD  cbResource,
  68.     BYTE  nType
  69.     );
  70. DWORD APIENTRY
  71. WNetEnumCachedPasswords(
  72.     LPSTR pbPrefix,
  73.     WORD  cbPrefix,
  74.     BYTE  nType,
  75.     CACHECALLBACK pfnCallback,
  76.     DWORD dwRefData
  77.     );
  78. #endif