IPXV_Inst::APIVersion Property

From Tracker Software PDF SDK
Jump to: navigation, search
m (Automatic page editing by robot)
m (Automatic page editing by robot)
 
(7 intermediate revisions by 3 users not shown)
Line 2: Line 2:
 
[[Category:Editor]]
 
[[Category:Editor]]
 
{{#customTitle:IPXV_Inst::APIVersion Property}}
 
{{#customTitle:IPXV_Inst::APIVersion Property}}
{{#parentPage:PXV:IPXV_Inst#Properties|APIVersion Property|property}}
+
{{#parentPage:PXV:IPXV_Inst#Properties|APIVersion|property}}
{{ToWrite}}
+
 
{{ToReview}}
 
{{ToReview}}
  
Property '''APIVersion''' of interface [[PXV:IPXV_Inst|IPXV_Inst]] returns  Value of ULONG ...
+
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 ==
 
== Syntax ==
<pre class="brush:cpp;gutter:false">HRESULT get_APIVersion([out, retval]  ULONG*  pVersion);
+
<pre class="brush:cpp;gutter:false">HRESULT get_APIVersion([out, retval]  ULONG*  nVersion);
 +
</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''.
 +
 
 +
The following macro can be used to define the version number:
 +
<pre class="brush:cpp">
 +
#define MAKE_API_VERSION(majver, minver, build, subbuild) ((majver) << 24) | ((minver) << 16) | ((build) << 8) | (subbuild)
 +
</pre>
 +
 
 +
As a result, for example, current version (1.2.0.0) of the SDK will have a value: <tt>0x01020000</tt>
 +
 
 +
== Sample ==
 +
<pre class="brush:cpp">#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);
 +
}
 
</pre>
 
</pre>
  
 
== See Also ==
 
== See Also ==
[[PXV:IPXV_Inst|IPXV_Inst]].
+
[[PXV:IPXV_Inst|IPXV_Inst]], [[PXV:IPXC_Inst_APIVersion|IPXC_Inst::get_APIVersion]]

Latest revision as of 02: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);
}

See Also

IPXV_Inst, IPXC_Inst::get_APIVersion