` ShellExecuteEX prototype (John Christ III ) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

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 April 17, 2024, 7:15 pm
This article has been viewed 35119 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: