高手请帮忙看一下

bill_lt 2001-10-11 08:46:05
FUNCTION ulong ShellExecute(ulong hwnd,ref string lpOperation,ref string lpFile,ref string lpParameters,ref string lpDirectory,ulong nShowCmd) LIBRARY "shell32.dll"
string ls_operation='open',ls_filename='c:\windows\Bubbles.bmp',ls_par,ls_dir
long ll_hand=1,ls_show=0
ShellExecute(ll_hand,ref ls_operation,ref ls_filename,ref ls_par,ref ls_dir,ls_show)

不知道错在哪里?
...全文
57 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
ht_csc 2001-10-11
  • 打赏
  • 举报
回复
楼上眼里不错嘛
rightyeah 2001-10-11
  • 打赏
  • 举报
回复
函数调用的时候就不要加ref了
ht_csc 2001-10-11
  • 打赏
  • 举报
回复
gz
pinglv 2001-10-11
  • 打赏
  • 举报
回复
解释都太清楚了。
NetColorWolf 2001-10-11
  • 打赏
  • 举报
回复
我想是你的第一个参数有问题,应该用一个存在的窗口的句柄。这里有个例子:
①定义API:
Function ulong ShellExecute(ulong hwnd,ref string lpOperation,ref string lpFile,ref string lpParameters,ref string lpDirectory,ulong nShowCmd) LIBRARY "shell32.dll" ALIAS FOR "ShellExecuteA"

②作一按纽,脚本:
  String str_null,str_filename
  SetNull ( str_null )
str_filename="c:\lag.txt"
  ShellExecute( Handle(Parent), str_null, str_filename , str_null, str_null, 1 )
hegum 2001-10-11
  • 打赏
  • 举报
回复
:-0

1,079

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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