Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Call Windows Explorer
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00185851
Message ID:
00185866
Vues:
21
Heres a simple example to fit your needs. Do this in a test:-

DECLARE INTEGER GetWindowsDirectory IN Win32API; && Strict function name
STRING lcBuffer; && to store the directory name
INTEGER lnBufSize && to tell function max length

STORE SPACE(100) TO lcBuffer
GetWindowsDirectory(@lcBuffer,LEN(lcBuffer)

lcBuffer will then contain the windows directory (with null terminator) look for null within the string (LEFT(lcBuffer,AT(CHR(0),lcBuffer)) to get directory.

If you have either FoxPro 2.6 or VFP3 available, there is a WIN32API.HLP file contained - interesting reading. It is designed more for C programming so if you look at the type declarations, you will need to convert them (here I converted LPTSTR to STRING and UINT to INTEGER).

Have fun,

>Nigel, thanks for your prompt reply.
>Could you share with me how to go about using API? Thanks.
>
>>The simple way is to call RUN /N c:\windows\explorer.exe - you may consider using the API to get the windows directory first.
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform