diff options
author | Bram Moolenaar <Bram@vim.org> | 2004-06-13 20:20:40 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2004-06-13 20:20:40 +0000 |
commit | 071d4279d6ab81b7187b48f3a0fc61e587b6db6c (patch) | |
tree | 221cbe3c40e043163c06f61c52a7ba2eb41e12ce /src/VisVim/StdAfx.h | |
parent | b4210b3bc14e2918f153a7307530fbe6eba659e1 (diff) | |
download | vim-git-071d4279d6ab81b7187b48f3a0fc61e587b6db6c.tar.gz |
updated for version 7.0001v7.0001
Diffstat (limited to 'src/VisVim/StdAfx.h')
-rw-r--r-- | src/VisVim/StdAfx.h | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/src/VisVim/StdAfx.h b/src/VisVim/StdAfx.h new file mode 100644 index 000000000..10bfdc02b --- /dev/null +++ b/src/VisVim/StdAfx.h @@ -0,0 +1,73 @@ +// Stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__AC72670E_2977_11D1_B2F3_006008040780__INCLUDED_) +#define AFX_STDAFX_H__AC72670E_2977_11D1_B2F3_006008040780__INCLUDED_ + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include <afxwin.h> // MFC core and standard components +#include <afxdisp.h> + +#include <atlbase.h> +//You may derive a class from CComModule and use it if you want to override +//something, but do not change the name of _Module +extern CComModule _Module; + +#include <atlcom.h> + +// Developer Studio Object Model +#include <ObjModel\addauto.h> +#include <ObjModel\appdefs.h> +#include <ObjModel\appauto.h> +#include <ObjModel\blddefs.h> +#include <ObjModel\bldauto.h> +#include <ObjModel\textdefs.h> +#include <ObjModel\textauto.h> +#include <ObjModel\dbgdefs.h> +#include <ObjModel\dbgauto.h> + +///////////////////////////////////////////////////////////////////////////// +// Debugging support + +// Use VERIFY_OK around all calls to the Developer Studio objects which +// you expect to return S_OK. +// In DEBUG builds of your add-in, VERIFY_OK displays an ASSERT dialog box +// if the expression returns an HRESULT other than S_OK. If the HRESULT +// is a success code, the ASSERT box will display that HRESULT. If it +// is a failure code, the ASSERT box will display that HRESULT plus the +// error description string provided by the object which raised the error. +// In RETAIL builds of your add-in, VERIFY_OK just evaluates the expression +// and ignores the returned HRESULT. + +#ifdef _DEBUG + +void GetLastErrorDescription (CComBSTR & bstr); // Defined in VisVim.cpp +#define VERIFY_OK(f) \ + { \ + HRESULT hr = (f); \ + if (hr != S_OK) \ + { \ + if (FAILED(hr)) \ + { \ + CComBSTR bstr; \ + GetLastErrorDescription(bstr); \ + _RPTF2(_CRT_ASSERT, "Object call returned %lx\n\n%S", hr, (BSTR) bstr); \ + } \ + else \ + _RPTF1(_CRT_ASSERT, "Object call returned %lx", hr); \ + } \ + } + +#else //_DEBUG + +#define VERIFY_OK(f) (f); + +#endif //_DEBUG + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__AC72670E_2977_11D1_B2F3_006008040780__INCLUDED) |