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 regtypelib
23 #include
"vbscript_defs.h"
26 helpstring("Microsoft VBScript Globals"),
27 uuid(3eef9758
-35fc
-11d1
-8ce4
-00c04fc2b185
),
30 library VBScript_Global
32 importlib
("stdole2.tlb");
35 uuid(3eef9758
-35fc
-11d1
-8ce4
-00c04fc2B186
)
37 dispinterface GlobalObj
{
39 [id(DISPID_GLOBAL_VBUSESYSTEM
), readonly]
42 [id(DISPID_GLOBAL_USESYSTEMDAYOFWEEK
), readonly]
43 VARIANT vbUseSystemDayOfWeek
;
45 [id(DISPID_GLOBAL_VBSUNDAY
), readonly]
48 [id(DISPID_GLOBAL_VBMONDAY
), readonly]
51 [id(DISPID_GLOBAL_VBTUESDAY
), readonly]
54 [id(DISPID_GLOBAL_VBWEDNESDAY
), readonly]
57 [id(DISPID_GLOBAL_VBTHURSDAY
), readonly]
60 [id(DISPID_GLOBAL_VBFRIDAY
), readonly]
63 [id(DISPID_GLOBAL_VBSATURDAY
), readonly]
66 [id(DISPID_GLOBAL_VBFIRSTJAN1
), readonly]
69 [id(DISPID_GLOBAL_VBFIRSTFOURDAYS
), readonly]
70 VARIANT vbFirstFourDays
;
72 [id(DISPID_GLOBAL_VBFIRSTFULLWEEK
), readonly]
73 VARIANT vbFirstFullWeek
;
75 [id(DISPID_GLOBAL_VBOKONLY
), readonly]
78 [id(DISPID_GLOBAL_VBOKCANCEL
), readonly]
81 [id(DISPID_GLOBAL_VBABORTRETRYIGNORE
), readonly]
82 VARIANT vbAbortRetryIgnore
;
84 [id(DISPID_GLOBAL_VBYESNOCANCEL
), readonly]
85 VARIANT vbYesNoCancel
;
87 [id(DISPID_GLOBAL_VBYESNO
), readonly]
90 [id(DISPID_GLOBAL_VBRETRYCANCEL
), readonly]
91 VARIANT vbRetryCancel
;
93 [id(DISPID_GLOBAL_VBCRITICAL
), readonly]
96 [id(DISPID_GLOBAL_VBQUESTION
), readonly]
99 [id(DISPID_GLOBAL_VBEXCLAMATION
), readonly]
100 VARIANT vbExclamation
;
102 [id(DISPID_GLOBAL_VBINFORMATION
), readonly]
103 VARIANT vbInformation
;
105 [id(DISPID_GLOBAL_VBDEFAULTBUTTON1
), readonly]
106 VARIANT vbDefaultButton1
;
108 [id(DISPID_GLOBAL_VBDEFAULTBUTTON2
), readonly]
109 VARIANT vbDefaultButton2
;
111 [id(DISPID_GLOBAL_VBDEFAULTBUTTON3
), readonly]
112 VARIANT vbDefaultButton3
;
114 [id(DISPID_GLOBAL_VBDEFAULTBUTTON4
), readonly]
115 VARIANT vbDefaultButton4
;
117 [id(DISPID_GLOBAL_VBAPPLICATIONMODAL
), readonly]
118 VARIANT vbApplicationModal
;
120 [id(DISPID_GLOBAL_VBSYSTEMMODAL
), readonly]
121 VARIANT vbSystemModal
;
123 [id(DISPID_GLOBAL_VBOK
), readonly]
126 [id(DISPID_GLOBAL_VBCANCEL
), readonly]
129 [id(DISPID_GLOBAL_VBABORT
), readonly]
132 [id(DISPID_GLOBAL_VBRETRY
), readonly]
135 [id(DISPID_GLOBAL_VBIGNORE
), readonly]
138 [id(DISPID_GLOBAL_VBYES
), readonly]
141 [id(DISPID_GLOBAL_VBNO
), readonly]
144 [id(DISPID_GLOBAL_VBEMPTY
), readonly]
147 [id(DISPID_GLOBAL_VBNULL
), readonly]
150 [id(DISPID_GLOBAL_VBINTEGER
), readonly]
153 [id(DISPID_GLOBAL_VBLONG
), readonly]
156 [id(DISPID_GLOBAL_VBSINGLE
), readonly]
159 [id(DISPID_GLOBAL_VBDOUBLE
), readonly]
162 [id(DISPID_GLOBAL_VBCURRENCY
), readonly]
165 [id(DISPID_GLOBAL_VBDATE
), readonly]
168 [id(DISPID_GLOBAL_VBSTRING
), readonly]
171 [id(DISPID_GLOBAL_VBOBJECT
), readonly]
174 [id(DISPID_GLOBAL_VBERROR
), readonly]
177 [id(DISPID_GLOBAL_VBBOOLEAN
), readonly]
180 [id(DISPID_GLOBAL_VBVARIANT
), readonly]
183 [id(DISPID_GLOBAL_VBDATAOBJECT
), readonly]
184 VARIANT vbDataObject
;
186 [id(DISPID_GLOBAL_VBDECIMAL
), readonly]
189 [id(DISPID_GLOBAL_VBBYTE
), readonly]
192 [id(DISPID_GLOBAL_VBARRAY
), readonly]
195 [id(DISPID_GLOBAL_VBTRUE
), readonly]
198 [id(DISPID_GLOBAL_VBFALSE
), readonly]
201 [id(DISPID_GLOBAL_VBUSEDEFAULT
), readonly]
202 VARIANT vbUseDefault
;
204 [id(DISPID_GLOBAL_VBBINARYCOMPARE
), readonly]
205 VARIANT vbBinaryCompare
;
207 [id(DISPID_GLOBAL_VBTEXTCOMPARE
), readonly]
208 VARIANT vbTextCompare
;
210 [id(DISPID_GLOBAL_VBDATABASECOMPARE
), readonly]
211 VARIANT vbDatabaseCompare
;
213 [id(DISPID_GLOBAL_VBGENERALDATE
), readonly]
214 VARIANT vbGeneralDate
;
216 [id(DISPID_GLOBAL_VBLONGDATE
), readonly]
219 [id(DISPID_GLOBAL_VBSHORTDATE
), readonly]
222 [id(DISPID_GLOBAL_VBLONGTIME
), readonly]
225 [id(DISPID_GLOBAL_VBSHORTTIME
), readonly]
228 [id(DISPID_GLOBAL_VBOBJECTERROR
), readonly]
229 VARIANT vbObjectError
;
231 [id(DISPID_GLOBAL_VBBLACK
), readonly]
234 [id(DISPID_GLOBAL_VBBLUE
), readonly]
237 [id(DISPID_GLOBAL_VBCYAN
), readonly]
240 [id(DISPID_GLOBAL_VBGREEN
), readonly]
243 [id(DISPID_GLOBAL_VBMAGENTA
), readonly]
246 [id(DISPID_GLOBAL_VBRED
), readonly]
249 [id(DISPID_GLOBAL_VBWHITE
), readonly]
252 [id(DISPID_GLOBAL_VBYELLOW
), readonly]
255 [id(DISPID_GLOBAL_VBCR
), readonly]
258 [id(DISPID_GLOBAL_VBCRLF
), readonly]
261 [id(DISPID_GLOBAL_VBNEWLINE
), readonly]
264 [id(DISPID_GLOBAL_VBFORMFEED
), readonly]
267 [id(DISPID_GLOBAL_VBLF
), readonly]
270 [id(DISPID_GLOBAL_VBNULLCHAR
), readonly]
273 [id(DISPID_GLOBAL_VBNULLSTRING
), readonly]
274 VARIANT vbNullString
;
276 [id(DISPID_GLOBAL_VBTAB
), readonly]
279 [id(DISPID_GLOBAL_VBVERTICALTAB
), readonly]
280 VARIANT vbVerticalTab
;
282 [id(DISPID_GLOBAL_VBMSGBOXHELPBUTTON
), readonly]
283 VARIANT vbMsgBoxHelpButton
;
285 [id(DISPID_GLOBAL_VBMSGBOXSETFOREGROUND
), readonly]
286 VARIANT vbMsgBoxSetForeground
;
288 [id(DISPID_GLOBAL_VBMSGBOXRIGHT
), readonly]
289 VARIANT vbMsgBoxRight
;
291 [id(DISPID_GLOBAL_VBMSGBOXRTLREADING
), readonly]
292 VARIANT vbMsgBoxRtlReading
;
295 [id(DISPID_GLOBAL_CCUR
)]
296 VARIANT CCur
(VARIANT expression
);
298 [id(DISPID_GLOBAL_CINT
)]
299 VARIANT CInt
(VARIANT expression
);
301 [id(DISPID_GLOBAL_CLNG
)]
302 VARIANT CLng
(VARIANT expression
);
304 [id(DISPID_GLOBAL_CBOOL
)]
305 VARIANT CBool
(VARIANT expression
);
307 [id(DISPID_GLOBAL_CBYTE
)]
308 VARIANT CByte
(VARIANT expression
);
310 [id(DISPID_GLOBAL_CDATE
)]
311 VARIANT CDate
(VARIANT expression
);
313 [id(DISPID_GLOBAL_CDBL
)]
314 VARIANT CDbl
(VARIANT expression
);
316 [id(DISPID_GLOBAL_CSNG
)]
317 VARIANT CSng
(VARIANT expression
);
319 [id(DISPID_GLOBAL_CSTR
)]
320 VARIANT CStr
(VARIANT expression
);
322 [id(DISPID_GLOBAL_HEX
)]
323 VARIANT Hex
(VARIANT number
);
325 [id(DISPID_GLOBAL_OCT
)]
326 VARIANT Oct
(VARIANT number
);
328 [id(DISPID_GLOBAL_VARTYPE
)]
329 VARIANT VarType
(VARIANT varname
);
331 [id(DISPID_GLOBAL_ISDATE
)]
332 VARIANT IsDate
(VARIANT expression
);
334 [id(DISPID_GLOBAL_ISEMPTY
)]
335 VARIANT IsEmpty
(VARIANT expression
);
337 [id(DISPID_GLOBAL_ISNULL
)]
338 VARIANT IsNull
(VARIANT expression
);
340 [id(DISPID_GLOBAL_ISNUMERIC
)]
341 VARIANT IsNumeric
(VARIANT expression
);
343 [id(DISPID_GLOBAL_ISARRAY
)]
344 VARIANT IsArray
(VARIANT expression
);
346 [id(DISPID_GLOBAL_ISOBJECT
)]
347 VARIANT IsObject
(VARIANT identifier
);
349 [id(DISPID_GLOBAL_ATN
)]
350 VARIANT Atn
(VARIANT number
);
352 [id(DISPID_GLOBAL_COS
)]
353 VARIANT Cos
(VARIANT number
);
355 [id(DISPID_GLOBAL_SIN
)]
356 VARIANT Sin
(VARIANT number
);
358 [id(DISPID_GLOBAL_TAN
)]
359 VARIANT Tan
(VARIANT number
);
361 [id(DISPID_GLOBAL_EXP
)]
362 VARIANT Exp
(VARIANT number
);
364 [id(DISPID_GLOBAL_LOG
)]
365 VARIANT Log
(VARIANT number
);
367 [id(DISPID_GLOBAL_SQR
)]
368 VARIANT Sqr
(VARIANT number
);
370 [id(DISPID_GLOBAL_RANDOMIZE
)]
371 VARIANT Randomize
(VARIANT number
);
373 [id(DISPID_GLOBAL_RND
)]
374 VARIANT Rnd
(VARIANT number
);
376 [id(DISPID_GLOBAL_TIMER
)]
379 [id(DISPID_GLOBAL_LBOUND
)]
380 VARIANT LBound
(VARIANT arrayname
);
382 [id(DISPID_GLOBAL_UBOUND
)]
383 VARIANT UBound
(VARIANT arrayname
);
385 [id(DISPID_GLOBAL_RGB
)]
391 [id(DISPID_GLOBAL_LEN
)]
392 VARIANT Len
(VARIANT string);
394 [id(DISPID_GLOBAL_LENB
)]
395 VARIANT LenB
(VARIANT string);
397 [id(DISPID_GLOBAL_LEFT
)]
402 [id(DISPID_GLOBAL_LEFTB
)]
407 [id(DISPID_GLOBAL_RIGHT
)]
412 [id(DISPID_GLOBAL_RIGHTB
)]
417 [id(DISPID_GLOBAL_MID
)]
421 [optional] VARIANT length
);
423 [id(DISPID_GLOBAL_MIDB
)]
427 [optional] VARIANT length
);
429 [id(DISPID_GLOBAL_STRCOMP
)]
433 [optional] VARIANT compare
);
435 [id(DISPID_GLOBAL_LCASE
)]
436 VARIANT LCase
(VARIANT string);
438 [id(DISPID_GLOBAL_UCASE
)]
439 VARIANT UCase
(VARIANT string);
441 [id(DISPID_GLOBAL_LTRIM
)]
442 VARIANT LTrim
(VARIANT string);
444 [id(DISPID_GLOBAL_RTRIM
)]
445 VARIANT RTrim
(VARIANT string);
447 [id(DISPID_GLOBAL_TRIM
)]
448 VARIANT Trim
(VARIANT string);
450 [id(DISPID_GLOBAL_SPACE
)]
451 VARIANT Space
(VARIANT number
);
453 [id(DISPID_GLOBAL_STRING
)]
455 [optional] VARIANT number
,
456 [optional] VARIANT character
);
458 [id(DISPID_GLOBAL_INSTR
)]
463 [optional] VARIANT compare
);
465 [id(DISPID_GLOBAL_INSTRB
)]
470 [optional] VARIANT compare
);
472 [id(DISPID_GLOBAL_ASCB
)]
473 VARIANT AscB
(VARIANT string);
475 [id(DISPID_GLOBAL_CHRB
)]
476 VARIANT ChrB
(VARIANT charcode
);
478 [id(DISPID_GLOBAL_ASC
)]
479 VARIANT Asc
(VARIANT string);
481 [id(DISPID_GLOBAL_CHR
)]
482 VARIANT Chr
(VARIANT charcode
);
484 [id(DISPID_GLOBAL_ASCW
)]
485 VARIANT AscW
(VARIANT string);
487 [id(DISPID_GLOBAL_CHRW
)]
488 VARIANT ChrW
(VARIANT charcode
);
490 [id(DISPID_GLOBAL_ABS
)]
491 VARIANT Abs
(VARIANT number
);
493 [id(DISPID_GLOBAL_FIX
)]
494 VARIANT Fix
(VARIANT number
);
496 [id(DISPID_GLOBAL_INT
)]
497 VARIANT Int(VARIANT number
);
499 [id(DISPID_GLOBAL_SGN
)]
500 VARIANT Sgn
(VARIANT number
);
502 [id(DISPID_GLOBAL_NOW
)]
505 [id(DISPID_GLOBAL_DATE
)]
508 [id(DISPID_GLOBAL_TIME
)]
511 [id(DISPID_GLOBAL_DAY
)]
512 VARIANT Day
(VARIANT Date
);
514 [id(DISPID_GLOBAL_MONTH
)]
515 VARIANT Month
(VARIANT Date
);
517 [id(DISPID_GLOBAL_WEEKDAY
)]
520 [optional] VARIANT firstdayofweek
);
522 [id(DISPID_GLOBAL_YEAR
)]
523 VARIANT Year
(VARIANT Date
);
525 [id(DISPID_GLOBAL_HOUR
)]
526 VARIANT Hour
(VARIANT Time
);
528 [id(DISPID_GLOBAL_MINUTE
)]
529 VARIANT Minute
(VARIANT Time
);
531 [id(DISPID_GLOBAL_SECOND
)]
532 VARIANT Second
(VARIANT Time
);
534 [id(DISPID_GLOBAL_DATEVALUE
)]
535 VARIANT DateValue
(VARIANT Date
);
537 [id(DISPID_GLOBAL_TIMEVALUE
)]
538 VARIANT TimeValue
(VARIANT Time
);
540 [id(DISPID_GLOBAL_DATESERIAL
)]
546 [id(DISPID_GLOBAL_TIMESERIAL
)]
552 [id(DISPID_GLOBAL_INPUTBOX
)]
555 [optional] VARIANT title
,
556 [optional] VARIANT defaultValue,
557 [optional] VARIANT xpos
,
558 [optional] VARIANT ypos
,
559 [optional] VARIANT helpfile,
560 [optional] VARIANT context
);
562 [id(DISPID_GLOBAL_MSGBOX
)]
565 [optional] VARIANT buttons
,
566 [optional] VARIANT title
,
567 [optional] VARIANT helpfile,
568 [optional] VARIANT context
);
570 [id(DISPID_GLOBAL_CREATEOBJECT
)]
571 VARIANT CreateObject
(VARIANT classValue
);
573 [id(DISPID_GLOBAL_GETOBJECT
)]
575 [optional] VARIANT pathname
,
576 [optional] VARIANT classValue
);
578 [id(DISPID_GLOBAL_DATEADD
)]
584 [id(DISPID_GLOBAL_DATEDIFF
)]
589 [optional] VARIANT firstdayofweek
,
590 [optional] VARIANT firstdayofyear
);
592 [id(DISPID_GLOBAL_DATEPART
)]
596 [optional] VARIANT firstdayofweek
,
597 [optional] VARIANT firstdayofyear
);
599 [id(DISPID_GLOBAL_TYPENAME
)]
600 VARIANT TypeName
(VARIANT varname
);
602 [id(DISPID_GLOBAL_ARRAY
)]
603 VARIANT Array
(VARIANT arglist
);
605 [id(DISPID_GLOBAL_ERASE
)]
606 VARIANT Erase
(VARIANT arraylist
);
608 [id(DISPID_GLOBAL_FILTER
)]
610 VARIANT InputStrings
,
612 [optional] VARIANT Include
,
613 [optional] VARIANT compare
);
615 [id(DISPID_GLOBAL_JOIN
)]
618 [optional] VARIANT delimiter
);
620 [id(DISPID_GLOBAL_SPLIT
)]
623 [optional] VARIANT delimiter
,
624 [optional] VARIANT count
,
625 [optional] VARIANT compare
);
627 [id(DISPID_GLOBAL_REPLACE
)]
632 [optional] VARIANT start
,
633 [optional] VARIANT count
,
634 [optional] VARIANT compare
);
636 [id(DISPID_GLOBAL_STRREVERSE
)]
637 VARIANT StrReverse
(VARIANT string1
);
639 [id(DISPID_GLOBAL_INSTRREV
)]
643 [optional] VARIANT start
,
644 [optional] VARIANT compare
);
646 [id(DISPID_GLOBAL_LOADPICTURE
)]
647 VARIANT LoadPicture
([optional] VARIANT stringexpression
);
649 [id(DISPID_GLOBAL_SCRIPTENGINE
)]
650 VARIANT ScriptEngine
();
652 [id(DISPID_GLOBAL_SCRIPTENGINEMAJORVERSION
)]
653 VARIANT ScriptEngineMajorVersion
();
655 [id(DISPID_GLOBAL_SCRIPTENGINEMINORVERSION
)]
656 VARIANT ScriptEngineMinorVersion
();
658 [id(DISPID_GLOBAL_SCRIPTENGINEBUILDVERSION
)]
659 VARIANT ScriptEngineBuildVersion
();
661 [id(DISPID_GLOBAL_FORMATNUMBER
)]
662 VARIANT FormatNumber
(
664 [optional] VARIANT NumDigitsAfterDecimal
,
665 [optional] VARIANT IncludeLeadingDigit
,
666 [optional] VARIANT UseParensForNegativeNumbers
,
667 [optional] VARIANT GroupDigits
);
669 [id(DISPID_GLOBAL_FORMATCURRENCY
)]
670 VARIANT FormatCurrency
(
672 [optional] VARIANT NumDigitsAfterDecimal
,
673 [optional] VARIANT IncludeLeadingDigit
,
674 [optional] VARIANT UseParensForNegativeNumbers
,
675 [optional] VARIANT GroupDigits
);
677 [id(DISPID_GLOBAL_FORMATPERCENT
)]
678 VARIANT FormatPercent
(
680 [optional] VARIANT NumDigitsAfterDecimal
,
681 [optional] VARIANT IncludeLeadingDigit
,
682 [optional] VARIANT UseParensForNegativeNumbers
,
683 [optional] VARIANT GroupDigits
);
685 [id(DISPID_GLOBAL_FORMATDATETIME
)]
686 VARIANT FormatDateTime
(
688 [optional] VARIANT NamedFormat
);
690 [id(DISPID_GLOBAL_WEEKDAYNAME
)]
694 VARIANT firstdayofweek
);
696 [id(DISPID_GLOBAL_MONTHNAME
)]
699 [optional] VARIANT abbreviate
);
701 [id(DISPID_GLOBAL_ROUND
)]
704 [optional] VARIANT numdecimalplaces
);
706 [id(DISPID_GLOBAL_ESCAPE
)]
707 VARIANT Escape
(VARIANT string);
709 [id(DISPID_GLOBAL_UNESCAPE
)]
710 VARIANT Unescape
(VARIANT string);
712 [id(DISPID_GLOBAL_EVAL
)]
713 VARIANT Eval
(VARIANT string);
715 [id(DISPID_GLOBAL_EXECUTE
)]
716 VARIANT Execute
(VARIANT string);
718 [id(DISPID_GLOBAL_EXECUTEGLOBAL
)]
719 VARIANT ExecuteGlobal
(VARIANT string);
721 [id(DISPID_GLOBAL_GETREF
)]
722 VARIANT GetRef
(VARIANT string);
726 uuid(3eef9758
-35fc
-11d1
-8ce4
-00c04fc2b187
)
728 dispinterface ErrObj
{
730 [id(DISPID_ERR_DESCRIPTION
)]
733 [id(DISPID_ERR_HELPCONTEXT
)]
736 [id(DISPID_ERR_HELPFILE
)]
739 [id(DISPID_ERR_NUMBER
)]
742 [id(DISPID_ERR_SOURCE
)]
746 [id(DISPID_ERR_CLEAR
)]
749 [id(DISPID_ERR_RAISE
)]
755 VARIANT HelpContext);