
################
A3DDllInitialize
################

.. c:function:: A3DStatus A3DDllInitialize(A3DInt32 iMajorVersion, A3DInt32 iMinorVersion)

   .. rst-class:: sig-pretty-signature
   
      | :c:enum:`~A3DStatus` A3DDllInitialize(:c:type:`~A3DInt32` **iMajorVersion**\ , :c:type:`~A3DInt32` **iMinorVersion**\ )
   
   Starts a session with the library.
   
   This function initializes the internal structures in the library.
   
   
      2.0
   
   
   **Return 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 ``A3DDllGetVersion`` anytime. 
      - To have the library produce an XML trace file, you must call ``A3DDllActivateXMLTrace`` before calling this function. 
   
   
   .. rubric:: Sample code
   
   
   .. code-block:: cpp
   
      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_MAJORVERSION``
   
      **iMinorVersion**\ : The minor version of the HOOPS Exchange. Set this value to ``A3D_DLL_MINORVERSION``
   
   
   **Returns**
   
   
      ``A3D_SUCCESS`` on success, or an error code on failure
   
   




