zeromemory(&start,sizeof(startupinfo));
zeromemory(&proc, sizeof(process_information));
handle ret;
handle hreadpipe;
handle hwritepipe;
dword lngbytesread;
string soutput = "";
char sbuffer[4096];
zeromemory(sbuffer,4096);
sa.nlength = sizeof(sa);
sa.binherithandle = true;
sa.lpsecuritydescriptor = null;
bool pass = createpipe(&hreadpipe,&hwritepipe,&sa,0);
if(pass == 0)
start.cb = sizeof(start);
start.dwflags = startf_usestdhandles | startf_useshowwindow;
start.hstdoutput = hwritepipe;
start.hstderror = hwritepipe;
start.wshowwindow = sw_hide;
pass = createprocess(null,scmdline,null,null,true,0,null,null,&start,&proc);
if(pass == 0)
closehandle(hwritepipe);
do}while(pass != 0);
closehandle(proc.hprocess);
closehandle(proc.hthread);
closehandle(hreadpipe);
return soutput;
}
從資料庫中讀取出資料,然後用XML輸出
1 private static void writexml string strfilename,string code,datetime from,datetime to 27 將locationid讀到陣列中 8string select 9 select select locationid ...
DOS下執行C 程式配置
閒來無事,想想c 是否一樣能用dos來,編譯執行程式呢,於是上網搜搜結果喜人,詳見 自己來總結一下步驟 1 設定系統的環境變數,來讓dos知道cl命令從哪來的?我的是vs2010,找到安裝資料夾的的 d program files microsoft visual studio 10.0 vc bi...
DOS下執行C 程式配置
閒來無事,想想c 是否一樣能用dos來,編譯執行程式呢,於是上網搜搜結果喜人,詳見 自己來總結一下步驟 1 設定系統的環境變數,來讓dos知道cl命令從哪來的?我的是vs2010,找到安裝資料夾的的 d program files microsoft visual studio 10.0 vc bi...