2 * Copyright (C) 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
22 cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
23 cpp_quote("#undef CopyFile")
24 cpp_quote("#undef DeleteFile")
25 cpp_quote("#undef MoveFile")
29 uuid(420B2830-E718-11CF-893D-00A0C9054228),
34 importlib("stdole2.tlb");
36 interface IDictionary;
38 interface IDriveCollection;
40 interface IFileCollection;
41 interface IFileSystem;
42 interface IFileSystem3;
44 interface IFolderCollection;
45 interface IScriptEncoder;
46 interface ITextStream;
48 typedef enum CompareMethod
64 TristateTrue = 0xffffffff,
66 TristateUseDefault = 0xfffffffe,
67 TristateMixed = 0xfffffffe
70 typedef enum FileAttribute
83 typedef enum SpecialFolderConst
90 typedef enum DriveTypeConst
100 typedef enum StandardStreamTypes
105 } StandardStreamTypes;
109 uuid(42C642C1-97E1-11CF-978F-00A02463E06F),
114 interface IDictionary : IDispatch
116 [id(00000000), propputref]
117 HRESULT Item([in] VARIANT* Key, [in] VARIANT* pRetItem);
119 [id(00000000), propput]
120 HRESULT Item([in] VARIANT* Key, [in] VARIANT* pRetItem);
122 [id(00000000), propget]
123 HRESULT Item([in] VARIANT* Key, [out, retval] VARIANT* pRetItem);
126 HRESULT Add([in] VARIANT* Key, [in] VARIANT* Item);
128 [id(0x00000002), propget]
129 HRESULT Count([out, retval] long* pCount);
132 HRESULT Exists([in] VARIANT* Key, [out, retval] VARIANT_BOOL* pExists);
135 HRESULT Items([out, retval] VARIANT* pItemsArray);
137 [id(0x00000005), propput]
138 HRESULT Key([in] VARIANT* Key, [in] VARIANT* rhs);
141 HRESULT Keys([out, retval] VARIANT* pKeysArray);
144 HRESULT Remove([in] VARIANT* Key);
149 [id(0x00000009), propput]
150 HRESULT CompareMode([in] CompareMethod pcomp);
152 [id(0x00000009), propget]
153 HRESULT CompareMode([out, retval] CompareMethod* pcomp);
155 [id(DISPID_NEWENUM), restricted]
156 HRESULT _NewEnum([out, retval] IUnknown** ppunk);
158 [id(0x0000000a), propget, hidden]
159 HRESULT HashVal([in] VARIANT* Key, [out, retval] VARIANT* HashVal);
164 uuid(0AB5A3D0-E5B6-11D0-ABF5-00A0C90FFFC0),
170 interface IFileSystem : IDispatch
172 [id(0x0000271a), propget]
173 HRESULT Drives([out, retval] IDriveCollection** ppdrives);
176 HRESULT BuildPath([in] BSTR Path, [in] BSTR Name, [out, retval] BSTR* pbstrResult);
179 HRESULT GetDriveName([in] BSTR Path, [out, retval] BSTR* pbstrResult);
182 HRESULT GetParentFolderName([in] BSTR Path, [out, retval] BSTR* pbstrResult);
185 HRESULT GetFileName([in] BSTR Path, [out, retval] BSTR* pbstrResult);
188 HRESULT GetBaseName([in] BSTR Path, [out, retval] BSTR* pbstrResult);
191 HRESULT GetExtensionName([in] BSTR Path, [out, retval] BSTR* pbstrResult);
194 HRESULT GetAbsolutePathName([in] BSTR Path, [out, retval] BSTR* pbstrResult);
197 HRESULT GetTempName([out, retval] BSTR* pbstrResult);
200 HRESULT DriveExists([in] BSTR DriveSpec, [out, retval] VARIANT_BOOL* pfExists);
203 HRESULT FileExists([in] BSTR FileSpec, [out, retval] VARIANT_BOOL* pfExists);
206 HRESULT FolderExists([in] BSTR FolderSpec, [out, retval] VARIANT_BOOL* pfExists);
209 HRESULT GetDrive([in] BSTR DriveSpec, [out, retval] IDrive** ppdrive);
212 HRESULT GetFile([in] BSTR FilePath, [out, retval] IFile** ppfile);
215 HRESULT GetFolder([in] BSTR FolderPath, [out, retval] IFolder** ppfolder);
218 HRESULT GetSpecialFolder([in] SpecialFolderConst SpecialFolder, [out, retval] IFolder** ppfolder);
221 HRESULT DeleteFile([in] BSTR FileSpec, [in, optional, defaultvalue(0)] VARIANT_BOOL Force);
224 HRESULT DeleteFolder([in] BSTR FolderSpec, [in, optional, defaultvalue(0)] VARIANT_BOOL Force);
226 [id(0x000004b4), helpstring("Move a file"), helpcontext(0x00214bab)]
227 HRESULT MoveFile([in] BSTR Source, [in] BSTR Destination);
230 HRESULT MoveFolder([in] BSTR Source, [in] BSTR Destination);
233 HRESULT CopyFile([in] BSTR Source, [in] BSTR Destination,
234 [in, optional, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles);
237 HRESULT CopyFolder([in] BSTR Source, [in] BSTR Destination,
238 [in, optional, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles);
241 HRESULT CreateFolder([in] BSTR Path, [out, retval] IFolder** ppfolder);
244 HRESULT CreateTextFile([in] BSTR FileName, [in, optional, defaultvalue(-1)] VARIANT_BOOL Overwrite,
245 [in, optional, defaultvalue(0)] VARIANT_BOOL Unicode, [out, retval] ITextStream** ppts);
248 HRESULT OpenTextFile([in] BSTR FileName, [in, optional, defaultvalue(1)] IOMode IOMode,
249 [in, optional, defaultvalue(0)] VARIANT_BOOL Create,
250 [in, optional, defaultvalue(0)] Tristate Format,
251 [out, retval] ITextStream** ppts);
256 uuid(C7C3F5A1-88A3-11D0-ABCB-00A0C90FFFC0),
262 interface IDriveCollection : IDispatch {
264 HRESULT Item([in] VARIANT Key, [out, retval] IDrive** ppdrive);
266 [id(DISPID_NEWENUM), propget, restricted, hidden]
267 HRESULT _NewEnum([out, retval] IUnknown** ppenum);
269 [id(0x00000001), propget]
270 HRESULT Count([out, retval] long* plCount);
275 uuid(C7C3F5A0-88A3-11D0-ABCB-00A0C90FFFC0),
281 interface IDrive : IDispatch
283 [id(00000000), propget]
284 HRESULT Path([out, retval] BSTR* pbstrPath);
286 [id(0x00002710), propget]
287 HRESULT DriveLetter([out, retval] BSTR* pbstrLetter)
289 [id(0x00002711), propget]
290 HRESULT ShareName([out, retval] BSTR* pbstrShareName);
292 [id(0x00002712), propget]
293 HRESULT DriveType([out, retval] DriveTypeConst* pdt);
295 [id(0x00002713), propget]
296 HRESULT RootFolder([out, retval] IFolder** ppfolder);
298 [id(0x00002715), propget]
299 HRESULT AvailableSpace([out, retval] VARIANT* pvarAvail);
301 [id(0x00002714), propget]
302 HRESULT FreeSpace([out, retval] VARIANT* pvarFree);
304 [id(0x00002716), propget]
305 HRESULT TotalSize([out, retval] VARIANT* pvarTotal);
307 [id(0x00002717), propget]
308 HRESULT VolumeName([out, retval] BSTR* pbstrName);
310 [id(0x00002717), propput]
311 HRESULT VolumeName([in] BSTR pbstrName);
313 [id(0x00002718), propget]
314 HRESULT FileSystem([out, retval] BSTR* pbstrFileSystem);
316 [id(0x00002719), propget]
317 HRESULT SerialNumber([out, retval] long* pulSerialNumber);
319 [id(0x0000271a), propget]
320 HRESULT IsReady([out, retval] VARIANT_BOOL* pfReady);
325 uuid(C7C3F5A2-88A3-11D0-ABCB-00A0C90FFFC0),
331 interface IFolder : IDispatch
333 [id(00000000), propget]
334 HRESULT Path([out, retval] BSTR* pbstrPath);
336 [id(0x000003e8), propget]
337 HRESULT Name([out, retval] BSTR* pbstrName);
339 [id(0x000003e8), propput]
340 HRESULT Name([in] BSTR pbstrName);
342 [id(0x000003ea), propget]
343 HRESULT ShortPath([out, retval] BSTR* pbstrPath);
345 [id(0x000003e9), propget]
346 HRESULT ShortName([out, retval] BSTR* pbstrName);
348 [id(0x000003ec), propget]
349 HRESULT Drive([out, retval] IDrive** ppdrive);
351 [id(0x000003ed), propget]
352 HRESULT ParentFolder([out, retval] IFolder** ppfolder);
354 [id(0x000003eb), propget]
355 HRESULT Attributes([out, retval] FileAttribute* pfa);
357 [id(0x000003eb), propput]
358 HRESULT Attributes([in] FileAttribute pfa);
360 [id(0x000003ee), propget]
361 HRESULT DateCreated([out, retval] DATE* pdate);
363 [id(0x000003ef), propget]
364 HRESULT DateLastModified([out, retval] DATE* pdate);
366 [id(0x000003f0), propget]
367 HRESULT DateLastAccessed([out, retval] DATE* pdate);
369 [id(0x000003f2), propget]
370 HRESULT Type([out, retval] BSTR* pbstrType);
373 HRESULT Delete([in, optional, defaultvalue(0)] VARIANT_BOOL Force);
376 HRESULT Copy([in] BSTR Destination, [in, optional, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles);
379 HRESULT Move([in] BSTR Destination);
381 [id(0x00002710), propget]
382 HRESULT IsRootFolder([out, retval] VARIANT_BOOL* pfRootFolder);
384 [id(0x000003f1), propget]
385 HRESULT Size([out, retval] VARIANT* pvarSize);
387 [id(0x00002711), propget]
388 HRESULT SubFolders([out, retval] IFolderCollection** ppfolders);
390 [id(0x00002712), propget]
391 HRESULT Files([out, retval] IFileCollection** ppfiles);
394 HRESULT CreateTextFile([in] BSTR FileName, [in, optional, defaultvalue(-1)] VARIANT_BOOL Overwrite,
395 [in, optional, defaultvalue(0)] VARIANT_BOOL Unicode, [out, retval] ITextStream** ppts);
400 uuid(C7C3F5A3-88A3-11D0-ABCB-00A0C90FFFC0),
406 interface IFolderCollection : IDispatch
409 HRESULT Add([in] BSTR Name, [out, retval] IFolder** ppfolder);
411 [id(00000000), propget]
412 HRESULT Item([in] VARIANT Key, [out, retval] IFolder** ppfolder);
414 [id(DISPID_NEWENUM), propget, restricted, hidden]
415 HRESULT _NewEnum([out, retval] IUnknown** ppenum);
417 [id(0x00000001), propget]
418 HRESULT Count([out, retval] long* plCount);
423 uuid(C7C3F5A5-88A3-11D0-ABCB-00A0C90FFFC0),
429 interface IFileCollection : IDispatch
431 [id(00000000), propget]
432 HRESULT Item([in] VARIANT Key, [out, retval] IFile** ppfile);
434 [id(DISPID_NEWENUM), propget, restricted, hidden]
435 HRESULT _NewEnum([out, retval] IUnknown** ppenum);
437 [id(0x00000001), propget]
438 HRESULT Count([out, retval] long* plCount);
443 uuid(C7C3F5A4-88A3-11D0-ABCB-00A0C90FFFC0),
449 interface IFile : IDispatch
451 [id(00000000), propget]
452 HRESULT Path([out, retval] BSTR* pbstrPath);
454 [id(0x000003e8), propget]
455 HRESULT Name([out, retval] BSTR* pbstrName);
457 [id(0x000003e8), propput]
458 HRESULT Name([in] BSTR pbstrName);
460 [id(0x000003ea), propget]
461 HRESULT ShortPath([out, retval] BSTR* pbstrPath);
463 [id(0x000003e9), propget]
464 HRESULT ShortName([out, retval] BSTR* pbstrName);
466 [id(0x000003ec), propget]
467 HRESULT Drive([out, retval] IDrive** ppdrive);
469 [id(0x000003ed), propget]
470 HRESULT ParentFolder([out, retval] IFolder** ppfolder);
472 [id(0x000003eb), propget]
473 HRESULT Attributes([out, retval] FileAttribute* pfa);
475 [id(0x000003eb), propput]
476 HRESULT Attributes([in] FileAttribute pfa);
478 [id(0x000003ee), propget]
479 HRESULT DateCreated([out, retval] DATE* pdate);
481 [id(0x000003ef), propget]
482 HRESULT DateLastModified([out, retval] DATE* pdate);
484 [id(0x000003f0), propget]
485 HRESULT DateLastAccessed([out, retval] DATE* pdate);
487 [id(0x000003f1), propget]
488 HRESULT Size([out, retval] VARIANT* pvarSize);
490 [id(0x000003f2), propget]
491 HRESULT Type([out, retval] BSTR* pbstrType);
494 HRESULT Delete([in, optional, defaultvalue(0)] VARIANT_BOOL Force);
497 HRESULT Copy([in] BSTR Destination, [in, optional, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles);
500 HRESULT Move([in] BSTR Destination);
503 HRESULT OpenAsTextStream([in, optional, defaultvalue(1)] IOMode IOMode,
504 [in, optional, defaultvalue(0)] Tristate Format, [out, retval] ITextStream** ppts);
509 uuid(53BAD8C1-E718-11CF-893D-00A0C9054228),
515 interface ITextStream : IDispatch
517 [id(0x00002710), propget]
518 HRESULT Line([out, retval] long* Line);
520 [id(0xfffffdef), propget]
521 HRESULT Column([out, retval] long* Column);
523 [id(0x00002712), propget]
524 HRESULT AtEndOfStream([out, retval] VARIANT_BOOL* EOS);
526 [id(0x00002713), propget]
527 HRESULT AtEndOfLine([out, retval] VARIANT_BOOL* EOL);
529 HRESULT Read([in] long Characters, [out, retval] BSTR* Text);
532 HRESULT ReadLine([out, retval] BSTR* Text);
535 HRESULT ReadAll([out, retval] BSTR* Text);
538 HRESULT Write([in] BSTR Text);
541 HRESULT WriteLine([in, optional, defaultvalue("")] BSTR Text);
544 HRESULT WriteBlankLines([in] long Lines);
547 HRESULT Skip([in] long Characters);
558 uuid(2A0B9D10-4B87-11D3-A97A-00104B365C9F),
563 interface IFileSystem3 : IFileSystem
566 HRESULT GetStandardStream([in] StandardStreamTypes StandardStreamType,
567 [in, optional, defaultvalue(0)] VARIANT_BOOL Unicode, [out, retval] ITextStream** ppts);
570 HRESULT GetFileVersion([in] BSTR FileName, [out, retval] BSTR* FileVersion);
575 uuid(AADC65F6-CFF1-11D1-B747-00C04FC2B085),
579 interface IScriptEncoder : IDispatch
582 HRESULT EncodeScriptFile([in] BSTR szExt, [in] BSTR bstrStreamIn, [in] long cFlags,
583 [in] BSTR bstrDefaultLang, [out, retval] BSTR* pbstrStreamOut);
587 uuid(EE09B103-97E0-11CF-978F-00A02463E06F),
589 helpstring("Scripting.Dictionary"),
590 threading(apartment),
591 progid("Scripting.Dictionary")
595 [default] interface IDictionary;
599 uuid(0D43FE01-F093-11CF-8940-00A0C9054228),
601 helpstring("FileSystem Object"),
603 progid("Scripting.FileSystemObject")
605 coclass FileSystemObject
607 [default] interface IFileSystem3;
611 uuid(C7C3F5B1-88A3-11D0-ABCB-00A0C90FFFC0),
617 [default] interface IDrive;
621 uuid(C7C3F5B2-88A3-11D0-ABCB-00A0C90FFFC0),
627 [default] interface IDriveCollection;
631 uuid(C7C3F5B3-88A3-11D0-ABCB-00A0C90FFFC0),
637 [default] interface IFolder;
641 uuid(C7C3F5B4-88A3-11D0-ABCB-00A0C90FFFC0),
647 [default] interface IFolderCollection;
651 uuid(C7C3F5B5-88A3-11D0-ABCB-00A0C90FFFC0),
657 [default] interface IFile;
661 uuid(C7C3F5B6-88A3-11D0-ABCB-00A0C90FFFC0),
667 [default] interface IFileCollection;
671 uuid(0BB02EC0-EF49-11CF-8940-00A0C9054228),
677 [default] interface ITextStream;
681 uuid(32DA2B15-CFED-11D1-B747-00C04FC2B085),
683 helpstring("Script Encoder Object"),
684 threading(apartment),
685 progid("Scripting.Encoder")
689 [default] interface IScriptEncoder;