Vp init: Difference between revisions

From Virtual Paradise Wiki
Jump to navigation Jump to search
Roy Curtis (talk | contribs)
m test commit; new method page
Line 1: Line 1:
<C>int vp_init(int version)</C>
{{sdk method page|init|Initializes the Virtual Paradise SDK, which is required before calling any other method of the SDK.
 
|customparam={{sdk parameter|int|version}}
== Description ==
|customparamex=VP_BUILD
Initializes the VP API.
|noinstanceparam=
 
|parameters=
== Callback ==
  {{sdk parameter row|int|version|VP_BUILD in VP.h defines the build of the SDK library}}
None
|behavior=
 
== Notes ==
This only has to be called once for every application. It is used to check if the version used to build the application is compatible with the version used at runtime.
This only has to be called once for every application. It is used to check if the version used to build the application is compatible with the version used at runtime.
 
|returncodes=
== Arguments ==
  {{sdk return code row}}
;version:VP_BUILD in VP.h defines the build of the SDK library.
  {{sdk return code row|version_mismatch|VP.h and the SDK library are from different builds}}
 
|examples=
== Argument attributes ==
None
 
== Return values ==
;[[SDK Reason Codes#VP_RC_SUCCESS|VP_RC_SUCCESS]]
;[[SDK Reason Codes#VP_RC_VERSION_MISMATCH|VP_RC_VERSION_MISMATCH]]:VP.h and the SDK library are from different builds.
 
== Returned attributes ==
None
 
== Example ==
<C>
<C>
int rc;
int rc;
if(rc = vp_init(VP_BUILD))
if(rc = vp_init(VP_BUILD))
     printf("Error initializing VP API(reason %d)\n", rc);
     printf("Error initializing VP API (reason %d)\n", rc);
</C>
</C>
 
}}
[[Category: SDK]]

Revision as of 15:54, 28 September 2013

Method call snippet vp_init(VP_BUILD);

Initializes the Virtual Paradise SDK, which is required before calling any other method of the SDK.

Parameters

These are the parameters that this method requires:

Parameter Usage
int
version
VP_BUILD in VP.h defines the build of the SDK library

Returns

This method returns a return code integer, which indicates whether the call was successful or errored for any reason:

Return code Cause
VP_RC_SUCCESS Successful call (for methods that have a registered callback, it only means the request has been sent)
VP_RC_SUCCESS Successful call (for methods that have a registered callback, it only means the request has been sent)
VP_RC_VERSION_MISMATCH VP.h and the SDK library are from different builds

Behavior

This only has to be called once for every application. It is used to check if the version used to build the application is compatible with the version used at runtime.

Examples

<C> int rc; if(rc = vp_init(VP_BUILD))

   printf("Error initializing VP API (reason %d)\n", rc);

</C>