Posted by: Jeff Luther
The function you want is actually part of the Windows API, not TD's CDK. In any
event, declare the function in the ext. functs. area like this:
Code: Select all
Library name: SHELL32.DLL
ThreadSafe: No
Function: ShellExecuteA
Description:
Export Ordinal: 0
Returns
Number: INT
Parameters
Window Handle: HWND
String: LPSTR
String: LPSTR
String: LPSTR
String: LPSTR
Number: INT
Constants
System
Number: SW_SHOWNORMAL =1
Then you can call it something like:
Code: Select all
! p_sFilename = some file you want to open...
Set l_nReturn = ShellExecuteA( hWndNULL, "open", p_sFilename, "", "", SW_SHOWNORMAL )
If l_nReturn <= 32
! error
Else
! -- evergthing fine
Return TRUE
And for some info. straight from MS, here's a link to the function from a VB perspective:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnarvb4/html/msdn_shelexec.asp
Best Regards,
Jeff Luther/PC Design
info: www.pulpcards.com/gupta/