在PB6.5中,如何获取系统当前目录

tommyshen 2003-10-20 12:28:29
我在Local External Functions中进行如下声明:Function ulong GetCurrentDirectory (ulong nBufferLength,ref string lpBuffer) LIBRARY "kernel32.dll",但在进行调用时提示:“调用外部函数错误”,不知应如何正确调用?
...全文
21 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
feixianzhi 2003-12-30
  • 打赏
  • 举报
回复
pb 自带了GetCurrentDirectory()函数
lijiashu1981 2003-12-30
  • 打赏
  • 举报
回复
Function boolean CreateDirectoryA(string lpPathName,string lpSecurityAttributes) Library "kernel32.dll"



ll_refe = CreateDirectoryA(ls_pathname,ls_SecurityAttributes)
27 2003-12-30
  • 打赏
  • 举报
回复
我试过的,没问题:)
27 2003-12-30
  • 打赏
  • 举报
回复
好想是声明错了,
Function ulong GetCurrentDirectoryA(ulong BufferLen,ref string currentdir) Library"Kernel32.dll"
例如:

string ls_curdir
ulong l_buf
l_buf = 100
ls_curdir = space(l_buf) //为参数分配空间
GetcurrentDirectoryA(l_buf,ls_curdir)
MessageBox("当前目录",ls_curdir)

:)

680

社区成员

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

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