DS_GetAttrHandle
- Updated2023-02-21
- 1 minute(s) read
HRESULT DS_GetAttrHandle (DSHandle DSHandle, const char *attributeName, DSHandle *DSAttributeHandle);
Purpose
Returns a DataSocket object handle that identifies a DataSocket object's attribute.
If the attribute does not already exist, this function returns an error. DataSocket object attributes are also DataSocket objects. Use the handle to get and set the data value and the attributes of the DataSocket attribute object.
Call DS_DiscardObjHandle to free the DataSocket attribute object's resources when you are done using the handle.
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. |
| attributeName | const char * | A string to specify the name of the attribute. |
| Output | ||
| Name | Type | Description |
| DSAttributeHandle | DSHandle | Returns a handle that you use to identify the DataSocket object in subsequent
function calls. The handle is never 0. Call DS_DiscardObjHandle to free the DataSocket object's resources when you are done using the handle. |
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