Login
`
Templates, Tools and Utilities
|
||
Icetips Article
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, 8:34 am This article has been viewed 35329 times.
|
|