Advertisement
eldiegotee

Untitled

Jan 13th, 2023
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. Private Sub AbrirParche(ByVal sUrl As String)
  2. Dim oWinHttp As New WinHttp.WinHttpRequest
  3. oWinHttp.Open "GET", sUrl, False
  4. oWinHttp.Send
  5. Dim lFileSize As Long
  6. lFileSize = oWinHttp.GetResponseHeader("Content-Length")
  7. ProgressBar1.Max = lFileSize
  8. Open Directory For Binary Access Write As #1
  9. Dim byteData() As Byte
  10. byteData = oWinHttp.ResponseBody
  11. Put #1, , byteData
  12. Close #1
  13. Call AddConsole("Descarga finalizada", 0, 255, 0, True, False)
  14. ProgressBar1.Value = 0
  15. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement