>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