Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Declare command and Win32API Problem
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00161279
Message ID:
00161292
Views:
21
>I have a problem getting the GetWindowsDirectory function to return the Windows dir in VFP6. It keeps returning 0. Can anyone help me with the correct syntex.

Russell,

I've just given it a quick go and it worked for me:

DECLARE INTEGER GetWindowsDirectory IN win32api STRING @,INTEGER
STORE SPACE(100) TO lcWinPath
STORE 100 TO lnTemp
GetWindowsDirectory( @lcWinPath, lnTemp)
? lcWinPath

Don't forget to catch the result of the function and use it to cut the string to remove the null terminator

HTH
regards

Ian
Previous
Reply
Map
View

Click here to load this message in the networking platform