J
joky99
Unregistered / Unconfirmed
GUEST, unregistred user!
library Project1;<br><br>uses<br> SysUtils,<br> Classes;<br><br><br>FUNCTION w_set_clock(): pchar; stdcall;<br>BEGIN<br> result:=pchar('clock');<br>END; <br><br>{$R *.res}<br>exports<br>w_set_clock;<br>begin<br>end.<br>以上是DELPHI的DLL源代码,编译通过生成test.dll<br>以下是PB中的引用,但出错.请问错在哪里?<br>1、在PB窗口中的Global External Functions加入<br> FUNCTION string w_set_clock() library 'test.dll'<br>2、以事件中<br> string aa <br> aa=w_set_clock() <br> st_1.text=aa <br>3、运行时出现错误"Error:Bad runtime function reference at line 9 in clicked event of object cb_1 of main."