如何用PB调用API函数Getmodulefilename()?

yugx 2000-08-14 01:47:00
用PB调用API函数Getmodulefilename()时,第一个参数应声明为 ulong, 它代表当前应用程序实例句柄,但我不知道如何取得它,请教各位高手了。
Getmodulefilename()用于取得当前执行文件的路径名
...全文
363 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
bisonh 2000-08-15
  • 打赏
  • 举报
回复
function ulong GetModuleFileNameA (ulong hModule,ref string lpFilename,uint nSize) library "kernel32.dll"


string path=space(100)
GetModuleFileNameA(handle(getapplication()),path,100)
bisonh 2000-08-15
  • 打赏
  • 举报
回复
试试这个

handle(GetApplication( ))

bisonh 2000-08-14
  • 打赏
  • 举报
回复
GetApplication( )

The function returns the handle of the current application object.

680

社区成员

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

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