[PATCH 1/2] d3dx9_36: Implement ID3DXFileDataImpl_GetName.

Christian Costa titan.costa at gmail.com
Mon Jan 14 03:20:54 CST 2013


---
 dlls/d3dx9_36/xfile.c |   19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/dlls/d3dx9_36/xfile.c b/dlls/d3dx9_36/xfile.c
index 8fa20ff..63d85b6 100644
--- a/dlls/d3dx9_36/xfile.c
+++ b/dlls/d3dx9_36/xfile.c
@@ -137,9 +137,24 @@ static HRESULT WINAPI ID3DXFileDataImpl_GetEnum(ID3DXFileData *iface, ID3DXFileE
 
 static HRESULT WINAPI ID3DXFileDataImpl_GetName(ID3DXFileData *iface, char *name, SIZE_T *size)
 {
-    FIXME("(%p)->(%p, %p): stub\n", iface, name, size);
+    ID3DXFileDataImpl *This = impl_from_ID3DXFileData(iface);
+    DWORD dxfile_size;
+    HRESULT ret;
 
-    return E_NOTIMPL;
+    TRACE("(%p)->(%p, %p)\n", iface, name, size);
+
+    if (!name || !size)
+        return E_POINTER;
+
+    dxfile_size = *size;
+
+    ret = IDirectXFileData_GetName(This->dxfile_data, name, &dxfile_size);
+    if (ret != DXFILE_OK)
+        return error_dxfile_to_d3dxfile(ret);
+
+    *size = dxfile_size;
+
+    return S_OK;
 }
 
 




More information about the wine-patches mailing list