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.

104 lines
2.9 KiB

  1. // stdafx.h : include file for standard system include files,
  2. // or project specific include files that are used frequently,
  3. // but are changed infrequently
  4. #if !defined(AFX_STDAFX_H__32F22F6D_2F19_11D3_9B2F_00C04FA37E1F__INCLUDED_)
  5. #define AFX_STDAFX_H__32F22F6D_2F19_11D3_9B2F_00C04FA37E1F__INCLUDED_
  6. #if _MSC_VER >= 1000
  7. #pragma once
  8. #endif // _MSC_VER >= 1000
  9. #define STRICT
  10. #define _ATL_APARTMENT_THREADED
  11. // the following define is needed to expose system resource ID's in winuser.h
  12. #define OEMRESOURCE
  13. #include <atlbase.h>
  14. //You may derive a class from CComModule and use it if you want to override
  15. //something, but do not change the name of _Module
  16. extern CComModule _Module;
  17. #include <atlcom.h>
  18. // WTL code
  19. #include <atlapp.h>
  20. #include <atlmisc.h>
  21. #include <commctrl.h>
  22. #include <atlwin.h>
  23. #include <atldlgs.h>
  24. #include <atlgdi.h>
  25. // Snapin Info
  26. #include <mmc.h>
  27. #include "BOMSnap.h"
  28. #include "comptrs.h"
  29. #include "bomsnap.h"
  30. #include <string>
  31. #include <vector>
  32. typedef std::basic_string<TCHAR> tstring;
  33. typedef struct _BOMMENU {
  34. tstring strPlain;
  35. tstring strNoLoc;
  36. } BOMMENU, *PBOMMENU;
  37. typedef std::basic_string<BYTE> byte_string;
  38. typedef std::vector<tstring> string_vector;
  39. typedef std::vector<BOMMENU> menu_vector;
  40. // VERSION History
  41. // 100 - Initial version
  42. // 101 - Added refresh flags to menu commands
  43. // 102 - Added propery menu flag to object class info
  44. // 150 - Added icon's to query nodes, Changed Menu IDs, and changed AD menu reference
  45. #define SNAPIN_VERSION ((DWORD)150)
  46. //
  47. // Error handling macros
  48. //
  49. #define ASSERT(condition) _ASSERT(condition)
  50. #define RETURN_ON_FAILURE(hr) if (FAILED(hr)) return hr;
  51. #define EXIT_ON_FAILURE(hr) if (FAILED(hr)) return;
  52. #define BREAK_ON_FAILURE(hr) if (FAILED(hr)) break;
  53. #define CONTINUE_ON_FAILURE(hr) if (FAILED(hr)) continue;
  54. #define THROW_ON_FAILURE(hr) if (FAILED(hr)) _com_issue_error(hr);
  55. #define THROW_ERROR(hr) _com_issue_error(hr);
  56. #define VALIDATE_POINTER(p) \
  57. ASSERT(p != NULL); \
  58. if (p == NULL) return E_POINTER;
  59. #define SAFE_DELETE(p) if (p) delete p;
  60. //
  61. // Standard bitmap image indices
  62. //
  63. #define ROOT_NODE_IMAGE 0
  64. #define ROOT_NODE_OPENIMAGE 0
  65. #define GROUP_NODE_IMAGE 6 // Default Query Node Icon
  66. #define GROUP_NODE_OPENIMAGE 6
  67. #define QUERY_NODE_IMAGE 6
  68. #define QUERY_NODE_OPENIMAGE 6
  69. #define RESULT_ITEM_IMAGE 5 // Default Result Icon
  70. // length of GUID string representation
  71. #define GUID_STRING_LEN 39
  72. // byte size of GUID string, including termination
  73. #define GUID_STRING_SIZE ((GUID_STRING_LEN + 1) * sizeof(WCHAR))
  74. // array length
  75. #define lengthof(arr) (sizeof(arr) / sizeof(arr[0]))
  76. //{{AFX_INSERT_LOCATION}}
  77. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  78. #endif // !defined(AFX_STDAFX_H__32F22F6D_2F19_11D3_9B2F_00C04FA37E1F__INCLUDED)