IPXV_Inst::APIVersion Property

From Tracker Software PDF SDK
Revision as of 02:21, 20 October 2015 by Dsbot (Talk | contribs) (Automatic page editing by robot)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


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);
}

See Also

IPXV_Inst, IPXC_Inst::get_APIVersion