From f674ddee2896b9ea0d433aac86cd5cecb7b43c6a Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Sun, 23 Mar 2014 22:25:36 +0400 Subject: [PATCH] scrrun: Implement OpenAsTextStream(). --- dlls/scrrun/filesystem.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c index c6dbb76510c..ec4890ab73a 100644 --- a/dlls/scrrun/filesystem.c +++ b/dlls/scrrun/filesystem.c @@ -2456,11 +2456,18 @@ static HRESULT WINAPI file_Move(IFile *iface, BSTR Destination) return E_NOTIMPL; } -static HRESULT WINAPI file_OpenAsTextStream(IFile *iface, IOMode IOMode, Tristate Format, ITextStream **ppts) +static HRESULT WINAPI file_OpenAsTextStream(IFile *iface, IOMode mode, Tristate format, ITextStream **stream) { struct file *This = impl_from_IFile(iface); - FIXME("(%p)->(%x %x %p)\n", This, IOMode, Format, ppts); - return E_NOTIMPL; + + TRACE("(%p)->(%d %d %p)\n", This, mode, format, stream); + + if (format == TristateUseDefault) { + FIXME("default format not handled, defaulting to unicode\n"); + format = TristateTrue; + } + + return create_textstream(This->path, OPEN_EXISTING, mode, format == TristateTrue, stream); } static const IFileVtbl file_vtbl = {