>Hi! I was wondering if anyone knows a way to get information from the registry in VFP 5.0.
>
>What I specifically want is:
>
>In HKEY_CLASS_ROOT
>where all the extensions are I want the class name like
>for example (on my comuter a BMP has:
>(Default) "ACDC_BMP"
>
>But if I use PAINTPICTURE the program won't open in the program the user is used to...
>
>So the question is can I get this info from the registry some how???
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,
George
Ubi caritas et amor, deus ibi est