home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / common / msdev98 / template / atl / object.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-06-16  |  799 b   |  34 lines

  1. [!if=(FileExists, "FALSE")]
  2. // [!CPPName] : Implementation of [!ClassName]
  3.  
  4. #include "stdafx.h"
  5. #include "[!ProjectName].h"
  6. #include "[!HeaderName]"
  7. [!else]
  8. [!AddIncludeFile(TargetFile, "stdafx.h")]
  9. [!AddStringToSymbol(ProjectName.h, ProjectName, ".h")]
  10. [!AddIncludeFile(TargetFile, ProjectName.h)]
  11. [!AddIncludeFile(TargetFile, HeaderName)]
  12. [!endif]
  13. [!crlf]
  14.  
  15. /////////////////////////////////////////////////////////////////////////////
  16. // [!ClassName]
  17. [!crlf]
  18. [!if=(ErrorInfoEnabled, "TRUE")]
  19. STDMETHODIMP [!ClassName]::InterfaceSupportsErrorInfo(REFIID riid)
  20. {
  21.     static const IID* arr[] = 
  22.     {
  23.         &IID_[!InterfaceName]
  24.     };
  25.  
  26.     for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
  27.     {
  28.         if (InlineIsEqualGUID(*arr[i],riid))
  29.             return S_OK;
  30.     }
  31.     return S_FALSE;
  32. }
  33. [!endif]
  34.