USB Libraries Help > USB Host Libraries > USB CDC Host Library > Library Interface > a) Client Access Functions > USB_HOST_CDC_DeviceObjHandleGet Function
MPLAB Harmony USB Stack
USB_HOST_CDC_DeviceObjHandleGet Function

This function returns the Device Object Handle for this CDC device. This returned Device Object Handle can be used by the application to perform device level operations such as getting the string descriptors.

C
USB_HOST_DEVICE_OBJ_HANDLE USB_HOST_CDC_DeviceObjHandleGet(
    USB_HOST_CDC_OBJ cdcDeviceObj
);
Preconditions

None.

Parameters
Parameters 
Description 
cdcDeviceObj 
CDC device object handle returned in the USB_HOST_CDC_ATTACH_EVENT_HANDLER function. 
Returns

Will return a valid device object handle if the device is still connected to the system. Will return an USB_HOST_DEVICE_OBJ_HANDLE_INVALID otherwise.

Remarks

None.

Example