Commit dfd7c70d authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

d3drm: Reorder d3drm creation function to avoid forward declarations.

parent 9defecb0
......@@ -37,10 +37,6 @@ typedef struct {
LONG ref;
} IDirect3DRMImpl;
static const struct IDirect3DRMVtbl Direct3DRM_Vtbl;
static const struct IDirect3DRM2Vtbl Direct3DRM2_Vtbl;
static const struct IDirect3DRM3Vtbl Direct3DRM3_Vtbl;
static inline IDirect3DRMImpl *impl_from_IDirect3DRM(IDirect3DRM *iface)
{
return CONTAINING_RECORD(iface, IDirect3DRMImpl, IDirect3DRM_iface);
......@@ -56,29 +52,6 @@ static inline IDirect3DRMImpl *impl_from_IDirect3DRM3(IDirect3DRM3 *iface)
return CONTAINING_RECORD(iface, IDirect3DRMImpl, IDirect3DRM3_iface);
}
HRESULT Direct3DRM_create(IUnknown** ppObj)
{
IDirect3DRMImpl* object;
TRACE("(%p)\n", ppObj);
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMImpl));
if (!object)
{
ERR("Out of memory\n");
return E_OUTOFMEMORY;
}
object->IDirect3DRM_iface.lpVtbl = &Direct3DRM_Vtbl;
object->IDirect3DRM2_iface.lpVtbl = &Direct3DRM2_Vtbl;
object->IDirect3DRM3_iface.lpVtbl = &Direct3DRM3_Vtbl;
object->ref = 1;
*ppObj = (IUnknown*)&object->IDirect3DRM_iface;
return S_OK;
}
/*** IUnknown methods ***/
static HRESULT WINAPI IDirect3DRMImpl_QueryInterface(IDirect3DRM* iface, REFIID riid, void** ppvObject)
{
......@@ -1378,3 +1351,26 @@ static const struct IDirect3DRM3Vtbl Direct3DRM3_Vtbl =
IDirect3DRM3Impl_SetOptions,
IDirect3DRM3Impl_GetOptions
};
HRESULT Direct3DRM_create(IUnknown** ppObj)
{
IDirect3DRMImpl* object;
TRACE("(%p)\n", ppObj);
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMImpl));
if (!object)
{
ERR("Out of memory\n");
return E_OUTOFMEMORY;
}
object->IDirect3DRM_iface.lpVtbl = &Direct3DRM_Vtbl;
object->IDirect3DRM2_iface.lpVtbl = &Direct3DRM2_Vtbl;
object->IDirect3DRM3_iface.lpVtbl = &Direct3DRM3_Vtbl;
object->ref = 1;
*ppObj = (IUnknown*)&object->IDirect3DRM_iface;
return S_OK;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment