cObject
---cVersionInfo
Use this class to determine whether Version Information was embedded into an application, and if it was, to retrieve information from it.
To be able to access version information of an application, the project must be configured to embed version information by checking the 'Include version information in build' checkbox in the Studio's Version tab in Project Properties.
| Note: | The cApplication class automatically instantiates an object of this class (and exposes it through its phoVersionInfo property), so typically you do not need to create objects of this class directly. |
This sample shows how to retrieve Version Information that was embedded in an application.
Object oApplication is a cApplication
Procedure OnCreate
Boolean bIncluded
Handle hoVersionInfo
Get phoVersionInfo To hoVersionInfo
Get pbIncluded of hoVersionInfo To bIncluded
If bIncluded Begin
Showln "Special build=" (pbSpecialBuild(hoVersionInfo))
Showln "Private build=" (pbPrivateBuild(hoVersionInfo))
Show "Build=" (piVersionMajor(hoVersionInfo)) "."
Show (piVersionMinor(hoVersionInfo)) "."
Show (piVersionRelease(hoVersionInfo)) "."
ShowLn (piVersionBuild(hoVersionInfo))
End
Else ;
Showln "Sorry, Version Information was not embedded in the application"
End_Procedure
End_Object
See Also