注册 登录
编程论坛 PowerBuilder

[求助] pb调用外部函数?

neimeng 发布于 2007-03-18 19:34, 1876 次点击

vb环境下的代码:
Public Declare Function base64_decode Lib "base64.dll" (ByVal strSrc As String, ByVal iLen As Integer, ByRef strDec As Byte) As Integer
注:strSrc为要编码的字符串
ilen为字符串长度
strDec是编码后的字符(VB中使用的是byte数组)
我在pb中这样定义的:
Function integer base64_decode(String strSrc,Integer iLen,ref char strDec) Library "base64.dll"
为什么程序在调用base64_decode函数时无反映?

请问:在pb中应如何改写? pb9.0
请高手帮忙解决一下!!!
1 回复
#2
mgc2007-03-20 16:32
strDec是编码后的字符应该是个指针类输出,所以:
Function integer base64_decode(String strSrc, Integer iLen, Ref String strDec) Library "base64.dll"
1