WinIncludes.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //===- WinIncludes.h --------------------------------------------*- C++ -*-===//
  2. ///////////////////////////////////////////////////////////////////////////////
  3. // //
  4. // WinIncludes.h //
  5. // Copyright (C) Microsoft Corporation. All rights reserved. //
  6. // This file is distributed under the University of Illinois Open Source //
  7. // License. See LICENSE.TXT for details. //
  8. // //
  9. ///////////////////////////////////////////////////////////////////////////////
  10. #pragma once
  11. #define NOATOM 1
  12. #define NOGDICAPMASKS 1
  13. #define NOMETAFILE 1
  14. #define NOMINMAX 1
  15. #define NOOPENFILE 1
  16. #define NORASTEROPS 1
  17. #define NOSCROLL 1
  18. #define NOSOUND 1
  19. #define NOSYSMETRICS 1
  20. #define NOWH 1
  21. #define NOCOMM 1
  22. #define NOKANJI 1
  23. #define NOCRYPT 1
  24. #define NOMCX 1
  25. #define WIN32_LEAN_AND_MEAN 1
  26. #define VC_EXTRALEAN 1
  27. #include <windows.h>
  28. #include <unknwn.h>
  29. #include <atlbase.h> // atlbase.h needs to come before strsafe.h
  30. #include <strsafe.h>
  31. #include <intsafe.h>
  32. #include <ObjIdl.h>
  33. // Support older atlbase.h if needed
  34. #ifndef _ATL_DECLSPEC_ALLOCATOR
  35. #define _ATL_DECLSPEC_ALLOCATOR
  36. #endif
  37. /// Swap two ComPtr classes.
  38. template <class T> void swap(CComHeapPtr<T> &a, CComHeapPtr<T> &b) {
  39. T *c(a.m_pData);
  40. a.m_pData = b.m_pData;
  41. b.m_pData = c;
  42. }