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
19 #pragma makedep header
25 cpp_quote
("#ifdef WINE_NO_UNICODE_MACROS")
26 cpp_quote
("#undef CopyFile")
27 cpp_quote
("#undef DeleteFile")
28 cpp_quote
("#undef MoveFile")
30 /* this is not defined in public headers */
31 cpp_quote
("#define CTL_E_ENDOFFILE STD_CTL_SCODE(62)")
32 cpp_quote
("#define CTL_E_KEY_ALREADY_EXISTS STD_CTL_SCODE(457)")
33 cpp_quote
("#define CTL_E_ELEMENT_NOT_FOUND STD_CTL_SCODE(32811)")
36 uuid(420B2830
-E718
-11CF
-893D
-00A0C9054228
),
41 importlib
("stdole2.tlb");
45 typedef enum CompareMethod
63 TristateUseDefault
= -2,
67 typedef enum FileAttribute
80 typedef enum SpecialFolderConst
87 typedef enum DriveTypeConst
97 typedef enum StandardStreamTypes
102 } StandardStreamTypes
;
106 uuid(42C642C1
-97E1
-11CF
-978F
-00A02463E06F
),
111 interface IDictionary
: IDispatch
113 [id(DISPID_VALUE
), propputref]
114 HRESULT Item
([in] VARIANT* Key
, [in] VARIANT* pRetItem
);
116 [id(DISPID_VALUE
), propput]
117 HRESULT Item
([in] VARIANT* Key
, [in] VARIANT* pRetItem
);
119 [id(DISPID_VALUE
), propget]
120 HRESULT Item
([in] VARIANT* Key
, [out, retval] VARIANT* pRetItem
);
123 HRESULT Add
([in] VARIANT* Key
, [in] VARIANT* Item
);
125 [id(0x00000002), propget]
126 HRESULT Count
([out, retval] long* pCount
);
129 HRESULT Exists
([in] VARIANT* Key
, [out, retval] VARIANT_BOOL* pExists
);
132 HRESULT Items
([out, retval] VARIANT* pItemsArray
);
134 [id(0x00000005), propput]
135 HRESULT Key
([in] VARIANT* Key
, [in] VARIANT* rhs
);
138 HRESULT Keys
([out, retval] VARIANT* pKeysArray
);
141 HRESULT Remove
([in] VARIANT* Key
);
146 [id(0x00000009), propput]
147 HRESULT CompareMode
([in] CompareMethod pcomp
);
149 [id(0x00000009), propget]
150 HRESULT CompareMode
([out, retval] CompareMethod
* pcomp
);
152 [id(DISPID_NEWENUM
), restricted]
153 HRESULT _NewEnum
([out, retval] IUnknown
** ppunk
);
155 [id(0x0000000a), propget, hidden]
156 HRESULT HashVal
([in] VARIANT* Key
, [out, retval] VARIANT* HashVal
);
161 uuid(C7C3F5A0
-88A3
-11D0
-ABCB
-00A0C90FFFC0
),
167 interface IDrive
: IDispatch
169 [id(DISPID_VALUE
), propget]
170 HRESULT Path
([out, retval] BSTR* pbstrPath
);
172 [id(0x00002710), propget]
173 HRESULT DriveLetter
([out, retval] BSTR* pbstrLetter
);
175 [id(0x00002711), propget]
176 HRESULT ShareName
([out, retval] BSTR* pbstrShareName
);
178 [id(0x00002712), propget]
179 HRESULT DriveType
([out, retval] DriveTypeConst
* pdt
);
181 [id(0x00002713), propget]
182 HRESULT RootFolder
([out, retval] IFolder
** ppfolder
);
184 [id(0x00002715), propget]
185 HRESULT AvailableSpace
([out, retval] VARIANT* pvarAvail
);
187 [id(0x00002714), propget]
188 HRESULT FreeSpace
([out, retval] VARIANT* pvarFree
);
190 [id(0x00002716), propget]
191 HRESULT TotalSize
([out, retval] VARIANT* pvarTotal
);
193 [id(0x00002717), propget]
194 HRESULT VolumeName
([out, retval] BSTR* pbstrName
);
196 [id(0x00002717), propput]
197 HRESULT VolumeName
([in] BSTR pbstrName
);
199 [id(0x00002718), propget]
200 HRESULT FileSystem
([out, retval] BSTR* pbstrFileSystem
);
202 [id(0x00002719), propget]
203 HRESULT SerialNumber
([out, retval] long* pulSerialNumber
);
205 [id(0x0000271a), propget]
206 HRESULT IsReady
([out, retval] VARIANT_BOOL* pfReady
);
211 uuid(C7C3F5A1
-88A3
-11D0
-ABCB
-00A0C90FFFC0
),
217 interface IDriveCollection
: IDispatch
{
218 [id(DISPID_VALUE
), propget]
219 HRESULT Item
([in] VARIANT Key
, [out, retval] IDrive
** ppdrive
);
221 [id(DISPID_NEWENUM
), propget, restricted, hidden]
222 HRESULT _NewEnum
([out, retval] IUnknown
** ppenum
);
224 [id(0x00000001), propget]
225 HRESULT Count
([out, retval] long* plCount
);
230 uuid(53BAD8C1
-E718
-11CF
-893D
-00A0C9054228
),
236 interface ITextStream
: IDispatch
238 [id(0x00002710), propget]
239 HRESULT Line
([out, retval] long* Line
);
241 [id(0xfffffdef), propget]
242 HRESULT Column
([out, retval] long* Column
);
244 [id(0x00002712), propget]
245 HRESULT AtEndOfStream
([out, retval] VARIANT_BOOL* EOS
);
247 [id(0x00002713), propget]
248 HRESULT AtEndOfLine
([out, retval] VARIANT_BOOL* EOL
);
251 HRESULT Read
([in] long Characters
, [out, retval] BSTR* Text
);
254 HRESULT ReadLine
([out, retval] BSTR* Text
);
257 HRESULT ReadAll
([out, retval] BSTR* Text
);
260 HRESULT Write
([in] BSTR Text
);
263 HRESULT WriteLine
([in, defaultvalue("")] BSTR Text
);
266 HRESULT WriteBlankLines
([in] long Lines
);
269 HRESULT Skip
([in] long Characters
);
280 uuid(C7C3F5A4
-88A3
-11D0
-ABCB
-00A0C90FFFC0
),
286 interface IFile
: IDispatch
288 [id(DISPID_VALUE
), propget]
289 HRESULT Path
([out, retval] BSTR* pbstrPath
);
291 [id(0x000003e8), propget]
292 HRESULT Name
([out, retval] BSTR* pbstrName
);
294 [id(0x000003e8), propput]
295 HRESULT Name
([in] BSTR pbstrName
);
297 [id(0x000003ea), propget]
298 HRESULT ShortPath
([out, retval] BSTR* pbstrPath
);
300 [id(0x000003e9), propget]
301 HRESULT ShortName
([out, retval] BSTR* pbstrName
);
303 [id(0x000003ec), propget]
304 HRESULT Drive
([out, retval] IDrive
** ppdrive
);
306 [id(0x000003ed), propget]
307 HRESULT ParentFolder
([out, retval] IFolder
** ppfolder
);
309 [id(0x000003eb), propget]
310 HRESULT Attributes
([out, retval] FileAttribute
* pfa
);
312 [id(0x000003eb), propput]
313 HRESULT Attributes
([in] FileAttribute pfa
);
315 [id(0x000003ee), propget]
316 HRESULT DateCreated
([out, retval] DATE
* pdate
);
318 [id(0x000003ef), propget]
319 HRESULT DateLastModified
([out, retval] DATE
* pdate
);
321 [id(0x000003f0), propget]
322 HRESULT DateLastAccessed
([out, retval] DATE
* pdate
);
324 [id(0x000003f1), propget]
325 HRESULT Size
([out, retval] VARIANT* pvarSize
);
327 [id(0x000003f2), propget]
328 HRESULT Type
([out, retval] BSTR* pbstrType
);
331 HRESULT Delete
([in, defaultvalue(0)] VARIANT_BOOL Force
);
334 HRESULT Copy
([in] BSTR Destination
, [in, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles
);
337 HRESULT Move
([in] BSTR Destination
);
340 HRESULT OpenAsTextStream
([in, defaultvalue(1)] IOMode IOMode
,
341 [in, defaultvalue(0)] Tristate Format
, [out, retval] ITextStream
** ppts
);
346 uuid(0AB5A3D0
-E5B6
-11D0
-ABF5
-00A0C90FFFC0
),
352 interface IFileSystem
: IDispatch
354 [id(0x0000271a), propget]
355 HRESULT Drives
([out, retval] IDriveCollection
** ppdrives
);
358 HRESULT BuildPath
([in] BSTR Path
, [in] BSTR Name
, [out, retval] BSTR* pbstrResult
);
361 HRESULT GetDriveName
([in] BSTR Path
, [out, retval] BSTR* pbstrResult
);
364 HRESULT GetParentFolderName
([in] BSTR Path
, [out, retval] BSTR* pbstrResult
);
367 HRESULT GetFileName
([in] BSTR Path
, [out, retval] BSTR* pbstrResult
);
370 HRESULT GetBaseName
([in] BSTR Path
, [out, retval] BSTR* pbstrResult
);
373 HRESULT GetExtensionName
([in] BSTR Path
, [out, retval] BSTR* pbstrResult
);
376 HRESULT GetAbsolutePathName
([in] BSTR Path
, [out, retval] BSTR* pbstrResult
);
379 HRESULT GetTempName
([out, retval] BSTR* pbstrResult
);
382 HRESULT DriveExists
([in] BSTR DriveSpec
, [out, retval] VARIANT_BOOL* pfExists
);
385 HRESULT FileExists
([in] BSTR FileSpec
, [out, retval] VARIANT_BOOL* pfExists
);
388 HRESULT FolderExists
([in] BSTR FolderSpec
, [out, retval] VARIANT_BOOL* pfExists
);
391 HRESULT GetDrive
([in] BSTR DriveSpec
, [out, retval] IDrive
** ppdrive
);
394 HRESULT GetFile
([in] BSTR FilePath
, [out, retval] IFile
** ppfile
);
397 HRESULT GetFolder
([in] BSTR FolderPath
, [out, retval] IFolder
** ppfolder
);
400 HRESULT GetSpecialFolder
([in] SpecialFolderConst SpecialFolder
, [out, retval] IFolder
** ppfolder
);
403 HRESULT DeleteFile
([in] BSTR FileSpec
, [in, defaultvalue(0)] VARIANT_BOOL Force
);
406 HRESULT DeleteFolder
([in] BSTR FolderSpec
, [in, defaultvalue(0)] VARIANT_BOOL Force
);
408 [id(0x000004b4), helpstring("Move a file"), helpcontext(0x00214bab)]
409 HRESULT MoveFile
([in] BSTR Source, [in] BSTR Destination
);
412 HRESULT MoveFolder
([in] BSTR Source, [in] BSTR Destination
);
415 HRESULT CopyFile
([in] BSTR Source, [in] BSTR Destination
,
416 [in, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles
);
419 HRESULT CopyFolder
([in] BSTR Source, [in] BSTR Destination
,
420 [in, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles
);
423 HRESULT CreateFolder
([in] BSTR Path
, [out, retval] IFolder
** ppfolder
);
426 HRESULT CreateTextFile
([in] BSTR FileName
, [in, defaultvalue(-1)] VARIANT_BOOL Overwrite
,
427 [in, defaultvalue(0)] VARIANT_BOOL Unicode
, [out, retval] ITextStream
** ppts
);
430 HRESULT OpenTextFile
([in] BSTR FileName
, [in, defaultvalue(1)] IOMode IOMode
,
431 [in, defaultvalue(0)] VARIANT_BOOL Create
,
432 [in, defaultvalue(0)] Tristate Format
,
433 [out, retval] ITextStream
** ppts
);
438 uuid(C7C3F5A5
-88A3
-11D0
-ABCB
-00A0C90FFFC0
),
444 interface IFileCollection
: IDispatch
446 [id(DISPID_VALUE
), propget]
447 HRESULT Item
([in] VARIANT Key
, [out, retval] IFile
** ppfile
);
449 [id(DISPID_NEWENUM
), propget, restricted, hidden]
450 HRESULT _NewEnum
([out, retval] IUnknown
** ppenum
);
452 [id(0x00000001), propget]
453 HRESULT Count
([out, retval] long* plCount
);
458 uuid(C7C3F5A3
-88A3
-11D0
-ABCB
-00A0C90FFFC0
),
464 interface IFolderCollection
: IDispatch
467 HRESULT Add
([in] BSTR Name
, [out, retval] IFolder
** ppfolder
);
469 [id(DISPID_VALUE
), propget]
470 HRESULT Item
([in] VARIANT Key
, [out, retval] IFolder
** ppfolder
);
472 [id(DISPID_NEWENUM
), propget, restricted, hidden]
473 HRESULT _NewEnum
([out, retval] IUnknown
** ppenum
);
475 [id(0x00000001), propget]
476 HRESULT Count
([out, retval] long* plCount
);
481 uuid(C7C3F5A2
-88A3
-11D0
-ABCB
-00A0C90FFFC0
),
487 interface IFolder
: IDispatch
489 [id(DISPID_VALUE
), propget]
490 HRESULT Path
([out, retval] BSTR* pbstrPath
);
492 [id(0x000003e8), propget]
493 HRESULT Name
([out, retval] BSTR* pbstrName
);
495 [id(0x000003e8), propput]
496 HRESULT Name
([in] BSTR pbstrName
);
498 [id(0x000003ea), propget]
499 HRESULT ShortPath
([out, retval] BSTR* pbstrPath
);
501 [id(0x000003e9), propget]
502 HRESULT ShortName
([out, retval] BSTR* pbstrName
);
504 [id(0x000003ec), propget]
505 HRESULT Drive
([out, retval] IDrive
** ppdrive
);
507 [id(0x000003ed), propget]
508 HRESULT ParentFolder
([out, retval] IFolder
** ppfolder
);
510 [id(0x000003eb), propget]
511 HRESULT Attributes
([out, retval] FileAttribute
* pfa
);
513 [id(0x000003eb), propput]
514 HRESULT Attributes
([in] FileAttribute pfa
);
516 [id(0x000003ee), propget]
517 HRESULT DateCreated
([out, retval] DATE
* pdate
);
519 [id(0x000003ef), propget]
520 HRESULT DateLastModified
([out, retval] DATE
* pdate
);
522 [id(0x000003f0), propget]
523 HRESULT DateLastAccessed
([out, retval] DATE
* pdate
);
525 [id(0x000003f2), propget]
526 HRESULT Type
([out, retval] BSTR* pbstrType
);
529 HRESULT Delete
([in, defaultvalue(0)] VARIANT_BOOL Force
);
532 HRESULT Copy
([in] BSTR Destination
, [in, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles
);
535 HRESULT Move
([in] BSTR Destination
);
537 [id(0x00002710), propget]
538 HRESULT IsRootFolder
([out, retval] VARIANT_BOOL* pfRootFolder
);
540 [id(0x000003f1), propget]
541 HRESULT Size
([out, retval] VARIANT* pvarSize
);
543 [id(0x00002711), propget]
544 HRESULT SubFolders
([out, retval] IFolderCollection
** ppfolders
);
546 [id(0x00002712), propget]
547 HRESULT Files
([out, retval] IFileCollection
** ppfiles
);
550 HRESULT CreateTextFile
([in] BSTR FileName
, [in, defaultvalue(-1)] VARIANT_BOOL Overwrite
,
551 [in, defaultvalue(0)] VARIANT_BOOL Unicode
, [out, retval] ITextStream
** ppts
);
556 uuid(2A0B9D10
-4B87
-11D3
-A97A
-00104B365C9F
),
561 interface IFileSystem3
: IFileSystem
564 HRESULT GetStandardStream
([in] StandardStreamTypes StandardStreamType
,
565 [in, defaultvalue(0)] VARIANT_BOOL Unicode
, [out, retval] ITextStream
** ppts
);
568 HRESULT GetFileVersion
([in] BSTR FileName
, [out, retval] BSTR* FileVersion
);
573 uuid(AADC65F6
-CFF1
-11D1
-B747
-00C04FC2B085
),
577 interface IScriptEncoder
: IDispatch
580 HRESULT EncodeScriptFile
([in] BSTR szExt
, [in] BSTR bstrStreamIn
, [in] long cFlags
,
581 [in] BSTR bstrDefaultLang
, [out, retval] BSTR* pbstrStreamOut
);
585 uuid(EE09B103
-97E0
-11CF
-978F
-00A02463E06F
),
587 helpstring("Scripting.Dictionary"),
588 threading
(apartment
),
589 progid
("Scripting.Dictionary")
593 [default] interface IDictionary
;
597 uuid(0D43FE01
-F093
-11CF
-8940-00A0C9054228
),
599 helpstring("FileSystem Object"),
601 progid
("Scripting.FileSystemObject")
603 coclass FileSystemObject
605 [default] interface IFileSystem3
;
609 uuid(C7C3F5B1
-88A3
-11D0
-ABCB
-00A0C90FFFC0
),
615 [default] interface IDrive
;
619 uuid(C7C3F5B2
-88A3
-11D0
-ABCB
-00A0C90FFFC0
),
625 [default] interface IDriveCollection
;
629 uuid(C7C3F5B3
-88A3
-11D0
-ABCB
-00A0C90FFFC0
),
635 [default] interface IFolder
;
639 uuid(C7C3F5B4
-88A3
-11D0
-ABCB
-00A0C90FFFC0
),
645 [default] interface IFolderCollection
;
649 uuid(C7C3F5B5
-88A3
-11D0
-ABCB
-00A0C90FFFC0
),
655 [default] interface IFile
;
659 uuid(C7C3F5B6
-88A3
-11D0
-ABCB
-00A0C90FFFC0
),
665 [default] interface IFileCollection
;
669 uuid(0BB02EC0
-EF49
-11CF
-8940-00A0C9054228
),
675 [default] interface ITextStream
;
679 uuid(32DA2B15
-CFED
-11D1
-B747
-00C04FC2B085
),
681 helpstring("Script Encoder Object"),
682 threading
(apartment
),
683 progid
("Scripting.Encoder")
687 [default] interface IScriptEncoder
;