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.

71 lines
1.7 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1998
  6. //
  7. // File: shellext.h
  8. //
  9. //--------------------------------------------------------------------------
  10. //////////////////////////////////////////////////////////////////////
  11. #ifndef _SHELLEXT_H
  12. #define _SHELLEXT_H
  13. #if _MSC_VER >= 1000
  14. #pragma once
  15. #endif // _MSC_VER >= 1000
  16. #include "resource.h" // main symbols
  17. /////////////////////////////////////////////////////////////////////////////
  18. // CShellExt
  19. class CShellExt :
  20. public IShellExtInit,
  21. public IContextMenu,
  22. public CComObjectRoot,
  23. public CComCoClass<CShellExt,&CLSID_OuDelegWizExt>
  24. {
  25. public:
  26. CShellExt()
  27. {
  28. m_hParentWnd = NULL;
  29. }
  30. BEGIN_COM_MAP(CShellExt)
  31. COM_INTERFACE_ENTRY(IShellExtInit)
  32. COM_INTERFACE_ENTRY(IContextMenu)
  33. END_COM_MAP()
  34. static HRESULT WINAPI UpdateRegistry(BOOL bRegister)
  35. {
  36. return _Module.UpdateRegistryCLSID(GetObjectCLSID(), bRegister);
  37. }
  38. DECLARE_NOT_AGGREGATABLE(CShellExt)
  39. // IShellExtInit methods
  40. public:
  41. STDMETHOD(Initialize)(LPCITEMIDLIST pidlFolder, LPDATAOBJECT pdtobj,
  42. HKEY hkeyProgID);
  43. // IContextMenu methods
  44. public:
  45. STDMETHOD(QueryContextMenu)(HMENU hMenu, UINT indexMenu, UINT idCmdFirst,
  46. UINT idCmdLast, UINT uFlags);
  47. STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO lpcmi);
  48. STDMETHOD(GetCommandString)(UINT_PTR idCmd, UINT uFlags, UINT FAR *reserved,
  49. LPSTR pszName, UINT cchMax);
  50. private:
  51. HWND m_hParentWnd;
  52. CWString m_szObjectLDAPPath;
  53. };
  54. #endif // _SHELLEXT_H