DECLARE INTEGER GetWindowsDirectory IN Win32API ; STRING @cLocation, ; INTEGER nSize LOCAL cLocation, nSize m.cLocation = SPACE(256) m.nSize = GetWindowsDirectory(@cLocation, 256) IF nSize > 0 * * Got it - it's the size of the return * cLocation = LEFT(m.cLocation,m.nSize) ELSE * * An error occurred when retrieving the value - return the null string * cLocation = '' ENDIFThis code works OK!