J
jsxjd
Unregistered / Unconfirmed
GUEST, unregistred user!
function getFiles(srcMsg,tarMsg,srcFile,tarFilechar;bTarget:boolean)char;stdcall;<br>var<br> s:string;<br> b:boolean;<br>begin<br> result:=nil;<br> SelectFileFrm:=TSelectFileFrm.Create(Application.MainForm);<br> with SelectFileFrm do<br> try<br> if srcMsg<>nil then sourceBox.Caption:=srcMsg;<br> if tarMsg<>nil then targetBox.Caption:=tarMsg;<br> srcFiles.Items.Text:=srcFile;<br> targetFile.caption:=tarFile;<br> HasTarget:=bTarget;<br> showmodal;<br> b:=modalresult=mrOk;<br> if b then<br> s:=Trim(srcFiles.items.text)+'||'+Trim(targetFile.caption);<br> // if b then result:=pchar(s+#0); 为什么摆这儿不行<br> finally<br> free;<br> end;<br> if b then result:=pchar(s+#0); //为什么一定摆这儿,而且还要 #0<br>end;