2 * Copyright 2012 Alistair Leslie-Hughes
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
30 #include "scrrun_private.h"
32 #include "wine/debug.h"
34 WINE_DEFAULT_DEBUG_CHANNEL(scrrun);
37 IFolder IFolder_iface;
42 ITextStream ITextStream_iface;
53 static inline struct folder *impl_from_IFolder(IFolder *iface)
55 return CONTAINING_RECORD(iface, struct folder, IFolder_iface);
58 static inline struct textstream *impl_from_ITextStream(ITextStream *iface)
60 return CONTAINING_RECORD(iface, struct textstream, ITextStream_iface);
63 static int textstream_check_iomode(struct textstream *This, enum iotype type)
66 return This->mode == ForWriting || This->mode == ForAppending;
71 static HRESULT WINAPI textstream_QueryInterface(ITextStream *iface, REFIID riid, void **obj)
73 struct textstream *This = impl_from_ITextStream(iface);
75 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), obj);
77 if (IsEqualIID(riid, &IID_ITextStream) ||
78 IsEqualIID(riid, &IID_IDispatch) ||
79 IsEqualIID(riid, &IID_IUnknown))
82 ITextStream_AddRef(iface);
90 static ULONG WINAPI textstream_AddRef(ITextStream *iface)
92 struct textstream *This = impl_from_ITextStream(iface);
93 ULONG ref = InterlockedIncrement(&This->ref);
94 TRACE("(%p)->(%d)\n", This, ref);
98 static ULONG WINAPI textstream_Release(ITextStream *iface)
100 struct textstream *This = impl_from_ITextStream(iface);
101 ULONG ref = InterlockedDecrement(&This->ref);
102 TRACE("(%p)->(%d)\n", This, ref);
110 static HRESULT WINAPI textstream_GetTypeInfoCount(ITextStream *iface, UINT *pctinfo)
112 struct textstream *This = impl_from_ITextStream(iface);
113 TRACE("(%p)->(%p)\n", This, pctinfo);
118 static HRESULT WINAPI textstream_GetTypeInfo(ITextStream *iface, UINT iTInfo,
119 LCID lcid, ITypeInfo **ppTInfo)
121 struct textstream *This = impl_from_ITextStream(iface);
122 TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
123 return get_typeinfo(ITextStream_tid, ppTInfo);
126 static HRESULT WINAPI textstream_GetIDsOfNames(ITextStream *iface, REFIID riid,
127 LPOLESTR *rgszNames, UINT cNames,
128 LCID lcid, DISPID *rgDispId)
130 struct textstream *This = impl_from_ITextStream(iface);
134 TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
136 hr = get_typeinfo(ITextStream_tid, &typeinfo);
139 hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
140 ITypeInfo_Release(typeinfo);
146 static HRESULT WINAPI textstream_Invoke(ITextStream *iface, DISPID dispIdMember,
147 REFIID riid, LCID lcid, WORD wFlags,
148 DISPPARAMS *pDispParams, VARIANT *pVarResult,
149 EXCEPINFO *pExcepInfo, UINT *puArgErr)
151 struct textstream *This = impl_from_ITextStream(iface);
155 TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
156 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
158 hr = get_typeinfo(ITextStream_tid, &typeinfo);
161 hr = ITypeInfo_Invoke(typeinfo, iface, dispIdMember, wFlags,
162 pDispParams, pVarResult, pExcepInfo, puArgErr);
163 ITypeInfo_Release(typeinfo);
169 static HRESULT WINAPI textstream_get_Line(ITextStream *iface, LONG *line)
171 struct textstream *This = impl_from_ITextStream(iface);
172 FIXME("(%p)->(%p): stub\n", This, line);
176 static HRESULT WINAPI textstream_get_Column(ITextStream *iface, LONG *column)
178 struct textstream *This = impl_from_ITextStream(iface);
179 FIXME("(%p)->(%p): stub\n", This, column);
183 static HRESULT WINAPI textstream_get_AtEndOfStream(ITextStream *iface, VARIANT_BOOL *eos)
185 struct textstream *This = impl_from_ITextStream(iface);
186 FIXME("(%p)->(%p): stub\n", This, eos);
190 static HRESULT WINAPI textstream_get_AtEndOfLine(ITextStream *iface, VARIANT_BOOL *eol)
192 struct textstream *This = impl_from_ITextStream(iface);
193 FIXME("(%p)->(%p): stub\n", This, eol);
197 static HRESULT WINAPI textstream_Read(ITextStream *iface, LONG len, BSTR *text)
199 struct textstream *This = impl_from_ITextStream(iface);
200 FIXME("(%p)->(%p): stub\n", This, text);
202 if (textstream_check_iomode(This, IORead))
203 return CTL_E_BADFILEMODE;
208 static HRESULT WINAPI textstream_ReadLine(ITextStream *iface, BSTR *text)
210 struct textstream *This = impl_from_ITextStream(iface);
211 FIXME("(%p)->(%p): stub\n", This, text);
213 if (textstream_check_iomode(This, IORead))
214 return CTL_E_BADFILEMODE;
219 static HRESULT WINAPI textstream_ReadAll(ITextStream *iface, BSTR *text)
221 struct textstream *This = impl_from_ITextStream(iface);
222 FIXME("(%p)->(%p): stub\n", This, text);
224 if (textstream_check_iomode(This, IORead))
225 return CTL_E_BADFILEMODE;
230 static HRESULT WINAPI textstream_Write(ITextStream *iface, BSTR text)
232 struct textstream *This = impl_from_ITextStream(iface);
233 FIXME("(%p)->(%s): stub\n", This, debugstr_w(text));
237 static HRESULT WINAPI textstream_WriteLine(ITextStream *iface, BSTR text)
239 struct textstream *This = impl_from_ITextStream(iface);
240 FIXME("(%p)->(%s): stub\n", This, debugstr_w(text));
244 static HRESULT WINAPI textstream_WriteBlankLines(ITextStream *iface, LONG lines)
246 struct textstream *This = impl_from_ITextStream(iface);
247 FIXME("(%p)->(%d): stub\n", This, lines);
251 static HRESULT WINAPI textstream_Skip(ITextStream *iface, LONG count)
253 struct textstream *This = impl_from_ITextStream(iface);
254 FIXME("(%p)->(%d): stub\n", This, count);
258 static HRESULT WINAPI textstream_SkipLine(ITextStream *iface)
260 struct textstream *This = impl_from_ITextStream(iface);
261 FIXME("(%p): stub\n", This);
265 static HRESULT WINAPI textstream_Close(ITextStream *iface)
267 struct textstream *This = impl_from_ITextStream(iface);
268 FIXME("(%p): stub\n", This);
272 static const ITextStreamVtbl textstreamvtbl = {
273 textstream_QueryInterface,
276 textstream_GetTypeInfoCount,
277 textstream_GetTypeInfo,
278 textstream_GetIDsOfNames,
281 textstream_get_Column,
282 textstream_get_AtEndOfStream,
283 textstream_get_AtEndOfLine,
288 textstream_WriteLine,
289 textstream_WriteBlankLines,
295 static HRESULT create_textstream(IOMode mode, ITextStream **ret)
297 struct textstream *stream;
299 stream = heap_alloc(sizeof(struct textstream));
300 if (!stream) return E_OUTOFMEMORY;
302 stream->ITextStream_iface.lpVtbl = &textstreamvtbl;
306 *ret = &stream->ITextStream_iface;
310 static HRESULT WINAPI folder_QueryInterface(IFolder *iface, REFIID riid, void **obj)
312 struct folder *This = impl_from_IFolder(iface);
314 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), obj);
318 if (IsEqualGUID( riid, &IID_IFolder ) ||
319 IsEqualGUID( riid, &IID_IUnknown))
322 IFolder_AddRef(iface);
325 return E_NOINTERFACE;
330 static ULONG WINAPI folder_AddRef(IFolder *iface)
332 struct folder *This = impl_from_IFolder(iface);
333 ULONG ref = InterlockedIncrement(&This->ref);
334 TRACE("(%p)->(%d)\n", This, ref);
338 static ULONG WINAPI folder_Release(IFolder *iface)
340 struct folder *This = impl_from_IFolder(iface);
341 ULONG ref = InterlockedDecrement(&This->ref);
342 TRACE("(%p)->(%d)\n", This, ref);
350 static HRESULT WINAPI folder_GetTypeInfoCount(IFolder *iface, UINT *pctinfo)
352 struct folder *This = impl_from_IFolder(iface);
353 TRACE("(%p)->(%p)\n", This, pctinfo);
358 static HRESULT WINAPI folder_GetTypeInfo(IFolder *iface, UINT iTInfo,
359 LCID lcid, ITypeInfo **ppTInfo)
361 struct folder *This = impl_from_IFolder(iface);
362 TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
363 return get_typeinfo(IFolder_tid, ppTInfo);
366 static HRESULT WINAPI folder_GetIDsOfNames(IFolder *iface, REFIID riid,
367 LPOLESTR *rgszNames, UINT cNames,
368 LCID lcid, DISPID *rgDispId)
370 struct folder *This = impl_from_IFolder(iface);
374 TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
376 hr = get_typeinfo(IFolder_tid, &typeinfo);
379 hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
380 ITypeInfo_Release(typeinfo);
386 static HRESULT WINAPI folder_Invoke(IFolder *iface, DISPID dispIdMember,
387 REFIID riid, LCID lcid, WORD wFlags,
388 DISPPARAMS *pDispParams, VARIANT *pVarResult,
389 EXCEPINFO *pExcepInfo, UINT *puArgErr)
391 struct folder *This = impl_from_IFolder(iface);
395 TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
396 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
398 hr = get_typeinfo(IFolder_tid, &typeinfo);
401 hr = ITypeInfo_Invoke(typeinfo, iface, dispIdMember, wFlags,
402 pDispParams, pVarResult, pExcepInfo, puArgErr);
403 ITypeInfo_Release(typeinfo);
409 static HRESULT WINAPI folder_get_Path(IFolder *iface, BSTR *path)
411 struct folder *This = impl_from_IFolder(iface);
412 FIXME("(%p)->(%p): stub\n", This, path);
416 static HRESULT WINAPI folder_get_Name(IFolder *iface, BSTR *name)
418 struct folder *This = impl_from_IFolder(iface);
419 FIXME("(%p)->(%p): stub\n", This, name);
423 static HRESULT WINAPI folder_put_Name(IFolder *iface, BSTR name)
425 struct folder *This = impl_from_IFolder(iface);
426 FIXME("(%p)->(%s): stub\n", This, debugstr_w(name));
430 static HRESULT WINAPI folder_get_ShortPath(IFolder *iface, BSTR *path)
432 struct folder *This = impl_from_IFolder(iface);
433 FIXME("(%p)->(%p): stub\n", This, path);
437 static HRESULT WINAPI folder_get_ShortName(IFolder *iface, BSTR *name)
439 struct folder *This = impl_from_IFolder(iface);
440 FIXME("(%p)->(%p): stub\n", This, name);
444 static HRESULT WINAPI folder_get_Drive(IFolder *iface, IDrive **drive)
446 struct folder *This = impl_from_IFolder(iface);
447 FIXME("(%p)->(%p): stub\n", This, drive);
451 static HRESULT WINAPI folder_get_ParentFolder(IFolder *iface, IFolder **parent)
453 struct folder *This = impl_from_IFolder(iface);
454 FIXME("(%p)->(%p): stub\n", This, parent);
458 static HRESULT WINAPI folder_get_Attributes(IFolder *iface, FileAttribute *attr)
460 struct folder *This = impl_from_IFolder(iface);
461 FIXME("(%p)->(%p): stub\n", This, attr);
465 static HRESULT WINAPI folder_put_Attributes(IFolder *iface, FileAttribute attr)
467 struct folder *This = impl_from_IFolder(iface);
468 FIXME("(%p)->(0x%x): stub\n", This, attr);
472 static HRESULT WINAPI folder_get_DateCreated(IFolder *iface, DATE *date)
474 struct folder *This = impl_from_IFolder(iface);
475 FIXME("(%p)->(%p): stub\n", This, date);
479 static HRESULT WINAPI folder_get_DateLastModified(IFolder *iface, DATE *date)
481 struct folder *This = impl_from_IFolder(iface);
482 FIXME("(%p)->(%p): stub\n", This, date);
486 static HRESULT WINAPI folder_get_DateLastAccessed(IFolder *iface, DATE *date)
488 struct folder *This = impl_from_IFolder(iface);
489 FIXME("(%p)->(%p): stub\n", This, date);
493 static HRESULT WINAPI folder_get_Type(IFolder *iface, BSTR *type)
495 struct folder *This = impl_from_IFolder(iface);
496 FIXME("(%p)->(%p): stub\n", This, type);
500 static HRESULT WINAPI folder_Delete(IFolder *iface, VARIANT_BOOL force)
502 struct folder *This = impl_from_IFolder(iface);
503 FIXME("(%p)->(%x): stub\n", This, force);
507 static HRESULT WINAPI folder_Copy(IFolder *iface, BSTR dest, VARIANT_BOOL overwrite)
509 struct folder *This = impl_from_IFolder(iface);
510 FIXME("(%p)->(%s %x): stub\n", This, debugstr_w(dest), overwrite);
514 static HRESULT WINAPI folder_Move(IFolder *iface, BSTR dest)
516 struct folder *This = impl_from_IFolder(iface);
517 FIXME("(%p)->(%s): stub\n", This, debugstr_w(dest));
521 static HRESULT WINAPI folder_get_IsRootFolder(IFolder *iface, VARIANT_BOOL *isroot)
523 struct folder *This = impl_from_IFolder(iface);
524 FIXME("(%p)->(%p): stub\n", This, isroot);
528 static HRESULT WINAPI folder_get_Size(IFolder *iface, VARIANT *size)
530 struct folder *This = impl_from_IFolder(iface);
531 FIXME("(%p)->(%p): stub\n", This, size);
535 static HRESULT WINAPI folder_get_SubFolders(IFolder *iface, IFolderCollection **folders)
537 struct folder *This = impl_from_IFolder(iface);
538 FIXME("(%p)->(%p): stub\n", This, folders);
542 static HRESULT WINAPI folder_get_Files(IFolder *iface, IFileCollection **files)
544 struct folder *This = impl_from_IFolder(iface);
545 FIXME("(%p)->(%p): stub\n", This, files);
549 static HRESULT WINAPI folder_CreateTextFile(IFolder *iface, BSTR filename, VARIANT_BOOL overwrite,
550 VARIANT_BOOL unicode, ITextStream **stream)
552 struct folder *This = impl_from_IFolder(iface);
553 FIXME("(%p)->(%s %x %x %p): stub\n", This, debugstr_w(filename), overwrite, unicode, stream);
557 static const IFolderVtbl foldervtbl = {
558 folder_QueryInterface,
561 folder_GetTypeInfoCount,
563 folder_GetIDsOfNames,
568 folder_get_ShortPath,
569 folder_get_ShortName,
571 folder_get_ParentFolder,
572 folder_get_Attributes,
573 folder_put_Attributes,
574 folder_get_DateCreated,
575 folder_get_DateLastModified,
576 folder_get_DateLastAccessed,
581 folder_get_IsRootFolder,
583 folder_get_SubFolders,
585 folder_CreateTextFile
588 static HRESULT create_folder(IFolder **folder)
592 This = heap_alloc(sizeof(struct folder));
593 if (!This) return E_OUTOFMEMORY;
595 This->IFolder_iface.lpVtbl = &foldervtbl;
598 *folder = &This->IFolder_iface;
603 static HRESULT WINAPI filesys_QueryInterface(IFileSystem3 *iface, REFIID riid, void **ppvObject)
605 TRACE("%p %s %p\n", iface, debugstr_guid(riid), ppvObject);
607 if ( IsEqualGUID( riid, &IID_IFileSystem3 ) ||
608 IsEqualGUID( riid, &IID_IFileSystem ) ||
609 IsEqualGUID( riid, &IID_IDispatch ) ||
610 IsEqualGUID( riid, &IID_IUnknown ) )
614 else if ( IsEqualGUID( riid, &IID_IDispatchEx ))
616 TRACE("Interface IDispatchEx not supported - returning NULL\n");
618 return E_NOINTERFACE;
620 else if ( IsEqualGUID( riid, &IID_IObjectWithSite ))
622 TRACE("Interface IObjectWithSite not supported - returning NULL\n");
624 return E_NOINTERFACE;
628 FIXME("Unsupported interface %s\n", debugstr_guid(riid));
629 return E_NOINTERFACE;
632 IFileSystem3_AddRef(iface);
637 static ULONG WINAPI filesys_AddRef(IFileSystem3 *iface)
639 TRACE("%p\n", iface);
644 static ULONG WINAPI filesys_Release(IFileSystem3 *iface)
646 TRACE("%p\n", iface);
651 static HRESULT WINAPI filesys_GetTypeInfoCount(IFileSystem3 *iface, UINT *pctinfo)
653 TRACE("(%p)->(%p)\n", iface, pctinfo);
659 static HRESULT WINAPI filesys_GetTypeInfo(IFileSystem3 *iface, UINT iTInfo,
660 LCID lcid, ITypeInfo **ppTInfo)
662 TRACE("(%p)->(%u %u %p)\n", iface, iTInfo, lcid, ppTInfo);
663 return get_typeinfo(IFileSystem3_tid, ppTInfo);
666 static HRESULT WINAPI filesys_GetIDsOfNames(IFileSystem3 *iface, REFIID riid,
667 LPOLESTR *rgszNames, UINT cNames,
668 LCID lcid, DISPID *rgDispId)
673 TRACE("(%p)->(%s %p %u %u %p)\n", iface, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
675 hr = get_typeinfo(IFileSystem3_tid, &typeinfo);
678 hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
679 ITypeInfo_Release(typeinfo);
685 static HRESULT WINAPI filesys_Invoke(IFileSystem3 *iface, DISPID dispIdMember,
686 REFIID riid, LCID lcid, WORD wFlags,
687 DISPPARAMS *pDispParams, VARIANT *pVarResult,
688 EXCEPINFO *pExcepInfo, UINT *puArgErr)
693 TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", iface, dispIdMember, debugstr_guid(riid),
694 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
696 hr = get_typeinfo(IFileSystem3_tid, &typeinfo);
699 hr = ITypeInfo_Invoke(typeinfo, iface, dispIdMember, wFlags,
700 pDispParams, pVarResult, pExcepInfo, puArgErr);
701 ITypeInfo_Release(typeinfo);
707 static HRESULT WINAPI filesys_get_Drives(IFileSystem3 *iface, IDriveCollection **ppdrives)
709 FIXME("%p %p\n", iface, ppdrives);
714 static HRESULT WINAPI filesys_BuildPath(IFileSystem3 *iface, BSTR Path,
715 BSTR Name, BSTR *pbstrResult)
717 FIXME("%p %s %s %p\n", iface, debugstr_w(Path), debugstr_w(Name), pbstrResult);
722 static HRESULT WINAPI filesys_GetDriveName(IFileSystem3 *iface, BSTR Path,
725 FIXME("%p %s %p\n", iface, debugstr_w(Path), pbstrResult);
730 static HRESULT WINAPI filesys_GetParentFolderName(IFileSystem3 *iface, BSTR Path,
733 FIXME("%p %s %p\n", iface, debugstr_w(Path), pbstrResult);
738 static HRESULT WINAPI filesys_GetFileName(IFileSystem3 *iface, BSTR Path,
741 FIXME("%p %s %p\n", iface, debugstr_w(Path), pbstrResult);
746 static HRESULT WINAPI filesys_GetBaseName(IFileSystem3 *iface, BSTR Path,
749 FIXME("%p %s %p\n", iface, debugstr_w(Path), pbstrResult);
754 static HRESULT WINAPI filesys_GetExtensionName(IFileSystem3 *iface, BSTR Path,
757 FIXME("%p %s %p\n", iface, debugstr_w(Path), pbstrResult);
762 static HRESULT WINAPI filesys_GetAbsolutePathName(IFileSystem3 *iface, BSTR Path,
765 FIXME("%p %s %p\n", iface, debugstr_w(Path), pbstrResult);
770 static HRESULT WINAPI filesys_GetTempName(IFileSystem3 *iface, BSTR *pbstrResult)
772 FIXME("%p %p\n", iface, pbstrResult);
777 static HRESULT WINAPI filesys_DriveExists(IFileSystem3 *iface, BSTR DriveSpec,
778 VARIANT_BOOL *pfExists)
780 FIXME("%p %s %p\n", iface, debugstr_w(DriveSpec), pfExists);
785 static HRESULT WINAPI filesys_FileExists(IFileSystem3 *iface, BSTR path, VARIANT_BOOL *ret)
788 TRACE("%p %s %p\n", iface, debugstr_w(path), ret);
790 if (!ret) return E_POINTER;
792 attrs = GetFileAttributesW(path);
793 *ret = attrs != INVALID_FILE_ATTRIBUTES && !(attrs & FILE_ATTRIBUTE_DIRECTORY) ? VARIANT_TRUE : VARIANT_FALSE;
797 static HRESULT WINAPI filesys_FolderExists(IFileSystem3 *iface, BSTR path, VARIANT_BOOL *ret)
800 TRACE("%p %s %p\n", iface, debugstr_w(path), ret);
802 if (!ret) return E_POINTER;
804 attrs = GetFileAttributesW(path);
805 *ret = attrs != INVALID_FILE_ATTRIBUTES && (attrs & FILE_ATTRIBUTE_DIRECTORY) ? VARIANT_TRUE : VARIANT_FALSE;
810 static HRESULT WINAPI filesys_GetDrive(IFileSystem3 *iface, BSTR DriveSpec,
813 FIXME("%p %s %p\n", iface, debugstr_w(DriveSpec), ppdrive);
818 static HRESULT WINAPI filesys_GetFile(IFileSystem3 *iface, BSTR FilePath,
821 FIXME("%p %s %p\n", iface, debugstr_w(FilePath), ppfile);
826 static HRESULT WINAPI filesys_GetFolder(IFileSystem3 *iface, BSTR FolderPath,
829 FIXME("%p %s %p\n", iface, debugstr_w(FolderPath), ppfolder);
834 static HRESULT WINAPI filesys_GetSpecialFolder(IFileSystem3 *iface,
835 SpecialFolderConst SpecialFolder,
838 FIXME("%p %d %p\n", iface, SpecialFolder, ppfolder);
843 static HRESULT WINAPI filesys_DeleteFile(IFileSystem3 *iface, BSTR FileSpec,
846 FIXME("%p %s %d\n", iface, debugstr_w(FileSpec), Force);
851 static HRESULT WINAPI filesys_DeleteFolder(IFileSystem3 *iface, BSTR FolderSpec,
854 FIXME("%p %s %d\n", iface, debugstr_w(FolderSpec), Force);
859 static HRESULT WINAPI filesys_MoveFile(IFileSystem3 *iface, BSTR Source,
862 FIXME("%p %s %s\n", iface, debugstr_w(Source), debugstr_w(Destination));
867 static HRESULT WINAPI filesys_MoveFolder(IFileSystem3 *iface,BSTR Source,
870 FIXME("%p %s %s\n", iface, debugstr_w(Source), debugstr_w(Destination));
875 static HRESULT WINAPI filesys_CopyFile(IFileSystem3 *iface, BSTR Source,
876 BSTR Destination, VARIANT_BOOL OverWriteFiles)
878 FIXME("%p %s %s %d\n", iface, debugstr_w(Source), debugstr_w(Destination), OverWriteFiles);
883 static HRESULT WINAPI filesys_CopyFolder(IFileSystem3 *iface, BSTR Source,
884 BSTR Destination, VARIANT_BOOL OverWriteFiles)
886 FIXME("%p %s %s %d\n", iface, debugstr_w(Source), debugstr_w(Destination), OverWriteFiles);
891 static HRESULT WINAPI filesys_CreateFolder(IFileSystem3 *iface, BSTR path,
896 TRACE("(%p)->(%s %p)\n", iface, debugstr_w(path), folder);
898 ret = CreateDirectoryW(path, NULL);
902 if (GetLastError() == ERROR_ALREADY_EXISTS) return CTL_E_FILEALREADYEXISTS;
903 return HRESULT_FROM_WIN32(GetLastError());
906 return create_folder(folder);
909 static HRESULT WINAPI filesys_CreateTextFile(IFileSystem3 *iface, BSTR FileName,
910 VARIANT_BOOL Overwrite, VARIANT_BOOL Unicode,
913 FIXME("%p %s %d %d %p\n", iface, debugstr_w(FileName), Overwrite, Unicode, ppts);
918 static HRESULT WINAPI filesys_OpenTextFile(IFileSystem3 *iface, BSTR filename,
919 IOMode mode, VARIANT_BOOL create,
920 Tristate format, ITextStream **stream)
922 FIXME("(%p)->(%s %d %d %d %p)\n", iface, debugstr_w(filename), mode, create, format, stream);
923 return create_textstream(mode, stream);
926 static HRESULT WINAPI filesys_GetStandardStream(IFileSystem3 *iface,
927 StandardStreamTypes StandardStreamType,
928 VARIANT_BOOL Unicode,
931 FIXME("%p %d %d %p\n", iface, StandardStreamType, Unicode, ppts);
936 static HRESULT WINAPI filesys_GetFileVersion(IFileSystem3 *iface, BSTR FileName,
939 FIXME("%p %s %p\n", iface, debugstr_w(FileName), FileVersion);
944 static const struct IFileSystem3Vtbl filesys_vtbl =
946 filesys_QueryInterface,
949 filesys_GetTypeInfoCount,
951 filesys_GetIDsOfNames,
955 filesys_GetDriveName,
956 filesys_GetParentFolderName,
959 filesys_GetExtensionName,
960 filesys_GetAbsolutePathName,
964 filesys_FolderExists,
968 filesys_GetSpecialFolder,
970 filesys_DeleteFolder,
975 filesys_CreateFolder,
976 filesys_CreateTextFile,
977 filesys_OpenTextFile,
978 filesys_GetStandardStream,
979 filesys_GetFileVersion
982 static IFileSystem3 filesystem = { &filesys_vtbl };
984 HRESULT WINAPI FileSystem_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
986 TRACE("(%p %s %p)\n", outer, debugstr_guid(riid), ppv);
988 return IFileSystem3_QueryInterface(&filesystem, riid, ppv);