2012/10/25 Nikolay Sivov
<bunglehead@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 ?�