DS_GetLastMessage
- Updated2023-02-21
- 1 minute(s) read
DS_GetLastMessage
HRESULT DS_GetLastMessage (DSHandle DSHandle, char buffer[], unsigned int bufferSize);
Purpose
Returns a status message for a DataSocket object.
The status message contains either a description of the last error in communication between the DataSocket object and the DataSocket data source, a description of the last step taken in connecting the DataSocket object to the DataSocket data source, or a description of the last data update between the DataSocket object and the DataSocket data source.
Parameters
Input | ||
Name | Type | Description |
DSHandle | DSHandle | Pass the handle you obtained from DS_Open, DS_GetAttrHandle, or DS_CreateAttrHandle to identify the DataSocket object. |
bufferSize | unsigned int | The size, in bytes, of the buffer that you pass in the buffer parameter of this function. |
Output | ||
Name | Type | Description |
buffer | char [] | Returns the message. If the buffer you pass is too small to hold the message, LabWindows/CVI truncates the message to fit in the buffer. |
Return Value
Name | Type | Description |
status | HRESULT | The value that indicates whether an error occurred. A negative error code indicates function failure. 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. |
Additional Information
Library: DataSocket Library
Include file: datasock\dataskt.h
LabWindows/CVI compatibility: LabWindows/CVI 5.5 and later