2 * Copyright 2011 Jacek Caban for CodeWeavers
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
20 cpp_quote
("#undef ExpandEnvironmentStrings")
23 helpstring("Windows Script Host Object Model"),
24 uuid(f935dc20
-1cf0
-11d0
-adb9
-00c04fd58a0b
),
27 library IWshRuntimeLibrary
29 importlib
("stdole2.tlb");
67 TristateUseDefault
= -2,
72 interface IFolderCollection
;
75 uuid(53bad8c1
-e718
-11cf
-893d
-00a0c9054228
),
82 interface ITextStream
: IDispatch
{
84 HRESULT Line
([out, retval] long* Line
);
86 [id(0xfffffdef), propget]
87 HRESULT Column
([out, retval] long* Column
);
90 HRESULT AtEndOfStream
([out, retval] VARIANT_BOOL* EOS
);
93 HRESULT AtEndOfLine
([out, retval] VARIANT_BOOL* EOL
);
96 HRESULT Read
([in] long Characters
, [out, retval] BSTR* Text
);
99 HRESULT ReadLine
([out, retval] BSTR* Text
);
102 HRESULT ReadAll
([out, retval] BSTR* Text
);
105 HRESULT Write
([in] BSTR Text
);
108 HRESULT WriteLine
([in, optional, defaultvalue("")] BSTR Text
);
111 HRESULT WriteBlankLines
([in] long Lines
);
114 HRESULT Skip
([in] long Characters
);
124 uuid(c7c3f5a0
-88a3
-11d0
-abcb
-00a0c90fffc0
),
131 interface IDrive
: IDispatch
{
132 [id(DISPID_VALUE
), propget]
133 HRESULT Path
([out, retval] BSTR* path
);
135 [id(0x2710), propget]
136 HRESULT DriveLetter
([out, retval] BSTR* letter
);
138 [id(0x2711), propget]
139 HRESULT ShareName
([out, retval] BSTR* ShareName
);
141 [id(0x2712), propget]
142 HRESULT DriveType
([out, retval] DriveTypeConst
* type
);
144 [id(0x2713), propget]
145 HRESULT RootFolder
([out, retval] IFolder
** folder
);
147 [id(0x2715), propget]
148 HRESULT AvailableSpace
([out, retval] VARIANT* Avail
);
150 [id(0x2714), propget]
151 HRESULT FreeSpace
([out, retval] VARIANT* pFree
);
153 [id(0x2716), propget]
154 HRESULT TotalSize
([out, retval] VARIANT* Total
);
156 [id(0x2717), propget]
157 HRESULT VolumeName
([out, retval] BSTR* Name
);
159 [id(0x2717), propput]
160 HRESULT VolumeName
([in] BSTR Name
);
162 [id(0x2718), propget]
163 HRESULT FileSystem
([out, retval] BSTR* pFileSystem
);
165 [id(0x2719), propget]
166 HRESULT SerialNumber
([out, retval] long* SerialNumber
);
168 [id(0x271a), propget]
169 HRESULT IsReady
([out, retval] VARIANT_BOOL* pfReady
);
173 uuid(c7c3f5a4
-88a3
-11d0
-abcb
-00a0c90fffc0
),
180 interface IFile
: IDispatch
{
181 [id(DISPID_VALUE
), propget]
182 HRESULT Path
([out, retval] BSTR* path
);
184 [id(0x03e8), propget]
185 HRESULT Name
([out, retval] BSTR* Name
);
187 [id(0x03e8), propput]
188 HRESULT Name
([in] BSTR Name
);
190 [id(0x03ea), propget]
191 HRESULT ShortPath
([out, retval] BSTR* path
);
193 [id(0x03e9), propget]
194 HRESULT ShortName
([out, retval] BSTR* Name
);
196 [id(0x03ec), propget]
197 HRESULT Drive
([out, retval] IDrive
** drive
);
199 [id(0x03ed), propget]
200 HRESULT ParentFolder
([out, retval] IFolder
** folder
);
202 [id(0x03eb), propget]
203 HRESULT Attributes
([out, retval] FileAttribute
* attr
);
205 [id(0x03eb), propput]
206 HRESULT Attributes
([in] FileAttribute attr
);
208 [id(0x03ee), propget]
209 HRESULT DateCreated
([out, retval] DATE
* date
);
211 [id(0x03ef), propget]
212 HRESULT DateLastModified
([out, retval] DATE
* date
);
214 [id(0x03f0), propget]
215 HRESULT DateLastAccessed
([out, retval] DATE
* date
);
217 [id(0x03f1), propget]
218 HRESULT Size
([out, retval] VARIANT* Size
);
220 [id(0x03f2), propget]
221 HRESULT Type
([out, retval] BSTR* Type
);
224 HRESULT Delete
([in, optional, defaultvalue(0)] VARIANT_BOOL Force
);
228 [in] BSTR Destination
,
229 [in, optional, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles
);
232 HRESULT Move
([in] BSTR Destination
);
235 HRESULT OpenAsTextStream
(
236 [in, optional, defaultvalue(1)] IOMode IOMode
,
237 [in, optional, defaultvalue(0)] Tristate Format
,
238 [out, retval] ITextStream
** ppts
);
242 uuid(c7c3f5a5
-88a3
-11d0
-abcb
-00a0c90fffc0
),
249 interface IFileCollection
: IDispatch
{
250 [id(DISPID_VALUE
), propget]
253 [out, retval] IFile
** ppfile
);
254 [id(DISPID_NEWENUM
), propget, restricted, hidden]
255 HRESULT _NewEnum
([out, retval] IUnknown
** ppenum
);
257 HRESULT Count
([out, retval] long* count
);
261 uuid(c7c3f5a2
-88a3
-11d0
-abcb
-00a0c90fffc0
),
268 interface IFolder
: IDispatch
{
269 [id(DISPID_VALUE
), propget]
270 HRESULT Path
([out, retval] BSTR* path
);
272 [id(0x03e8), propget]
273 HRESULT Name
([out, retval] BSTR* name
);
275 [id(0x03e8), propput]
276 HRESULT Name
([in] BSTR name
);
278 [id(0x03ea), propget]
279 HRESULT ShortPath
([out, retval] BSTR* path
);
281 [id(0x03e9), propget]
282 HRESULT ShortName
([out, retval] BSTR* name
);
284 [id(0x03ec), propget]
285 HRESULT Drive
([out, retval] IDrive
** drive
);
287 [id(0x03ed), propget]
288 HRESULT ParentFolder
([out, retval] IFolder
** folder
);
290 [id(0x03eb), propget]
291 HRESULT Attributes
([out, retval] FileAttribute
* attr
);
293 [id(0x03eb), propput]
294 HRESULT Attributes
([in] FileAttribute attr
);
296 [id(0x03ee), propget]
297 HRESULT DateCreated
([out, retval] DATE
* date
);
299 [id(0x03ef), propget]
300 HRESULT DateLastModified
([out, retval] DATE
* date
);
302 [id(0x03f0), propget]
303 HRESULT DateLastAccessed
([out, retval] DATE
* date
);
305 [id(0x03f2), propget]
306 HRESULT Type
([out, retval] BSTR* type
);
309 HRESULT Delete
([in, optional, defaultvalue(0)] VARIANT_BOOL force
);
313 [in] BSTR Destination
,
314 [in, optional, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles
);
317 HRESULT Move
([in] BSTR Destination
);
319 [id(0x2710), propget]
320 HRESULT IsRootFolder
([out, retval] VARIANT_BOOL* root
);
322 [id(0x03f1), propget]
323 HRESULT Size
([out, retval] VARIANT* size
);
325 [id(0x2711), propget]
326 HRESULT SubFolders
([out, retval] IFolderCollection
** folders
);
328 [id(0x2712), propget]
329 HRESULT Files
([out, retval] IFileCollection
** files
);
332 HRESULT CreateTextFile
(
334 [in, optional, defaultvalue(-1)] VARIANT_BOOL Overwrite
,
335 [in, optional, defaultvalue(0)] VARIANT_BOOL Unicode
,
336 [out, retval] ITextStream
** ppts
);
340 uuid(c7c3f5a3
-88a3
-11d0
-abcb
-00a0c90fffc0
),
347 interface IFolderCollection
: IDispatch
{
351 [out, retval] IFolder
** folder
);
353 [id(DISPID_VALUE
), propget]
356 [out, retval] IFolder
** folder
);
358 [id(DISPID_NEWENUM
), propget, restricted, hidden]
359 HRESULT _NewEnum
([out, retval] IUnknown
** ppenum
);
362 HRESULT Count
([out, retval] long* count
);
366 uuid(f935dc27
-1cf0
-11d0
-adb9
-00c04fd58a0b
),
371 interface IWshCollection
: IDispatch
{
375 [out, retval] VARIANT *out_Value
);
378 HRESULT Count
([out, retval] long *out_Count
);
381 HRESULT length
([out, retval] long *out_Count
);
384 HRESULT _NewEnum
([out, retval] IUnknown
*out_Enum
);
388 uuid(f935dc29
-1cf0
-11d0
-adb9
-00c04fd58a0b
),
393 interface IWshEnvironment
: IDispatch
{
394 [id(DISPID_VALUE
), propget]
397 [out, retval] BSTR *out_Value
);
399 [id(DISPID_VALUE
), propput]
402 [in] BSTR out_Value
);
405 HRESULT Count
([out, retval] long *out_Count
);
408 HRESULT length
([out, retval] long *out_Count
);
411 HRESULT _NewEnum
([out, retval] IUnknown
*out_Enum
);
414 HRESULT Remove
([in] BSTR Name
);
418 uuid(08fed190
-be19
-11d3
-a28b
-00104bd35090
),
423 interface IWshExec
: IDispatch
{
424 [id(0x0001), propget]
425 HRESULT Status
([out, retval] WshExecStatus
* Status
);
427 [id(0x0003), propget]
428 HRESULT StdIn
([out, retval] ITextStream
** stream
);
430 [id(0x0004), propget]
431 HRESULT StdOut
([out, retval] ITextStream
** stream
);
433 [id(0x0005), propget]
434 HRESULT StdErr
([out, retval] ITextStream
** stream
);
436 [id(0x0006), propget]
437 HRESULT ProcessID
([out, retval] long* pid
);
439 [id(0x0007), propget]
440 HRESULT ExitCode
([out, retval] long* ExitCode
);
447 uuid(f935dc23
-1cf0
-11d0
-adb9
-00c04fd58a0b
),
452 interface IWshShortcut
: IDispatch
{
453 [id(DISPID_VALUE
), propget]
454 HRESULT FullName
([out, retval] BSTR* name
);
456 [id(0x03e8), propget]
457 HRESULT Arguments
([out, retval] BSTR* Arguments
);
459 [id(0x03e8), propput]
460 HRESULT Arguments
([in] BSTR Arguments
);
462 [id(0x03e9), propget]
463 HRESULT Description
([out, retval] BSTR* Description
);
465 [id(0x03e9), propput]
466 HRESULT Description
([in] BSTR Description
);
468 [id(0x03ea), propget]
469 HRESULT Hotkey
([out, retval] BSTR* HotKey
);
471 [id(0x03ea), propput]
472 HRESULT Hotkey
([in] BSTR HotKey
);
474 [id(0x03eb), propget]
475 HRESULT IconLocation
([out, retval] BSTR* IconPath
);
477 [id(0x03eb), propput]
478 HRESULT IconLocation
([in] BSTR IconPath
);
480 [id(0x03ec), propput]
481 HRESULT RelativePath
([in] BSTR rhs
);
483 [id(0x03ed), propget]
484 HRESULT TargetPath
([out, retval] BSTR* Path
);
486 [id(0x03ed), propput]
487 HRESULT TargetPath
([in] BSTR Path
);
489 [id(0x03ee), propget]
490 HRESULT WindowStyle
([out, retval] int* ShowCmd
);
492 [id(0x03ee), propput]
493 HRESULT WindowStyle
([in] int ShowCmd
);
495 [id(0x03ef), propget]
496 HRESULT WorkingDirectory
([out, retval] BSTR* WorkingDirectory
);
498 [id(0x03ef), propput]
499 HRESULT WorkingDirectory
([in] BSTR WorkingDirectory
);
502 HRESULT Load
([in] BSTR PathLink
);
509 uuid(f935dc21
-1cf0
-11d0
-adb9
-00c04fd58a0b
),
515 interface IWshShell
: IDispatch
{
516 [id(0x0064), propget]
517 HRESULT SpecialFolders
([out, retval] IWshCollection
** out_Folders
);
519 [id(0x00c8), propget]
521 [in, optional] VARIANT* Type
,
522 [out, retval] IWshEnvironment
** out_Env
);
527 [in, optional] VARIANT* WindowStyle
,
528 [in, optional] VARIANT* WaitOnReturn
,
529 [out, retval] int* out_ExitCode
);
534 [in, optional] VARIANT* SecondsToWait
,
535 [in, optional] VARIANT* Title
,
536 [in, optional] VARIANT* Type
,
537 [out, retval] int* out_Button
);
540 HRESULT CreateShortcut
(
542 [out, retval] IDispatch
** out_Shortcut
);
545 HRESULT ExpandEnvironmentStrings
(
547 [out, retval] BSTR* out_Dst
);
552 [out, retval] VARIANT* out_Value
);
558 [in, optional] VARIANT* Type
);
561 HRESULT RegDelete
([in] BSTR Name
);
565 uuid(24be5a30
-edfe
-11d2
-b933
-00104b365c9f
),
571 interface IWshShell2
: IWshShell
{
576 [in, optional, defaultvalue("")] BSTR Target
,
577 [out, retval] VARIANT_BOOL* out_Success
);
582 [in, optional] VARIANT* Wait
,
583 [out, retval] VARIANT_BOOL* out_Success
);
588 [in, optional] VARIANT* Wait
);
592 uuid(41904400-be18
-11d3
-a28b
-00104bd35090
),
597 interface IWshShell3
: IWshShell2
{
601 [out, retval] IWshExec
** out_Exec
);
603 [id(0x0bc5), propget]
604 HRESULT CurrentDirectory
([out, retval] BSTR* out_Directory
);
606 [id(0x0bc5), propput]
607 HRESULT CurrentDirectory
([in] BSTR out_Directory
);
611 uuid(24be5a31
-edfe
-11d2
-b933
-00104b365c9f
),
616 interface IWshNetwork2
: IDispatch
{
617 [id(0x60020000), propget]
618 HRESULT UserDomain
([out, retval] BSTR *out_UserDomain
);
622 helpstring("Windows Script Host Shell Object"),
623 uuid(f935dc22
-1cf0
-11d0
-adb9
-00c04fd58a0b
),
624 threading
(apartment
),
625 progid
("WScript.Shell.1"),
626 vi_progid
("WScript.Shell")
628 coclass IWshShell_Class
{
629 [default] interface IWshShell3
;
633 helpstring("Windows Script Host Shell Object"),
634 uuid(72c24dd5
-d70a
-438b
-8a42
-98424b88afb8
),
635 threading
(apartment
),
636 progid
("WScript.Shell.1"),
637 vi_progid
("WScript.Shell")
640 [default] interface IWshShell3
;
644 helpstring("Windows Script Host Network Object"),
645 uuid(f935dc26
-1cf0
-11d0
-adb9
-00c04fd58a0b
),
646 threading
(apartment
),
647 progid
("WScript.Network.1"),
648 vi_progid
("WScript.Network")
650 coclass IWshNetwork_Class
{
651 [default] interface IWshNetwork2
;
655 helpstring("Windows Script Host Network Object"),
656 uuid(093ff999
-1ea0
-4079-9525-9614c3504b74
),
657 threading
(apartment
),
658 progid
("WScript.Network.1"),
659 vi_progid
("WScript.Network")
662 [default] interface IWshNetwork2
;