黑
黑衣人
Unregistered / Unconfirmed
GUEST, unregistred user!
动态库中的函数:<br>function ComboTwoString(FristStr:WideString;SecondStr:WideString):WideString;export;<br>begin<br> result := FirstStr + SecondStr;<br>end;<br><br>exports<br> ComboTwoString name 'cts';<br>--------------------------------------------------------------------------------<br>调用的程序如下:<br>procedure TForm1.Button2Click(Sender: TObject);<br>var dllModule:THandle;<br> farDllPro:TFarProc;<br> sFirstStr,sSecondStr,sComboStr:string;<br>begin<br> sFirstStr := trim(Edit1.Text);<br> sSecondStr:= trim(Edit2.Text);<br> dllModule := LoadLibrary('MyDll.Dll');<br> farDllPro := GetProcAddress(dllModule,'cts');<br> //下面要如何将sFirstStr,sSecondStr传递到动态库中的函数并将处理后的值赋予sComboStr????<br> ……<br>end;<br>