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