On 04/20/2017 10:44 AM, Alistair Leslie-Hughes wrote:
+{
- mfattributes *This = impl_from_IMFAttributes(iface);
- if(IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IMFAttributes))
- {
TRACE("(IID_IUnknown %p)\n", object);
*object = This;
- }
- else
- {
FIXME("(%s, %p)\n", debugstr_guid(riid), object);
*object = NULL;
return E_NOINTERFACE;
- }
- IUnknown_AddRef((IUnknown*)*object);
- return S_OK;
+}
Please add a regular TRACE for this method, and return iface or interface pointer from This, instead of This itself. Trace you have now is inaccurate.
+HRESULT WINAPI MFCreateAttributes(IMFAttributes **attributes, UINT32 size) +{
- mfattributes *object;
- TRACE("%p, %d\n", attributes, size);
- object = HeapAlloc( GetProcessHeap(), 0, sizeof(*attributes) );
- if(!object)
return E_OUTOFMEMORY;
This should use sizeof(*object).
On 04/20/2017 11:17 AM, Nikolay Sivov wrote:
On 04/20/2017 10:44 AM, Alistair Leslie-Hughes wrote:
+{
- mfattributes *This = impl_from_IMFAttributes(iface);
- if(IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IMFAttributes))
- {
TRACE("(IID_IUnknown %p)\n", object);
*object = This;
- }
- else
- {
FIXME("(%s, %p)\n", debugstr_guid(riid), object);
*object = NULL;
return E_NOINTERFACE;
- }
- IUnknown_AddRef((IUnknown*)*object);
- return S_OK;
+}
Please add a regular TRACE for this method, and return iface or interface pointer from This, instead of This itself.
Actually "object" is a really bad name for that parameter as it isn't a COM object but an interface. A better name is "ret_iface".
bye michael