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.

123 lines
2.6 KiB

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. All rights reserved
  4. Module Name:
  5. ssp.hxx
  6. Abstract:
  7. This file wraps around wintrust functions.
  8. Author:
  9. Larry Zhu (LZhu) 6-Apr-2001
  10. Environment:
  11. User Mode -Win32
  12. Revision History:
  13. --*/
  14. #ifndef _SSP_HXX_
  15. #define _SSP_HXX_
  16. #ifdef __cplusplus
  17. #include <mscat.h>
  18. #include <softpub.h>
  19. class TSSP
  20. {
  21. SIGNATURE('sspp'); // Security Service Provider for Printers
  22. public:
  23. TSSP(
  24. VOID
  25. );
  26. ~TSSP(
  27. VOID
  28. );
  29. HRESULT
  30. IsValid(
  31. VOID
  32. ) const;
  33. HRESULT
  34. AddCatalogDirect(
  35. IN PCWSTR pszCatalogFullPath,
  36. IN PCWSTR pszCatNameOnSystem OPTIONAL
  37. );
  38. HRESULT
  39. VerifyCatalog(
  40. IN PCWSTR pszCatalogFullPath
  41. );
  42. private:
  43. typedef BOOL
  44. (* PFuncCryptCATAdminAcquireContext)(
  45. OUT HCATADMIN *phCatAdmin,
  46. IN const GUID *pgSubsystem,
  47. IN DWORD dwFlags
  48. );
  49. typedef HCATINFO
  50. (* PFuncCryptCATAdminAddCatalog)(
  51. IN HCATADMIN hCatAdmin,
  52. IN WCHAR *pwszCatalogFile,
  53. IN WCHAR *pwszSelectBaseName, OPTIONAL
  54. IN DWORD dwFlags
  55. );
  56. typedef BOOL
  57. (* PFuncCryptCATAdminReleaseCatalogContext)(
  58. IN HCATADMIN hCatAdmin,
  59. IN HCATINFO hCatInfo,
  60. IN DWORD dwFlags
  61. );
  62. typedef BOOL
  63. (* PFuncCryptCATAdminReleaseContext)(
  64. IN HCATADMIN hCatAdmin,
  65. IN DWORD dwFlags
  66. );
  67. typedef HRESULT
  68. (* PFuncWinVerifyTrust)(
  69. IN HWND hWnd,
  70. IN GUID *pgActionID,
  71. IN WINTRUST_DATA *pWinTrustData
  72. );
  73. //
  74. // Copying and assignment are not defined.
  75. //
  76. TSSP(const TSSP & rhs);
  77. TSSP& operator =(const TSSP & rhs);
  78. HRESULT
  79. Initialize(
  80. VOID
  81. );
  82. HMODULE m_hLibrary;
  83. PFuncCryptCATAdminAcquireContext m_pfnCryptCATAdminAcquireContext;
  84. PFuncCryptCATAdminAddCatalog m_pfnCryptCATAdminAddCatalog;
  85. PFuncCryptCATAdminReleaseCatalogContext m_pfnCryptCATAdminReleaseCatalogContext;
  86. PFuncCryptCATAdminReleaseContext m_pfnCryptCATAdminReleaseContext;
  87. PFuncWinVerifyTrust m_pfnWinVerifyTrust;
  88. HRESULT m_hr;
  89. };
  90. #endif // #ifdef __cplusplus
  91. #endif // #ifndef _SSP_HXX_