PB12.5 调用 ftpCreateDirectory 函数

qq_21869293 2020-03-02 08:41:55
PB12.5 调用 ftpCreateDirectory 函数 如下:
定义
FUNCTION Boolean FtpCreateDirectory(Long hConnect,ref String lDirectory) LIBRARY "WinInet.dll" ALIAS FOR "FtpCreateDirectoryA"

函数:
public function boolean uf_createdirectory (string directoryname);
boolean lb_ret
string  ls_Curren
tPath = space(255)
setnull(ls_CurrentPath)
ls_CurrentPath = directoryname
lb_ret = FtpCreateDirectory(ii_ServerSeesion,ls_CurrentPath)
if not lb_ret then
  return false
end if
return lb_ret
end function;


结果是目录创建成功!但目录名称只取了字符串的第一个字符,如: abcd ,创建的目录名为: a。哪位知道帮忙解决一下!!!
...全文
584 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
lxbin2003 2020-05-04
  • 打赏
  • 举报
回复 1
FUNCTION Boolean FtpCreateDirectory(Long hConnect,ref String lDirectory) LIBRARY "WinInet.dll" ALIAS FOR "FtpCreateDirectoryW" 对于PB10以上UNICODE版本,使用W,而不是A。
AndriyChoi 2020-03-04
  • 打赏
  • 举报
回复
alias for "FtpCreateDirectoryA;Ansi"

680

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder API 调用
社区管理员
  • API 调用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧