[SCRRUN]
[reactos.git] / rostests / winetests / scrrun / scrrun.idl
1 /*
2 * Copyright (C) 2012 Alistair Leslie-Hughes
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 import "unknwn.idl";
19 import "objidl.idl";
20 import "oaidl.idl";
21
22 cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
23 cpp_quote("#undef CopyFile")
24 cpp_quote("#undef DeleteFile")
25 cpp_quote("#undef MoveFile")
26 cpp_quote("#endif")
27
28 [
29 uuid(420B2830-E718-11CF-893D-00A0C9054228),
30 version(1.0)
31 ]
32 library Scripting
33 {
34 importlib("stdole2.tlb");
35
36 interface IDictionary;
37 interface IDrive;
38 interface IDriveCollection;
39 interface IFile;
40 interface IFileCollection;
41 interface IFileSystem;
42 interface IFileSystem3;
43 interface IFolder;
44 interface IFolderCollection;
45 interface IScriptEncoder;
46 interface ITextStream;
47
48 typedef enum CompareMethod
49 {
50 BinaryCompare = 0,
51 TextCompare = 1,
52 DatabaseCompare = 2
53 } CompareMethod;
54
55 typedef enum IOMode
56 {
57 ForReading = 1,
58 ForWriting = 2,
59 ForAppending = 8
60 } IOMode;
61
62 typedef enum Tristate
63 {
64 TristateTrue = 0xffffffff,
65 TristateFalse = 0,
66 TristateUseDefault = 0xfffffffe,
67 TristateMixed = 0xfffffffe
68 } Tristate;
69
70 typedef enum FileAttribute
71 {
72 Normal = 0,
73 ReadOnly = 1,
74 Hidden = 2,
75 System = 4,
76 Volume = 8,
77 Directory = 16,
78 Archive = 32,
79 Alias = 1024,
80 Compressed = 2048
81 } FileAttribute;
82
83 typedef enum SpecialFolderConst
84 {
85 WindowsFolder = 0,
86 SystemFolder = 1,
87 TemporaryFolder = 2
88 } SpecialFolderConst;
89
90 typedef enum DriveTypeConst
91 {
92 UnknownType = 0,
93 Removable = 1,
94 Fixed = 2,
95 Remote = 3,
96 CDRom = 4,
97 RamDisk = 5
98 } DriveTypeConst;
99
100 typedef enum StandardStreamTypes
101 {
102 StdIn = 0,
103 StdOut = 1,
104 StdErr = 2
105 } StandardStreamTypes;
106
107 [
108 odl,
109 uuid(42C642C1-97E1-11CF-978F-00A02463E06F),
110 hidden,
111 dual,
112 oleautomation
113 ]
114 interface IDictionary : IDispatch
115 {
116 [id(00000000), propputref]
117 HRESULT Item([in] VARIANT* Key, [in] VARIANT* pRetItem);
118
119 [id(00000000), propput]
120 HRESULT Item([in] VARIANT* Key, [in] VARIANT* pRetItem);
121
122 [id(00000000), propget]
123 HRESULT Item([in] VARIANT* Key, [out, retval] VARIANT* pRetItem);
124
125 [id(0x00000001)]
126 HRESULT Add([in] VARIANT* Key, [in] VARIANT* Item);
127
128 [id(0x00000002), propget]
129 HRESULT Count([out, retval] long* pCount);
130
131 [id(0x00000003)]
132 HRESULT Exists([in] VARIANT* Key, [out, retval] VARIANT_BOOL* pExists);
133
134 [id(0x00000004)]
135 HRESULT Items([out, retval] VARIANT* pItemsArray);
136
137 [id(0x00000005), propput]
138 HRESULT Key([in] VARIANT* Key, [in] VARIANT* rhs);
139
140 [id(0x00000006)]
141 HRESULT Keys([out, retval] VARIANT* pKeysArray);
142
143 [id(0x00000007)]
144 HRESULT Remove([in] VARIANT* Key);
145
146 [id(0x00000008)]
147 HRESULT RemoveAll();
148
149 [id(0x00000009), propput]
150 HRESULT CompareMode([in] CompareMethod pcomp);
151
152 [id(0x00000009), propget]
153 HRESULT CompareMode([out, retval] CompareMethod* pcomp);
154
155 [id(DISPID_NEWENUM), restricted]
156 HRESULT _NewEnum([out, retval] IUnknown** ppunk);
157
158 [id(0x0000000a), propget, hidden]
159 HRESULT HashVal([in] VARIANT* Key, [out, retval] VARIANT* HashVal);
160 }
161
162 [
163 odl,
164 uuid(0AB5A3D0-E5B6-11D0-ABF5-00A0C90FFFC0),
165 hidden,
166 dual,
167 nonextensible,
168 oleautomation
169 ]
170 interface IFileSystem : IDispatch
171 {
172 [id(0x0000271a), propget]
173 HRESULT Drives([out, retval] IDriveCollection** ppdrives);
174
175 [id(0x00002710)]
176 HRESULT BuildPath([in] BSTR Path, [in] BSTR Name, [out, retval] BSTR* pbstrResult);
177
178 [id(0x00002714)]
179 HRESULT GetDriveName([in] BSTR Path, [out, retval] BSTR* pbstrResult);
180
181 [id(0x00002715)]
182 HRESULT GetParentFolderName([in] BSTR Path, [out, retval] BSTR* pbstrResult);
183
184 [id(0x00002716)]
185 HRESULT GetFileName([in] BSTR Path, [out, retval] BSTR* pbstrResult);
186
187 [id(0x00002717)]
188 HRESULT GetBaseName([in] BSTR Path, [out, retval] BSTR* pbstrResult);
189
190 [id(0x00002718)]
191 HRESULT GetExtensionName([in] BSTR Path, [out, retval] BSTR* pbstrResult);
192
193 [id(0x00002712)]
194 HRESULT GetAbsolutePathName([in] BSTR Path, [out, retval] BSTR* pbstrResult);
195
196 [id(0x00002713)]
197 HRESULT GetTempName([out, retval] BSTR* pbstrResult);
198
199 [id(0x0000271f)]
200 HRESULT DriveExists([in] BSTR DriveSpec, [out, retval] VARIANT_BOOL* pfExists);
201
202 [id(0x00002720)]
203 HRESULT FileExists([in] BSTR FileSpec, [out, retval] VARIANT_BOOL* pfExists);
204
205 [id(0x00002721)]
206 HRESULT FolderExists([in] BSTR FolderSpec, [out, retval] VARIANT_BOOL* pfExists);
207
208 [id(0x0000271b)]
209 HRESULT GetDrive([in] BSTR DriveSpec, [out, retval] IDrive** ppdrive);
210
211 [id(0x0000271c)]
212 HRESULT GetFile([in] BSTR FilePath, [out, retval] IFile** ppfile);
213
214 [id(0x0000271d)]
215 HRESULT GetFolder([in] BSTR FolderPath, [out, retval] IFolder** ppfolder);
216
217 [id(0x0000271e)]
218 HRESULT GetSpecialFolder([in] SpecialFolderConst SpecialFolder, [out, retval] IFolder** ppfolder);
219
220 [id(0x000004b0)]
221 HRESULT DeleteFile([in] BSTR FileSpec, [in, optional, defaultvalue(0)] VARIANT_BOOL Force);
222
223 [id(0x000004b1)]
224 HRESULT DeleteFolder([in] BSTR FolderSpec, [in, optional, defaultvalue(0)] VARIANT_BOOL Force);
225
226 [id(0x000004b4), helpstring("Move a file"), helpcontext(0x00214bab)]
227 HRESULT MoveFile([in] BSTR Source, [in] BSTR Destination);
228
229 [id(0x000004b5)]
230 HRESULT MoveFolder([in] BSTR Source, [in] BSTR Destination);
231
232 [id(0x000004b2)]
233 HRESULT CopyFile([in] BSTR Source, [in] BSTR Destination,
234 [in, optional, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles);
235
236 [id(0x000004b3)]
237 HRESULT CopyFolder([in] BSTR Source, [in] BSTR Destination,
238 [in, optional, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles);
239
240 [id(0x00000460)]
241 HRESULT CreateFolder([in] BSTR Path, [out, retval] IFolder** ppfolder);
242
243 [id(0x0000044d)]
244 HRESULT CreateTextFile([in] BSTR FileName, [in, optional, defaultvalue(-1)] VARIANT_BOOL Overwrite,
245 [in, optional, defaultvalue(0)] VARIANT_BOOL Unicode, [out, retval] ITextStream** ppts);
246
247 [id(0x0000044c)]
248 HRESULT OpenTextFile([in] BSTR FileName, [in, optional, defaultvalue(1)] IOMode IOMode,
249 [in, optional, defaultvalue(0)] VARIANT_BOOL Create,
250 [in, optional, defaultvalue(0)] Tristate Format,
251 [out, retval] ITextStream** ppts);
252 }
253
254 [
255 odl,
256 uuid(C7C3F5A1-88A3-11D0-ABCB-00A0C90FFFC0),
257 hidden,
258 dual,
259 nonextensible,
260 oleautomation
261 ]
262 interface IDriveCollection : IDispatch {
263 [id(00000000)]
264 HRESULT Item([in] VARIANT Key, [out, retval] IDrive** ppdrive);
265
266 [id(DISPID_NEWENUM), propget, restricted, hidden]
267 HRESULT _NewEnum([out, retval] IUnknown** ppenum);
268
269 [id(0x00000001), propget]
270 HRESULT Count([out, retval] long* plCount);
271 }
272
273 [
274 odl,
275 uuid(C7C3F5A0-88A3-11D0-ABCB-00A0C90FFFC0),
276 hidden,
277 dual,
278 nonextensible,
279 oleautomation
280 ]
281 interface IDrive : IDispatch
282 {
283 [id(00000000), propget]
284 HRESULT Path([out, retval] BSTR* pbstrPath);
285
286 [id(0x00002710), propget]
287 HRESULT DriveLetter([out, retval] BSTR* pbstrLetter)
288 ;
289 [id(0x00002711), propget]
290 HRESULT ShareName([out, retval] BSTR* pbstrShareName);
291
292 [id(0x00002712), propget]
293 HRESULT DriveType([out, retval] DriveTypeConst* pdt);
294
295 [id(0x00002713), propget]
296 HRESULT RootFolder([out, retval] IFolder** ppfolder);
297
298 [id(0x00002715), propget]
299 HRESULT AvailableSpace([out, retval] VARIANT* pvarAvail);
300
301 [id(0x00002714), propget]
302 HRESULT FreeSpace([out, retval] VARIANT* pvarFree);
303
304 [id(0x00002716), propget]
305 HRESULT TotalSize([out, retval] VARIANT* pvarTotal);
306
307 [id(0x00002717), propget]
308 HRESULT VolumeName([out, retval] BSTR* pbstrName);
309
310 [id(0x00002717), propput]
311 HRESULT VolumeName([in] BSTR pbstrName);
312
313 [id(0x00002718), propget]
314 HRESULT FileSystem([out, retval] BSTR* pbstrFileSystem);
315
316 [id(0x00002719), propget]
317 HRESULT SerialNumber([out, retval] long* pulSerialNumber);
318
319 [id(0x0000271a), propget]
320 HRESULT IsReady([out, retval] VARIANT_BOOL* pfReady);
321 }
322
323 [
324 odl,
325 uuid(C7C3F5A2-88A3-11D0-ABCB-00A0C90FFFC0),
326 hidden,
327 dual,
328 nonextensible,
329 oleautomation
330 ]
331 interface IFolder : IDispatch
332 {
333 [id(00000000), propget]
334 HRESULT Path([out, retval] BSTR* pbstrPath);
335
336 [id(0x000003e8), propget]
337 HRESULT Name([out, retval] BSTR* pbstrName);
338
339 [id(0x000003e8), propput]
340 HRESULT Name([in] BSTR pbstrName);
341
342 [id(0x000003ea), propget]
343 HRESULT ShortPath([out, retval] BSTR* pbstrPath);
344
345 [id(0x000003e9), propget]
346 HRESULT ShortName([out, retval] BSTR* pbstrName);
347
348 [id(0x000003ec), propget]
349 HRESULT Drive([out, retval] IDrive** ppdrive);
350
351 [id(0x000003ed), propget]
352 HRESULT ParentFolder([out, retval] IFolder** ppfolder);
353
354 [id(0x000003eb), propget]
355 HRESULT Attributes([out, retval] FileAttribute* pfa);
356
357 [id(0x000003eb), propput]
358 HRESULT Attributes([in] FileAttribute pfa);
359
360 [id(0x000003ee), propget]
361 HRESULT DateCreated([out, retval] DATE* pdate);
362
363 [id(0x000003ef), propget]
364 HRESULT DateLastModified([out, retval] DATE* pdate);
365
366 [id(0x000003f0), propget]
367 HRESULT DateLastAccessed([out, retval] DATE* pdate);
368
369 [id(0x000003f2), propget]
370 HRESULT Type([out, retval] BSTR* pbstrType);
371
372 [id(0x000004b1)]
373 HRESULT Delete([in, optional, defaultvalue(0)] VARIANT_BOOL Force);
374
375 [id(0x000004b3)]
376 HRESULT Copy([in] BSTR Destination, [in, optional, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles);
377
378 [id(0x000004b5)]
379 HRESULT Move([in] BSTR Destination);
380
381 [id(0x00002710), propget]
382 HRESULT IsRootFolder([out, retval] VARIANT_BOOL* pfRootFolder);
383
384 [id(0x000003f1), propget]
385 HRESULT Size([out, retval] VARIANT* pvarSize);
386
387 [id(0x00002711), propget]
388 HRESULT SubFolders([out, retval] IFolderCollection** ppfolders);
389
390 [id(0x00002712), propget]
391 HRESULT Files([out, retval] IFileCollection** ppfiles);
392
393 [id(0x0000044d)]
394 HRESULT CreateTextFile([in] BSTR FileName, [in, optional, defaultvalue(-1)] VARIANT_BOOL Overwrite,
395 [in, optional, defaultvalue(0)] VARIANT_BOOL Unicode, [out, retval] ITextStream** ppts);
396 }
397
398 [
399 odl,
400 uuid(C7C3F5A3-88A3-11D0-ABCB-00A0C90FFFC0),
401 hidden,
402 dual,
403 nonextensible,
404 oleautomation
405 ]
406 interface IFolderCollection : IDispatch
407 {
408 [id(0x00000002)]
409 HRESULT Add([in] BSTR Name, [out, retval] IFolder** ppfolder);
410
411 [id(00000000), propget]
412 HRESULT Item([in] VARIANT Key, [out, retval] IFolder** ppfolder);
413
414 [id(DISPID_NEWENUM), propget, restricted, hidden]
415 HRESULT _NewEnum([out, retval] IUnknown** ppenum);
416
417 [id(0x00000001), propget]
418 HRESULT Count([out, retval] long* plCount);
419 }
420
421 [
422 odl,
423 uuid(C7C3F5A5-88A3-11D0-ABCB-00A0C90FFFC0),
424 hidden,
425 dual,
426 nonextensible,
427 oleautomation
428 ]
429 interface IFileCollection : IDispatch
430 {
431 [id(00000000), propget]
432 HRESULT Item([in] VARIANT Key, [out, retval] IFile** ppfile);
433
434 [id(DISPID_NEWENUM), propget, restricted, hidden]
435 HRESULT _NewEnum([out, retval] IUnknown** ppenum);
436
437 [id(0x00000001), propget]
438 HRESULT Count([out, retval] long* plCount);
439 }
440
441 [
442 odl,
443 uuid(C7C3F5A4-88A3-11D0-ABCB-00A0C90FFFC0),
444 hidden,
445 dual,
446 nonextensible,
447 oleautomation
448 ]
449 interface IFile : IDispatch
450 {
451 [id(00000000), propget]
452 HRESULT Path([out, retval] BSTR* pbstrPath);
453
454 [id(0x000003e8), propget]
455 HRESULT Name([out, retval] BSTR* pbstrName);
456
457 [id(0x000003e8), propput]
458 HRESULT Name([in] BSTR pbstrName);
459
460 [id(0x000003ea), propget]
461 HRESULT ShortPath([out, retval] BSTR* pbstrPath);
462
463 [id(0x000003e9), propget]
464 HRESULT ShortName([out, retval] BSTR* pbstrName);
465
466 [id(0x000003ec), propget]
467 HRESULT Drive([out, retval] IDrive** ppdrive);
468
469 [id(0x000003ed), propget]
470 HRESULT ParentFolder([out, retval] IFolder** ppfolder);
471
472 [id(0x000003eb), propget]
473 HRESULT Attributes([out, retval] FileAttribute* pfa);
474
475 [id(0x000003eb), propput]
476 HRESULT Attributes([in] FileAttribute pfa);
477
478 [id(0x000003ee), propget]
479 HRESULT DateCreated([out, retval] DATE* pdate);
480
481 [id(0x000003ef), propget]
482 HRESULT DateLastModified([out, retval] DATE* pdate);
483
484 [id(0x000003f0), propget]
485 HRESULT DateLastAccessed([out, retval] DATE* pdate);
486
487 [id(0x000003f1), propget]
488 HRESULT Size([out, retval] VARIANT* pvarSize);
489
490 [id(0x000003f2), propget]
491 HRESULT Type([out, retval] BSTR* pbstrType);
492
493 [id(0x000004b0)]
494 HRESULT Delete([in, optional, defaultvalue(0)] VARIANT_BOOL Force);
495
496 [id(0x000004b2)]
497 HRESULT Copy([in] BSTR Destination, [in, optional, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles);
498
499 [id(0x000004b4)]
500 HRESULT Move([in] BSTR Destination);
501
502 [id(0x0000044c)]
503 HRESULT OpenAsTextStream([in, optional, defaultvalue(1)] IOMode IOMode,
504 [in, optional, defaultvalue(0)] Tristate Format, [out, retval] ITextStream** ppts);
505 }
506
507 [
508 odl,
509 uuid(53BAD8C1-E718-11CF-893D-00A0C9054228),
510 hidden,
511 dual,
512 nonextensible,
513 oleautomation
514 ]
515 interface ITextStream : IDispatch
516 {
517 [id(0x00002710), propget]
518 HRESULT Line([out, retval] long* Line);
519
520 [id(0xfffffdef), propget]
521 HRESULT Column([out, retval] long* Column);
522
523 [id(0x00002712), propget]
524 HRESULT AtEndOfStream([out, retval] VARIANT_BOOL* EOS);
525
526 [id(0x00002713), propget]
527 HRESULT AtEndOfLine([out, retval] VARIANT_BOOL* EOL);
528
529 [id(0x00002714)]
530 HRESULT Read([in] long Characters, [out, retval] BSTR* Text);
531
532 [id(0x00002715)]
533 HRESULT ReadLine([out, retval] BSTR* Text);
534
535 [id(0x00002716)]
536 HRESULT ReadAll([out, retval] BSTR* Text);
537
538 [id(0x00002717)]
539 HRESULT Write([in] BSTR Text);
540
541 [id(0x00002718)]
542 HRESULT WriteLine([in, optional, defaultvalue("")] BSTR Text);
543
544 [id(0x00002719)]
545 HRESULT WriteBlankLines([in] long Lines);
546
547 [id(0x0000271a)]
548 HRESULT Skip([in] long Characters);
549
550 [id(0x0000271b)]
551 HRESULT SkipLine();
552
553 [id(0x0000271c)]
554 HRESULT Close();
555 }
556
557 [
558 odl,
559 uuid(2A0B9D10-4B87-11D3-A97A-00104B365C9F),
560 dual,
561 nonextensible,
562 oleautomation
563 ]
564 interface IFileSystem3 : IFileSystem
565 {
566 [id(0x00004e20)]
567 HRESULT GetStandardStream([in] StandardStreamTypes StandardStreamType,
568 [in, optional, defaultvalue(0)] VARIANT_BOOL Unicode, [out, retval] ITextStream** ppts);
569
570 [id(0x00004e2a)]
571 HRESULT GetFileVersion([in] BSTR FileName, [out, retval] BSTR* FileVersion);
572 }
573
574 [
575 odl,
576 uuid(AADC65F6-CFF1-11D1-B747-00C04FC2B085),
577 dual,
578 oleautomation
579 ]
580 interface IScriptEncoder : IDispatch
581 {
582 [id(00000000)]
583 HRESULT EncodeScriptFile([in] BSTR szExt, [in] BSTR bstrStreamIn, [in] long cFlags,
584 [in] BSTR bstrDefaultLang, [out, retval] BSTR* pbstrStreamOut);
585 }
586
587 [
588 uuid(EE09B103-97E0-11CF-978F-00A02463E06F),
589 version(1.0),
590 helpstring("Scripting.Dictionary"),
591 threading(apartment),
592 progid("Scripting.Dictionary")
593 ]
594 coclass Dictionary
595 {
596 [default] interface IDictionary;
597 }
598
599 [
600 uuid(0D43FE01-F093-11CF-8940-00A0C9054228),
601 version(1.0),
602 helpstring("FileSystem Object"),
603 threading(both),
604 progid("Scripting.FileSystemObject")
605 ]
606 coclass FileSystemObject
607 {
608 [default] interface IFileSystem3;
609 }
610
611 [
612 uuid(C7C3F5B1-88A3-11D0-ABCB-00A0C90FFFC0),
613 noncreatable,
614 version(1.0)
615 ]
616 coclass Drive
617 {
618 [default] interface IDrive;
619 }
620
621 [
622 uuid(C7C3F5B2-88A3-11D0-ABCB-00A0C90FFFC0),
623 noncreatable,
624 version(1.0)
625 ]
626 coclass Drives
627 {
628 [default] interface IDriveCollection;
629 }
630
631 [
632 uuid(C7C3F5B3-88A3-11D0-ABCB-00A0C90FFFC0),
633 noncreatable,
634 version(1.0)
635 ]
636 coclass Folder
637 {
638 [default] interface IFolder;
639 }
640
641 [
642 uuid(C7C3F5B4-88A3-11D0-ABCB-00A0C90FFFC0),
643 noncreatable,
644 version(1.0)
645 ]
646 coclass Folders
647 {
648 [default] interface IFolderCollection;
649 }
650
651 [
652 uuid(C7C3F5B5-88A3-11D0-ABCB-00A0C90FFFC0),
653 noncreatable,
654 version(1.0)
655 ]
656 coclass File
657 {
658 [default] interface IFile;
659 }
660
661 [
662 uuid(C7C3F5B6-88A3-11D0-ABCB-00A0C90FFFC0),
663 noncreatable,
664 version(1.0)
665 ]
666 coclass Files
667 {
668 [default] interface IFileCollection;
669 }
670
671 [
672 uuid(0BB02EC0-EF49-11CF-8940-00A0C9054228),
673 noncreatable,
674 version(1.0)
675 ]
676 coclass TextStream
677 {
678 [default] interface ITextStream;
679 }
680
681 [
682 uuid(32DA2B15-CFED-11D1-B747-00C04FC2B085),
683 version(1.0),
684 helpstring("Script Encoder Object"),
685 threading(apartment),
686 progid("Scripting.Encoder")
687 ]
688 coclass Encoder
689 {
690 [default] interface IScriptEncoder;
691 }
692 }