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.

134 lines
4.1 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1999 **/
  4. /**********************************************************************/
  5. /*
  6. winssnap.h
  7. global defines
  8. FILE HISTORY:
  9. */
  10. #ifndef _WINSSNAP_H
  11. #define _WINSSNAP_H
  12. // message that gets posted to statistics windows to update their stats
  13. #define WM_NEW_STATS_AVAILABLE WM_USER + 100
  14. // macro to get the handler for a node. This is a WINS snapin specific
  15. // implementation
  16. #define GETHANDLER(classname, node) (reinterpret_cast<classname *>(node->GetData(TFS_DATA_USER)))
  17. extern const GUID GUID_WinsServerNodeType; // Server NodeType GUID
  18. // {90901AF6-7A31-11d0-97E0-00C04FC3357A}
  19. extern const CLSID CLSID_WinsSnapin ;
  20. // {524CCE97-A886-11d0-AB86-00C04FC3357A}
  21. extern const CLSID CLSID_WinsSnapinExtension ;
  22. // {1CE57F61-A88A-11d0-AB86-00C04FC3357A}
  23. extern const GUID CLSID_WinsSnapinAbout;
  24. // {1AE7F339-AA00-11d0-AB88-00C04FC3357A}
  25. extern const GUID GUID_WinsRootNodeType ;
  26. // {D5A5218E-BD09-11d0-AB96-00C04FC3357A}
  27. extern const GUID GUID_WinsGenericNodeType ;
  28. extern const GUID GUID_WinsReplicationNodeType;
  29. // {E220FD88-1FE6-11d1-B967-00C04FBF914A}
  30. extern const GUID GUID_WinsActiveRegNodeType ;
  31. // {FEC2D41A-2DF7-11d1-B97B-00C04FBF914A}
  32. extern const GUID GUID_WinsActiveRegistrationLeafNodeType;
  33. // {6A112BB1-4577-11d1-B99F-00C04FBF914A}
  34. extern const GUID GUID_WinsReplicationPartnerLeafNodeType;
  35. // {CC6473A7-A49C-11d1-BA4D-00C04FBF914A}
  36. extern const GUID GUID_WinsServerStatusNodeType;
  37. extern const GUID GUID_WinsServerStatusLeafNodeType;
  38. // {DA1BDD17-8E54-11d1-93DB-00C04FC3357A}
  39. extern const GUID GUID_NetConsRootNodeType;
  40. extern const IID IID_IWinsDatabase;// = {0x7B0C8BBF,0x3117,0x11d1,{0xB9,0x81,0x00,0xC0,0x4F,0xBF,0x91,0x4A}};
  41. #define ARRAYLEN(x) (sizeof(x) / sizeof((x)[0]))
  42. // Sample folder types
  43. enum NODETYPES
  44. {
  45. // scope pane items
  46. WINSSNAP_ROOT,
  47. WINSSNAP_SERVER,
  48. WINSSNAP_ACTIVE_REGISTRATIONS,
  49. WINSSNAP_REPLICATION_PARTNERS,
  50. //StatusRemove
  51. WINSSNAP_SERVER_STATUS,
  52. // result pane items
  53. WINSSNAP_REGISTRATION,
  54. WINSSNAP_REPLICATION_PARTNER,
  55. WINSSNAP_STATUS_LEAF_NODE,
  56. WINSSNAP_NODETYPE_MAX
  57. };
  58. #define GETIP_FIRST(x) ((x>>24) & 0xff)
  59. #define GETIP_SECOND(x) ((x>>16) & 0xff)
  60. #define GETIP_THIRD(x) ((x>> 8) & 0xff)
  61. #define GETIP_FOURTH(x) ((x) & 0xff)
  62. #define INTLTIMESTR(time) (((CIntlTime)(time)).CIntlTime::operator const CString())
  63. #define TMST(x) INTLTIMESTR(x)
  64. // wait cursor stuff around functions. If you need a wait cursor for
  65. // and entire fucntion, just use CWaitCursor. To wrap a wait cursor
  66. // around an rpc call, use these macros.
  67. #define BEGIN_WAIT_CURSOR { CWaitCursor waitCursor;
  68. #define RESTORE_WAIT_CURSOR waitCursor.Restore();
  69. #define END_WAIT_CURSOR }
  70. // Defines for help from the help menu and F1 help for scope pane items
  71. #define WINSSNAP_HELP_BASE 0xA0000000
  72. #define WINSSNAP_HELP_SNAPIN WINSSNAP_HELP_BASE + 1
  73. #define WINSSNAP_HELP_ROOT WINSSNAP_HELP_BASE + 2
  74. #define WINSSNAP_HELP_SERVER WINSSNAP_HELP_BASE + 3
  75. #define WINSSNAP_HELP_ACT_REG_NODE WINSSNAP_HELP_BASE + 4
  76. #define WINSSNAP_HELP_REP_PART_NODE WINSSNAP_HELP_BASE + 5
  77. #define WINSSNAP_HELP_ACTREG_ENTRY WINSSNAP_HELP_BASE + 6
  78. #define WINSSNAP_HELP_REP_PART_ENTRY WINSSNAP_HELP_BASE + 7
  79. class CWinsSnapinApp : public CWinApp
  80. {
  81. public:
  82. virtual BOOL InitInstance();
  83. virtual int ExitInstance();
  84. int MessageBox (UINT nIdPrompt, UINT nType = MB_OK, UINT nHelpContext = -1);
  85. int MessageBox (LPCTSTR pPrefixText, UINT nIdPrompt, UINT nType = MB_OK, UINT nHelpContext = -1);
  86. DWORD GetSystemMessage(UINT nId, TCHAR * chBuffer, int cbBuffSize);
  87. public:
  88. BOOL m_bWinsockInited;
  89. };
  90. extern CWinsSnapinApp theApp;
  91. // help stuff here
  92. typedef CMap<UINT, UINT, DWORD *, DWORD *> CWinsContextHelpMap;
  93. extern CWinsContextHelpMap g_winsContextHelpMap;
  94. #define WINSSNAP_NUM_HELP_MAPS 33
  95. extern DWORD * WinsGetHelpMap(UINT uID);
  96. #endif //_WINSSNAP_H