>Hi,
>
> I tried to find something in VFP that returns the Windows system directory (System or System32, depending), and gave up so I tried the following:
>
>Declare GetSystemDirectory in kernel32 String,Integer
>lcBuffer = SPACE(1024)
>? GetSystemDirectory(@lcBuffer,1024)
>
The DECLARE is wrong - you need to use:
DECLARE INTEGER GetSystemDirectory IN KERNEL32 STRING @buffer, INTEGER nBufSize
The size of the directory path is significantly smaller than 1024 - 512 hytes or 524 bytes seem to stick with me. There's an entry in the FAQ showing code that works for this call under Win32 and Other APIs.