Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |

# QAxContainer FAQ

- The QAxContainer build system
- Accessing the object API
  - Typical error messages
    - Requested control could not be instantiated
    - QAxBase::internalInvoke: No such method
    - Error calling IDispatch member: Non-optional parameter missing
    - Error calling IDispatch member: Type mismatch in parameter \c n
- Distributing QAxContainer applications

## The QAxContainer build system

To build Qt applications that can host ActiveX controls, simply link the application against the qaxcontainer library by adding

        LIBS += qaxcontainer.lib

to the application's `.pro` file.

## Accessing the object API

ActiveQt provides a Qt API to the COM object, and replaces COM datatypes with Qt equivalents. Use the `dumpdoc` example program to get the documentation of the Qt API for any COM object and it's subobjects.

### Typical error messages

ActiveQt prints error messages to the debug output when it encounters error situations at runtime. Usually you must run your program in the debugger to see these messages (e.g. in Visual Studio's Debug output).

#### Requested control could not be instantiated

The control requested in QAxBase::setControl() is not installed on this system, or is not accessible for the current user.

The control might require administrator rights, or a license key. If the control is licensed, reimplement initialize() and use the COM APIs to call the IClassFactory2 interface functions.

#### QAxBase::internalInvoke: No such method

A `dynamicCall()` failed - the function prototype did not match any function available in the object's API.

#### Error calling IDispatch member: Non-optional parameter missing

A `dynamicCall()` failed - the function prototype was correct, but too few parameters were provided.

#### Error calling IDispatch member: Type mismatch in parameter `n`

A `dynamicCall()` failed - the function prototype was correct, but the paramter at index `n` was of the wrong type and could not be coerced to the correct type.

## Distributing QAxContainer applications

If the Qt library is build statically the QAxContainer library will also be static, and you don't need to redistribute any binaries except the application executable.

To distribute your application when Qt and QAxContainer are shared DLLs provide both DLLs either in the system path, or in the same directory as the application's executable.