Login
`
Templates, Tools and Utilities
|
||
Add a comment to an Icetips ArticlePlease add your comments to this article.
Please note that you must provide both a name and a valid email address in order
for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!
Back to article list Search Articles Add Comment Printer friendly Direct link Par2: ShellExecuteEX prototype 2003-05-14 -- John Christ III SHELLEXECUTEINFOgroup GROUP, TYPE
cbSize UNSIGNED
fMask UNSIGNED
hwnd UNSIGNED
lpVerb LONG
lpFile LONG
lpParameters LONG
lpDirectory LONG
nShow LONG
hInstApp UNSIGNED
! Optional members
lpIDList LONG
lpClass LONG
hkeyClass LONG
dwHotKey UNSIGNED
hIcon UNSIGNED
hProcess UNSIGNED
END
MODULE('win32.lib')
ShellExecuteEx(*SHELLEXECUTEINFOgroup), SIGNED, PASCAL, |
RAW, DLL, NAME('ShellExecuteExA')
WaitForSingleObject(UNSIGNED, LONG), UNSIGNED, PASCAL, |
NAME('WaitForSingleObject')
CloseHandle(UNSIGNED), SIGNED, PASCAL, NAME('CloseHandle')
END
sei LIKE(SHELLEXECUTEINFOgroup)
FileAction CSTRING(16)
FileName CSTRING(256)
Parameters CSTRING(256)
DefaultDirectory CSTRING(256)
FileAction = 'open'
FileName = 'myProgram.exe'
Parameters = ''
DefaultDirectory = ''
CLEAR(sei)
sei.cbSize = SIZE(sei)
sei.fMask = SEE_MASK_NOCLOSEPROCESS
sei.hwnd = Window{PROP:Handle}
sei.lpVerb = ADDRESS(FileAction)
sei.lpFile = ADDRESS(FileName)
sei.lpParameters = ADDRESS(Parameters)
sei.lpDirectory = ADDRESS(DefaultDirectory)
sei.nShow = SW_HIDE
IF ShellExecuteEx(sei)
I# = WaitForSingleObject(sei.hProcess, -1);
I# = CloseHandle(sei.hProcess);
END
(Later) Sorry, forgot these:
SW_HIDE EQUATE(0)
SEE_MASK_NOCLOSEPROCESS EQUATE(00000040h)
Today is November 21, 2024, 12:56 pm This article has been viewed 35330 times.
|
|