Home |
Function RTUDeviceOfPipe |
Function RTUDeviceOfPipeRTUDeviceOfPipe returns the handle of the device to which the given pipe is connected: RTUDeviceHandle RTUDeviceOfPipe(RTUPipeHandle Pipe); ParametersPipeHandle to the pipe to query. return valueIf the function succeeds, the requested device handle is returned. For closed or invalid pipe handles, NULL is returned. This function can be useful to retrieve a client's private data with pipes in Message notification mode, in particular if the client handles several devices using a single queue. Example:typedef struct { int whatever; ... } MyData ... RTUSBMessage * E = RTUGetMsgQ(Q); MyData * D = RTUGetClientData(RTUDeviceOfPipe(E->Pipe), MyCallback);
|