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.

65 lines
2.3 KiB

  1. //==============================================================;
  2. //
  3. // This source code is only intended as a supplement to existing Microsoft documentation.
  4. //
  5. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  6. // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  7. // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  8. // PURPOSE.
  9. //
  10. // Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
  11. //==============================================================;
  12. #ifndef _BRANCHES_H
  13. #define _BRANCHES_H
  14. #include <mmc.h>
  15. #include <crtdbg.h>
  16. #include "globals.h"
  17. //#include "resource.h"
  18. //#include "LocalRes.h"
  19. class CDelegationBase {
  20. public:
  21. CDelegationBase();
  22. virtual ~CDelegationBase();
  23. virtual const _TCHAR *GetDisplayName(int nCol = 0) = 0;
  24. virtual const GUID & getNodeType() { _ASSERT(FALSE); return IID_NULL; }
  25. virtual const LPARAM GetCookie() { return reinterpret_cast<LPARAM>(this); }
  26. virtual const int GetBitmapIndex() = 0;
  27. virtual HRESULT GetResultViewType(LPOLESTR *ppViewType, long *pViewOptions) { return S_FALSE; }
  28. public:
  29. // virtual functions go here (for MMCN_*)
  30. // virtual HRESULT OnExpand(IConsoleNameSpace *pConsoleNameSpace, IConsole *pConsole, HSCOPEITEM parent) { return S_FALSE; }
  31. // virtual HRESULT OnShow(IConsole *pConsole, BOOL bShow, HSCOPEITEM scopeitem) { return S_FALSE; }
  32. // virtual HRESULT OnAddImages(IImageList *pImageList, HSCOPEITEM hsi);
  33. virtual HRESULT OnAddMenuItems(IContextMenuCallback *pContextMenuCallback, long *pInsertionsAllowed) { return S_FALSE; }
  34. virtual HRESULT OnMenuCommand(IConsole *pConsole, long lCommandID) { return S_FALSE; }
  35. public:
  36. /* static HBITMAP m_pBMapSm;
  37. static HBITMAP m_pBMapLg;
  38. _TCHAR m_szMachineName[255]; //Current machine name. CClassExtSnap also caches this value.
  39. _TCHAR* GetMachineName() { return m_szMachineName; }
  40. */
  41. protected:
  42. BOOL bExpanded;
  43. /*
  44. static void LoadBitmaps() {
  45. m_pBMapSm = LoadBitmap(g_hinst, MAKEINTRESOURCE(IDR_SMICONS));
  46. m_pBMapLg = LoadBitmap(g_hinst, MAKEINTRESOURCE(IDR_LGICONS)); }
  47. */
  48. private:
  49. // {66F340F8-3733-49b4-8E48-1020E4DD8660}
  50. static const GUID thisGuid;
  51. };
  52. #endif // _BRANCHES_H