Save a file downloaded via WinHTTP to disk, using Delphi XE
问题 An answer to this question showed how easy it is to use WinHTTP via Type Library imports in delphi. I imported the type library for WinHTTP, and then tried to write a File Download helper function using that api. Here's how far I got: I can't seem to figure out how to save the IWinHttpRequest.ResponseStream (declared as OleVariant in the TLB file) as Stream, to disk. // IWinHttpRequest is defined by importing type library of WinHTTP. // Microsoft WinHTTP Services, version 5.1 (Version 5.1) C: