Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.3 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: d3drmfacearrayobj.cpp
  8. //
  9. //--------------------------------------------------------------------------
  10. // d3drmFaceArrayObj.cpp : Implementation of CDirectApp and DLL registration.
  11. #include "stdafx.h"
  12. #include "Direct.h"
  13. #include "dms.h"
  14. #include "d3drmFaceArrayObj.h"
  15. #include "d3drmFace2Obj.h"
  16. CONSTRUCTOR( _dxj_Direct3dRMFaceArray,{});
  17. DESTRUCTOR( _dxj_Direct3dRMFaceArray,{});
  18. GETSET_OBJECT(_dxj_Direct3dRMFaceArray);
  19. GET_DIRECT_R(_dxj_Direct3dRMFaceArray, getSize, GetSize, long);
  20. #ifdef DX5
  21. RETURN_NEW_ITEM_CAST_1_R(_dxj_Direct3dRMFaceArray, getElement, GetElement, _dxj_Direct3dRMFace, long,(DWORD));
  22. #else
  23. HRESULT C_dxj_Direct3dRMFaceArrayObject::getElement(long i, I_dxj_Direct3dRMFace2 **face2){
  24. HRESULT hr;
  25. IDirect3DRMFace *realface=NULL;
  26. IDirect3DRMFace2 *realface2=NULL;
  27. hr=m__dxj_Direct3dRMFaceArray->GetElement((DWORD)i,&realface);
  28. if FAILED(hr) return hr;
  29. hr=realface->QueryInterface(IID_IDirect3DRMFace2,(void**)&realface2);
  30. realface->Release();
  31. if FAILED(hr) return hr;
  32. INTERNAL_CREATE(_dxj_Direct3dRMFace2,(IDirect3DRMFace2*)realface2,face2);
  33. return hr;
  34. }
  35. #endif