PowerBuilder中调用动态链接库的问题
我用VC++写了个动态链接库,导出了一个函数:
TCHAR DelwithFile(LPCTSTR pDataFile,LPCTSTR pKey,LPCTSTR pResultFile)
在PowerBuilder中声明为:
FUNCTION Char DelwithFile(string pDataFile,string pKey,string pResultfile) LIBRARY "Encrypt.dll" ALIAS FOR "DelwithFile"
但是在作以下调用的时候,总是出错:
string filename
string key
filename = sle_filename.Text
key = "fige"
EncryptFile(filename,key,filename)
提示信息为:
Application terminated
Error: Specified argument type differs from required argument type at runtime in DLL function DelwithFile.(Invalid stack pointer on return from function call) at line 7 in clicked event of object cb_encrypt of w_main.
请问这是怎么回事,我该怎样解决这个问题。