+static const struct IXAudio2Vtbl XAudio2_Vtbl;
You wouldn't need this if you've moved XAudio2_create() after vtbl declaration.
+HRESULT XAudio2_create(IUnknown *pUnkOuter, LPVOID *ppObj)
Please use better names, and "void **".
+{
- IXAudio2Impl* object;
- TRACE("(%p, %p)\n", pUnkOuter, ppObj);
- if(pUnkOuter)
return CLASS_E_NOAGGREGATION;
- object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IXAudio2Impl));
- if(!object)
return E_OUTOFMEMORY;
No need for HEAP_ZERO_MEMORY.
- *ppObj = object;
That's not how it's done - return proper interface pointer.
HRESULT WINAPI DllRegisterServer(void) { TRACE("\n");
- return __wine_register_resources( instance );
- return __wine_register_resources(instance);
}
You can probably leave this as it is.