|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
IRDA with VB2005Hi:
I am trying to write an app in VB2005 that can send data to another device via the IR port on my laptop. I do not want to use Comm Port workarounds. Does anyone know of code examples, or any clue how this can be done. Help will be appreciated. Use the IrDAClient class, whether the one in the .NETCF,
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemnetsocketsirdaclientclasstopic.asp, or Peter Foot's enhanced one, which also works on the full Framework, http://32feet.net/library/InTheHand.Net.Sockets.IrDAClient.html I've example code of the latter, for IrCOMM and IrLPT usage, on my website, see http://www.alanjmcf.me.uk/comms/infrared/irdaDotNetCliIrLpt.cs.html and http://www.alanjmcf.me.uk/comms/infrared/irdaDotNetCliIrComm.vb.html, the latter being in VB.NET. -- Show quoteHide quoteAlan J. McFarlane http://www.alanjmcf.me.uk/ Please follow-up in the newsgroup for the benefit of all. "Roger Allen" wrote: > Hi: > > I am trying to write an app in VB2005 that can send data to another device > via the IR port on my laptop. > > I do not want to use Comm Port workarounds. > > Does anyone know of code examples, or any clue how this can be done. > > Help will be appreciated. > > > > Many thanks for the leads - I'll let you know what happens
Show quoteHide quote "Alan J. McFarlane" <alanj***@yahoo.com.INVALID> wrote in message news:32206C81-05D0-4E0A-812E-19C051D70488@microsoft.com... > Use the IrDAClient class, whether the one in the .NETCF, > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemnetsocketsirdaclientclasstopic.asp, > or Peter Foot's enhanced one, which also works on the full Framework, > http://32feet.net/library/InTheHand.Net.Sockets.IrDAClient.html > > I've example code of the latter, for IrCOMM and IrLPT usage, on my > website, > see http://www.alanjmcf.me.uk/comms/infrared/irdaDotNetCliIrLpt.cs.html > and > http://www.alanjmcf.me.uk/comms/infrared/irdaDotNetCliIrComm.vb.html, the > latter being in VB.NET. > -- > Alan J. McFarlane > http://www.alanjmcf.me.uk/ > Please follow-up in the newsgroup for the benefit of all. > > > "Roger Allen" wrote: > >> Hi: >> >> I am trying to write an app in VB2005 that can send data to another >> device >> via the IR port on my laptop. >> >> I do not want to use Comm Port workarounds. >> >> Does anyone know of code examples, or any clue how this can be done. >> >> Help will be appreciated. >> >> >> >> Alan:
I just downloaded and installed InThehand v1.6.5.1222. I'm using VS2005 The code below generates the following error: Error 1 Reference required to assembly 'System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes' containing the type 'System.Net.Sockets.Socket'. Add one to your project. .......... Does this mean there is a compatibility issue with VS2005 and/or .netV2? Any advice will be much appreciated Roger Option Strict On Option Explicit On Imports System Imports System.Text Imports System.Net.Sockets.Socket Imports InTheHand.Net.Sockets Public Class frmMain Const SelectPeerNum As Integer = 0 Const ServiceName As String = "IrDA:IRCOMM" Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Cli As New IrDAClient Cli.Client() End Sub End Class Show quoteHide quote "Alan J. McFarlane" <alanj***@yahoo.com.INVALID> wrote in message news:32206C81-05D0-4E0A-812E-19C051D70488@microsoft.com... > Use the IrDAClient class, whether the one in the .NETCF, > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemnetsocketsirdaclientclasstopic.asp, > or Peter Foot's enhanced one, which also works on the full Framework, > http://32feet.net/library/InTheHand.Net.Sockets.IrDAClient.html > > I've example code of the latter, for IrCOMM and IrLPT usage, on my > website, > see http://www.alanjmcf.me.uk/comms/infrared/irdaDotNetCliIrLpt.cs.html > and > http://www.alanjmcf.me.uk/comms/infrared/irdaDotNetCliIrComm.vb.html, the > latter being in VB.NET. > -- > Alan J. McFarlane > http://www.alanjmcf.me.uk/ > Please follow-up in the newsgroup for the benefit of all. > > > "Roger Allen" wrote: > >> Hi: >> >> I am trying to write an app in VB2005 that can send data to another >> device >> via the IR port on my laptop. >> >> I do not want to use Comm Port workarounds. >> >> Does anyone know of code examples, or any clue how this can be done. >> >> Help will be appreciated. >> >> >> >> In article news:OEAYPMtEGHA.1088@tk2msftngp13.phx.gbl, Roger Allen Yes and no. It appears that the 32feet.NET library is compiledwrote: > I just downloaded and installed InThehand v1.6.5.1222. I'm using > VS2005 > > The code below generates the following error: > Error 1 Reference required to assembly 'System, Version=1.0.5000.0, > Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes' > containing the type 'System.Net.Sockets.Socket'. Add one to your > project. ......... > > Does this mean there is a compatibility issue with VS2005 and/or > .netV2? > against the .NET CF v1. But this isn't a problem at runtime as the reference is "Retargetable" and through a feature called unification (http://msdn2.microsoft.com/en-us/library/db7849ey.aspx) the runtime will use its own version of the framework, e.g. if the v2 runtime loads the library it will redirect references for v1 assemblies to its own. Now, at compile time; with the CS compiler(s) there's no problem either. A similar thing seems to happen; it sees the reference to the older framework assembly, and just continues using its own framework version. However with the VB compiler this seems not to be the case and this error is reported. (And unsurprisingly trying supplying an explicit reference to the old assembly makes the compiler even more confused; at least when I try with a 1.1 version [...\v2.0.50727\vbc xxxx.vb /r:System /r:...\v1.1.4322\System.dll]; complaining of ambiguous references.) So I guess this is a bug in the VB compiler, but I'm not really expert enough to know for sure. Anyone here have any comment? I you get no answer here, then try posting in http://32feet.net/forums/, ahh wait I see you've done so already. :-) (http://32feet.net/forums/452/ShowPost.aspx) > Const ServiceName As String = "IrDA:IRCOMM" (Should be "IrDA:IrCOMM").> -- Alan J. McFarlane http://www.alanjmcf.me.uk/ Please follow-up in the newsgroup for the benefit of all. |
|||||||||||||||||||||||