Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting the CLASS name from the registry from extension.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00125998
Message ID:
00126031
Vues:
34
>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" && Doesn't have to exist
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform