问题描述
侦听线程InTheHand.Net.Bluetooth.BluetoothRadiobr=InTheHand.Net.Bluetooth.BluetoothRadio.PrimaryRadio;if(br==null){MessageBox.Show("NosupportBluetoothradio/stackfound.");}elseif(br.Mode!=InTheHand.Net.Bluetooth.RadioMode.Discoverable){DialogResultrslt=MessageBox.Show("MakeBluetoothRadioDiscoverable?","DeviceListener",MessageBoxButtons.YesNo,MessageBoxIcon.Question,MessageBoxDefaultButton.Button1);if(rslt==DialogResult.Yes){br.Mode=InTheHand.Net.Bluetooth.RadioMode.Discoverable;}}ol=newObexListener(ObexTransport.Bluetooth);ol.Start();接收线程System.Threading.Threadt=newSystem.Threading.Thread(newSystem.Threading.ThreadStart(DealWithRequest));t.Start();处理函数publicvoidDealWithRequest(){while(ol.IsListening){try{ObexListenerContextolc=ol.GetContext();ObexListenerRequestolr=olc.Request;stringfilename=Uri.UnescapeDataString(olr.RawUrl.TrimStart(newchar[]{'/'}));olr.WriteFile(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal)+"\"+DateTime.Now.ToString("yyMMddHHmmss")+""+filename);this.Invoke(newAddToListDelegate(AddToList),newobject[]{filename});}catch(Exception){break;}}}现象是侦听被驱动自带的接收文件功能拦截,文件总被驱动自带的接收文件功能抢先接收了。怎么样能让驱动不接收文件呢?