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