WindowsXP-SP1/admin/cys/test/common.vbi
2020-09-30 16:53:49 +02:00

49 lines
799 B
Plaintext

' common.vbi
' common routines and definitions
'
const NEG_ONE = &HFFFFFFFF
Sub Echo(byref message)
wscript.echo message
End sub
' Echos the contents of the Err object.
sub DumpErr
dim errnum
errnum = Err.Number
Echo "Error 0x" & CStr(Hex(errnum)) & " occurred."
if len(Err.Description) then
Echo "Description: " & Err.Description
end if
if len(Err.Source) then
Echo "Source : " & Err.Source
end if
if len(Err.HelpContext) then
Echo "Context : " & Err.HelpContext
end if
if len(Err.HelpFile) then
Echo "Help File : " & Err.HelpFile
end if
end sub
sub DumpErrAndQuit
dim errnum
errnum = Err.Number
DumpErr
wscript.quit(errnum)
end sub
'
' end common.vbi
'