Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
751 B

  1. ' common.vbi
  2. ' common routines and definitions
  3. '
  4. const NEG_ONE = &HFFFFFFFF
  5. Sub Echo(byref message)
  6. wscript.echo message
  7. End sub
  8. ' Echos the contents of the Err object.
  9. sub DumpErr
  10. dim errnum
  11. errnum = Err.Number
  12. Echo "Error 0x" & CStr(Hex(errnum)) & " occurred."
  13. if len(Err.Description) then
  14. Echo "Description: " & Err.Description
  15. end if
  16. if len(Err.Source) then
  17. Echo "Source : " & Err.Source
  18. end if
  19. if len(Err.HelpContext) then
  20. Echo "Context : " & Err.HelpContext
  21. end if
  22. if len(Err.HelpFile) then
  23. Echo "Help File : " & Err.HelpFile
  24. end if
  25. end sub
  26. sub DumpErrAndQuit
  27. dim errnum
  28. errnum = Err.Number
  29. DumpErr
  30. wscript.quit(errnum)
  31. end sub
  32. '
  33. ' end common.vbi
  34. '