Re: [PATCH 3/3] d3drm: Implement CreateMesh method and stubbed IDirect3DRMMesh interface.

2012-03-29 Thread Michael Stefaniuc
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




Re: [PATCH 3/3] d3drm: Implement CreateMesh method and stubbed IDirect3DRMMesh interface.

2012-03-29 Thread Christian Costa

Le 30/03/2012 00:28, Michael Stefaniuc a écrit :

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


Thanks Michael. Something was wrong. I resent a cleaner patch.

Bye
Christian