如何在网页上调用迅雷!!!!!!!!!!!!!!!!!!!!!!求教,搞了几天了.代码如下
已经引用了ThunderAgent_003.dll,但是运行后,什么反映都没有, 求教,
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using THUNDERAGENTLib;
namespace JCE
{
/// <summary>
/// WebForm2 的摘要说明。
/// </summary>
public class WebForm2 : System.Web.UI.Page
{
//THUNDERAGENTLib.AgentClass Thunder = new THUNDERAGENTLib.AgentClass();
private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
if(!this.IsPostBack)
this.ThunderTest();
}
public void ThunderTest(){
// this.Response.Write(this.Thunder.GetInfo("ThunderExists"));
// this.Response.Write(this.Thunder.GetInfo("ThunderRunning"));
// this.Response.Write(this.Thunder.GetInfo("ThunderVersion"));
// this.Response.Write(this.Thunder.GetInfo("PlatformVersion"));
// this.Response.Write(this.Thunder.GetInfo("ThunderRunning"));
// this.Thunder.AddTask("http://www.qhschool.com/test.rar","","","","",0,0,-1);
// this.Thunder.CommitTasks();
Agent myAgent = new Agent();
myAgent.AddTask("http://www.qhschool.com/test.rar", "", "d:\\", "", "", 0, 0, -1);
myAgent.CommitTasks();
myAgent = null;
}
#region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
}