wshom.ocx: Added IWshShortcut stub.
[wine] / dlls / wshom.ocx / wshom.idl
1 /*
2  * Copyright 2011 Jacek Caban for CodeWeavers
3  *
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.
8  *
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.
13  *
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
17  */
18
19 import "oaidl.idl";
20 cpp_quote("#undef ExpandEnvironmentStrings")
21
22 [
23     helpstring("Windows Script Host Object Model"),
24     uuid(f935dc20-1cf0-11d0-adb9-00c04fd58a0b),
25     version(1.0)
26 ]
27 library IWshRuntimeLibrary
28 {
29     importlib("stdole2.tlb");
30
31     typedef enum {
32         WshRunning  = 0,
33         WshFinished,
34         WshFailed
35     } WshExecStatus;
36
37     typedef enum {
38         UnknownType = 0,
39         Removable,
40         Fixed,
41         Remote,
42         CDRom,
43         RamDisk
44     } DriveTypeConst;
45
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;
57
58     typedef enum {
59         ForReading   = 0x1,
60         ForWriting   = 0x2,
61         ForAppending = 0x8
62     } IOMode;
63
64     typedef enum {
65         TristateTrue       = -1,
66         TristateFalse      =  0,
67         TristateUseDefault = -2,
68         TristateMixed      = -2
69     } Tristate;
70
71     interface IFolder;
72     interface IFolderCollection;
73
74     [
75         uuid(53bad8c1-e718-11cf-893d-00a0c9054228),
76         odl,
77         hidden,
78         dual,
79         nonextensible,
80         oleautomation
81     ]
82     interface ITextStream : IDispatch {
83         [id(0x2710), propget]
84         HRESULT Line([out, retval] long* Line);
85
86         [id(0xfffffdef), propget]
87         HRESULT Column([out, retval] long* Column);
88
89         [id(0x2712), propget]
90         HRESULT AtEndOfStream([out, retval] VARIANT_BOOL* EOS);
91
92         [id(0x2713), propget]
93         HRESULT AtEndOfLine([out, retval] VARIANT_BOOL* EOL);
94
95         [id(0x2714)]
96         HRESULT Read([in] long Characters, [out, retval] BSTR* Text);
97
98         [id(0x2715)]
99         HRESULT ReadLine([out, retval] BSTR* Text);
100
101         [id(0x2716)]
102         HRESULT ReadAll([out, retval] BSTR* Text);
103
104         [id(0x2717)]
105         HRESULT Write([in] BSTR Text);
106
107         [id(0x2718)]
108         HRESULT WriteLine([in, optional, defaultvalue("")] BSTR Text);
109
110         [id(0x2719)]
111         HRESULT WriteBlankLines([in] long Lines);
112
113         [id(0x271a)]
114         HRESULT Skip([in] long Characters);
115
116         [id(0x271b)]
117         HRESULT SkipLine();
118
119         [id(0x271c)]
120         HRESULT Close();
121     };
122
123     [
124         uuid(c7c3f5a0-88a3-11d0-abcb-00a0c90fffc0),
125         odl,
126         hidden,
127         dual,
128         nonextensible,
129         oleautomation
130     ]
131     interface IDrive : IDispatch {
132         [id(DISPID_VALUE), propget]
133         HRESULT Path([out, retval] BSTR* path);
134
135         [id(0x2710), propget]
136         HRESULT DriveLetter([out, retval] BSTR* letter);
137
138         [id(0x2711), propget]
139         HRESULT ShareName([out, retval] BSTR* ShareName);
140
141         [id(0x2712), propget]
142         HRESULT DriveType([out, retval] DriveTypeConst* type);
143
144         [id(0x2713), propget]
145         HRESULT RootFolder([out, retval] IFolder** folder);
146
147         [id(0x2715), propget]
148         HRESULT AvailableSpace([out, retval] VARIANT* Avail);
149
150         [id(0x2714), propget]
151         HRESULT FreeSpace([out, retval] VARIANT* pFree);
152
153         [id(0x2716), propget]
154         HRESULT TotalSize([out, retval] VARIANT* Total);
155
156         [id(0x2717), propget]
157         HRESULT VolumeName([out, retval] BSTR* Name);
158
159         [id(0x2717), propput]
160         HRESULT VolumeName([in] BSTR Name);
161
162         [id(0x2718), propget]
163         HRESULT FileSystem([out, retval] BSTR* pFileSystem);
164
165         [id(0x2719), propget]
166         HRESULT SerialNumber([out, retval] long* SerialNumber);
167
168         [id(0x271a), propget]
169         HRESULT IsReady([out, retval] VARIANT_BOOL* pfReady);
170     };
171
172     [
173         uuid(c7c3f5a4-88a3-11d0-abcb-00a0c90fffc0),
174         odl,
175         hidden,
176         dual,
177         nonextensible,
178         oleautomation
179     ]
180     interface IFile : IDispatch {
181         [id(DISPID_VALUE), propget]
182         HRESULT Path([out, retval] BSTR* path);
183
184         [id(0x03e8), propget]
185         HRESULT Name([out, retval] BSTR* Name);
186
187         [id(0x03e8), propput]
188         HRESULT Name([in] BSTR Name);
189
190         [id(0x03ea), propget]
191         HRESULT ShortPath([out, retval] BSTR* path);
192
193         [id(0x03e9), propget]
194         HRESULT ShortName([out, retval] BSTR* Name);
195
196         [id(0x03ec), propget]
197         HRESULT Drive([out, retval] IDrive** drive);
198
199         [id(0x03ed), propget]
200         HRESULT ParentFolder([out, retval] IFolder** folder);
201
202         [id(0x03eb), propget]
203         HRESULT Attributes([out, retval] FileAttribute* attr);
204
205         [id(0x03eb), propput]
206         HRESULT Attributes([in] FileAttribute attr);
207
208         [id(0x03ee), propget]
209         HRESULT DateCreated([out, retval] DATE* date);
210
211         [id(0x03ef), propget]
212         HRESULT DateLastModified([out, retval] DATE* date);
213
214         [id(0x03f0), propget]
215         HRESULT DateLastAccessed([out, retval] DATE* date);
216
217         [id(0x03f1), propget]
218         HRESULT Size([out, retval] VARIANT* Size);
219
220         [id(0x03f2), propget]
221         HRESULT Type([out, retval] BSTR* Type);
222
223         [id(0x04b0)]
224         HRESULT Delete([in, optional, defaultvalue(0)] VARIANT_BOOL Force);
225
226         [id(0x04b2)]
227         HRESULT Copy(
228                     [in] BSTR Destination,
229                     [in, optional, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles);
230
231         [id(0x04b4)]
232         HRESULT Move([in] BSTR Destination);
233
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);
239     };
240
241     [
242         uuid(c7c3f5a5-88a3-11d0-abcb-00a0c90fffc0),
243         odl,
244         hidden,
245         dual,
246         nonextensible,
247         oleautomation
248     ]
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);
258     };
259
260     [
261         uuid(c7c3f5a2-88a3-11d0-abcb-00a0c90fffc0),
262         odl,
263         hidden,
264         dual,
265         nonextensible,
266         oleautomation
267     ]
268     interface IFolder : IDispatch {
269         [id(DISPID_VALUE), propget]
270         HRESULT Path([out, retval] BSTR* path);
271
272         [id(0x03e8), propget]
273         HRESULT Name([out, retval] BSTR* name);
274
275         [id(0x03e8), propput]
276         HRESULT Name([in] BSTR name);
277
278         [id(0x03ea), propget]
279         HRESULT ShortPath([out, retval] BSTR* path);
280
281         [id(0x03e9), propget]
282         HRESULT ShortName([out, retval] BSTR* name);
283
284         [id(0x03ec), propget]
285         HRESULT Drive([out, retval] IDrive** drive);
286
287         [id(0x03ed), propget]
288         HRESULT ParentFolder([out, retval] IFolder** folder);
289
290         [id(0x03eb), propget]
291         HRESULT Attributes([out, retval] FileAttribute* attr);
292
293         [id(0x03eb), propput]
294         HRESULT Attributes([in] FileAttribute attr);
295
296         [id(0x03ee), propget]
297         HRESULT DateCreated([out, retval] DATE* date);
298
299         [id(0x03ef), propget]
300         HRESULT DateLastModified([out, retval] DATE* date);
301
302         [id(0x03f0), propget]
303         HRESULT DateLastAccessed([out, retval] DATE* date);
304
305         [id(0x03f2), propget]
306         HRESULT Type([out, retval] BSTR* type);
307
308         [id(0x04b1)]
309         HRESULT Delete([in, optional, defaultvalue(0)] VARIANT_BOOL force);
310
311         [id(0x04b3)]
312         HRESULT Copy(
313                     [in] BSTR Destination,
314                     [in, optional, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles);
315
316         [id(0x04b5)]
317         HRESULT Move([in] BSTR Destination);
318
319         [id(0x2710), propget]
320         HRESULT IsRootFolder([out, retval] VARIANT_BOOL* root);
321
322         [id(0x03f1), propget]
323         HRESULT Size([out, retval] VARIANT* size);
324
325         [id(0x2711), propget]
326         HRESULT SubFolders([out, retval] IFolderCollection** folders);
327
328         [id(0x2712), propget]
329         HRESULT Files([out, retval] IFileCollection** files);
330
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);
337     };
338
339     [
340         uuid(c7c3f5a3-88a3-11d0-abcb-00a0c90fffc0),
341         odl,
342         hidden,
343         dual,
344         nonextensible,
345         oleautomation
346     ]
347     interface IFolderCollection : IDispatch {
348         [id(2)]
349         HRESULT Add(
350                     [in] BSTR Name,
351                     [out, retval] IFolder** folder);
352
353         [id(DISPID_VALUE), propget]
354         HRESULT Item(
355                     [in] VARIANT Key,
356                     [out, retval] IFolder** folder);
357
358         [id(DISPID_NEWENUM), propget, restricted, hidden]
359         HRESULT _NewEnum([out, retval] IUnknown** ppenum);
360
361         [id(1), propget]
362         HRESULT Count([out, retval] long* count);
363     };
364
365     [
366         uuid(f935dc27-1cf0-11d0-adb9-00c04fd58a0b),
367         odl,
368         dual,
369         oleautomation
370     ]
371     interface IWshCollection : IDispatch {
372         [id(DISPID_VALUE)]
373         HRESULT Item(
374                 [in] VARIANT *Index,
375                 [out, retval] VARIANT *out_Value);
376
377         [id(1)]
378         HRESULT Count([out, retval] long *out_Count);
379
380         [id(2), propget]
381         HRESULT length([out, retval] long *out_Count);
382
383         [id(DISPID_NEWENUM)]
384         HRESULT _NewEnum([out, retval] IUnknown *out_Enum);
385     }
386
387     [
388         uuid(f935dc29-1cf0-11d0-adb9-00c04fd58a0b),
389         odl,
390         dual,
391         oleautomation
392     ]
393     interface IWshEnvironment : IDispatch {
394         [id(DISPID_VALUE), propget]
395         HRESULT Item(
396                 [in] BSTR Name,
397                 [out, retval] BSTR *out_Value);
398
399         [id(DISPID_VALUE), propput]
400         HRESULT Item(
401                 [in] BSTR Name,
402                 [in] BSTR out_Value);
403
404         [id(1)]
405         HRESULT Count([out, retval] long *out_Count);
406
407         [id(2), propget]
408         HRESULT length([out, retval] long *out_Count);
409
410         [id(DISPID_NEWENUM)]
411         HRESULT _NewEnum([out, retval] IUnknown *out_Enum);
412
413         [id(0x03e9)]
414         HRESULT Remove([in] BSTR Name);
415     }
416
417     [
418         uuid(08fed190-be19-11d3-a28b-00104bd35090),
419         odl,
420         dual,
421         oleautomation
422     ]
423     interface IWshExec : IDispatch {
424         [id(0x0001), propget]
425         HRESULT Status([out, retval] WshExecStatus* Status);
426
427         [id(0x0003), propget]
428         HRESULT StdIn([out, retval] ITextStream** stream);
429
430         [id(0x0004), propget]
431         HRESULT StdOut([out, retval] ITextStream** stream);
432
433         [id(0x0005), propget]
434         HRESULT StdErr([out, retval] ITextStream** stream);
435
436         [id(0x0006), propget]
437         HRESULT ProcessID([out, retval] long* pid);
438
439         [id(0x0007), propget]
440         HRESULT ExitCode([out, retval] long* ExitCode);
441
442         [id(0x0008)]
443         HRESULT Terminate();
444     };
445
446     [
447         uuid(f935dc23-1cf0-11d0-adb9-00c04fd58a0b),
448         odl,
449         dual,
450         oleautomation
451     ]
452     interface IWshShortcut : IDispatch {
453         [id(DISPID_VALUE), propget]
454         HRESULT FullName([out, retval] BSTR* name);
455
456         [id(0x03e8), propget]
457         HRESULT Arguments([out, retval] BSTR* Arguments);
458
459         [id(0x03e8), propput]
460         HRESULT Arguments([in] BSTR Arguments);
461
462         [id(0x03e9), propget]
463         HRESULT Description([out, retval] BSTR* Description);
464
465         [id(0x03e9), propput]
466         HRESULT Description([in] BSTR Description);
467
468         [id(0x03ea), propget]
469         HRESULT Hotkey([out, retval] BSTR* HotKey);
470
471         [id(0x03ea), propput]
472         HRESULT Hotkey([in] BSTR HotKey);
473
474         [id(0x03eb), propget]
475         HRESULT IconLocation([out, retval] BSTR* IconPath);
476
477         [id(0x03eb), propput]
478         HRESULT IconLocation([in] BSTR IconPath);
479
480         [id(0x03ec), propput]
481         HRESULT RelativePath([in] BSTR rhs);
482
483         [id(0x03ed), propget]
484         HRESULT TargetPath([out, retval] BSTR* Path);
485
486         [id(0x03ed), propput]
487         HRESULT TargetPath([in] BSTR Path);
488
489         [id(0x03ee), propget]
490         HRESULT WindowStyle([out, retval] int* ShowCmd);
491
492         [id(0x03ee), propput]
493         HRESULT WindowStyle([in] int ShowCmd);
494
495         [id(0x03ef), propget]
496         HRESULT WorkingDirectory([out, retval] BSTR* WorkingDirectory);
497
498         [id(0x03ef), propput]
499         HRESULT WorkingDirectory([in] BSTR WorkingDirectory);
500
501         [id(0x07d0), hidden]
502         HRESULT Load([in] BSTR PathLink);
503
504         [id(0x07d1)]
505         HRESULT Save();
506     };
507
508     [
509         uuid(f935dc21-1cf0-11d0-adb9-00c04fd58a0b),
510         odl,
511         dual,
512         oleautomation,
513         hidden
514     ]
515     interface IWshShell : IDispatch {
516         [id(0x0064), propget]
517         HRESULT SpecialFolders([out, retval] IWshCollection** out_Folders);
518
519         [id(0x00c8), propget]
520         HRESULT Environment(
521             [in, optional] VARIANT* Type,
522             [out, retval] IWshEnvironment** out_Env);
523
524         [id(0x03e8)]
525         HRESULT Run(
526             [in] BSTR Command,
527             [in, optional] VARIANT* WindowStyle,
528             [in, optional] VARIANT* WaitOnReturn,
529             [out, retval] int* out_ExitCode);
530
531         [id(0x03e9)]
532         HRESULT Popup(
533             [in] BSTR Text,
534             [in, optional] VARIANT* SecondsToWait,
535             [in, optional] VARIANT* Title,
536             [in, optional] VARIANT* Type,
537             [out, retval] int* out_Button);
538
539         [id(0x03ea)]
540         HRESULT CreateShortcut(
541             [in] BSTR PathLink,
542             [out, retval] IDispatch** out_Shortcut);
543
544         [id(0x03ee)]
545         HRESULT ExpandEnvironmentStrings(
546             [in] BSTR Src,
547             [out, retval] BSTR* out_Dst);
548
549         [id(0x07d0)]
550         HRESULT RegRead(
551             [in] BSTR Name,
552             [out, retval] VARIANT* out_Value);
553
554         [id(0x07d1)]
555         HRESULT RegWrite(
556             [in] BSTR Name,
557             [in] VARIANT* Value,
558             [in, optional] VARIANT* Type);
559
560         [id(0x07d2)]
561         HRESULT RegDelete([in] BSTR Name);
562     };
563
564     [
565       uuid(24be5a30-edfe-11d2-b933-00104b365c9f),
566       odl,
567       dual,
568       oleautomation,
569       hidden
570     ]
571     interface IWshShell2 : IWshShell {
572         [id(0x0bb8)]
573         HRESULT LogEvent(
574             [in] VARIANT* Type,
575             [in] BSTR Message,
576             [in, optional, defaultvalue("")] BSTR Target,
577             [out, retval] VARIANT_BOOL* out_Success);
578
579         [id(0x0bc2)]
580         HRESULT AppActivate(
581             [in] VARIANT* App,
582             [in, optional] VARIANT* Wait,
583             [out, retval] VARIANT_BOOL* out_Success);
584
585         [id(0x0bc3)]
586         HRESULT SendKeys(
587             [in] BSTR Keys,
588             [in, optional] VARIANT* Wait);
589     };
590
591     [
592         uuid(41904400-be18-11d3-a28b-00104bd35090),
593         odl,
594         dual,
595         oleautomation
596     ]
597     interface IWshShell3 : IWshShell2 {
598         [id(0x0bc4)]
599         HRESULT Exec(
600             [in] BSTR Command,
601             [out, retval] IWshExec** out_Exec);
602
603         [id(0x0bc5), propget]
604         HRESULT CurrentDirectory([out, retval] BSTR* out_Directory);
605
606         [id(0x0bc5), propput]
607         HRESULT CurrentDirectory([in] BSTR out_Directory);
608     };
609
610     [
611         uuid(24be5a31-edfe-11d2-b933-00104b365c9f),
612         odl,
613         dual,
614         oleautomation
615     ]
616     interface IWshNetwork2 : IDispatch {
617         [id(0x60020000), propget]
618         HRESULT UserDomain([out, retval] BSTR *out_UserDomain);
619     }
620
621     [
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")
627     ]
628     coclass IWshShell_Class {
629         [default] interface IWshShell3;
630     }
631
632     [
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")
638     ]
639     coclass WshShell {
640         [default] interface IWshShell3;
641     }
642
643     [
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")
649     ]
650     coclass IWshNetwork_Class {
651         [default] interface IWshNetwork2;
652     }
653
654     [
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")
660     ]
661     coclass WshNetwork {
662         [default] interface IWshNetwork2;
663     }
664 }