|
|
|
|
|
- Overview
- How to?
- Prerequisite
- Changing a WINDEV application to 64-bit
- Compilation error management mode
- Compilation errors specific to the 64-bit mode
- Limitations and adaptations
- Different limitations
- Adaptations
- Database management
- Installing the application
- Combined 32 and 64-bit installation
- 64-bit installation only
- Switching from a 32-bit to a 64-bit installation
- Switching from a combined installation to a 64-bit installation
Changing an application to 64-bit
Modern computers (servers and desktop computers) are equipped with 64-bit operating systems. The main difference between a 32-bit and a 64-bit system is that in 64-bit, applications and the system are no longer limited in terms of memory allocation. In "32-bit" configurations the operating system is limited to 4 GB, while in "64-bit", there is nearly no limit (18 billion GB). Operating mode of 32-bit applications: - WINDEV 32-bit applications run on a 64-bit operating system without any modification: executable, installation, etc.
- 32-bit applications run on a 64-bit system are indicated in the task manager. These applications are neither disrupted nor run in a compatibility mode: they are simply subject to the memory constraints of 32-bit applications.. This limitation is not a constraint for most of the standard applications.
Remark: From version 28 onwards, new projects created with WINDEV are automatically 64-bit projects. Prerequisite - Determine which user computers run 32-bit and 64-bit operating systems.
Please note: 64-bit applications cannot run on 32-bit systems.. - Check for 32-bit application dependencies. Does the application use any of the following? Is it available in 64-bit?:
- an ActiveX control,
- an external base: make sure the native connector is available in 64-bit.
- the user computer must have a 64-bit client library to connect to the external database,
- a Windows API or a dll,
- a .NET assembly,
- external applications (OLE Automation). If the application uses Word, Excel, LibreOffice, etc.: you must make sure that the 64-bit versions of these external applications are installed on the user computers.
Changing a WINDEV application to 64-bit To easily upgrade a 32-bit WINDEV application to 64-bit:
- Open the 32-bit WINDEV project in the editor.
- Create a new project configuration: in the "Project Explorer" pane, display the context menu for the "Configurations" option and select "New configuration". The project configuration creation wizard starts.
- The first step of the wizard allows you to:
- Project configuration name. Choose an explicit name because this name will be used to create the generation directory of the files affected by the project configuration.
- Select the desired project configuration, here "Windows or Linux application".
- The next step in the wizard is to select the operating system, Windows in our case.
- The next step is to select the execution mode, in this case "Windows 64-bit executable".
- Then select the elements (windows, queries, etc.) of this new configuration. In a standard case, all the elements of the 32-bit application must be selected.
Note: Project elements will be shared between the two configurations.. - Finish the wizard.
The project configuration is automatically created. For more details on how to create and manage project configurations, see Project configurations. If your development computer is in 64-bit mode, you have the ability to run the test of the 64-bit application via the 64-bit "GO" option. Remarks: - Create a 64-bit-only application: Of course, it's possible to define an application as a "64-bit" application as soon as the project is created.. However, this solution is more complicated because a "64-bit" application does not work on a "32-bit" system bur only on a "64-bit" system.
- If you have created a project for a 64-bit application only, you can also create a specific project configuration for the 32-bit mode.
Compilation error management mode - For the applications and services (Windows or Linux) in 32-bit mode, the 64-bit compilation errors are disabled.
- For the applications and services (Windows or Linux) in 64-bit mode, the 64-bit compilation errors are always enabled.
- For the components, libraries and web services, the 64-bit errors are always enabled.
Compilation errors specific to the 64-bit mode If the "32-bit" application was using Windows APIs or external DLLs, the transformation to "64-bit" mode may generate compilation errors. These compilation errors are specific to the "64-bit" mode. The most common error consists in using an "integer" variable to store a memory address.
On 64-bit machines, pointers take up 8 bytes of memory, whereas on 32-bit machines, they take up 4 bytes.
In this case, if a "standard" integer is used, the application may access a truncated memory address, therefore an invalid address. To avoid this problem, simply use the WLanguage type System int: this type uses an 8-byte integer in 64-bit format and a 4-byte integer in 32-bit format! Tips:: - Don't forget to check that the APIs used exist in "64-bit" mode. And make sure that the DLL does not have a different name in "64-bit" mode and that its operating mode is identical.
If differences are noticed, you have the ability to use In64bitMode to call the API corresponding to the current system. - In 64-bit, if a value that is too large is assigned to a 1, 2, 4 or 8-byte Integer variable, the value of the variable will not be the same as in 32-bit.
Limitations and adaptations Different limitations - Hasp is not available in 64-bit.
- Netxxx functions: Only the client part is available in 64-bit, and is compatible with a 32-bit server.. The server part (NetStartServer and NetEndServer) is not available.
- 64-bit external language: only C and C++ are available.
Adaptations - Accessing the registry: on a 64-bit system, 32-bit applications write to the registry from the following branch: "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node"..
Note: The RegistryQueryValue function has an automatic access mode registerModeAuto which reads the correct registry key depending on the type of configuration and the system on which the application is running. - Windows API or dll: in some cases, it may be necessary to use the WLanguage System Integer type. This type uses an 8-byte integer in 64-bit and a 4-byte integer in 32-bit.
- Access to system files: on a 64-bit system, 32-bit applications use different system directories. For example, 64-bit executables can access the "\Windows\system32\" folder. However, 32-bit executables will access the "\Windows\SysWOW64" folder.
- For external components used in the project, you will need to enable 64-bit compatibility in the code of the component. For components created with a recent version of WINDEV, this mode is enabled by default.
- For specific processes on a 32 or 64-bit configuration, simply use In64bitMode.
Database management Access to the database (whether HFSQL Classic or HFSQL Client/Server) remains the same, even when the application switches
from 32 to 64-bit. Note: The HFSQL server is installed in 64-bit mode by default. Two key points regarding external databases: - Native Connectors are available in 64-bit mode, except for Sybase and Progress native connectors.
- do not forget to install the 64-bit version of the database client library on end-user computers (refer to the database developer).
Installing the application Combined 32 and 64-bit installation If the telemetry report reveals that some users are still running a 32-bit operating system, a combined 32 and 64-bit installation can be performed. 64-bit installation only If all users of the application are running a 64-bit operating system, the application can be available in 64-bit version only. In this case, the 32-bit configuration is no longer useful and can be deleted (right-click the configuration in the "Project explorer" pane and select "Delete"). Switching from a 32-bit to a 64-bit installation If the 32-bit version of the application is already installed on user computers, and needs to be upgraded to the 64-bit version, simply deploy the 64-bit installation in the same directory as the 32-bit version. Live Update will automatically show an update prompt to end users. The application will then automatically switch to 64-bit on the user computers. Note: When generating a 64-bit executable, it is important to apply a version number higher than that of the current 32-bit version. Switching from a combined installation to a 64-bit installation Just like in the previous case, simply create a 64-bit only setup procedure and deploy it on the same network directory as the combined installation. Reminder: It's important to set the version number of the 64-bit executable higher than that of the 32-bit executable, and to make the update mandatory by forcing the minimum authorized version to run. When users launch the application, a mandatory update notification will appear and the application will switch to the 64-bit version.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|