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.

120 lines
3.4 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997 - 1999
  6. //
  7. // File: pstprv.h
  8. //
  9. //--------------------------------------------------------------------------
  10. //
  11. // private header for secure storage
  12. //
  13. #ifndef __PSTPRV_H__
  14. #define __PSTPRV_H__
  15. #define PROTSTOR_VERSION 1
  16. #define MAXPROTSEQ 20 // increase avail bind handles to 20
  17. #define PSTORE_LOCAL_ENDPOINT L"protected_storage"
  18. #define PSTORE_LOCAL_PROT_SEQ L"ncalrpc"
  19. #define PST_EVENT_INIT "PS_SERVICE_STARTED"
  20. //
  21. // For Windows NT5, terminal server requires the "Global\" prefix in order
  22. // for the named-event to be shared across all sessions.
  23. //
  24. #define PST_EVENT_INIT_NT5 "Global\\PS_SERVICE_STARTED"
  25. #define PST_EVENT_STOP "PS_SERVICE_STOP"
  26. #define PST_EVENT_DEFER_QUERY "PS_SERVICE_QUERY"
  27. //
  28. // file name of our network provider
  29. //
  30. #define FILENAME_CLIENT_INTERFACE L"pstorec.dll"
  31. #define PASSWORD_LOGON_NT 1
  32. //
  33. // WinNT doesn't have logoff notification. Scavenger will call LSA to see if
  34. // session deleted.
  35. //
  36. #define PASSWORD_LOGON_LEGACY_95 3 // old case-sensitive passwords on Win95, don't use!
  37. #define PASSWORD_LOGOFF_95 4
  38. #define PASSWORD_LOGON_95 5
  39. #define MODULE_RAISE_COUNT 4 // Ref count on process raise count
  40. #define REG_PSTTREE_LOC L"SOFTWARE\\Microsoft\\Protected Storage System Provider"
  41. //
  42. // private callbacks exposed for server which are specific to base provider.
  43. //
  44. #define SS_SERVERPARAM_CALLBACKS 0x6997 // server get param value
  45. typedef
  46. BOOL FGETWINDOWSPASSWORD(
  47. PST_PROVIDER_HANDLE *hPSTProv,
  48. BYTE rgbPasswordDerivedBytes[],
  49. DWORD cbPasswordDerivedBytes);
  50. FGETWINDOWSPASSWORD FGetWindowsPassword;
  51. typedef
  52. HRESULT PRIVATE_AUTHENTICODEINITPOLICY(
  53. IN LPVOID lpV
  54. );
  55. PRIVATE_AUTHENTICODEINITPOLICY PrivateAuthenticodeInitPolicy;
  56. typedef
  57. HRESULT PRIVATE_AUTHENTICODEFINALPOLICY(
  58. IN LPVOID lpV
  59. );
  60. PRIVATE_AUTHENTICODEFINALPOLICY PrivateAuthenticodeFinalPolicy;
  61. typedef struct {
  62. DWORD cbSize; // sizeof(PRIVATE_CALLBACKS)
  63. FGETWINDOWSPASSWORD* pfnFGetWindowsPassword;
  64. PRIVATE_AUTHENTICODEINITPOLICY* pfnAuthenticodeInitPolicy;
  65. PRIVATE_AUTHENTICODEFINALPOLICY* pfnAuthenticodeFinalPolicy;
  66. } PRIVATE_CALLBACKS, *PPRIVATE_CALLBACKS, *LPPRIVATE_CALLBACKS;
  67. typedef struct {
  68. PST_PROVIDER_HANDLE hPSTProv; // copy of client provided handle
  69. handle_t hBinding; // client binding handle
  70. HANDLE hThread; // client thread handle
  71. HANDLE hProcess; // client process handle (not to be closed)
  72. DWORD dwProcessId; // client process ID
  73. LPVOID lpContext; // Win95 HACKHACK context
  74. } CALL_STATE, *PCALL_STATE, *LPCALL_STATE;
  75. //
  76. // installed provider item data buffer
  77. //
  78. typedef struct {
  79. DWORD cbSize; // sizeof(PST_PROVIDER)
  80. BYTE FileHash[20]; // SHA-1 hash of file szFileName
  81. WCHAR szFileName[ANYSIZE_ARRAY];// Unicode (in-place) file name
  82. } PST_PROVIDER, *PPST_PROVIDER, *LPPST_PROVIDER;
  83. #endif // __PSTPRV_H__