資源簡介
c# dos命令常用操作 類源碼下載
代碼片段和文件信息
//類名:EcanDOS
//作用:DOS常用命令操作
//作者:劉典武
//時間:2010-12-01
using?System;
using?System.Collections.Generic;
using?System.Text;
using?System.IO;
using?System.Diagnostics;
using?System.Runtime.InteropServices;
namespace?Ecan
{
????public?class?EcanDOS
????{
????????//引入API函數
????????[DllImportAttribute(“user32.dll“)]
????????private?static?extern?int?FindWindow(string?ClassName?string?WindowName);
????????[DllImport(“user32.dll“)]
????????private?static?extern?int?ShowWindow(int?handle?int?cmdShow);
????????[DllImport(“winmm.dll“?EntryPoint?=?“mciSendString“?CharSet?=?CharSet.Auto)]
????????private?static?extern?int?mciSendString(string?lpstrCommand?string?lpstrReturnstring?int?uReturnLength?int?hwndCallback);
????????private?const?int?SW_HIDE?=?0;//API參數表示隱藏窗口
??
評論
共有 條評論