}//class

        private static void Create_BluetoothClient(out TestInquiryBtIf btIf, out BluetoothClient cli)
        {
            // Ensure this is setup, as we call it from a thread which will not work.
            TestUtilities.IsUnderTestHarness();
            //
            btIf = new TestInquiryBtIf();
            TestRfcommPort port;
            Stream         strm2;

            WidcommBluetoothClientCommsTest.Create_BluetoothClient(btIf, out port, out cli, out strm2);
        }
        void _EventsOccurWithNoPrecedingDiscoverDevicesCall_WithNoCompletedEvent(
            TestInquiryBtIf btIf, BluetoothClient cli)
        {
            Assert.IsFalse(btIf.testDoCallbacksFromWithinStartInquiry, "tdcfwsi");
            ThreadStart dlgt = delegate {
                bool signalled = btIf.startInquiryCalled.WaitOne(0, false);
                Assert.IsFalse(signalled, "!signalled_A!!!!!");
                btIf.InquiryEventsOne_WithNoCompletedEvent();
                signalled = btIf.startInquiryCalled.WaitOne(0, false);
                Assert.IsFalse(signalled, "!signalled_B!!!!!");
            };
            IAsyncResult arDlgt = Delegate2.BeginInvoke(dlgt, null, null);

            //
            WidcommBluetoothClient.ReadKnownDeviceFromTheRegistry = false;
            Delegate2.EndInvoke(dlgt, arDlgt); // any exceptions?
            Assert.AreEqual(0, btIf.stopInquiryCalled, "stopInquiryCalled");
        }