|
-
Sep 25th, 2005, 09:24 AM
#1
Thread Starter
PowerPoster
Socket's and COM
Hi.
Sorry if this is posted in the wrong forum but PLEASE DO move it to another forum if necessary.
I am not good with C/C++ - I dont know anything/much about it. I program in .NET and other languages. In .NET I mainly program in C#
I am trying to access IR and send signals to devices (non computer/server)
I have almost found a way but get an exception when doing this:
Code:
Socket theSock = new Socket(AddressFamily.Irda, SocketType.Stream, ProtocolType.Unspecified);
IPEndPoint ipep = new IPEndPoint(IPAddress.None.Address, 0);
theSock.Connect(ipep); //HERE
when connecting I get the exception "The system detected an invalid pointer address in attempting to use a pointer argument in a call"
Now, I am trying to connect to a device (TV/VCR) but since that has no ports or IP Address, I used IPAddress.None and port 0. But this is the result I get.
I am using a computer (mobile device really) which has IR. I wish to open a socket, send any data I want in byte[] and then close the socket when needed to.
Does anyone know or can help me translate/create that function? Perhaps even you may be able to help me sort out the exception?
I found this on MSDN but have no clue/idea what each command means!:
http://msdn.microsoft.com/library/de...sdn_serial.asp
I appreciate your help!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|