DLL_VERSION Language Extension

dll.h

Defines the DLL major and minor version numbers.

The DLL_VERSION macro is used for defining the DLL major and minor version numbers. It must be followed by two 16-bit constant unsigned integers, which represent the major and minor version numbers, respectively. For example:

DLL_VERSION 2,13
Later, when a program wants to load the DLL, it passes the expected major and minor version numbers as parameters to the LoadDLL function. If the expected and actual major version numbers are not the same, or if the expected minor version number is greater than actual minor version number, the DLL is simply ignored (skipped). As LoadDLL searches through all folders for a matching DLL, it is legal to have several DLLs with the same name (in different folders) and with the same ID numbers, but with different version numbers. LoadDLL will load the first DLL found (if any) with a matching name, ID number and major version number, and whose minor version number is greater or equal to the expected minor version number.

DLL_ID must appear at the end of the DLL interface section, just after the DLL_ID entry, and just before the DLL_EXPORTS entry. See DLL_INTERFACE for a detailed layout of the DLL interface structure.


See also: DLL_INTERFACE, LoadDLL