//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // 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: // GetAllUsersProfileDirectory.Pkg // // Purpose: // Defines interface to WinAPI function GetAllUsersProfileDirectory // // Author: // Vincent Oorsprong // // Date: // 2001, June, 4th // //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #IFNDEF GET_GetAllUsersProfileDirectory External_Function WinAPI_GetAllUsersProfileDirectory "GetAllUsersProfileDirectoryA" 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 GetAllUsersProfileDirectory For Desktop Returns String #ELSE Function GetAllUsersProfileDirectory 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_GetAllUsersProfileDirectory (AddressOf (sProfileDir), AddressOf (dwProfileDirSize))) To iRetval If (iRetval <> 0) Begin Function_Return (Cstring (sProfileDir)) End Function_Return "" End_Function // GetAllUsersProfileDirectory #ENDIF