Admin Production ni-theme
Current Publication

ActiveX Library Error Codes

LabWindows/CVI

ActiveX Library Error Codes

The ActiveX Library functions return negative values when they detect errors. This library uses a common set of error codes. The following table lists the error codes, defined constants, and error messages associated with functions in the the LabWindows/CVI ActiveX Library.

Note Note  Occasionally, an ActiveX Library function returns an error code because an internal call to a Windows function returns the error code. The following table does not list such error codes; however, you can refer to <Program Files>\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\winerror.h for the Windows error code.

Use the CA_GetAutomationErrorString function to convert the error code, returned in the Result parameter of ActiveX Library functions, into meaningful error messages. You then can use CA_DisplayErrorInfo to display the description of an error code.

Error codes are defined in the CVIversion\include\cviauto.h or in <Program Files>\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\winerror.h files.

ActiveX Library Error Codes

Code Defined Constant Description
0X0 E_CVIAUTO_NO_ERROR The operation completed successfully.
0X80040201 E_CVIAUTO_INVALID_TYPE_DESC The type you passed is an invalid ActiveX data type.
0X80040202 E_CVIAUTO_INVALID_RETURN_TYPE The type you passed is an invalid return type.
0X80040203 E_CVIAUTO_USE_CAVT_TYPE_DESC Use CAVT_ constants for data types instead of VT_ constants.
0X80040204 E_CVIAUTO_INVALID_NUM_DIM The number of dimensions in the safe array does not match the number this function requires.
0X80040205 E_CVIAUTO_DIFF_SAFEARRAY_TYPE The safe array type does not match the type you requested.
0X80040206 E_CVIAUTO_VARIANT_NOT_SAFEARRAY The variant does not contain a safe array.
0X80040207 E_CVIAUTO_NULL_RET_VAL_PARAM The return value parameter must not be NULL.
0X80040208 E_CVIAUTO_DLL_LOAD_FAILED Could not load the CVI Automation Support DLL (cviauto.dll).
0X80040209 E_CVIAUTO_BAD_DLL_VERSION CVI Automation Support DLL (cviauto.dll) version does not match the import library.
0X8004020a E_CVIAUTO_COULD_NOT_CREATE_MUTEX Unable to create a required mutex.
0x8004020b E_CVIAUTO_WRONG_THREAD You can call this function only from the thread that created the CAObjHandle.
0x8004020c E_CVIAUTO_NO_CALLBACKS The object has no registered event callbacks.
0x8004020d E_CVIAUTO_INVALID_CALLBACKID Invalid callback ID.
0x8004020e E_CVIAUTO_CALLBACK_REGISTERED This event already has a registered callback.
0x8004020f E_CVIAUTO_CALLBACK_NOT_REGISTERED This event does not have a registered callback.
0x80040210 E_CVIAUTO_INVALID_METHOD_INDEX Invalid event method index.
0x80040211 E_CVIAUTO_INVALID_INTERFACE_PTR Invalid ActiveX interface pointer.
0x80040212 E_CVIAUTO_SERVER_NOT_INITIALIZED The automation server was not initialized.
0x80040213 E_CVIAUTO_SERVER_INVALID_TYPE The module type is invalid.
0x80040214 E_CVIAUTO_SERVER_INPROC_ONLY This operation is only permitted on in-process (DLL) servers.
0x80040215 E_CVIAUTO_SERVER_NOT_AUTOMATION The server was not launched for automation.
0x80040216 E_CVIAUTO_SERVER_INVALID_AGGREG Aggregation is only allowed during object creation.
0x80040217 E_CVIAUTO_SERVER_IFACE_NOT_AGGREG This interface is already implemented or aggregated by this object.
0x80040218 E_CVIAUTO_SERVER_INITIALIZATION Server initialization error.
0x80040219 E_CVIAUTO_SERVER_CLASS_NOT_REG The class is not registered internally with the Automation Support DLL.
0x80040220 E_CVIAUTO_CVI_UI_ERROR A User Interface Library error occurred.
0x80040221 E_CVIAUTO_SERVER_OBJ_NO_ERRORINFO This object does not implement the ISupportErrorInfo interface.
0x80040222 E_CVIAUTO_SERVER_ITF_NO_ERRORINFO This interface does not support ErrorInfo.
0x80040223 E_CVIAUTO_SERVER_IN_CALLBACK This function cannot be called from the server or object callback.