PageRenderTime 37ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/Visual Studio 2008/CppOfficeManagedCOMAddInShim/stdafx.h

#
C Header | 58 lines | 38 code | 15 blank | 5 comment | 2 complexity | e8b06a35ec62c45183daca4a6ebc5249 MD5 | raw file
  1. // stdafx.h
  2. #pragma once
  3. #ifndef STRICT
  4. #define STRICT
  5. #endif
  6. #ifndef WINVER // Allow use of features specific to Windows XP or later.
  7. #define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows.
  8. #endif
  9. #ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.
  10. #define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
  11. #endif
  12. #ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
  13. #define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
  14. #endif
  15. #ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later.
  16. #define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE.
  17. #endif
  18. #define _ATL_APARTMENT_THREADED
  19. #define _ATL_NO_AUTOMATIC_NAMESPACE
  20. #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // Some CString constructors will be explicit.
  21. #define _ATL_ALL_WARNINGS // Turns off ATL's hiding of some safely ignored warning messages.
  22. #include "resource.h"
  23. #include <atlbase.h>
  24. #include <atlcom.h>
  25. #include "interop.h"
  26. #pragma warning( disable : 4278 )
  27. #pragma warning( disable : 4146 )
  28. // For _AppDomain. Used to communicate with the default app domain from unmanaged code.
  29. #import <mscorlib.tlb> raw_interfaces_only high_property_prefixes("_get","_put","_putref")
  30. // Imports the MSADDNDR.DLL typelib which we need for IDTExtensibility2.
  31. #import "libid:AC0714F2-3D04-11D1-AE7D-00A0C90F26F4" raw_interfaces_only named_guids
  32. #pragma warning( default : 4146 )
  33. #pragma warning( default : 4278 )
  34. using namespace ATL;
  35. // For CorBindToRuntimeEx and ICorRuntimeHost.
  36. #include <mscoree.h>
  37. #define IfFailGo(x) { hr=(x); if (FAILED(hr)) goto Error; }
  38. #define IfNullGo(p) { if(!p) {hr = E_FAIL; goto Error; } }
  39. #include <windows.h>
  40. #include <assert.h>
  41. // Additional statements for Aggregator.
  42. #include <new>
  43. #include <strsafe.h>