|
|
|
|
|
- Programming standard under Windows Vista (and higher)
fDataDirCommon (Function) In french: fRepDonnéesCommun Returns a directory path for the data shared: - between all the users of the computer.
- between all the TSE users.
This directory can be used without restriction under Windows Vista and higher. This directory is used to store: - the files for the general configuration of the application (.INI files, .XML files, etc.).
- data files common to all users (HFSQL data files .fic, .ndx and .mmo).
This directory is automatically created if it does not exist.
fCreate(CompleteDir(fDataDirCommon()) + "MyApp.ini")
Syntax
<Result> = fDataDirCommon([<Options>])
<Result>: Character string Path of the directory to use for the shared data of an application. The result returned by this function differs in test mode and at runtime:- in test mode: <Common base directory of users>\<Application Data>\WINDEV Applications\<Project name>
- running: <Users' common base directory>\<Applications data>\<Company name>\<Executable name>
Note: the company name is specified when the executable is created.. If this name is not specified, it is replaced with "WINDEV applications"
Note: On Windows 98 and Me, <Result> corresponds to the application's execution directory (also returned by the function fExeDir). <Options>: Optional constant Indicates whether the directory must be created or not: | | fddDefault (Default value) | The directory is created if it does not exist. | fddWithoutCreation | The directory is not created if it does not exist. |
Remarks Programming standard under Windows Vista (and higher) To increase computer security against worms and viruses, Windows Vista (and later versions) has implemented the UAC mechanism (User Account Control). 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 users of the computer, 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 users of the computer, they must be stored in the directory returned by fGlobalDirCommon.
Summary table:
Remarks: - 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. For more details, see Configuring the test mode of project.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|