DS_DiscardObjHandle
- Updated2023-02-21
- 1 minute(s) read
HRESULT DS_DiscardObjHandle (DSHandle DSHandle);
Purpose
Discards a DataSocket object and frees the resources used by it.
When you call this function on a DataSocket object handle that you obtained from DS_Open, all of that DataSocket object's attribute objects are also disconnected from the DataSocket data source. You cannot get or set the data value or attributes of a DataSocket object that is disconnected from its DataSocket data source. You must still call DS_DiscardObjHandle on disconnected DataSocket objects.
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. |
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