LabWindows/CVI

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

DataSocket Error Codes

The following table shows the error codes that the DataSocket Library returns directly. Error codes are defined in CVIversion\toolslib\datasock\dataskt.h and <Program Files>\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\winerror.h. Other error codes in winerror.h are generated by ActiveX servers and are passed on to you by the DataSocket Library. A negative error code indicates that the function failed.

You can use DS_GetLibraryErrorString to get the description of an error code.

Constant Value Description
E_DATASKT_INVALID_TYPE_DESC 0x80040201 The type passed is not a valid Automation data type.
E_DATASKT_INVALID_RETURN_TYPE 0x80040202 The type passed not a valid return type.
E_DATASKT_USE_CAVT_TYPE_DESC 0x80040203 Use CAVT_ constants for data types instead of VT_ constants.
E_DATASKT_INVALID_NUM_DIM 0x80040204 The number of dimensions in the Safe Array does not match the number required by this function.
E_DATASKT_DIFF_SAFEARRAY_TYPE 0x80040205 The Safe Array type does not match the requested type.
E_DATASKT_VARIANT_NOT_SAFEARRAY 0x80040206 The Variant does not contain a Safe Array.
E_DATASKT_NULL_RET_VAL_PARAM 0x80040207 The return value parameter must not be NULL.
E_DATASKT_CVIAUTODLL_LOAD_FAILED 0x80040208 Could not load the CVI Automation Support DLL (cviauto.dll).
E_DATASKT_CVIAUTOBAD_DLL_VERSION 0x80040209 The CVI Automation Support DLL (cviauto.dll) version does not match the import library.
E_DATASKT_COULD_NOT_CREATE_MUTEX 0x8004020a Unable to create a required mutex.
E_DATASKT_WRONG_THREAD 0x8004020b You can call this function only from the thread that created the CAObjHandle.
E_DATASKT_NO_CALLBACKS 0x8004020c The object has no registered event callbacks.
E_DATASKT_INVALID_CALLBACKID 0x8004020d Invalid callback ID.
E_DATASKT_CALLBACK_REGISTERED 0x8004020e This event already has a registered callback.
E_DATASKT_CALLBACK_NOT_REGISTERED 0x8004020f This event does not have a registered callback.
E_DATASKT_INVALID_METHOD_INDEX 0x80040210 Invalid event method index.
E_DATASKT_INVALID_INTERFACE_PTR 0x80040211 Invalid ActiveX interface pointer.
E_DATASKT_DATASKTDLL_LOAD_FAILED 0x80040500 Could not load the DataSocket Support DLL.
E_DATASKT_BAD_DATASKTDLL_VERSION 0x80040501 The DLL version does not match the import library.
E_DATASKT_BUFFERING_IN_MTA 0x80040502 Cannot create DataSocket for buffered operation in "Multithreaded Apartment" thread with event model.
E_DATASKT_TIMEOUT_EXPIRED 0x80040503 The DataSocket operation timed out.
E_DATASKT_NO_POLL_QUEUE_IN_EVENT_MODEL 0x80040504 Cannot access polling queue in event model.
DISP_E_TYPEMISMATCH 0x80020005 Type mismatch.
DISP_E_BADVARTYPE 0x80020008 Bad variable type.
DISP_E_EXCEPTION 0x80020009 Exception occurred.
E_HANDLE 0x80070006 The handle is invalid.
E_OUTOFMEMORY 0x8007000e Not enough storage is available to complete this operation.
E_INVALIDARG 0x80070057 The parameter is incorrect.
ERROR_INSUFFICIENT_BUFFER 0x8007007a The data area passed to a system call is too small.

You also can refer to <Program Files>\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\winerror.h for error codes returned by ActiveX servers.

Log in to get a better experience