读书人

PB调用VC++ DLL的有关问题

发布时间: 2012-02-06 15:52:45 作者: rapoo

PB调用VC++ DLL的问题
PB在调用VC++ DLL中函数时,如果函数传递变量的类型为char*、CString、LPCTSTR之类的话,在PB中引用时该用什么类型?
另外void类型的函数在PB中怎么声明?

[解决办法]
string
[解决办法]
ref string

void
[解决办法]
问题应该在DLL里边
extern "C" __declspec(dllexport) short _stdcall SendSMS(TCHAR* MobileNo,TCHAR* Msg,short Len)

PB声明:
FUNCTION int SendSMS(string MobileNo,string Msg,int Len) LIBRARY 'MSGLib.dll'


PB调用:
string ls_phoneNo,ls_Message

ls_phoneNo = space(16)
ls_Message = space(256)

iRet = SendSMS(ls_phoneNo,ls_Message,len(ls_Message))

读书人网 >PB

热点推荐