函数的定义如下:
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"
以下是一个简单的示例:(这是窗口中一个按纽的click事件的代码)
ulong hwnd,nShowCmd
hwnd=Handle(parent)
nShowCmd=1
string lpOperation,lpFile,lpParameters,lpDirectory
lpOperation="open"
lpFile="hh.exe"
lpParameters="help.chm"
SetNull(lpDirectory)
ShellExecute(hwnd,lpOperation,lpFile,lpParameters,lpDirectory,nShowCmd)