|
![]() |
![]() |
version 2003
PA_Get4DVersion → unsigned long
Parameter | Type | Description | ||||
This command does not require any parameters | ||||||
Function result | unsigned long | ← | Version number of the running application |
Description
The command
PA_Get4DVersion
returns the version number of the running application.
The returned value is of type unsigned long and should be read in hexadecimal value, in 7 nibbles numbered from right to left:
Nibble #7 Equal to 0xF or 0xB (0xF means Final version; 0xB means Beta version)
Nibble #6 thru #4: a 12-bit number containing a version number internally used by 4D,
Nibble #3 thru #2: a byte containing the version number,
Nibble #1 Contains the update/upgrade number,
Nibble #0 Contains the revision number.
Example:
· 0xB0090670 means 9th beta version of 4th Dimension 6.7
· 0xF0010683 means 1st final version of 4th Dimension 6.8.3
. 0xF0010700 means 1st final version of 4th Dimension 2003
You can use macros (or in-lined functions) to retrieve information.
Example
We do not want to launch if the version is less than 6.7.3.
// somewhere in a header file
#define kMINIMAL_4DVERSION 0x00000673
. . .
// Function called at InitPackage
char Is4DVersionOK ()
{
if ( ( PA_Get4DVersion() & 0x0000FFFF ) < kMINIMAL_4DVERSION )
{
PA_Alert( "This plug-in needs at least a version 6.7.3 of 4D" );
return 0;
}
else
return 1;
}
Error Handling
always returns
eER_NoErr