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.

142 lines
4.4 KiB

  1. VERSION 5.00
  2. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  3. Begin VB.Form Form1
  4. Caption = "Form1"
  5. ClientHeight = 3510
  6. ClientLeft = 60
  7. ClientTop = 345
  8. ClientWidth = 4785
  9. LinkTopic = "Form1"
  10. ScaleHeight = 3510
  11. ScaleWidth = 4785
  12. StartUpPosition = 3 'Windows Default
  13. Begin MSComctlLib.ProgressBar ProgressBar1
  14. Height = 495
  15. Left = 120
  16. TabIndex = 8
  17. Top = 2880
  18. Width = 4455
  19. _ExtentX = 7858
  20. _ExtentY = 873
  21. _Version = 393216
  22. Appearance = 1
  23. End
  24. Begin VB.TextBox TextJobID
  25. Height = 285
  26. Left = 2175
  27. TabIndex = 0
  28. Top = 120
  29. Width = 2415
  30. End
  31. Begin VB.TextBox TextProviderID
  32. Height = 285
  33. Left = 2160
  34. TabIndex = 2
  35. Top = 600
  36. Width = 2415
  37. End
  38. Begin VB.TextBox TextFileName
  39. Height = 285
  40. Left = 2160
  41. TabIndex = 4
  42. Top = 1080
  43. Width = 2415
  44. End
  45. Begin VB.CommandButton CommandTransfer
  46. Caption = "Transfer"
  47. Height = 495
  48. Left = 120
  49. TabIndex = 6
  50. Top = 1560
  51. Width = 4455
  52. End
  53. Begin VB.Label LabelStatus
  54. Height = 495
  55. Left = 120
  56. TabIndex = 7
  57. Top = 2160
  58. Width = 4455
  59. End
  60. Begin VB.Label LabelJobID
  61. Alignment = 1 'Right Justify
  62. AutoSize = -1 'True
  63. Caption = "JobID"
  64. Height = 195
  65. Left = 1650
  66. TabIndex = 1
  67. Top = 165
  68. Width = 420
  69. End
  70. Begin VB.Label LabelProviderID
  71. Alignment = 1 'Right Justify
  72. AutoSize = -1 'True
  73. Caption = "ProviderID"
  74. Height = 195
  75. Left = 1305
  76. TabIndex = 3
  77. Top = 645
  78. Width = 750
  79. End
  80. Begin VB.Label LabelFileName
  81. Alignment = 1 'Right Justify
  82. AutoSize = -1 'True
  83. Caption = "FileName"
  84. Height = 255
  85. Left = 1320
  86. TabIndex = 5
  87. Top = 1095
  88. Width = 735
  89. End
  90. End
  91. Attribute VB_Name = "Form1"
  92. Attribute VB_GlobalNameSpace = False
  93. Attribute VB_Creatable = False
  94. Attribute VB_PredeclaredId = True
  95. Attribute VB_Exposed = False
  96. Option Explicit
  97. Private obj As MPCUpload
  98. Private WithEvents job As UPLOADMANAGERLib.MPCUploadJob
  99. Attribute job.VB_VarHelpID = -1
  100. Private Sub CommandTransfer_Click()
  101. Set job = obj.CreateJob
  102. job.Sig = "{A4E4318A-028E-11d3-9397-00C04F72DAF7}"
  103. job.Server = "http://pchealth_srv1/upload/uploadserver.dll"
  104. job.JobID = Form1.TextJobID
  105. job.ProviderID = Form1.TextProviderID
  106. job.GetDataFromFile Form1.TextFileName
  107. job.Mode = UL_FOREGROUND
  108. job.PersistToDisk = True
  109. job.History = UL_HISTORY_LOG_AND_DATA
  110. Call job.ActivateAsync
  111. End Sub
  112. Private Sub Form_Load()
  113. Set obj = CreateObject("UploadManager.MPCUpload")
  114. End Sub
  115. Private Sub job_onStatusChange(ByVal mpcujJob As UPLOADMANAGERLib.IMPCUploadJob, ByVal Status As UPLOADMANAGERLib.tagUL_STATUS)
  116. Dim str As String
  117. If (Status = UL_NOTACTIVE) Then str = "UL_NOTACTIVE"
  118. If (Status = UL_ACTIVE) Then str = "UL_ACTIVE"
  119. If (Status = UL_TRANSMITTING) Then str = "UL_TRANSMITTING"
  120. If (Status = UL_SUSPENDED) Then str = "UL_SUSPENDED"
  121. If (Status = UL_ABORTED) Then str = "UL_ABORTED"
  122. If (Status = UL_FAILED) Then str = "UL_FAILED"
  123. If (Status = UL_DELETED) Then str = "UL_DELETED"
  124. If (Status = UL_COMPLETED) Then str = "UL_COMPLETED"
  125. Form1.LabelStatus = str
  126. End Sub
  127. Private Sub job_onProgressChange(ByVal mpcujJob As UPLOADMANAGERLib.IMPCUploadJob, ByVal lCurrentSize As Long, ByVal lTotalSize As Long)
  128. ProgressBar1.Value = CDbl(lCurrentSize) / CDbl(lTotalSize) * 100
  129. End Sub