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
21 #include
"vbscript_defs.h"
24 helpstring("Microsoft VBScript Globals"),
25 uuid(3eef9758
-35fc
-11d1
-8ce4
-00c04fc2b185
),
28 library VBScript_Global
30 importlib
("stdole2.tlb");
33 uuid(3eef9758
-35fc
-11d1
-8ce4
-00c04fc2B186
)
35 dispinterface GlobalObj
{
37 [id(DISPID_GLOBAL_VBUSESYSTEM
), readonly]
40 [id(DISPID_GLOBAL_USESYSTEMDAYOFWEEK
), readonly]
41 VARIANT vbUseSystemDayOfWeek
;
43 [id(DISPID_GLOBAL_VBSUNDAY
), readonly]
46 [id(DISPID_GLOBAL_VBMONDAY
), readonly]
49 [id(DISPID_GLOBAL_VBTUESDAY
), readonly]
52 [id(DISPID_GLOBAL_VBWEDNESDAY
), readonly]
55 [id(DISPID_GLOBAL_VBTHURSDAY
), readonly]
58 [id(DISPID_GLOBAL_VBFRIDAY
), readonly]
61 [id(DISPID_GLOBAL_VBSATURDAY
), readonly]
64 [id(DISPID_GLOBAL_VBFIRSTJAN1
), readonly]
67 [id(DISPID_GLOBAL_VBFIRSTFOURDAYS
), readonly]
68 VARIANT vbFirstFourDays
;
70 [id(DISPID_GLOBAL_VBFIRSTFULLWEEK
), readonly]
71 VARIANT vbFirstFullWeek
;
73 [id(DISPID_GLOBAL_VBOKONLY
), readonly]
76 [id(DISPID_GLOBAL_VBOKCANCEL
), readonly]
79 [id(DISPID_GLOBAL_VBABORTRETRYIGNORE
), readonly]
80 VARIANT vbAbortRetryIgnore
;
82 [id(DISPID_GLOBAL_VBYESNOCANCEL
), readonly]
83 VARIANT vbYesNoCancel
;
85 [id(DISPID_GLOBAL_VBYESNO
), readonly]
88 [id(DISPID_GLOBAL_VBYESNOCANCEL
), readonly]
89 VARIANT vbRetryCancel
;
91 [id(DISPID_GLOBAL_VBCRITICAL
), readonly]
94 [id(DISPID_GLOBAL_VBQUESTION
), readonly]
97 [id(DISPID_GLOBAL_VBEXCLAMATION
), readonly]
98 VARIANT vbExclamation
;
100 [id(DISPID_GLOBAL_VBINFORMATION
), readonly]
101 VARIANT vbInformation
;
103 [id(DISPID_GLOBAL_VBDEFAULTBUTTON1
), readonly]
104 VARIANT vbDefaultButton1
;
106 [id(DISPID_GLOBAL_VBDEFAULTBUTTON2
), readonly]
107 VARIANT vbDefaultButton2
;
109 [id(DISPID_GLOBAL_VBDEFAULTBUTTON3
), readonly]
110 VARIANT vbDefaultButton3
;
112 [id(DISPID_GLOBAL_VBDEFAULTBUTTON4
), readonly]
113 VARIANT vbDefaultButton4
;
115 [id(DISPID_GLOBAL_VBAPPLICATIONMODAL
), readonly]
116 VARIANT vbApplicationModal
;
118 [id(DISPID_GLOBAL_VBSYSTEMMODAL
), readonly]
119 VARIANT vbSystemModal
;
121 [id(DISPID_GLOBAL_VBOK
), readonly]
124 [id(DISPID_GLOBAL_VBCANCEL
), readonly]
127 [id(DISPID_GLOBAL_VBABORT
), readonly]
130 [id(DISPID_GLOBAL_VBRETRY
), readonly]
133 [id(DISPID_GLOBAL_VBIGNORE
), readonly]
136 [id(DISPID_GLOBAL_VBYES
), readonly]
139 [id(DISPID_GLOBAL_VBNO
), readonly]
142 [id(DISPID_GLOBAL_VBEMPTY
), readonly]
145 [id(DISPID_GLOBAL_VBNULL
), readonly]
148 [id(DISPID_GLOBAL_VBINTEGER
), readonly]
151 [id(DISPID_GLOBAL_VBLONG
), readonly]
154 [id(DISPID_GLOBAL_VBSINGLE
), readonly]
157 [id(DISPID_GLOBAL_VBDOUBLE
), readonly]
160 [id(DISPID_GLOBAL_VBCURRENCY
), readonly]
163 [id(DISPID_GLOBAL_VBDATE
), readonly]
166 [id(DISPID_GLOBAL_VBSTRING
), readonly]
169 [id(DISPID_GLOBAL_VBOBJECT
), readonly]
172 [id(DISPID_GLOBAL_VBERROR
), readonly]
175 [id(DISPID_GLOBAL_VBBOOLEAN
), readonly]
178 [id(DISPID_GLOBAL_VBVARIANT
), readonly]
181 [id(DISPID_GLOBAL_VBDATAOBJECT
), readonly]
182 VARIANT vbDataObject
;
184 [id(DISPID_GLOBAL_VBDECIMAL
), readonly]
187 [id(DISPID_GLOBAL_VBBYTE
), readonly]
190 [id(DISPID_GLOBAL_VBARRAY
), readonly]
193 [id(DISPID_GLOBAL_VBTRUE
), readonly]
196 [id(DISPID_GLOBAL_VBFALSE
), readonly]
199 [id(DISPID_GLOBAL_VBUSEDEFAULT
), readonly]
200 VARIANT vbUseDefault
;
202 [id(DISPID_GLOBAL_VBBINARYCOMPARE
), readonly]
203 VARIANT vbBinaryCompare
;
205 [id(DISPID_GLOBAL_VBTEXTCOMPARE
), readonly]
206 VARIANT vbTextCompare
;
208 [id(DISPID_GLOBAL_VBDATABASECOMPARE
), readonly]
209 VARIANT vbDatabaseCompare
;
211 [id(DISPID_GLOBAL_VBGENERALDATE
), readonly]
212 VARIANT vbGeneralDate
;
214 [id(DISPID_GLOBAL_VBLONGDATE
), readonly]
217 [id(DISPID_GLOBAL_VBSHORTDATE
), readonly]
220 [id(DISPID_GLOBAL_VBLONGTIME
), readonly]
223 [id(DISPID_GLOBAL_VBSHORTTIME
), readonly]
226 [id(DISPID_GLOBAL_VBOBJECTERROR
), readonly]
227 VARIANT vbObjectError
;
229 [id(DISPID_GLOBAL_VBBLACK
), readonly]
232 [id(DISPID_GLOBAL_VBBLUE
), readonly]
235 [id(DISPID_GLOBAL_VBCYAN
), readonly]
238 [id(DISPID_GLOBAL_VBGREEN
), readonly]
241 [id(DISPID_GLOBAL_VBMAGENTA
), readonly]
244 [id(DISPID_GLOBAL_VBRED
), readonly]
247 [id(DISPID_GLOBAL_VBWHITE
), readonly]
250 [id(DISPID_GLOBAL_VBYELLOW
), readonly]
253 [id(DISPID_GLOBAL_VBCR
), readonly]
256 [id(DISPID_GLOBAL_VBCRLF
), readonly]
259 [id(DISPID_GLOBAL_VBNEWLINE
), readonly]
262 [id(DISPID_GLOBAL_VBFORMFEED
), readonly]
265 [id(DISPID_GLOBAL_VBLF
), readonly]
268 [id(DISPID_GLOBAL_VBNULLCHAR
), readonly]
271 [id(DISPID_GLOBAL_VBNULLSTRING
), readonly]
272 VARIANT vbNullString
;
274 [id(DISPID_GLOBAL_VBTAB
), readonly]
277 [id(DISPID_GLOBAL_VBVERTICALTAB
), readonly]
278 VARIANT vbVerticalTab
;
280 [id(DISPID_GLOBAL_VBMSGBOXHELPBUTTON
), readonly]
281 VARIANT vbMsgBoxHelpButton
;
283 [id(DISPID_GLOBAL_VBMSGBOXSETFOREGROUND
), readonly]
284 VARIANT vbMsgBoxSetForeground
;
286 [id(DISPID_GLOBAL_VBMSGBOXRIGHT
), readonly]
287 VARIANT vbMsgBoxRight
;
289 [id(DISPID_GLOBAL_VBMSGBOXRTLREADING
), readonly]
290 VARIANT vbMsgBoxRtlReading
;
293 [id(DISPID_GLOBAL_CCUR
)]
294 VARIANT CCur
(VARIANT expression
);
296 [id(DISPID_GLOBAL_CINT
)]
297 VARIANT CInt
(VARIANT expression
);
299 [id(DISPID_GLOBAL_CLNG
)]
300 VARIANT CLng
(VARIANT expression
);
302 [id(DISPID_GLOBAL_CBOOL
)]
303 VARIANT CBool
(VARIANT expression
);
305 [id(DISPID_GLOBAL_CBYTE
)]
306 VARIANT CByte
(VARIANT expression
);
308 [id(DISPID_GLOBAL_CDATE
)]
309 VARIANT CDate
(VARIANT expression
);
311 [id(DISPID_GLOBAL_CDBL
)]
312 VARIANT CDbl
(VARIANT expression
);
314 [id(DISPID_GLOBAL_CSNG
)]
315 VARIANT CSng
(VARIANT expression
);
317 [id(DISPID_GLOBAL_CSTR
)]
318 VARIANT CStr
(VARIANT expression
);
320 [id(DISPID_GLOBAL_HEX
)]
321 VARIANT Hex
(VARIANT number
);
323 [id(DISPID_GLOBAL_OCT
)]
324 VARIANT Oct
(VARIANT number
);
326 [id(DISPID_GLOBAL_VARTYPE
)]
327 VARIANT VarType
(VARIANT varname
);
329 [id(DISPID_GLOBAL_ISDATE
)]
330 VARIANT IsDate
(VARIANT expression
);
332 [id(DISPID_GLOBAL_ISEMPTY
)]
333 VARIANT IsEmpty
(VARIANT expression
);
335 [id(DISPID_GLOBAL_ISNULL
)]
336 VARIANT IsNull
(VARIANT expression
);
338 [id(DISPID_GLOBAL_ISNUMERIC
)]
339 VARIANT IsNumeric
(VARIANT expression
);
341 [id(DISPID_GLOBAL_ISARRAY
)]
342 VARIANT IsArray
(VARIANT expression
);
344 [id(DISPID_GLOBAL_ISOBJECT
)]
345 VARIANT IsObject
(VARIANT identifier
);
347 [id(DISPID_GLOBAL_ATN
)]
348 VARIANT Atn
(VARIANT number
);
350 [id(DISPID_GLOBAL_COS
)]
351 VARIANT Cos
(VARIANT number
);
353 [id(DISPID_GLOBAL_SIN
)]
354 VARIANT Sin
(VARIANT number
);
356 [id(DISPID_GLOBAL_TAN
)]
357 VARIANT Tan
(VARIANT number
);
359 [id(DISPID_GLOBAL_EXP
)]
360 VARIANT Exp
(VARIANT number
);
362 [id(DISPID_GLOBAL_LOG
)]
363 VARIANT Log
(VARIANT number
);
365 [id(DISPID_GLOBAL_SQR
)]
366 VARIANT Sqr
(VARIANT number
);
368 [id(DISPID_GLOBAL_RANDOMIZE
)]
369 VARIANT Randomize
(VARIANT number
);
371 [id(DISPID_GLOBAL_RND
)]
372 VARIANT Rnd
(VARIANT number
);
374 [id(DISPID_GLOBAL_TIMER
)]
377 [id(DISPID_GLOBAL_LBOUND
)]
378 VARIANT LBound
(VARIANT arrayname
);
380 [id(DISPID_GLOBAL_UBOUND
)]
381 VARIANT UBound
(VARIANT arrayname
);
383 [id(DISPID_GLOBAL_RGB
)]
389 [id(DISPID_GLOBAL_LEN
)]
390 VARIANT Len
(VARIANT string);
392 [id(DISPID_GLOBAL_LENB
)]
393 VARIANT LenB
(VARIANT string);
395 [id(DISPID_GLOBAL_LEFT
)]
400 [id(DISPID_GLOBAL_LEFTB
)]
405 [id(DISPID_GLOBAL_RIGHT
)]
410 [id(DISPID_GLOBAL_RIGHTB
)]
415 [id(DISPID_GLOBAL_MID
)]
419 [optional] VARIANT length
);
421 [id(DISPID_GLOBAL_MIDB
)]
425 [optional] VARIANT length
);
427 [id(DISPID_GLOBAL_STRCOMP
)]
431 [optional] VARIANT compare
);
433 [id(DISPID_GLOBAL_LCASE
)]
434 VARIANT LCase
(VARIANT string);
436 [id(DISPID_GLOBAL_UCASE
)]
437 VARIANT UCase
(VARIANT string);
439 [id(DISPID_GLOBAL_LTRIM
)]
440 VARIANT LTrim
(VARIANT string);
442 [id(DISPID_GLOBAL_RTRIM
)]
443 VARIANT RTrim
(VARIANT string);
445 [id(DISPID_GLOBAL_TRIM
)]
446 VARIANT Trim
(VARIANT string);
448 [id(DISPID_GLOBAL_SPACE
)]
449 VARIANT Space
(VARIANT number
);
451 [id(DISPID_GLOBAL_STRING
)]
453 [optional] VARIANT number
,
454 [optional] VARIANT character
);
456 [id(DISPID_GLOBAL_INSTR
)]
461 [optional] VARIANT compare
);
463 [id(DISPID_GLOBAL_INSTRB
)]
468 [optional] VARIANT compare
);
470 [id(DISPID_GLOBAL_ASCB
)]
471 VARIANT AscB
(VARIANT string);
473 [id(DISPID_GLOBAL_CHRB
)]
474 VARIANT ChrB
(VARIANT charcode
);
476 [id(DISPID_GLOBAL_ASC
)]
477 VARIANT Asc
(VARIANT string);
479 [id(DISPID_GLOBAL_CHR
)]
480 VARIANT Chr
(VARIANT charcode
);
482 [id(DISPID_GLOBAL_ASCW
)]
483 VARIANT AscW
(VARIANT string);
485 [id(DISPID_GLOBAL_CHRW
)]
486 VARIANT ChrW
(VARIANT charcode
);
488 [id(DISPID_GLOBAL_ABS
)]
489 VARIANT Abs
(VARIANT number
);
491 [id(DISPID_GLOBAL_FIX
)]
492 VARIANT Fix
(VARIANT number
);
494 [id(DISPID_GLOBAL_INT
)]
495 VARIANT Int(VARIANT number
);
497 [id(DISPID_GLOBAL_SGN
)]
498 VARIANT Sgn
(VARIANT number
);
500 [id(DISPID_GLOBAL_NOW
)]
503 [id(DISPID_GLOBAL_DATE
)]
506 [id(DISPID_GLOBAL_TIME
)]
509 [id(DISPID_GLOBAL_DAY
)]
510 VARIANT Day
(VARIANT Date
);
512 [id(DISPID_GLOBAL_MONTH
)]
513 VARIANT Month
(VARIANT Date
);
515 [id(DISPID_GLOBAL_WEEKDAY
)]
518 [optional] VARIANT firstdayofweek
);
520 [id(DISPID_GLOBAL_YEAR
)]
521 VARIANT Year
(VARIANT Date
);
523 [id(DISPID_GLOBAL_HOUR
)]
524 VARIANT Hour
(VARIANT Time
);
526 [id(DISPID_GLOBAL_MINUTE
)]
527 VARIANT Minute
(VARIANT Time
);
529 [id(DISPID_GLOBAL_SECOND
)]
530 VARIANT Second
(VARIANT Time
);
532 [id(DISPID_GLOBAL_DATEVALUE
)]
533 VARIANT DateValue
(VARIANT Date
);
535 [id(DISPID_GLOBAL_TIMEVALUE
)]
536 VARIANT TimeValue
(VARIANT Time
);
538 [id(DISPID_GLOBAL_DATESERIAL
)]
544 [id(DISPID_GLOBAL_TIMESERIAL
)]
550 [id(DISPID_GLOBAL_INPUTBOX
)]
553 [optional] VARIANT title
,
554 [optional] VARIANT defaultValue,
555 [optional] VARIANT xpos
,
556 [optional] VARIANT ypos
,
557 [optional] VARIANT helpfile,
558 [optional] VARIANT context
);
560 [id(DISPID_GLOBAL_MSGBOX
)]
563 [optional] VARIANT buttons
,
564 [optional] VARIANT title
,
565 [optional] VARIANT helpfile,
566 [optional] VARIANT context
);
568 [id(DISPID_GLOBAL_CREATEOBJECT
)]
569 VARIANT CreateObject
(VARIANT classValue
);
571 [id(DISPID_GLOBAL_GETOBJECT
)]
573 [optional] VARIANT pathname
,
574 [optional] VARIANT classValue
);
576 [id(DISPID_GLOBAL_DATEADD
)]
582 [id(DISPID_GLOBAL_DATEDIFF
)]
587 [optional] VARIANT firstdayofweek
,
588 [optional] VARIANT firstdayofyear
);
590 [id(DISPID_GLOBAL_DATEPART
)]
594 [optional] VARIANT firstdayofweek
,
595 [optional] VARIANT firstdayofyear
);
597 [id(DISPID_GLOBAL_TYPENAME
)]
598 VARIANT TypeName
(VARIANT varname
);
600 [id(DISPID_GLOBAL_ARRAY
)]
601 VARIANT Array
(VARIANT arglist
);
603 [id(DISPID_GLOBAL_ERASE
)]
604 VARIANT Erase
(VARIANT arraylist
);
606 [id(DISPID_GLOBAL_FILTER
)]
608 VARIANT InputStrings
,
610 [optional] VARIANT Include
,
611 [optional] VARIANT compare
);
613 [id(DISPID_GLOBAL_JOIN
)]
616 [optional] VARIANT delimiter
);
618 [id(DISPID_GLOBAL_SPLIT
)]
621 [optional] VARIANT delimiter
,
622 [optional] VARIANT count
,
623 [optional] VARIANT compare
);
625 [id(DISPID_GLOBAL_REPLACE
)]
630 [optional] VARIANT start
,
631 [optional] VARIANT count
,
632 [optional] VARIANT compare
);
634 [id(DISPID_GLOBAL_STRREVERSE
)]
635 VARIANT StrReverse
(VARIANT string1
);
637 [id(DISPID_GLOBAL_INSTRREV
)]
641 [optional] VARIANT start
,
642 [optional] VARIANT compare
);
644 [id(DISPID_GLOBAL_LOADPICTURE
)]
645 VARIANT LoadPicture
([optional] VARIANT stringexpression
);
647 [id(DISPID_GLOBAL_SCRIPTENGINE
)]
648 VARIANT ScriptEngine
();
650 [id(DISPID_GLOBAL_SCRIPTENGINEMAJORVERSION
)]
651 VARIANT ScriptEngineMajorVersion
();
653 [id(DISPID_GLOBAL_SCRIPTENGINEMINORVERSION
)]
654 VARIANT ScriptEngineMinorVersion
();
656 [id(DISPID_GLOBAL_SCRIPTENGINEBUILDVERSION
)]
657 VARIANT ScriptEngineBuildVersion
();
659 [id(DISPID_GLOBAL_FORMATNUMBER
)]
660 VARIANT FormatNumber
(
662 [optional] VARIANT NumDigitsAfterDecimal
,
663 [optional] VARIANT IncludeLeadingDigit
,
664 [optional] VARIANT UseParensForNegativeNumbers
,
665 [optional] VARIANT GroupDigits
);
667 [id(DISPID_GLOBAL_FORMATCURRENCY
)]
668 VARIANT FormatCurrency
(
670 [optional] VARIANT NumDigitsAfterDecimal
,
671 [optional] VARIANT IncludeLeadingDigit
,
672 [optional] VARIANT UseParensForNegativeNumbers
,
673 [optional] VARIANT GroupDigits
);
675 [id(DISPID_GLOBAL_FORMATPERCENT
)]
676 VARIANT FormatPercent
(
678 [optional] VARIANT NumDigitsAfterDecimal
,
679 [optional] VARIANT IncludeLeadingDigit
,
680 [optional] VARIANT UseParensForNegativeNumbers
,
681 [optional] VARIANT GroupDigits
);
683 [id(DISPID_GLOBAL_FORMATDATETIME
)]
684 VARIANT FormatDateTime
(
686 [optional] VARIANT NamedFormat
);
688 [id(DISPID_GLOBAL_WEEKDAYNAME
)]
692 VARIANT firstdayofweek
);
694 [id(DISPID_GLOBAL_MONTHNAME
)]
697 [optional] VARIANT abbreviate
);
699 [id(DISPID_GLOBAL_ROUND
)]
702 [optional] VARIANT numdecimalplaces
);
704 [id(DISPID_GLOBAL_ESCAPE
)]
705 VARIANT Escape
(VARIANT string);
707 [id(DISPID_GLOBAL_UNESCAPE
)]
708 VARIANT Unescape
(VARIANT string);
710 [id(DISPID_GLOBAL_EVAL
)]
711 VARIANT Eval
(VARIANT string);
713 [id(DISPID_GLOBAL_EXECUTE
)]
714 VARIANT Execute
(VARIANT string);
716 [id(DISPID_GLOBAL_EXECUTEGLOBAL
)]
717 VARIANT ExecuteGlobal
(VARIANT string);
719 [id(DISPID_GLOBAL_GETREF
)]
720 VARIANT GetRef
(VARIANT string);
724 uuid(3eef9758
-35fc
-11d1
-8ce4
-00c04fc2b187
)
726 dispinterface ErrObj
{
728 [id(DISPID_ERR_DESCRIPTION
)]
731 [id(DISPID_ERR_HELPCONTEXT
)]
734 [id(DISPID_ERR_HELPFILE
)]
737 [id(DISPID_ERR_NUMBER
)]
740 [id(DISPID_ERR_SOURCE
)]
744 [id(DISPID_ERR_CLEAR
)]
747 [id(DISPID_ERR_RAISE
)]
753 VARIANT HelpContext);