scrrun: Implement ITextStream Close.
This commit is contained in:
parent
bd7e83f292
commit
0a19048795
|
@ -633,8 +633,16 @@ static HRESULT WINAPI textstream_SkipLine(ITextStream *iface)
|
|||
static HRESULT WINAPI textstream_Close(ITextStream *iface)
|
||||
{
|
||||
struct textstream *This = impl_from_ITextStream(iface);
|
||||
FIXME("(%p): stub\n", This);
|
||||
return E_NOTIMPL;
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
TRACE("(%p)\n", This);
|
||||
|
||||
if(!CloseHandle(This->file))
|
||||
hr = S_FALSE;
|
||||
|
||||
This->file = NULL;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static const ITextStreamVtbl textstreamvtbl = {
|
||||
|
|
|
@ -35,6 +35,9 @@
|
|||
|
||||
static IFileSystem3 *fs3;
|
||||
|
||||
/* w2k and 2k3 error code. */
|
||||
#define E_VAR_NOT_SET 0x800a005b
|
||||
|
||||
static inline ULONG get_refcount(IUnknown *iface)
|
||||
{
|
||||
IUnknown_AddRef(iface);
|
||||
|
@ -1378,6 +1381,15 @@ static void test_CreateTextFile(void)
|
|||
hr = ITextStream_Read(stream, 1, &str);
|
||||
ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
|
||||
|
||||
hr = ITextStream_Close(stream);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
||||
hr = ITextStream_Read(stream, 1, &str);
|
||||
ok(hr == CTL_E_BADFILEMODE || hr == E_VAR_NOT_SET, "got 0x%08x\n", hr);
|
||||
|
||||
hr = ITextStream_Close(stream);
|
||||
ok(hr == S_FALSE || hr == E_VAR_NOT_SET, "got 0x%08x\n", hr);
|
||||
|
||||
ITextStream_Release(stream);
|
||||
|
||||
/* check it's created */
|
||||
|
|
Loading…
Reference in New Issue