Vb. NET programming call Thunderbolt download file

Source: Internet
Author: User
Tags file size function definition save file

First make sure the computer is installed on the Thunder, open vs.net Click menu: Project-> Add Reference->com-> Add Reference to Thunderagent 1.0 Type Library.

1. Create a lightning Call object

Private Thundereng as New thunderagentlib.agent ' Create a lightning call object

Thundereng.addtask ("Download Address", "Save file name", "Save Directory", "Task note", "Reference address", "Start Mode", "Download from original address only", "Download threads from original address") ' Add download task

Thundereng.committasks () ' Submit download task

2. Use the mine Call object query Download task information

Sfilesize = Thundereng.gettaskinfo (Txturl.text, "FileSize") ' Get download file size

Sdownedsize = Thundereng.gettaskinfo (Txturl.text, "completedsize") ' Get completed size

sFileName = Thundereng.gettaskinfo (txturl.text, "filename") ' Get filename

Second, the Thunder platform interface function definition

Get information

1. BSTR GetInfo (BSTR pinfoname)

Function: Get Thunder or platform related information

Parameters:

Name of parameter Meaning
Pinfoname Information name, there are 4 kinds

"Thunderexists": whether the Thunderbolt exists

"Thunderrunning": The Thunderbolt is running

"Thunderversion": Thunder version number

"Platformversion": Platform version number

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.