diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 2553779417b..f60d389d93b 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -112,7 +112,7 @@ @ stub GdipCreateMetafileFromFile @ stub GdipCreateMetafileFromStream @ stdcall GdipCreateMetafileFromWmf(ptr long ptr ptr) -@ stub GdipCreateMetafileFromWmfFile +@ stdcall GdipCreateMetafileFromWmfFile(wstr ptr ptr) @ stdcall GdipCreatePath2(ptr ptr long long ptr) @ stdcall GdipCreatePath2I(ptr ptr long long ptr) @ stdcall GdipCreatePath(long ptr) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 48917b36f8b..c127dbb28ef 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -881,6 +881,18 @@ err: return retval; } +GpStatus WINGDIPAPI GdipCreateMetafileFromWmfFile(GDIPCONST WCHAR *file, + GDIPCONST WmfPlaceableFileHeader * placeable, GpMetafile **metafile) +{ + HMETAFILE hmf = GetMetaFileW(file); + + TRACE("(%s, %p, %p)\n", debugstr_w(file), placeable, metafile); + + if(!hmf) return InvalidParameter; + + return GdipCreateMetafileFromWmf(hmf, TRUE, placeable, metafile); +} + GpStatus WINGDIPAPI GdipCreateStreamOnFile(GDIPCONST WCHAR * filename, UINT access, IStream **stream) { diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 378057a9fb9..b93308bf525 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -77,6 +77,7 @@ GpStatus WINGDIPAPI GdipCreateLineBrushFromRectWithAngleI(GDIPCONST GpRect*, GpStatus WINGDIPAPI GdipCreateMetafileFromEmf(HENHMETAFILE,BOOL,GpMetafile**); GpStatus WINGDIPAPI GdipCreateMetafileFromWmf(HMETAFILE,BOOL, GDIPCONST WmfPlaceableFileHeader*,GpMetafile**); +GpStatus WINGDIPAPI GdipCreateMetafileFromWmfFile(GDIPCONST WCHAR*, GDIPCONST WmfPlaceableFileHeader*,GpMetafile**); GpStatus WINGDIPAPI GdipCreateStreamOnFile(GDIPCONST WCHAR*,UINT,IStream**); GpStatus WINGDIPAPI GdipDeleteGraphics(GpGraphics *); GpStatus WINGDIPAPI GdipDrawArc(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL,REAL,REAL);