ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / 64-bit mode
  • 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
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
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 as follows: in "64-bit", the applications and the system no longer have memory allocation limitations.
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:
  • 32-bit WINDEV applications operate on a 64-bit operating system without modification: executable, setup, ...
  • 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 subject to the memory constraints of 32-bit applications. This limitation is not a constraint for most of the standard applications.
Remark: All projects created with WINDEV 28 and later will be in 64-bit mode by default.
How to?

Prerequisite

  • Determine which user computers run 32-bit and 64-bit operating systems.
    Caution: 64-bit applications cannot run on a 32-bit system.
  • 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 database: you must make sure that a 64-bit Native Connector is available.
    • 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 switch a WINDEV application from 32-bit to 64-bit:
  1. Open the 32-bit WINDEV project in the editor.
  2. Create a new project configuration: on the "Project" tab, in the "Project configuration" group, expand "New configuration", select "Windows executable", and then select "64-bit". The project configuration creation wizard starts.
  3. In the wizard:
    • Specify the name of the project configuration. 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 elements (windows, queries, ...) of this new configuration. In a standard case, all the elements of the 32-bit application must be selected.
      Remark: The project elements will be shared between the two configurations.
    • Finish the wizard.
  4. 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:
  • Creating a 64-bit application only: You have the ability to define that an application is a "64-bit" application when creating the project. However, this solution is more complicated because a "64-bit" application does not operate 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 Webservices, 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 System int type: this type uses an 8-byte integer in 64-bit and a 4-byte integer in 32-bit!
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 languages: only C and C++ are available.

Adaptations

  • Access to the registry: on a 64-bit system, 32-bit applications that access the registry are redirected to the following location: "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node" .
    Remark: RegistryQueryValue has an automatic access mode (registryModeAuto constant) that reads the right registry key according on the type of configuration and system the application is running on.
  • Windows API or dll: in some cases, it will be necessary to use the "system int" WLanguage 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: By default, the HFSQL server is installed in 64-bit mode.
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.
For more details, see Combined installation.

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").
The setup procedure can be performed as usual. For more details, see Setup procedure of an application.

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.
Remark: When generating the 64-bit executable, it is important to use a version number higher than 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: Make sure the 64-bit executable has a higher version number than the 32-bit executable, and make the update mandatory by setting a minimum version requirement.
When users launch the application, a mandatory update notification will appear and the application will switch to the 64-bit version.
Minimum version required
  • Version 11
Comments
Click [Add] to post a comment

Last update: 09/18/2023

Send a report | Local help