IrDAEndPoint コンストラクタ
アセンブリ: System.Net.IrDA (system.net.irda.dll 内)

Dim irdaDeviceID As Byte() Dim serviceName As String Dim instance As New IrDAEndPoint(irdaDeviceID, serviceName)



次のコード例は、IrDAEndPoint を使用して、リスト ボックスから選択されたリモートの参加デバイスへの接続を作成し、IrDAListener を使用して、そのリモート デバイスからの赤外線通信を待機しています。このコード例は、IrDAClient クラスのトピックで取り上げているコード例の一部分です。
' Create a connection, with the IrDAEndPoint class, ' for the selected device in the list box. ' Start listening for incoming requests from ' that device with an IrDAListener object. Try Dim i As Integer = ListBox1.SelectedIndex irEndP = New IrDAEndPoint(irDevices(i).DeviceID, irServiceName) irListen = New IrDAListener(irEndP) irListen.Start() Catch exSoc As SocketException MsgBox("Couldn't listen on service " & irServiceName & ": " _ & exSoc.ErrorCode) End Try
// Create a connection, with the IrDAEndPoint class, // for the selected device in the list box. // Start listening for incoming requests from // that device with an IrDAListener object. try { int i = listBox1.SelectedIndex; irEndP = new IrDAEndPoint(irDevices[i].DeviceID, irServiceName); irListen = new IrDAListener(irEndP); irListen.Start(); } catch(SocketException exSoc) { MessageBox.Show("Couldn't listen on service " + irServiceName + ": " + exSoc.ErrorCode); }


Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- IrDAEndPoint コンストラクタのページへのリンク