home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / com / oleaut / lines / errinfo.cpp < prev    next >
C/C++ Source or Header  |  1997-07-31  |  2KB  |  62 lines

  1. /*************************************************************************
  2. **
  3. **  This is a part of the Microsoft Source Code Samples.
  4. **
  5. **  Copyright (C) 1992-1997 Microsoft Corporation. All rights reserved.
  6. **
  7. **  This source code is only intended as a supplement to Microsoft Development
  8. **  Tools and/or WinHelp documentation.  See these sources for detailed
  9. **  information regarding the Microsoft samples programs.
  10. **
  11. **  OLE Automation Lines Object.
  12. **
  13. **  errinfo.cpp
  14. **
  15. **  CSupportErrorInfo implementation
  16. **
  17. **  Written by Microsoft Product Support Services, Windows Developer Support
  18. **
  19. *************************************************************************/
  20.  
  21. #include <windows.h>
  22. #include <windowsx.h>
  23. #ifdef WIN16   
  24.   #include <ole2.h>
  25.   #include <compobj.h>    
  26.   #include <dispatch.h> 
  27.   #include <variant.h>
  28.   #include <olenls.h>  
  29. #endif      
  30. #include "lines.h"  
  31.  
  32. CSupportErrorInfo::CSupportErrorInfo(IUnknown FAR* punkObject, REFIID riid)
  33. {
  34.     m_punkObject = punkObject; 
  35.     m_iid = riid;
  36. }         
  37.  
  38. STDMETHODIMP
  39. CSupportErrorInfo::QueryInterface(REFIID iid, void FAR* FAR* ppv) 
  40. {   
  41.     return m_punkObject->QueryInterface(iid, ppv);    
  42. }
  43.  
  44.  
  45. STDMETHODIMP_(ULONG)
  46. CSupportErrorInfo::AddRef(void)
  47. {
  48.     return m_punkObject->AddRef();
  49. }
  50.  
  51. STDMETHODIMP_(ULONG)
  52. CSupportErrorInfo::Release(void)
  53. {
  54.     return m_punkObject->Release();
  55.  
  56. STDMETHODIMP
  57. CSupportErrorInfo::InterfaceSupportsErrorInfo(REFIID riid)  
  58. {
  59.     return (riid == m_iid) ? NOERROR : S_FALSE;
  60. }
  61.