Vp init: Difference between revisions

From Virtual Paradise Wiki
Jump to navigation Jump to search
No edit summary
Oliver (talk | contribs)
More info
Line 1: Line 1:
<C>int vp_init(int build)</C>
<C>int vp_init(int version)</C>
 
== Description ==
== Description ==
Initializes the VP API, 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.
Initializes the VP API, 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.
== Callback ==
None
== Arguments ==
;version:VP_BUILD in VP.h defines the build of the SDK library.
== Return values ==
;[[VP_RC_SUCCESS]]
;[[VP_RC_VERSION_MISMATCH]]:VP.h and the SDK library are from different builds.
== Example ==
== Example ==
<C>
<C>
int err;
int rc;
if(err = vp_init(VP_BUILD))
if(rc = vp_init(VP_BUILD))
     printf("Error initializing VP API(reason %d)\n", err);
     printf("Error initializing VP API(reason %d)\n", rc);
</C>
</C>

Revision as of 14:05, 17 June 2012

<C>int vp_init(int version)</C>

Description

Initializes the VP API, 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.

Callback

None

Arguments

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

Return values

VP_RC_SUCCESS
VP_RC_VERSION_MISMATCH
VP.h and the SDK library are from different builds.

Example

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

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

</C>