Admin Production ni-theme
Current Publication

CA_FillErrorInfo

LabWindows/CVI

CA_FillErrorInfo

HRESULT CA_FillErrorInfo (HRESULT errorCode, ERRORINFO *errorInfo, int *errorInfoPresent);

Purpose

Note   This function has been superseded by CA_FillErrorInfoEx.

If the error code indicates failure, CA_FillErrorInfo queries the system for error information. If error information is available, this function fills in the sCode, source, description, helpFile, and helpContext fields of the ERRORINFO structure.

CA_FillErrorInfo calls the system function GetErrorInfo to obtain the error information.

Note   This function is used by the functions generated by the ActiveX Controller Wizard. It is not intended to be used directly.

Parameters

Input
Name Type Description
errorCode HRESULT An error code returned by an ActiveX server function or ActiveX Library function.
Output
Name Type Description
errorInfo ERRORINFO When the ActiveX server method invoked by this function fails with the error code DISP_E_EXCEPTION, descriptive information about the error code is stored in this parameter. The descriptive information includes the error code, source, and description. The information also can include a help file and help file context.

When the ActiveX server method invoked by this function fails with the error codes DISP_E_PARAMNOTFOUND, DISP_E_TYPEMISMATCH, or E_INVALIDARG, the parameter position of the invalid argument can be stored in the errorParamPos member of this parameter.

This parameter can be NULL.
errorInfoPresent int A Boolean value indicating whether error information was available from the system.

Return Value

Name Type Description
status HRESULT A value indicating whether an error occurred. Negative error codes indicate function failure.

Error codes are defined in CVIversion\include\cviauto.h and <Program Files>\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\winerror.h. The LabWindows/CVI ActiveX Library explicitly returns error codes. Other error codes in winerror.h are generated by ActiveX servers and passed on to you by the LabWindows/CVI ActiveX Library.

You can use CA_GetAutomationErrorString to get the description of an error code or CA_DisplayErrorInfo to display the description of the error code.

Additional Information

Library: ActiveX Library

Include file: cviauto.h

LabWindows/CVI compatibility: LabWindows/CVI 5.5 and later