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.

127 lines
2.8 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1998-2001
  3. Module Name:
  4. ShellExt.h
  5. Abstract:
  6. This is the header for the Cert Type shell extension object.
  7. Author:
  8. petesk 27-aug-98
  9. Environment:
  10. NT only.
  11. --*/
  12. #ifndef __CTSHLEXT_H_
  13. #define __CTSHLEXT_H_
  14. #include <shlobj.h>
  15. #include "CertTemplate.h"
  16. /////////////////////////////////////////////////////////////////////////////
  17. // CDfsShell
  18. class ATL_NO_VTABLE CCertTemplateShellExt :
  19. public CComObjectRootEx<CComSingleThreadModel>,
  20. public CComCoClass<CCertTemplateShellExt, &CLSID_CertTemplateShellExt>,
  21. public IShellExtInit,
  22. public IShellPropSheetExt,
  23. public IContextMenu
  24. {
  25. public:
  26. CCertTemplateShellExt();
  27. virtual ~CCertTemplateShellExt();
  28. //Simple ALL 1.0 based registry entry
  29. DECLARE_REGISTRY( CCertTemplateShellExt,
  30. _T("CERTTMPL.CCertTemplateShellExt.1"),
  31. _T("CERTTMPL.CCertTemplateShellExt"),
  32. IDS_CERTTEMPLATESHELLEXT_DESC,
  33. THREADFLAGS_APARTMENT)
  34. BEGIN_COM_MAP(CCertTemplateShellExt)
  35. COM_INTERFACE_ENTRY(IShellExtInit)
  36. COM_INTERFACE_ENTRY(IShellPropSheetExt)
  37. COM_INTERFACE_ENTRY(IContextMenu)
  38. END_COM_MAP()
  39. // IDfsShell
  40. public:
  41. // IShellExtInit Methods
  42. STDMETHOD (Initialize)
  43. (
  44. IN LPCITEMIDLIST pidlFolder, // Points to an ITEMIDLIST structure
  45. IN LPDATAOBJECT lpdobj, // Points to an IDataObject interface
  46. IN HKEY hkeyProgID // Registry key for the file object or folder type
  47. );
  48. //IShellPropSheetExt methods
  49. STDMETHODIMP AddPages
  50. (
  51. IN LPFNADDPROPSHEETPAGE lpfnAddPage,
  52. IN LPARAM lParam
  53. );
  54. STDMETHODIMP ReplacePage
  55. (
  56. IN UINT uPageID,
  57. IN LPFNADDPROPSHEETPAGE lpfnReplaceWith,
  58. IN LPARAM lParam
  59. );
  60. // IContextMenu methods
  61. STDMETHODIMP GetCommandString
  62. (
  63. UINT_PTR idCmd,
  64. UINT uFlags,
  65. UINT *pwReserved,
  66. LPSTR pszName,
  67. UINT cchMax
  68. );
  69. STDMETHODIMP InvokeCommand
  70. (
  71. LPCMINVOKECOMMANDINFO lpici
  72. );
  73. STDMETHODIMP QueryContextMenu
  74. (
  75. HMENU hmenu,
  76. UINT indexMenu,
  77. UINT idCmdFirst,
  78. UINT idCmdLast,
  79. UINT uFlags
  80. );
  81. protected:
  82. HRESULT AddVersion1CertTemplatePropPages (
  83. CCertTemplate* pCertTemplate,
  84. LPFNADDPROPSHEETPAGE lpfnAddPage,
  85. LPARAM lParam);
  86. HRESULT AddVersion2CertTemplatePropPages (
  87. CCertTemplate* pCertTemplate,
  88. LPFNADDPROPSHEETPAGE lpfnAddPage,
  89. LPARAM lParam);
  90. private:
  91. DWORD m_Count;
  92. CCertTemplate** m_apCertTemplates;
  93. UINT m_uiEditId;
  94. };
  95. #endif //__CTSHLEXT_H_