Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Call Windows Explorer
Message
 
To
10/02/1999 04:02:56
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00185851
Message ID:
00185866
Views:
22
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform