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.

150 lines
4.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_NETWORK_PROVIDER L"pstorenp.dll"
  31. #define FILENAME_NETWORK_PROVIDERA "pstorenp.dll"
  32. #define FILENAME_CLIENT_INTERFACE L"pstorec.dll"
  33. #define FILENAME_CLIENT_INTERFACEA "pstorec.dll"
  34. #define FILENAME_SERVER_INTERFACE "pstores.exe" // unicode later
  35. #define FILENAME_SERVER_INTERFACEW L"pstores.exe"
  36. #define FILENAME_BASE_PROVIDER "psbase.dll" // unicode later
  37. #define FILENAME_BASE_PROVIDERW L"psbase.dll"
  38. #define FILENAME_PSTORE_EXPLORER "pstoreex.dll"
  39. #define FILENAME_RESOURCE_MODULEW L"pstorerc.dll"
  40. #define NETWORK_PROVIDER_FILENAME FILENAME_NETWORK_PROVIDER
  41. //
  42. // CLSID string in ANSI for PStore Explorer installation.
  43. //
  44. #define GUID_EXPLORER_SZ "{5fe50e0e-8dcb-11d0-8c43-00c04fc2c621}"
  45. #define PST_AUTHENTICODE_ACTION_ID { 0xb750e756, 0xee6d, 0x11d0, {0xaa, 0x18, 0x00, 0x00, 0xf8, 0x75, 0x3a, 0x58} }
  46. #define PST_AUTHENTICODE_INIT_POLICY L"AuthInitPolicy"
  47. #define PST_AUTHENTICODE_FINAL_POLICY L"AuthFinalPolicy"
  48. #define PASSWORD_LOGON_NT 1
  49. //
  50. // WinNT doesn't have logoff notification. Scavenger will call LSA to see if
  51. // session deleted.
  52. //
  53. #define PASSWORD_LOGON_LEGACY_95 3 // old case-sensitive passwords on Win95, don't use!
  54. #define PASSWORD_LOGOFF_95 4
  55. #define PASSWORD_LOGON_95 5
  56. #define MODULE_RAISE_COUNT 4 // Ref count on process raise count
  57. #define REG_PSTTREE_LOC L"SOFTWARE\\Microsoft\\Protected Storage System Provider"
  58. //
  59. // private callbacks exposed for server which are specific to base provider.
  60. //
  61. #define SS_SERVERPARAM_CALLBACKS 0x6997 // server get param value
  62. typedef
  63. BOOL FGETWINDOWSPASSWORD(
  64. PST_PROVIDER_HANDLE *hPSTProv,
  65. BYTE rgbPasswordDerivedBytes[],
  66. DWORD cbPasswordDerivedBytes);
  67. FGETWINDOWSPASSWORD FGetWindowsPassword;
  68. typedef
  69. HRESULT PRIVATE_AUTHENTICODEINITPOLICY(
  70. IN LPVOID lpV
  71. );
  72. PRIVATE_AUTHENTICODEINITPOLICY PrivateAuthenticodeInitPolicy;
  73. typedef
  74. HRESULT PRIVATE_AUTHENTICODEFINALPOLICY(
  75. IN LPVOID lpV
  76. );
  77. PRIVATE_AUTHENTICODEFINALPOLICY PrivateAuthenticodeFinalPolicy;
  78. typedef struct {
  79. DWORD cbSize; // sizeof(PRIVATE_CALLBACKS)
  80. FGETWINDOWSPASSWORD* pfnFGetWindowsPassword;
  81. PRIVATE_AUTHENTICODEINITPOLICY* pfnAuthenticodeInitPolicy;
  82. PRIVATE_AUTHENTICODEFINALPOLICY* pfnAuthenticodeFinalPolicy;
  83. } PRIVATE_CALLBACKS, *PPRIVATE_CALLBACKS, *LPPRIVATE_CALLBACKS;
  84. typedef struct {
  85. PST_PROVIDER_HANDLE hPSTProv; // copy of client provided handle
  86. handle_t hBinding; // client binding handle
  87. HANDLE hThread; // client thread handle
  88. HANDLE hProcess; // client process handle (not to be closed)
  89. DWORD dwProcessId; // client process ID
  90. LPVOID lpContext; // Win95 HACKHACK context
  91. } CALL_STATE, *PCALL_STATE, *LPCALL_STATE;
  92. //
  93. // hack work-around to Win95 imagehlp bug.
  94. //
  95. typedef struct {
  96. DWORD StartEip;
  97. DWORD StartEbp;
  98. DWORD StartEsp;
  99. } HACK_WIN95_CONTEXT, *PHACK_WIN95_CONTEXT, *LPHACK_WIN95_CONTEXT;
  100. //
  101. // installed provider item data buffer
  102. //
  103. typedef struct {
  104. DWORD cbSize; // sizeof(PST_PROVIDER)
  105. BYTE FileHash[20]; // SHA-1 hash of file szFileName
  106. WCHAR szFileName[ANYSIZE_ARRAY];// Unicode (in-place) file name
  107. } PST_PROVIDER, *PPST_PROVIDER, *LPPST_PROVIDER;
  108. #endif // __PSTPRV_H__