George,
If I ask about a file that doesn't exist all I get back is 2 and nothing in the buffer. It works fine is an existing file is sent.
>To find out what application is associated with a given extension, look under the extension\shell\open\command. However, you can get this information without accessing the registry directly. Try this:
>DECLARE INTEGER FindExecutable IN Shell32;
> STRING lpFile, STRING lpDirectory, STRING @lpResult
>lcfile = "ANY.BMP"
>lcbuffer = SPACE(260)
>lnresult = FindExecutable(lcfile, "", @lcbuffer)
>IF lnresult > 32
> lnpt = AT(CHR(0), lcbuffer)
> lcexe = LEFT(lcbuffer, lnpt - 1)
>ENDIF
>hth,