A3DDllInitialize
-
A3DStatus
A3DDllInitialize(A3DInt32 iMajorVersion, A3DInt32 iMinorVersion) -
Starts a session with the library.
This function initializes the internal structures in the library.
2.0Return Values
`A3D_INITIALIZE_ALREADY_CALLED`:
`A3D_SUCCESS`:
You must call this function before calling any other functions in the HOOPS Exchange, with these exceptions:
- You can call
A3DDllGetVersionanytime. - To have the library produce an XML trace file, you must call
A3DDllActivateXMLTracebefore calling this function.
Sample code
A3DInt32 iErr = A3D_SUCCESS; A3DInt32 iMajorVersion = 0, iMinorVersion = 0; iErr = A3DDllGetVersion( &iMajorVersion, &iMinorVersion ); if( iMajorVersion != A3D_DLL_MAJORVERSION ) iErr = A3D_ERROR; else if( iMinorVersion < A3D_DLL_MINORVERSION ) iErr = A3D_ERROR; if( iErr == A3D_SUCCESS ) { iErr = A3DDllInitialize( A3D_DLL_MAJORVERSION, A3D_DLL_MAJORVERSION ); if ( iErr == A3D_SUCCESS ) { /* Insert your own code to create/read models */ /* ... */ /* At end of process, terminate the DLL use */ iErr = A3DDllTerminate(); } }
Parameters
iMajorVersion: The major version of the HOOPS Exchange. Set this value to
A3D_DLL_MAJORVERSIONiMinorVersion: The minor version of the HOOPS Exchange. Set this value to
A3D_DLL_MINORVERSIONReturns
A3D_SUCCESSon success, or an error code on failure - You can call