IPXV_Inst::APIVersion Property
From PDF XChange PDF SDK
m (Automatic page editing by robot) |
|||
Line 11: | Line 11: | ||
</pre> | </pre> | ||
+ | == Remarks == | ||
Version represented by 32-bit number consists of four components (bytes) in the following order from high to low: ''major version'', ''minor version'', ''build'', ''sub-build''. | Version represented by 32-bit number consists of four components (bytes) in the following order from high to low: ''major version'', ''minor version'', ''build'', ''sub-build''. | ||
Line 21: | Line 22: | ||
== Sample == | == Sample == | ||
− | <pre class="brush:cpp"> | + | <pre class="brush:cpp">#define MAKE_API_VERSION(majver, minver, build, subbuild) ((majver) << 24) | ((minver) << 16) | ((build) << 8) | (subbuild) |
− | #define MAKE_API_VERSION(majver, minver, build, subbuild) ((majver) << 24) | ((minver) << 16) | ((build) << 8) | (subbuild) | + | |
#define REQ_VER MAKE_API_VER(1, 2, 0, 0) | #define REQ_VER MAKE_API_VER(1, 2, 0, 0) | ||
Latest revision as of 01:21, 20 October 2015
Returns the actual version of SDK. Application should check the SDK version if it needs to use functionality that was introduced in specific version of the SDK.
Syntax
HRESULT get_APIVersion([out, retval] ULONG* nVersion);
Remarks
Version represented by 32-bit number consists of four components (bytes) in the following order from high to low: major version, minor version, build, sub-build.
The following macro can be used to define the version number:
#define MAKE_API_VERSION(majver, minver, build, subbuild) ((majver) << 24) | ((minver) << 16) | ((build) << 8) | (subbuild)
As a result, for example, current version (1.2.0.0) of the SDK will have a value: 0x01020000
Sample
#define MAKE_API_VERSION(majver, minver, build, subbuild) ((majver) << 24) | ((minver) << 16) | ((build) << 8) | (subbuild) #define REQ_VER MAKE_API_VER(1, 2, 0, 0) bool IsValidSDK(PXV_Inst* pInst) { ULONG nVer; pInst->get_APIVersion(&nVer); return (nVer >= REQ_VER); }