[PATCH 4/5] d3dx9_36: Implement ID3DXFileEnumObjectImpl_GetChildren & ID3DXFileEnumObjectImpl_GetChild and add stubbed interface for ID3DXFileData. (try 4)

Nikolay Sivov bunglehead at gmail.com
Thu Oct 25 03:51:53 CDT 2012


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?

> +    {
> +        (&object->ID3DXFileEnumObject_iface)->lpVtbl->Release(&object->ID3DXFileEnumObject_iface);
Hmm, what's wrong with object->ID3DXFileEnumObject_iface.lpVtbl->Release ?




More information about the wine-devel mailing list