Microsoft.Protocols.TestSuites.Rdpeusb.RdpeusbTestSutie.BVT_EUSB_OperateIo_QueryDeviceText C# (CSharp) Method

BVT_EUSB_OperateIo_QueryDeviceText() private method

private BVT_EUSB_OperateIo_QueryDeviceText ( ) : void
return void
        public void BVT_EUSB_OperateIo_QueryDeviceText()
        {
            LogComment("BVT_EUSB_OperateIo_QueryDeviceText");

            LogComment("1. Creates the control virtual channel, exchanges capabilities then notifies that the channel is created.");
            context.ControlChannel = CreateVirtualChannel();

            LogComment("2. Receives an add virtual channel request.");
            rdpeusbAdapter.ExpectAddVirtualChannel(context.ControlChannel);

            LogComment("3. Creates a new virtual channel for the device.");
            DynamicVirtualChannel channel = CreateVirtualChannel();

            LogComment("4. Receives an add device request.");
            EusbDeviceContext device = rdpeusbAdapter.ExpectAddDevice(channel);

            LogComment("5. Sends QUERY_DEVICE_TEXT request and receives corresponding response.");
            const uint englishLocaleId = 0x0409; // English (U.S.)
            rdpeusbAdapter.QueryDeviceText(device, 0, englishLocaleId);

            LogComment("6. Sends retract device request and the channel for the device is expected to be closed.");
            rdpeusbAdapter.RetractDevice(device, USB_RETRACT_REASON.UsbRetractReason_BlockedByPolicy);
        }