Ran J. Flam wrote in message <7cp2cg$dq...@horizon.centurasoft.com>...
>Use FindExecutableA( ) as shown below.
>
>
>Ran J. Flam
>Sparta Systems, Inc.
>-------------------------------------------------
>
>If the return value != 31 then sAssociatedExe is set with the executable
>file which is associated with the exetension of the 'sInFilename' above.
>
>Call SalStrSetBufferLength( sAssociatedExec, 256 )
>If FindExecutableA( sInFilename, 0, sAssociatedExec ) != 31
> Call SalStrTrim( sAssociatedExec, sAssociatedExec )
> If SalStrLength( sAssociatedExec ) > 0
> Set sOutAssociatedFile =
>ConvertToShortFilename( sAssociatedExec )
> Return TRUE
>
>!!CB!! 81
>Library name: shell32.dll
> Function: FindExecutableA
> Description:
> Export Ordinal: 0
> Returns
> Number: WORD
> Parameters
> String: LPSTR
> Number: DWORD
> Receive String: LPSTR
>
>
>
>
Ran.
Is there a windows function??
If 16 bit and if you are comfortable with salgetprofilestring,
then you can search in win.ini under the section "[Extensions]". It may
work.
Regards,
Mahesh.
Jason T. Kenney wrote in message <7cp7j0$dq...@horizon.centurasoft.com>...
>Thanks for the help...
>However, I am working with sql windows 5.02. Is there a 16 bit
>equivalent???
>
>
>
>Ran J. Flam wrote in message <7cp2cg$dq...@horizon.centurasoft.com>...
> Call SalStrSetBufferLength( sAssociatedExec, 256 )
A small remark: MAX_PATH = 260, not 256 as shown above. Maybe a long
string should be used if you use MAX_PATH.
-Craig.
Thanks for the info!
We'll make the code changes as you suggested.
-Ran
You probably have the answer by now, but, to be on the safe side ..
The 16-bit function is FindExecutable( ) as is included in shell.dll
We have actually first used it in our SQLWindows apps.
-Ran