//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // Confidential Trade Secret. // Copyright 1987-2001 Data Access Corporation, Miami FL, USA // All Rights reserved // DataFlex is a registered trademark of Data Access Corporation. // // Module: // GetProfilesDirectory.Pkg // // Purpose: // Defines interface to WinAPI function GetProfilesDirectory // // Author: // Vincent Oorsprong // // Date: // 2001, June, 4th // //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #IFNDEF GET_GetProfilesDirectory External_Function WinAPI_GetProfilesDirectory "GetProfilesDirectoryA" Userenv.Dll Pointer lpProfilesDir Pointer lpcchSize Returns Integer Define MAX_PATH For 260 // 2003-07-29 ------------------------------------ Start Nils G. Svedmyr #IF PKG_Version<|CI9 Function GetProfilesDirectory For Desktop Returns String #ELSE Function GetProfilesDirectory Desktop Returns String #ENDIF // 2003-07-29 ------------------------------------ Stop Nils G. Svedmyr String sProfileDir Dword dwProfileDirSize Integer iRetval ZeroString MAX_PATH To sProfileDir Move MAX_PATH To dwProfileDirSize Move (WinAPI_GetProfilesDirectory (AddressOf (sProfileDir), AddressOf (dwProfileDirSize))) To iRetval If (iRetval <> 0) Begin Function_Return (Cstring (sProfileDir)) End Function_Return "" End_Function // GetProfilesDirectory #ENDIF