wshom.ocx: Added IWshCollection stub and some tests.
[wine.git] / dlls / wshom.ocx / tests / wshom.idl
blobcdd63632dbb9c29e3d54b4bb442e24e73c1adaab
1 /*
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
19 import "oaidl.idl";
20 cpp_quote("#undef ExpandEnvironmentStrings")
23 helpstring("Windows Script Host Object Model"),
24 uuid(f935dc20-1cf0-11d0-adb9-00c04fd58a0b),
25 version(1.0)
27 library IWshRuntimeLibrary
29 importlib("stdole2.tlb");
31 typedef enum {
32 WshRunning = 0,
33 WshFinished,
34 WshFailed
35 } WshExecStatus;
37 typedef enum {
38 UnknownType = 0,
39 Removable,
40 Fixed,
41 Remote,
42 CDRom,
43 RamDisk
44 } DriveTypeConst;
46 typedef enum {
47 Normal = 0x000,
48 ReadOnly = 0x001,
49 Hidden = 0x002,
50 System = 0x004,
51 Volume = 0x008,
52 Directory = 0x010,
53 Archive = 0x020,
54 Alias = 0x400,
55 Compressed = 0x800
56 } FileAttribute;
58 typedef enum {
59 ForReading = 0x1,
60 ForWriting = 0x2,
61 ForAppending = 0x8
62 } IOMode;
64 typedef enum {
65 TristateTrue = -1,
66 TristateFalse = 0,
67 TristateUseDefault = -2,
68 TristateMixed = -2
69 } Tristate;
71 interface IFolder;
72 interface IFolderCollection;
75 uuid(53bad8c1-e718-11cf-893d-00a0c9054228),
76 odl,
77 hidden,
78 dual,
79 nonextensible,
80 oleautomation
82 interface ITextStream : IDispatch {
83 [id(0x2710), propget]
84 HRESULT Line([out, retval] long* Line);
86 [id(0xfffffdef), propget]
87 HRESULT Column([out, retval] long* Column);
89 [id(0x2712), propget]
90 HRESULT AtEndOfStream([out, retval] VARIANT_BOOL* EOS);
92 [id(0x2713), propget]
93 HRESULT AtEndOfLine([out, retval] VARIANT_BOOL* EOL);
95 [id(0x2714)]
96 HRESULT Read([in] long Characters, [out, retval] BSTR* Text);
98 [id(0x2715)]
99 HRESULT ReadLine([out, retval] BSTR* Text);
101 [id(0x2716)]
102 HRESULT ReadAll([out, retval] BSTR* Text);
104 [id(0x2717)]
105 HRESULT Write([in] BSTR Text);
107 [id(0x2718)]
108 HRESULT WriteLine([in, optional, defaultvalue("")] BSTR Text);
110 [id(0x2719)]
111 HRESULT WriteBlankLines([in] long Lines);
113 [id(0x271a)]
114 HRESULT Skip([in] long Characters);
116 [id(0x271b)]
117 HRESULT SkipLine();
119 [id(0x271c)]
120 HRESULT Close();
124 uuid(c7c3f5a0-88a3-11d0-abcb-00a0c90fffc0),
125 odl,
126 hidden,
127 dual,
128 nonextensible,
129 oleautomation
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),
174 odl,
175 hidden,
176 dual,
177 nonextensible,
178 oleautomation
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);
223 [id(0x04b0)]
224 HRESULT Delete([in, optional, defaultvalue(0)] VARIANT_BOOL Force);
226 [id(0x04b2)]
227 HRESULT Copy(
228 [in] BSTR Destination,
229 [in, optional, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles);
231 [id(0x04b4)]
232 HRESULT Move([in] BSTR Destination);
234 [id(0x044c)]
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),
243 odl,
244 hidden,
245 dual,
246 nonextensible,
247 oleautomation
249 interface IFileCollection : IDispatch {
250 [id(DISPID_VALUE), propget]
251 HRESULT Item(
252 [in] VARIANT Key,
253 [out, retval] IFile** ppfile);
254 [id(DISPID_NEWENUM), propget, restricted, hidden]
255 HRESULT _NewEnum([out, retval] IUnknown** ppenum);
256 [id(1), propget]
257 HRESULT Count([out, retval] long* count);
261 uuid(c7c3f5a2-88a3-11d0-abcb-00a0c90fffc0),
262 odl,
263 hidden,
264 dual,
265 nonextensible,
266 oleautomation
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);
308 [id(0x04b1)]
309 HRESULT Delete([in, optional, defaultvalue(0)] VARIANT_BOOL force);
311 [id(0x04b3)]
312 HRESULT Copy(
313 [in] BSTR Destination,
314 [in, optional, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles);
316 [id(0x04b5)]
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);
331 [id(0x044d)]
332 HRESULT CreateTextFile(
333 [in] BSTR FileName,
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),
341 odl,
342 hidden,
343 dual,
344 nonextensible,
345 oleautomation
347 interface IFolderCollection : IDispatch {
348 [id(2)]
349 HRESULT Add(
350 [in] BSTR Name,
351 [out, retval] IFolder** folder);
353 [id(DISPID_VALUE), propget]
354 HRESULT Item(
355 [in] VARIANT Key,
356 [out, retval] IFolder** folder);
358 [id(DISPID_NEWENUM), propget, restricted, hidden]
359 HRESULT _NewEnum([out, retval] IUnknown** ppenum);
361 [id(1), propget]
362 HRESULT Count([out, retval] long* count);
366 uuid(f935dc27-1cf0-11d0-adb9-00c04fd58a0b),
367 odl,
368 dual,
369 oleautomation
371 interface IWshCollection : IDispatch {
372 [id(DISPID_VALUE)]
373 HRESULT Item(
374 [in] VARIANT *Index,
375 [out, retval] VARIANT *out_Value);
377 [id(1)]
378 HRESULT Count([out, retval] long *out_Count);
380 [id(2), propget]
381 HRESULT length([out, retval] long *out_Count);
383 [id(DISPID_NEWENUM)]
384 HRESULT _NewEnum([out, retval] IUnknown *out_Enum);
388 uuid(f935dc29-1cf0-11d0-adb9-00c04fd58a0b),
389 odl,
390 dual,
391 oleautomation
393 interface IWshEnvironment : IDispatch {
394 [id(DISPID_VALUE), propget]
395 HRESULT Item(
396 [in] BSTR Name,
397 [out, retval] BSTR *out_Value);
399 [id(DISPID_VALUE), propput]
400 HRESULT Item(
401 [in] BSTR Name,
402 [in] BSTR out_Value);
404 [id(1)]
405 HRESULT Count([out, retval] long *out_Count);
407 [id(2), propget]
408 HRESULT length([out, retval] long *out_Count);
410 [id(DISPID_NEWENUM)]
411 HRESULT _NewEnum([out, retval] IUnknown *out_Enum);
413 [id(0x03e9)]
414 HRESULT Remove([in] BSTR Name);
418 uuid(08fed190-be19-11d3-a28b-00104bd35090),
419 odl,
420 dual,
421 oleautomation
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);
442 [id(0x0008)]
443 HRESULT Terminate();
447 uuid(f935dc21-1cf0-11d0-adb9-00c04fd58a0b),
448 odl,
449 dual,
450 oleautomation,
451 hidden
453 interface IWshShell : IDispatch {
454 [id(0x0064), propget]
455 HRESULT SpecialFolders([out, retval] IWshCollection** out_Folders);
457 [id(0x00c8), propget]
458 HRESULT Environment(
459 [in, optional] VARIANT* Type,
460 [out, retval] IWshEnvironment** out_Env);
462 [id(0x03e8)]
463 HRESULT Run(
464 [in] BSTR Command,
465 [in, optional] VARIANT* WindowStyle,
466 [in, optional] VARIANT* WaitOnReturn,
467 [out, retval] int* out_ExitCode);
469 [id(0x03e9)]
470 HRESULT Popup(
471 [in] BSTR Text,
472 [in, optional] VARIANT* SecondsToWait,
473 [in, optional] VARIANT* Title,
474 [in, optional] VARIANT* Type,
475 [out, retval] int* out_Button);
477 [id(0x03ea)]
478 HRESULT CreateShortcut(
479 [in] BSTR PathLink,
480 [out, retval] IDispatch** out_Shortcut);
482 [id(0x03ee)]
483 HRESULT ExpandEnvironmentStrings(
484 [in] BSTR Src,
485 [out, retval] BSTR* out_Dst);
487 [id(0x07d0)]
488 HRESULT RegRead(
489 [in] BSTR Name,
490 [out, retval] VARIANT* out_Value);
492 [id(0x07d1)]
493 HRESULT RegWrite(
494 [in] BSTR Name,
495 [in] VARIANT* Value,
496 [in, optional] VARIANT* Type);
498 [id(0x07d2)]
499 HRESULT RegDelete([in] BSTR Name);
503 uuid(24be5a30-edfe-11d2-b933-00104b365c9f),
504 odl,
505 dual,
506 oleautomation,
507 hidden
509 interface IWshShell2 : IWshShell {
510 [id(0x0bb8)]
511 HRESULT LogEvent(
512 [in] VARIANT* Type,
513 [in] BSTR Message,
514 [in, optional, defaultvalue("")] BSTR Target,
515 [out, retval] VARIANT_BOOL* out_Success);
517 [id(0x0bc2)]
518 HRESULT AppActivate(
519 [in] VARIANT* App,
520 [in, optional] VARIANT* Wait,
521 [out, retval] VARIANT_BOOL* out_Success);
523 [id(0x0bc3)]
524 HRESULT SendKeys(
525 [in] BSTR Keys,
526 [in, optional] VARIANT* Wait);
530 uuid(41904400-be18-11d3-a28b-00104bd35090),
531 odl,
532 dual,
533 oleautomation
535 interface IWshShell3 : IWshShell2 {
536 [id(0x0bc4)]
537 HRESULT Exec(
538 [in] BSTR Command,
539 [out, retval] IWshExec** out_Exec);
541 [id(0x0bc5), propget]
542 HRESULT CurrentDirectory([out, retval] BSTR* out_Directory);
544 [id(0x0bc5), propput]
545 HRESULT CurrentDirectory([in] BSTR out_Directory);
549 uuid(24be5a31-edfe-11d2-b933-00104b365c9f),
550 odl,
551 dual,
552 oleautomation
554 interface IWshNetwork2 : IDispatch {
555 [id(0x60020000), propget]
556 HRESULT UserDomain([out, retval] BSTR *out_UserDomain);
560 helpstring("Windows Script Host Shell Object"),
561 uuid(f935dc22-1cf0-11d0-adb9-00c04fd58a0b),
562 threading(apartment),
563 progid("WScript.Shell.1"),
564 vi_progid("WScript.Shell")
566 coclass IWshShell_Class {
567 [default] interface IWshShell3;
571 helpstring("Windows Script Host Shell Object"),
572 uuid(72c24dd5-d70a-438b-8a42-98424b88afb8),
573 threading(apartment),
574 progid("WScript.Shell.1"),
575 vi_progid("WScript.Shell")
577 coclass WshShell {
578 [default] interface IWshShell3;
582 helpstring("Windows Script Host Network Object"),
583 uuid(f935dc26-1cf0-11d0-adb9-00c04fd58a0b),
584 threading(apartment),
585 progid("WScript.Network.1"),
586 vi_progid("WScript.Network")
588 coclass IWshNetwork_Class {
589 [default] interface IWshNetwork2;
593 helpstring("Windows Script Host Network Object"),
594 uuid(093ff999-1ea0-4079-9525-9614c3504b74),
595 threading(apartment),
596 progid("WScript.Network.1"),
597 vi_progid("WScript.Network")
599 coclass WshNetwork {
600 [default] interface IWshNetwork2;