Home |
Function RTUClaimInterface |
Function RTUClaimInterfaceRTUClaimInterface informs RTUSB-32 that the calling client will handle the given interface. Access to this interface will be denied to all other clients: int RTUClaimInterface(RTUDeviceHandle Device, const RTUConfigurationDescriptor * Config, const RTUInterfaceDescriptor * Interface, RTUConnectCallback ClientCallback); ParametersDeviceDevice handle passed to an attachment/detachment callback. ConfigPointer to the configuration which contains the specified interface. This value must have been returned by RTUGetConfiguration or RTUFindInterface. InterfacePointer to the interface descriptor the client wishes to claim. This value must have been returned by RTUGetInterface or RTUFindInterface. ClientCallbackAddress of the attachment/detachment callback to call for the RTUDisconnect event. This callback will be called when the device is detached. This value must also be supplied to RTUSetClientData and RTUGetClientData and is used to uniquely identify the client. return valueIf the function succeeds, RTU_SUCCESS, or a negative error code on failure. This function must be called exactly once for every interface a client wishes to handle. If another client has already claimed the given interface, or has claimed a different configuration, the function returns RTU_NOT_AVAIL. The attempt to claim an interface which would exceed the maximum available Isochronous bandwidth or power supplied by the connecting hub port fails with code RTU_BANDWIDTH or RTU_OVER_CURRENT, respectively. This function communicates with the device to set the desired configuration, and, if required, the interface's alternate setting. This function must only be called from an attachment/detachment callback for the RTUConnect event.
|