Leaked source code of windows server 2003
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.

68 lines
1.8 KiB

  1. 'stop
  2. '
  3. ' Type Library Constants (UPLOADMANAGERLib)
  4. '
  5. '
  6. ' Enums for IMPCUploadJob.Mode
  7. '
  8. Const UL_MODE_BACKGROUND = &H0
  9. Const UL_MODE_FOREGROUND = &H1
  10. '
  11. ' Enums for IMPCUploadJob.Status
  12. '
  13. Const UL_STATUS_NOTACTIVE = &H0
  14. Const UL_STATUS_ACTIVE = &H1
  15. Const UL_STATUS_SUSPENDED = &H2
  16. Const UL_STATUS_TRANSMITTING = &H3
  17. Const UL_STATUS_ABORTED = &H4
  18. Const UL_STATUS_FAILED = &H5
  19. Const UL_STATUS_COMPLETED = &H6
  20. Const UL_STATUS_DELETED = &H7
  21. '
  22. ' Enums for IMPCUploadJob.Flags
  23. '
  24. Const UL_HISTORY_NONE = &H0
  25. Const UL_HISTORY_LOG = &H1
  26. Const UL_HISTORY_LOG_AND_DATA = &H2
  27. Set fso = CreateObject("Scripting.FileSystemObject")
  28. Set obj = CreateObject( "UploadManager.MPCUpload" )
  29. Set job1 = obj.CreateJob()
  30. Set job2 = obj.CreateJob()
  31. job1.Sig = "{2B12E858-F61B-11d2-938E-00C04F72DAF7}"
  32. job1.Server = "http://dmassare2/pchealth/uploadserver.dll"
  33. job1.ProviderID = "NonEsc"
  34. job1.History = UL_HISTORY_LOG
  35. job1.Mode = UL_MODE_BACKGROUND
  36. job1.Priority = -10
  37. job1.GetDataFromFile fso.GetAbsolutePathName( "test_files\100k" )
  38. job2.Sig = "{2B12E858-F61B-11d2-938E-00C04F72DAF7}"
  39. job2.Server = "http://dmassare2/pchealth/uploadserver.dll"
  40. job2.ProviderID = "Esc"
  41. job2.History = UL_HISTORY_LOG
  42. job2.Mode = UL_MODE_BACKGROUND
  43. job2.Priority = 10
  44. job2.GetDataFromFile fso.GetAbsolutePathName( "test_files\100k" )
  45. job1.ActivateAsync
  46. while job1.SentSize = 0 and job1.Status < UL_STATUS_ABORTED
  47. wscript.Echo "job1 " & job1.SentSize
  48. wend
  49. job2.ActivateAsync
  50. while job1.Status < UL_STATUS_ABORTED or job2.Status < UL_STATUS_ABORTED
  51. wscript.Echo "job1 " & job1.SentSize & " Status: " & job1.Status
  52. wscript.Echo "job2 " & job2.SentSize & " Status: " & job2.Status
  53. wend