PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Programming standard in Windows XP, Vista and later
  • Equivalence
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Returns a directory path for the global data of current application (data shared between several applications), for the current user.
This directory can be used without restriction in Windows XP, Vista, ... This directory is automatically created if it does not exist.
Note: From version 19, HFSQL is the new name of HyperFileSQL.
Example
// Create a configuration file
fCreate(CompleteDir(fGlobalDirUser()) + "MyApp.ini")
// In Windows 7, the file will be created in:
// C:\Users\fp\AppData\Roaming
Syntax
<Result> = fGlobalDirUser()
<Result>: Character string
Path of directory to use for the global data of application (shared between several applications), specific to the current user.
Remarks

Programming standard in Windows XP, Vista and later

To increase computer security against worms and viruses, the UAC mechanism (User Account Control) was implemented by Windows Vista (and later).
By default, this mechanism considers that all the users (including the administrators) are standard users with reduced rights. To run an application that requires additional rights, the UAC mechanism asks for confirmation.
When you create your applications, we advise you to comply with the programming standard of Windows to give the ability to any user (without specific rights) to use your application. Therefore:
  • If an application must create or modify local HFSQL data files or configuration files (.INI, .XML), these files must be found in the directory corresponding to the application.
    • If these files are specific to the current user, they must be stored in the directory returned by fDataDirUser.
    • If these files are common to all the computer users, they must be stored in the directory returned by fDataDirCommon.
  • If several applications must create or modify the same HFSQL data files or configuration files (.INI, .XML), these files must be found in the common directory of applications
    • If these files are specific to the current user, they must be stored in the directory returned by fGlobalDirUser.
    • If these files are common to all the computer users, they must be stored in the directory returned by fGlobalDirCommon.
Summary table:
1 applicationSeveral applications
1 userfDataDirUserfGlobalDirUser
Several usersfDataDirCommonfGlobalDirCommon


Notes:
  • These functions are recommended for the multi-user applications installed on a single computer or TSE.
  • If the domain or the Active Directory allows the use of a mobile profile, the user details are automatically copied when changing computer.
To help you create applications while complying with the programming standard, specific options are proposed by WINDEV when running the application test. See Configuring the test mode of project for more details.

Equivalence

fGlobalDirUser is equivalent to SysDir associated with the srAppData constant.
Components
WINDEVReports and Queries wd230vm.dll
Minimum required version
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment