请教BeginThread参数传递的问题 多谢~ |
尚未結案
|
allen-86
一般會員 發表:28 回覆:44 積分:19 註冊:2008-02-01 發送簡訊給我 |
使用CreateThread new一个新的指针就可以,但是BeginThread好像不行。请问到底如何传递参数?
procedure test(c:Cardinal); var pc:PCardinal; c1:Cardinal; procedure testThread(p:Pointer);stdcall; var c:Cardinal; begin c:=Cardinal(p^); ShowMessage(IntToStr(c)); end; begin New(pc); pc^:=c; test(c); end;
------
The empty vessels make the greatest sound. |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |