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