Library Session Functions

Functions

A3DStatus

A3DDllInitialize

A3D_API_DEPRECATED

A3D_API_DEPRECATED

A3DStatus

A3DDllTerminate

A3DStatus

A3DDllGetVersion

A3DStatus

A3DDllGetBuildInformation

A3DStatus

A3DDllIsInitialized

Detailed Description

group a3d_libsession_functions

Starts, configures, and terminates a session with the library.

The functions in this section start and terminate a session with the library.

Function Documentation

A3DStatus A3DDllInitialize(A3DInt32 iMajorVersion, A3DInt32 iMinorVersion)

Starts a session with the library.

This function initializes the internal structures in the library.

Version

2.0

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();
    }
}

Warning

You must call this function before calling any other functions in the HOOPS Publish, 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.

Parameters:
  • iMajorVersion – The major version of the HOOPS Publish. Set this value to A3D_DLL_MAJORVERSION

  • iMinorVersion – The minor version of the HOOPS Publish. Set this value to A3D_DLL_MINORVERSION

Return values:
  • `A3D_INITIALIZE_ALREADY_CALLED`

  • `A3D_SUCCESS`

Returns:

A3D_SUCCESS on success, or an error code on failure

Warning

doxygenfunction: Unable to resolve function “A3D_API_DEPRECATED” with arguments “None”. Candidate function could not be parsed. Parsing error is Error when parsing function declaration. If the function has no return type: Error in declarator or parameters-and-qualifiers Invalid C++ declaration: Expected identifier in nested name. [error at 60] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) ————————————————————^ If the function has a return type: Error in declarator If declarator-id with parameters-and-qualifiers: Invalid C++ declaration: Expected identifier in nested name. [error at 19] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) ——————-^ If parenthesis in noptr-declarator: Error in declarator or parameters-and-qualifiers If pointer to member declarator: Invalid C++ declaration: Expected ‘::’ in pointer to member (function). [error at 29] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) —————————–^ If declarator-id: Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 29] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) —————————–^

Warning

doxygenfunction: Unable to resolve function “A3D_API_DEPRECATED” with arguments “None”. Candidate function could not be parsed. Parsing error is Error when parsing function declaration. If the function has no return type: Error in declarator or parameters-and-qualifiers Invalid C++ declaration: Expected identifier in nested name. [error at 60] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) ————————————————————^ If the function has a return type: Error in declarator If declarator-id with parameters-and-qualifiers: Invalid C++ declaration: Expected identifier in nested name. [error at 19] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) ——————-^ If parenthesis in noptr-declarator: Error in declarator or parameters-and-qualifiers If pointer to member declarator: Invalid C++ declaration: Expected ‘::’ in pointer to member (function). [error at 29] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) —————————–^ If declarator-id: Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 29] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) —————————–^

A3DStatus A3DDllTerminate()

Terminates a session with the library.

This function terminates a session with the library. It deallocates memory it has previously allocated for its internal use.

You must call this function to end a session with the library.

Version

2.0

Warning

You can call this function only after successfully calling A3DDllInitialize.

Warning

When your process is done with A3DLIBS.dll (after calling A3DDllTerminate), you MUST unload that DLL, as shown in the sample code for A3DDllInitialize. Unloading the DLL helps to avoid conflicts that can occur when multiple processes use A3DLIBS.dll.

Warning

Processes must avoid parallel access to A3DLIBS.dll.

Return values:
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_SUCCESS

Returns:

A3D_SUCCESS on success, or an error code on failure

A3DStatus A3DDllGetVersion(A3DInt32 *piMajorVersion, A3DInt32 *piMinorVersion)

Gets the version identifiers for the currently installed library.

This function returns the version of the currently installed library. Use these version identifiers to determine whether that library is compatible with your application. The value returned through the piMajorVersion argument is identical to the Acrobat version identifier. The value returned through the piMinorVersion argument is specific to the library.

To ensure compatibility, the A3D_DLL_MAJORVERSION must be identical to the major version of currently installed library, and the A3D_DLL_MINORVERSION must be less than or equal to the minor version of the currently installed library.

You can call A3DDllGetVersion anytime, even before calling A3DDllInitialize and after calling A3DDllTerminate. This function does not allocate memory.

Version

2.0

Return values:

A3D_SUCCESS

Returns:

A3D_SUCCESS on success, or an error code on failure

A3DStatus A3DDllGetBuildInformation(A3DUTF8Char **ppBuildInformation)

Gets information relative to build.

This function returns build information. This can be asked by support to help solving problem. This function does not allocate memory.

Version

14.2

Return values:

A3D_SUCCESS

Returns:

A3D_SUCCESS on success, or an error code on failure

A3DStatus A3DDllIsInitialized()

Gets the status of the library initialization library.

This function returns the status of the library initialization library.

This function does not allocate memory.

Version

11.0

Return values:

A3D_SUCCESS

Returns:

A3D_SUCCESS on success, or an error code on failure