home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / com / dcom / atldraw / preatldr.cpp < prev    next >
C/C++ Source or Header  |  1998-04-02  |  653b  |  19 lines

  1. // preatldr.cpp : source file that includes just the standard includes
  2. //  ATLDraw.pch will be the pre-compiled header
  3. //  preatldr.obj will contain the pre-compiled type information
  4.  
  5. #include "preatldr.h"
  6.  
  7. LONG g_cObjCnt;
  8.  
  9. void dump_com_error(_com_error &e)
  10. {
  11.     _tprintf(_T("Oops - hit an error!\n"));
  12.     _tprintf(_T("\a\tCode = %08lx\n"), e.Error());
  13.     _tprintf(_T("\a\tCode meaning = %s\n"), e.ErrorMessage());
  14.     _bstr_t bstrSource(e.Source());
  15.     _bstr_t bstrDescription(e.Description());
  16.     _tprintf(_T("\a\tSource = %s\n"), (LPCTSTR) bstrSource);
  17.     _tprintf(_T("\a\tDescription = %s\n"), (LPCTSTR) bstrDescription);
  18. }
  19.