我在VC6下将createprocess封装了一遍,封装后的类型如下:
int CrtPro(char* str),str是传给createprocess的lpCommandLine参数,然后将CrtPro函数封装成dll。
在PB中声明该函数如下 Function integer CrtPro(ref string strCom) library "CrtPro.dll",在某个按钮
的clicked事件中写到:
string str
str = "notepad.exe"
CrtPro(str)
然后编译运行时会报错误 bad runtime function reference
怎么回事呢?
------解决方案--------------------
我使用c++写的动态库,从来都是使用c++调用一遍,再用delphi看一下。然后才是pb等东西