Thursday, July 07, 2005

Using BITS from C#

Here is instructions download a file with BITS. Perhaps to update your app from C# or at least this will get you started. Bits is written in C++ but fourtounately; Microsoft wrote a wrapper called BackgroundCopyManager (backgroundcopymanager.dll). You can read the article and download the assembly here. You need to start a new C# project and add a reference to the dll and also add this namespace to the top of your code.
using Microsoft.Msdn.Samples.BITS;
Here is code to queue a file and download it.
Manager m = new Manager();
Job bj = m.CreateJob("MyJob3");
bj.AddFile("http://localhost/largefile.msi", "destination123.msi");
bj.ResumeJob();
This code will bind a listbox and show the status of each job
Manager myBITS = new Manager();
JobCollection myJobs = myBITS.GetListofJobs(JobType.AllUsers);
myListBox.DataSource = myJobs;
Good luck.

15 Comments:

At 3:10 AM, Anonymous Anonymous said...

I have encounted a problem while using Microsoft.Msdn.Samples.BITS.dll;you will not be able to clear jobs from myBITS.GetListofJobs().clear.It will return jobColleciton reference which can be set to null but the manager still have available jobs.

May be the wrapper is not written properly

 
At 1:28 AM, Blogger qwe said...

You will get a beautiful cloth which in the game if we want to need the beautiful cloth, we can use our own Scions Of Fate gold to buy. The one I owned on my character is one of my friends sent to me the necessary SOF gold. Sometimes we can share the trophy as the necessary Scions Of Fate money together, and we do quest together. I do not have enough confidence and cheap SOF gold about my weak memory. First I have to buy sof gold to improve my pet which I have a lovely leopard in this game.
When I begin to play this Seal Online game, I first go to buy seal online cegel to buy some my favorite and beautiful clothes to dress up my character. I have spent cheap seal cegel to buy my favorite cloth. I mean we have anime and some necessary seal online cegel based games that do not look really kid dish. Though I will admit with my own seal cegel I went crazy on leveling with DECO. Some of the skills that we can use our sealonline cegel to improve to look amazing, and are fun to just watch honestly.

 
At 9:58 PM, Blogger yanhui said...

Once I played stoneage2, I did not know how to get strong, someone told me that you must have stoneage2 Gold. He gave me some stoneage 2 Gold, he said that I could buy stoneage2 money, but I did not have money, then I played it all my spare time. From then on, I got some buy stoneage2 Gold, if I did not continue to play it, I can sell stoneage 2 money to anyone who want.

 
At 9:59 PM, Blogger yanhui said...

Once I played flyff, I did not know how to get strong, someone told me that you must have flyff penya. He gave me some flyff money, he said that I could buy flyff penya, but I did not have money, then I played it all my spare time. From then on, I got some flyff gold, if I did not continue to play it, I can sell cheap penya to anyone who want.

 
At 10:45 PM, Blogger  said...

You know ,I have some ghost gen, and my friend also has some ghost online gen, do you kouw they have the same meaning, Both of them can be called ghost gold,I just want to buy some
ghost online gold, because there are many cheap ghost money.

 
At 10:45 PM, Blogger  said...

You know ,I have some shadow of legend Gold, and my friend also has some
sol gold, do you kouw they have the same meaning,Both of them can be called
shadow of legend money,I just want to
buy shadow of legend Gold, because there are many
cheap shadow of legend Gold.

 
At 1:14 AM, Blogger lanzi said...

I can get ro zeny cheaply,
Yesterday i want to buy ragnarok zenyfor my brother.
i hope him like it. i will buy iro zeny for him
as birthday present. i like the cheap zeny very much.
I usually buy ragnarok online zeny and keep it in my store.

I can get Solstice Kron cheaply.
Yesterday i bought Solstice Online Kronfor my brother.
i hope him like it. i will give Solstice Gold to him
as birthday present. i like the Solstice Online money very much.
I usually buy cheap Solstice Kron and keep it in my store.

 
At 2:41 AM, Anonymous Anonymous said...

Sword of the New World Vis in which world have one feature. First of all, realize the Sword of the New World Gold is useful to the each new player. You only play with others and buy vis can get happy from the game, you may found the cheap snw vis. However, Sword of the New World money can also save a lot your time.

 
At 2:45 AM, Anonymous Anonymous said...

I know that most players use aion kina to get a shiny cool weapon like other players in game. You need enhance stones with aion online kina. The process of enhancing is simple if you have aion gold. You can buy aion kina after clicking enhance, you will see a star rotating about like roulette. The equipment will be enhanced to the next level if you have more cheap aion kina.

 
At 4:36 AM, Anonymous Anonymous said...

Do you know the Archlord gold, in the game you need the
Archlord money. it can help you increase your level. My friends always asked me how to
buy Archlord gold, and I do not know he spend how much money to buy the
archlord online Gold, when I see him in order to play the game and search which the place can buy the
cheap Archlord gold. I am happy with him.
Do you know the cabal alz , in the game you need the
cabal gold. it can help you increase your level. My friends always asked me how to
buy cabal alz, and I do not know he spend how much money to buy the
cabal money, when I see him in order to play the game and search which the place can buy the
cabal online alz. I am happy with him.

 
At 4:38 AM, Anonymous Anonymous said...

Do you know the Asda Story gold,in the game you need the Asda Story money. It can help you increase your level. My friends always asked me how to buy Asda Story Gold, and I do not know he spend how much money to buy the Asda Story gold, when I see him in order to play the game and search which the place can buy the cheap Asda Story gold. I am happy with him.
Do you know the Archlord gold, in the game you need the Archlord money. It can help you increase your level. My friends always asked me how to buy Archlord gold, and I do not know he spend how much money to buy the archlord online Gold, when I see him in order to play the game and search which the place can buy thecheap Archlord gold. I am happy with him.

 
At 4:51 AM, Blogger fangyan said...

Making aoc gold is the old question : Honestly there is no fast way to make lots of conan gold . Sadly enough a lot of the people that all of a sudden come to with millions of age of conan gold almost overnight probably duped . Although there are a lot of ways to make lots of cheap aoc gold here I will tell you all of the ways that I know and what I do to buy aoc money.

 
At 4:52 AM, Blogger fangyan said...

As a new player , you may need some game guides or information to enhance yourself.
Sho Online Mun is one of the hardest theme for every class at the beginning . You must have a good way to manage your Sho Mun.If yor are a lucky guy ,you can earn so many Sho Online gold by yourself . But if you are a not , I just find a nice way to Sho gold. If you need , you can buy buy Sho Online gold at our website . Go to the related page and check the detailed information . Once you have any question , you can connect our customer service at any time .

 
At 10:36 PM, Anonymous china tours said...

That is really cool. Thanks for finding it. Some really good ideas there, this is going to be a real time sink. I am a china tour lover,You can learn more: China tour packages | China travel packages | China Travel Agency

 
At 1:38 AM, Anonymous learn mandarin Chinese said...

The best place to learn Chinese language is in China. However, we understand that it isn't always possible to move here to study Chinese language. The next best thing is to study with our experienced teachers in a virtual classroom. Online students enjoy the same excellent way of Chinese language class and custom designed courseware that we provide for our face to face clients.

 

Post a Comment

<< Home