diff --git a/dlls/d3drm/viewport.c b/dlls/d3drm/viewport.c index 4bfc5cc0d5c..2847069cc24 100644 --- a/dlls/d3drm/viewport.c +++ b/dlls/d3drm/viewport.c @@ -37,34 +37,11 @@ typedef struct { LONG ref; } IDirect3DRMViewportImpl; -static const struct IDirect3DRMViewportVtbl Direct3DRMViewport_Vtbl; - static inline IDirect3DRMViewportImpl *impl_from_IDirect3DRMViewport(IDirect3DRMViewport *iface) { return CONTAINING_RECORD(iface, IDirect3DRMViewportImpl, IDirect3DRMViewport_iface); } -HRESULT Direct3DRMViewport_create(IUnknown** ppObj) -{ - IDirect3DRMViewportImpl* object; - - TRACE("(%p)\n", ppObj); - - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMViewportImpl)); - if (!object) - { - ERR("Out of memory\n"); - return E_OUTOFMEMORY; - } - - object->IDirect3DRMViewport_iface.lpVtbl = &Direct3DRMViewport_Vtbl; - object->ref = 1; - - *ppObj = (IUnknown*)object; - - return S_OK; -} - /*** IUnknown methods ***/ static HRESULT WINAPI IDirect3DRMViewportImpl_QueryInterface(IDirect3DRMViewport* iface, REFIID riid, void** object) @@ -506,3 +483,24 @@ static const struct IDirect3DRMViewportVtbl Direct3DRMViewport_Vtbl = IDirect3DRMViewportImpl_GetProjection, IDirect3DRMViewportImpl_GetDirect3DViewport }; + +HRESULT Direct3DRMViewport_create(IUnknown** ppObj) +{ + IDirect3DRMViewportImpl* object; + + TRACE("(%p)\n", ppObj); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMViewportImpl)); + if (!object) + { + ERR("Out of memory\n"); + return E_OUTOFMEMORY; + } + + object->IDirect3DRMViewport_iface.lpVtbl = &Direct3DRMViewport_Vtbl; + object->ref = 1; + + *ppObj = (IUnknown*)object; + + return S_OK; +}