reg/tests: Test import with non-standard registry file headers.
[wine.git] / dlls / wshom.ocx / tests / wshom.idl
blob039938c82b04740c7f0bd90a834a69fe7021285b
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 #pragma makedep header
21 import "oaidl.idl";
22 cpp_quote("#undef ExpandEnvironmentStrings")
25 helpstring("Windows Script Host Object Model"),
26 uuid(f935dc20-1cf0-11d0-adb9-00c04fd58a0b),
27 version(1.0)
29 library IWshRuntimeLibrary
31 importlib("stdole2.tlb");
33 typedef enum {
34 WshRunning = 0,
35 WshFinished,
36 WshFailed
37 } WshExecStatus;
39 typedef enum {
40 UnknownType = 0,
41 Removable,
42 Fixed,
43 Remote,
44 CDRom,
45 RamDisk
46 } DriveTypeConst;
48 typedef enum {
49 Normal = 0x000,
50 ReadOnly = 0x001,
51 Hidden = 0x002,
52 System = 0x004,
53 Volume = 0x008,
54 Directory = 0x010,
55 Archive = 0x020,
56 Alias = 0x400,
57 Compressed = 0x800
58 } FileAttribute;
60 typedef enum {
61 ForReading = 0x1,
62 ForWriting = 0x2,
63 ForAppending = 0x8
64 } IOMode;
66 typedef enum {
67 TristateTrue = -1,
68 TristateFalse = 0,
69 TristateUseDefault = -2,
70 TristateMixed = -2
71 } Tristate;
73 interface IFolder;
74 interface IFolderCollection;
77 uuid(53bad8c1-e718-11cf-893d-00a0c9054228),
78 odl,
79 hidden,
80 dual,
81 nonextensible,
82 oleautomation
84 interface ITextStream : IDispatch {
85 [id(0x2710), propget]
86 HRESULT Line([out, retval] long* Line);
88 [id(0xfffffdef), propget]
89 HRESULT Column([out, retval] long* Column);
91 [id(0x2712), propget]
92 HRESULT AtEndOfStream([out, retval] VARIANT_BOOL* EOS);
94 [id(0x2713), propget]
95 HRESULT AtEndOfLine([out, retval] VARIANT_BOOL* EOL);
97 [id(0x2714)]
98 HRESULT Read([in] long Characters, [out, retval] BSTR* Text);
100 [id(0x2715)]
101 HRESULT ReadLine([out, retval] BSTR* Text);
103 [id(0x2716)]
104 HRESULT ReadAll([out, retval] BSTR* Text);
106 [id(0x2717)]
107 HRESULT Write([in] BSTR Text);
109 [id(0x2718)]
110 HRESULT WriteLine([in, defaultvalue("")] BSTR Text);
112 [id(0x2719)]
113 HRESULT WriteBlankLines([in] long Lines);
115 [id(0x271a)]
116 HRESULT Skip([in] long Characters);
118 [id(0x271b)]
119 HRESULT SkipLine();
121 [id(0x271c)]
122 HRESULT Close();
126 uuid(c7c3f5a0-88a3-11d0-abcb-00a0c90fffc0),
127 odl,
128 hidden,
129 dual,
130 nonextensible,
131 oleautomation
133 interface IDrive : IDispatch {
134 [id(DISPID_VALUE), propget]
135 HRESULT Path([out, retval] BSTR* path);
137 [id(0x2710), propget]
138 HRESULT DriveLetter([out, retval] BSTR* letter);
140 [id(0x2711), propget]
141 HRESULT ShareName([out, retval] BSTR* ShareName);
143 [id(0x2712), propget]
144 HRESULT DriveType([out, retval] DriveTypeConst* type);
146 [id(0x2713), propget]
147 HRESULT RootFolder([out, retval] IFolder** folder);
149 [id(0x2715), propget]
150 HRESULT AvailableSpace([out, retval] VARIANT* Avail);
152 [id(0x2714), propget]
153 HRESULT FreeSpace([out, retval] VARIANT* pFree);
155 [id(0x2716), propget]
156 HRESULT TotalSize([out, retval] VARIANT* Total);
158 [id(0x2717), propget]
159 HRESULT VolumeName([out, retval] BSTR* Name);
161 [id(0x2717), propput]
162 HRESULT VolumeName([in] BSTR Name);
164 [id(0x2718), propget]
165 HRESULT FileSystem([out, retval] BSTR* pFileSystem);
167 [id(0x2719), propget]
168 HRESULT SerialNumber([out, retval] long* SerialNumber);
170 [id(0x271a), propget]
171 HRESULT IsReady([out, retval] VARIANT_BOOL* pfReady);
175 uuid(c7c3f5a4-88a3-11d0-abcb-00a0c90fffc0),
176 odl,
177 hidden,
178 dual,
179 nonextensible,
180 oleautomation
182 interface IFile : IDispatch {
183 [id(DISPID_VALUE), propget]
184 HRESULT Path([out, retval] BSTR* path);
186 [id(0x03e8), propget]
187 HRESULT Name([out, retval] BSTR* Name);
189 [id(0x03e8), propput]
190 HRESULT Name([in] BSTR Name);
192 [id(0x03ea), propget]
193 HRESULT ShortPath([out, retval] BSTR* path);
195 [id(0x03e9), propget]
196 HRESULT ShortName([out, retval] BSTR* Name);
198 [id(0x03ec), propget]
199 HRESULT Drive([out, retval] IDrive** drive);
201 [id(0x03ed), propget]
202 HRESULT ParentFolder([out, retval] IFolder** folder);
204 [id(0x03eb), propget]
205 HRESULT Attributes([out, retval] FileAttribute* attr);
207 [id(0x03eb), propput]
208 HRESULT Attributes([in] FileAttribute attr);
210 [id(0x03ee), propget]
211 HRESULT DateCreated([out, retval] DATE* date);
213 [id(0x03ef), propget]
214 HRESULT DateLastModified([out, retval] DATE* date);
216 [id(0x03f0), propget]
217 HRESULT DateLastAccessed([out, retval] DATE* date);
219 [id(0x03f1), propget]
220 HRESULT Size([out, retval] VARIANT* Size);
222 [id(0x03f2), propget]
223 HRESULT Type([out, retval] BSTR* Type);
225 [id(0x04b0)]
226 HRESULT Delete([in, defaultvalue(0)] VARIANT_BOOL Force);
228 [id(0x04b2)]
229 HRESULT Copy(
230 [in] BSTR Destination,
231 [in, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles);
233 [id(0x04b4)]
234 HRESULT Move([in] BSTR Destination);
236 [id(0x044c)]
237 HRESULT OpenAsTextStream(
238 [in, defaultvalue(1)] IOMode IOMode,
239 [in, defaultvalue(0)] Tristate Format,
240 [out, retval] ITextStream** ppts);
244 uuid(c7c3f5a5-88a3-11d0-abcb-00a0c90fffc0),
245 odl,
246 hidden,
247 dual,
248 nonextensible,
249 oleautomation
251 interface IFileCollection : IDispatch {
252 [id(DISPID_VALUE), propget]
253 HRESULT Item(
254 [in] VARIANT Key,
255 [out, retval] IFile** ppfile);
256 [id(DISPID_NEWENUM), propget, restricted, hidden]
257 HRESULT _NewEnum([out, retval] IUnknown** ppenum);
258 [id(1), propget]
259 HRESULT Count([out, retval] long* count);
263 uuid(c7c3f5a2-88a3-11d0-abcb-00a0c90fffc0),
264 odl,
265 hidden,
266 dual,
267 nonextensible,
268 oleautomation
270 interface IFolder : IDispatch {
271 [id(DISPID_VALUE), propget]
272 HRESULT Path([out, retval] BSTR* path);
274 [id(0x03e8), propget]
275 HRESULT Name([out, retval] BSTR* name);
277 [id(0x03e8), propput]
278 HRESULT Name([in] BSTR name);
280 [id(0x03ea), propget]
281 HRESULT ShortPath([out, retval] BSTR* path);
283 [id(0x03e9), propget]
284 HRESULT ShortName([out, retval] BSTR* name);
286 [id(0x03ec), propget]
287 HRESULT Drive([out, retval] IDrive** drive);
289 [id(0x03ed), propget]
290 HRESULT ParentFolder([out, retval] IFolder** folder);
292 [id(0x03eb), propget]
293 HRESULT Attributes([out, retval] FileAttribute* attr);
295 [id(0x03eb), propput]
296 HRESULT Attributes([in] FileAttribute attr);
298 [id(0x03ee), propget]
299 HRESULT DateCreated([out, retval] DATE* date);
301 [id(0x03ef), propget]
302 HRESULT DateLastModified([out, retval] DATE* date);
304 [id(0x03f0), propget]
305 HRESULT DateLastAccessed([out, retval] DATE* date);
307 [id(0x03f2), propget]
308 HRESULT Type([out, retval] BSTR* type);
310 [id(0x04b1)]
311 HRESULT Delete([in, defaultvalue(0)] VARIANT_BOOL force);
313 [id(0x04b3)]
314 HRESULT Copy(
315 [in] BSTR Destination,
316 [in, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles);
318 [id(0x04b5)]
319 HRESULT Move([in] BSTR Destination);
321 [id(0x2710), propget]
322 HRESULT IsRootFolder([out, retval] VARIANT_BOOL* root);
324 [id(0x03f1), propget]
325 HRESULT Size([out, retval] VARIANT* size);
327 [id(0x2711), propget]
328 HRESULT SubFolders([out, retval] IFolderCollection** folders);
330 [id(0x2712), propget]
331 HRESULT Files([out, retval] IFileCollection** files);
333 [id(0x044d)]
334 HRESULT CreateTextFile(
335 [in] BSTR FileName,
336 [in, defaultvalue(-1)] VARIANT_BOOL Overwrite,
337 [in, defaultvalue(0)] VARIANT_BOOL Unicode,
338 [out, retval] ITextStream** ppts);
342 uuid(c7c3f5a3-88a3-11d0-abcb-00a0c90fffc0),
343 odl,
344 hidden,
345 dual,
346 nonextensible,
347 oleautomation
349 interface IFolderCollection : IDispatch {
350 [id(2)]
351 HRESULT Add(
352 [in] BSTR Name,
353 [out, retval] IFolder** folder);
355 [id(DISPID_VALUE), propget]
356 HRESULT Item(
357 [in] VARIANT Key,
358 [out, retval] IFolder** folder);
360 [id(DISPID_NEWENUM), propget, restricted, hidden]
361 HRESULT _NewEnum([out, retval] IUnknown** ppenum);
363 [id(1), propget]
364 HRESULT Count([out, retval] long* count);
368 uuid(f935dc27-1cf0-11d0-adb9-00c04fd58a0b),
369 odl,
370 dual,
371 oleautomation
373 interface IWshCollection : IDispatch {
374 [id(DISPID_VALUE)]
375 HRESULT Item(
376 [in] VARIANT *Index,
377 [out, retval] VARIANT *out_Value);
379 [id(1)]
380 HRESULT Count([out, retval] long *out_Count);
382 [id(2), propget]
383 HRESULT length([out, retval] long *out_Count);
385 [id(DISPID_NEWENUM)]
386 HRESULT _NewEnum([out, retval] IUnknown *out_Enum);
390 uuid(f935dc29-1cf0-11d0-adb9-00c04fd58a0b),
391 odl,
392 dual,
393 oleautomation
395 interface IWshEnvironment : IDispatch {
396 [id(DISPID_VALUE), propget]
397 HRESULT Item(
398 [in] BSTR Name,
399 [out, retval] BSTR *out_Value);
401 [id(DISPID_VALUE), propput]
402 HRESULT Item(
403 [in] BSTR Name,
404 [in] BSTR Value);
406 [id(1)]
407 HRESULT Count([out, retval] long *out_Count);
409 [id(2), propget]
410 HRESULT length([out, retval] long *out_Count);
412 [id(DISPID_NEWENUM)]
413 HRESULT _NewEnum([out, retval] IUnknown **out_Enum);
415 [id(0x03e9)]
416 HRESULT Remove([in] BSTR Name);
420 uuid(08fed190-be19-11d3-a28b-00104bd35090),
421 odl,
422 dual,
423 oleautomation
425 interface IWshExec : IDispatch {
426 [id(0x0001), propget]
427 HRESULT Status([out, retval] WshExecStatus* Status);
429 [id(0x0003), propget]
430 HRESULT StdIn([out, retval] ITextStream** stream);
432 [id(0x0004), propget]
433 HRESULT StdOut([out, retval] ITextStream** stream);
435 [id(0x0005), propget]
436 HRESULT StdErr([out, retval] ITextStream** stream);
438 [id(0x0006), propget]
439 HRESULT ProcessID([out, retval] DWORD *pid);
441 [id(0x0007), propget]
442 HRESULT ExitCode([out, retval] DWORD *code);
444 [id(0x0008)]
445 HRESULT Terminate();
449 uuid(f935dc23-1cf0-11d0-adb9-00c04fd58a0b),
450 odl,
451 dual,
452 oleautomation
454 interface IWshShortcut : IDispatch {
455 [id(DISPID_VALUE), propget]
456 HRESULT FullName([out, retval] BSTR* name);
458 [id(0x03e8), propget]
459 HRESULT Arguments([out, retval] BSTR* Arguments);
461 [id(0x03e8), propput]
462 HRESULT Arguments([in] BSTR Arguments);
464 [id(0x03e9), propget]
465 HRESULT Description([out, retval] BSTR* Description);
467 [id(0x03e9), propput]
468 HRESULT Description([in] BSTR Description);
470 [id(0x03ea), propget]
471 HRESULT Hotkey([out, retval] BSTR* HotKey);
473 [id(0x03ea), propput]
474 HRESULT Hotkey([in] BSTR HotKey);
476 [id(0x03eb), propget]
477 HRESULT IconLocation([out, retval] BSTR* IconPath);
479 [id(0x03eb), propput]
480 HRESULT IconLocation([in] BSTR IconPath);
482 [id(0x03ec), propput]
483 HRESULT RelativePath([in] BSTR rhs);
485 [id(0x03ed), propget]
486 HRESULT TargetPath([out, retval] BSTR* Path);
488 [id(0x03ed), propput]
489 HRESULT TargetPath([in] BSTR Path);
491 [id(0x03ee), propget]
492 HRESULT WindowStyle([out, retval] int* ShowCmd);
494 [id(0x03ee), propput]
495 HRESULT WindowStyle([in] int ShowCmd);
497 [id(0x03ef), propget]
498 HRESULT WorkingDirectory([out, retval] BSTR* WorkingDirectory);
500 [id(0x03ef), propput]
501 HRESULT WorkingDirectory([in] BSTR WorkingDirectory);
503 [id(0x07d0), hidden]
504 HRESULT Load([in] BSTR PathLink);
506 [id(0x07d1)]
507 HRESULT Save();
511 uuid(f935dc21-1cf0-11d0-adb9-00c04fd58a0b),
512 odl,
513 dual,
514 oleautomation,
515 hidden
517 interface IWshShell : IDispatch {
518 [id(0x0064), propget]
519 HRESULT SpecialFolders([out, retval] IWshCollection** out_Folders);
521 [id(0x00c8), propget]
522 HRESULT Environment(
523 [in, optional] VARIANT* Type,
524 [out, retval] IWshEnvironment** out_Env);
526 [id(0x03e8)]
527 HRESULT Run(
528 [in] BSTR Command,
529 [in, optional] VARIANT* WindowStyle,
530 [in, optional] VARIANT* WaitOnReturn,
531 [out, retval] DWORD* out_ExitCode);
533 [id(0x03e9)]
534 HRESULT Popup(
535 [in] BSTR Text,
536 [in, optional] VARIANT* SecondsToWait,
537 [in, optional] VARIANT* Title,
538 [in, optional] VARIANT* Type,
539 [out, retval] int* out_Button);
541 [id(0x03ea)]
542 HRESULT CreateShortcut(
543 [in] BSTR PathLink,
544 [out, retval] IDispatch** out_Shortcut);
546 [id(0x03ee)]
547 HRESULT ExpandEnvironmentStrings(
548 [in] BSTR Src,
549 [out, retval] BSTR* out_Dst);
551 [id(0x07d0)]
552 HRESULT RegRead(
553 [in] BSTR Name,
554 [out, retval] VARIANT* out_Value);
556 [id(0x07d1)]
557 HRESULT RegWrite(
558 [in] BSTR Name,
559 [in] VARIANT* Value,
560 [in, optional] VARIANT* Type);
562 [id(0x07d2)]
563 HRESULT RegDelete([in] BSTR Name);
567 uuid(24be5a30-edfe-11d2-b933-00104b365c9f),
568 odl,
569 dual,
570 oleautomation,
571 hidden
573 interface IWshShell2 : IWshShell {
574 [id(0x0bb8)]
575 HRESULT LogEvent(
576 [in] VARIANT* Type,
577 [in] BSTR Message,
578 [in, defaultvalue("")] BSTR Target,
579 [out, retval] VARIANT_BOOL* out_Success);
581 [id(0x0bc2)]
582 HRESULT AppActivate(
583 [in] VARIANT* App,
584 [in, optional] VARIANT* Wait,
585 [out, retval] VARIANT_BOOL* out_Success);
587 [id(0x0bc3)]
588 HRESULT SendKeys(
589 [in] BSTR Keys,
590 [in, optional] VARIANT* Wait);
594 uuid(41904400-be18-11d3-a28b-00104bd35090),
595 odl,
596 dual,
597 oleautomation
599 interface IWshShell3 : IWshShell2 {
600 [id(0x0bc4)]
601 HRESULT Exec(
602 [in] BSTR Command,
603 [out, retval] IWshExec** out_Exec);
605 [id(0x0bc5), propget]
606 HRESULT CurrentDirectory([out, retval] BSTR* out_Directory);
608 [id(0x0bc5), propput]
609 HRESULT CurrentDirectory([in] BSTR out_Directory);
613 uuid(24be5a31-edfe-11d2-b933-00104b365c9f),
614 odl,
615 dual,
616 oleautomation
618 interface IWshNetwork2 : IDispatch {
619 [id(0x60020000), propget]
620 HRESULT UserDomain([out, retval] BSTR *out_UserDomain);
624 helpstring("Windows Script Host Shell Object"),
625 uuid(f935dc22-1cf0-11d0-adb9-00c04fd58a0b),
626 threading(apartment),
627 progid("WScript.Shell.1"),
628 vi_progid("WScript.Shell")
630 coclass IWshShell_Class {
631 [default] interface IWshShell3;
635 helpstring("Windows Script Host Shell Object"),
636 uuid(72c24dd5-d70a-438b-8a42-98424b88afb8),
637 threading(apartment),
638 progid("WScript.Shell.1"),
639 vi_progid("WScript.Shell")
641 coclass WshShell {
642 [default] interface IWshShell3;
646 helpstring("Windows Script Host Network Object"),
647 uuid(f935dc26-1cf0-11d0-adb9-00c04fd58a0b),
648 threading(apartment),
649 progid("WScript.Network.1"),
650 vi_progid("WScript.Network")
652 coclass IWshNetwork_Class {
653 [default] interface IWshNetwork2;
657 helpstring("Windows Script Host Network Object"),
658 uuid(093ff999-1ea0-4079-9525-9614c3504b74),
659 threading(apartment),
660 progid("WScript.Network.1"),
661 vi_progid("WScript.Network")
663 coclass WshNetwork {
664 [default] interface IWshNetwork2;
668 uuid(08fed191-be19-11d3-a28b-00104bd35090),
669 threading(apartment)
671 coclass WshExec {
672 [default] interface IWshExec;