Assembly: System.Net.IrDA (in system.net.irda.dll)
'Declaration Public Sub New ( _ irdaDeviceID As Byte(), _ serviceName As String _ ) 'Usage Dim irdaDeviceID As Byte() Dim serviceName As String Dim instance As New IrDAEndPoint(irdaDeviceID, serviceName)
The device identifier.
The name of the service to connect to.
Either the device identifier or the service name is invalid.
After you create a connection to a device with an IrDAEndPoint, you can monitor infrared communications from that device by using an IrDAListener.
The following code example uses an IrDAEndPoint to create a connection to a device, as selected from a list box of remote participating devices, and then uses an IrDAListener to listen for infrared communications from the remote device. This code example is part of a larger example provided for the IrDAClient class.
' 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
Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.