Programming with BITS in Delphi
Sunday, March 18th, 2007BITS is Microsoft’s Background Intelligent Download Service. It was added in XP to allow downloading of security patches in the background. In the Platform SDK Microsoft provided a COM interface to allow developers to work with BITS. Unfortunately it is a bit of a pain to actually get to the interface, especially if you are not using Visual Studio. To make it easier for Delphi developers to work with BITS, I am providing my imported Type Library for the BackgroundCopyManager.
Alternatively you can use the JEDI Win32 API Library available on Sourceforge. It has the Bits interface (version 1.5) split into a few different files (JwaBits1_5.pas, JwaBits.pas, JwaBitscfg.pas, and JwaBitsMsg.pas [although they reference other included files]) and cleaned up a little bit. In addition it includes a number of other useful Delphi wrappers for Win32 API’s. I recommend this library over the raw TLB import. My demo will work with either one.
UPDATE: I recreated the demo and added it to the archive!