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.

126 lines
2.3 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1998 - 1999
  3. Module Name:
  4. ctextshl.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. /////////////////////////////////////////////////////////////////////////////
  16. // CDfsShell
  17. class ATL_NO_VTABLE CCertTypeShlExt :
  18. public CComObjectRootEx<CComSingleThreadModel>,
  19. public CComCoClass<CCertTypeShlExt, &CLSID_CertTypeShellExt>,
  20. public IShellExtInit,
  21. public IShellPropSheetExt,
  22. public IContextMenu
  23. {
  24. public:
  25. CCertTypeShlExt()
  26. {
  27. m_Count = 0;
  28. m_ahCertTemplates = NULL;
  29. m_uiEditId = 0;
  30. }
  31. ~CCertTypeShlExt()
  32. {
  33. }
  34. //Simple ALL 1.0 based registry entry
  35. DECLARE_REGISTRY( CCertTypeShlExt,
  36. _T("CAPESNPN.CCTShellExt.1"),
  37. _T("CAPESNPN.CCTShellExt"),
  38. IDS_CCTSHELLEXT_DESC,
  39. THREADFLAGS_APARTMENT)
  40. BEGIN_COM_MAP(CCertTypeShlExt)
  41. COM_INTERFACE_ENTRY(IShellExtInit)
  42. COM_INTERFACE_ENTRY(IShellPropSheetExt)
  43. COM_INTERFACE_ENTRY(IContextMenu)
  44. END_COM_MAP()
  45. // IDfsShell
  46. public:
  47. // IShellExtInit Methods
  48. STDMETHOD (Initialize)
  49. (
  50. IN LPCITEMIDLIST pidlFolder, // Points to an ITEMIDLIST structure
  51. IN LPDATAOBJECT lpdobj, // Points to an IDataObject interface
  52. IN HKEY hkeyProgID // Registry key for the file object or folder type
  53. );
  54. //IShellPropSheetExt methods
  55. STDMETHODIMP AddPages
  56. (
  57. IN LPFNADDPROPSHEETPAGE lpfnAddPage,
  58. IN LPARAM lParam
  59. );
  60. STDMETHODIMP ReplacePage
  61. (
  62. IN UINT uPageID,
  63. IN LPFNADDPROPSHEETPAGE lpfnReplaceWith,
  64. IN LPARAM lParam
  65. );
  66. // IContextMenu methods
  67. STDMETHODIMP GetCommandString
  68. (
  69. UINT_PTR idCmd,
  70. UINT uFlags,
  71. UINT *pwReserved,
  72. LPSTR pszName,
  73. UINT cchMax
  74. );
  75. STDMETHODIMP InvokeCommand
  76. (
  77. LPCMINVOKECOMMANDINFO lpici
  78. );
  79. STDMETHODIMP QueryContextMenu
  80. (
  81. HMENU hmenu,
  82. UINT indexMenu,
  83. UINT idCmdFirst,
  84. UINT idCmdLast,
  85. UINT uFlags
  86. );
  87. private:
  88. DWORD m_Count;
  89. HCERTTYPE *m_ahCertTemplates;
  90. UINT m_uiEditId;
  91. };
  92. #endif //__CTSHLEXT_H_