I have been trying to use socket communications so far, but whether I use that or serial communications, I'm having trouble just setting the connection up in the first place. I've actually been trying to understand how to use either in a desktop setting as well, to no avail. For the socket communication option, I am having problems defining the EndPoint for the Socket.Connect method. This is what I have so far:
Dim IR As Socket = New Socket(AddressFamily.Irda, SocketType.Stream, ProtocolType.Unspecified)
Dim EP As System.Net.EndPoint
Dim SA As System.Net.SocketAddress
SA = New System.Net.SocketAddress(AddressFamily.Irda, 1)
EP.Create(SA)
IR.Connect(EP)
IR.Send(New Byte() {1})
IR.Close()
This doesn't work because the EndPoint (EP) has not been assigned a value. EndPoint also does not use a New constructor, so I guess I'm just not sure how to declare it. I would just use the IRDA namespace, but my project is (like so many others') meant to communicate with remote controls and other "dumb" IR devices, rather than communicating with another Pocket PC or Windows based device. I realize the complications involved in communicating with such a device, but right now my main concern is even being able to send or receive any data at all. I figure I'll sort out the data format after that. Anyway, I don't know C++, but I will check out that link and see if I understand it.
As I sit here, I contemplate the last words of Socrates: "I drank what?". Pokémon Pearl Friend Code: 4554-2418-6836