读书人

PB调用Delphi封装的函数有关问题

发布时间: 2013-07-25 16:22:17 作者: rapoo

PB调用Delphi封装的函数问题

这个是Delphi封装的2个函数

function RegServer(SName:pchar;Port:integer):integer
function Connect(SName:pchar;Port:integer):integer

PB中调用DLL
public function int RegServer(string sName, int port) library "FlagClient0.dll"
public function int ConnectConn(string sName, int port) library "FlagClient0.dll" alias for

"Connect"

点击按钮触发
int result = RegServer("192.168.100.135",9999)
int result2 = ConnectConn("192.168.100.135",9999)
messageBox("1",result2)

messageBox应该返回“0” 现在返回的是“1” 是不是传的参数的问题呀!

读书人网 >PB

热点推荐