blob: 10bfdc02b12666c79a7b4c207ea6c7e0f5613d0b [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001// Stdafx.h : include file for standard system include files,
2// or project specific include files that are used frequently, but
3// are changed infrequently
4//
5
6#if !defined(AFX_STDAFX_H__AC72670E_2977_11D1_B2F3_006008040780__INCLUDED_)
7#define AFX_STDAFX_H__AC72670E_2977_11D1_B2F3_006008040780__INCLUDED_
8
9#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
10
11#include <afxwin.h> // MFC core and standard components
12#include <afxdisp.h>
13
14#include <atlbase.h>
15//You may derive a class from CComModule and use it if you want to override
16//something, but do not change the name of _Module
17extern CComModule _Module;
18
19#include <atlcom.h>
20
21// Developer Studio Object Model
22#include <ObjModel\addauto.h>
23#include <ObjModel\appdefs.h>
24#include <ObjModel\appauto.h>
25#include <ObjModel\blddefs.h>
26#include <ObjModel\bldauto.h>
27#include <ObjModel\textdefs.h>
28#include <ObjModel\textauto.h>
29#include <ObjModel\dbgdefs.h>
30#include <ObjModel\dbgauto.h>
31
32/////////////////////////////////////////////////////////////////////////////
33// Debugging support
34
35// Use VERIFY_OK around all calls to the Developer Studio objects which
36// you expect to return S_OK.
37// In DEBUG builds of your add-in, VERIFY_OK displays an ASSERT dialog box
38// if the expression returns an HRESULT other than S_OK. If the HRESULT
39// is a success code, the ASSERT box will display that HRESULT. If it
40// is a failure code, the ASSERT box will display that HRESULT plus the
41// error description string provided by the object which raised the error.
42// In RETAIL builds of your add-in, VERIFY_OK just evaluates the expression
43// and ignores the returned HRESULT.
44
45#ifdef _DEBUG
46
47void GetLastErrorDescription (CComBSTR & bstr); // Defined in VisVim.cpp
48#define VERIFY_OK(f) \
49 { \
50 HRESULT hr = (f); \
51 if (hr != S_OK) \
52 { \
53 if (FAILED(hr)) \
54 { \
55 CComBSTR bstr; \
56 GetLastErrorDescription(bstr); \
57 _RPTF2(_CRT_ASSERT, "Object call returned %lx\n\n%S", hr, (BSTR) bstr); \
58 } \
59 else \
60 _RPTF1(_CRT_ASSERT, "Object call returned %lx", hr); \
61 } \
62 }
63
64#else //_DEBUG
65
66#define VERIFY_OK(f) (f);
67
68#endif //_DEBUG
69
70//{{AFX_INSERT_LOCATION}}
71// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
72
73#endif // !defined(AFX_STDAFX_H__AC72670E_2977_11D1_B2F3_006008040780__INCLUDED)