29 Mar
2012
29 Mar
'12
10:28 p.m.
Hello Christian, On 03/29/2012 11:57 PM, Christian Costa wrote:
+HRESULT Direct3DRMMesh_create(REFIID riid, IUnknown** ppObj) +{ + IDirect3DRMMeshImpl* object; + + TRACE("(%p)\n", ppObj); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMMeshImpl)); + if (!object) + { + ERR("Out of memory\n"); + return E_OUTOFMEMORY; + } + + object->IDirect3DRMMesh_iface.lpVtbl = &Direct3DRMMesh_Vtbl; + object->ref = 1; + + if (IsEqualGUID(riid, &IID_IDirect3DRMMesh)) + *ppObj = (IUnknown*)&object->IDirect3DRMMesh_iface; + else + *ppObj = (IUnknown*)&object->IDirect3DRMMesh_iface; both if and else code path are the same.
+ + return S_OK; +} +
bye michael