LabWindows/CVI

Table of Contents
  • LabWindows/CVI Fundamentals
  • Creating Applications
  • Distributing Applications
  • Library Reference
  • Programmer Reference
  • Hardware Information

CA_DisplayErrorInfo

HRESULT CA_DisplayErrorInfo (CAObjHandle objectHandle, const char *title, HRESULT errorCode, const ERRORINFO *errorInfo);

Purpose

Displays in a dialog box the description associated with an error code and the error information contained in an ERRORINFO structure.

CA_DisplayErrorInfo formats and displays the sCode, wCode, source, description, and errorParamPos fields of the ERRORINFO structure, unless they are NULL.

If the helpFile of the ERRORINFO structure field is not NULL, the dialog box includes a Help button. To display the help file, click the Help button.

Parameters

Input
Name Type Description
objectHandle CAObjHandle Object handle you pass to the ActiveX server function or ActiveX Library function that reported the error.
title const char * Title of the dialog box. If you pass NULL, ActiveX Error appears as the title.
errorCode HRESULT Error code an ActiveX server function or an ActiveX Library function returns.
errorInfo const ERRORINFO * Structure the ActiveX Library fills in when a server method fails. You can pass NULL for this parameter.

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.0 and later

Examples

Refer to the following examples that use the CA_DisplayErrorInfo function:

  • userint\activex\3DGraphAxis.cws

    Open example
  • userint\activex\3DGraphColorMap.cws

    Open example
  • userint\activex\3DGraphContours.cws

    Open example

Log in to get a better experience