DS_CreateAttrHandle
- Updated2023-02-21
- 1 minute(s) read
HRESULT DS_CreateAttrHandle (DSHandle DSHandle, const char *attributeName, DSHandle *DSAttributeHandle);
Purpose
Creates and returns a DataSocket object handle that identifies a DataSocket object's attribute.
The DataSocket object must be configured for writing. If you call this function for a DataSocket object that was opened for reading, the function returns DISP_E_EXCEPTION (0x80020009).
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 * | Pass a string to specify the name of the new 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