Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Retrieving Windows File Associations via VFP
Message
 
 
À
02/06/2003 10:24:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00795191
Message ID:
00795238
Vues:
42
>How can I get the Windows (registry) File association via VFP or WinAPI. I am returning a file from GETFILE() call, and need to automatically load this file in Windows associated application synchronously (must terminate external application to return to VFP application for event capture).
>
>Fz - Boston MA
LPARAMETERS lcFileName 
LOCAL lcbuffer, lnresult, lcExe
DECLARE INTEGER FindExecutable IN Shell32;
  STRING lpFile, STRING lpDirectory, STRING @lpResult

lcbuffer = SPACE(200)
lnresult = FindExecutable(lcFileName, "", @lcbuffer)

IF lnresult > 32
	lcExe = LEFT(lcBuffer, RAT(CHR(0), lcbuffer )-1)
ELSE
	* Error or no association
	lcExe = ""
ENDIF	
RETURN lcExe
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform