[PATCH 4/5] d3dx9_36: Implement ID3DXFileEnumObjectImpl_GetChildren & ID3DXFileEnumObjectImpl_GetChild and add stubbed interface for ID3DXFileData. (try 4)
Christian Costa
titan.costa at gmail.com
Thu Oct 25 03:57:27 CDT 2012
2012/10/25 Nikolay Sivov <bunglehead at gmail.com>
> On 10/25/2012 10:34, Christian Costa wrote:
>
>>
>> +
>> +static HRESULT WINAPI ID3DXFileDataImpl_Create(**IDirectXFileObject
>> *dxfile_object, ID3DXFileData **ret_iface)
>> +{
>> + ID3DXFileDataImpl *object;
>> +
>> + TRACE("(%p, %p)\n", dxfile_object, ret_iface);
>> +
>> + *ret_iface = NULL;
>> +
>> + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
>> sizeof(*object));
>> + if (!object)
>> + {
>> + ERR("Out of memory\n");
>> + return E_OUTOFMEMORY;
>> + }
>> +
>> + object->ID3DXFileData_iface.**lpVtbl = &ID3DXFileData_Vtbl;
>> + object->ref = 1;
>> + object->dxfile_object = (IDirectXFileData*)dxfile_**object;
>> +
>> + *ret_iface = &object->ID3DXFileData_iface;
>> +
>> + return S_OK;
>> +}
>> +
>>
> You don't need WINAPI for it.
>
> + ret = ID3DXFileDataImpl_Create((**IDirectXFileObject*)data_**object,
>> &object->children[object->nb_**children]);
>>
> It seems you're casting it back and forth, is it possible to use proper
> type for data_object?
Because in another serie ID3DXFileDataImpl_Create will be called in another
place with a FileObject and ID3DXFileDataImpl_Create
will really deals with that FileObject.
>
> + {
>> + (&object->ID3DXFileEnumObject_**iface)->lpVtbl->Release(&**
>> object->ID3DXFileEnumObject_**iface);
>>
> Hmm, what's wrong with object->ID3DXFileEnumObject_**iface.lpVtbl->Release
> ?
>
What do you mean ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20121025/f95d3769/attachment.html>
More information about the wine-devel
mailing list