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:
00126128
Vues:
28
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" && 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,
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform