CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    May 2003
    Location
    Edinburgh, UK
    Posts
    277

    connect to nothing?

    Hi.

    I am trying to connect to a device using IR on my computer/phone.

    problem is that on the recieving end, there is no computer/IP Address and so on. its just a dumb IR which recieves data.

    I cannot seem to connect to it as i get this error:

    The system detected an invalid pointer address in attempting to use a pointer argument in a call


    this is the code:

    Code:
    Socket theSock = new Socket(AddressFamily.Irda, SocketType.Stream, ProtocolType.Unspecified);
    			
    theSock.Connect(new IPEndPoint(IPAddress.None, 0));
    any ideas on how to Connect to such a device? (this device could be a TV/VCR)

    in the end, i just want to send signal to it

  2. #2
    Join Date
    Jan 2002
    Location
    Scaro, UK
    Posts
    5,940

    Re: connect to nothing?

    As far as I know IR communications between laptops and palmtops etc work using Windows networking : i.e. the IR device will appear as a machine in the "network neighbourhood".

    For talking to a TV you'll have to get a lot more low level : there's no standard protocol to say "turn on" or "go to channel 5" - even between manufacturers which is why you get those programmable remote controls. I'm not sure it's even possible with the standard IR which comes on PCs.

    Darwen.
    www.pinvoker.com - PInvoker - the .NET PInvoke Interface Exporter for C++ Dlls.

  3. #3
    Join Date
    May 2003
    Location
    Edinburgh, UK
    Posts
    277

    Re: connect to nothing?

    i understand.
    I have the codes required to send out signals to a tv/vcr BUT need to connect to nothing... if that makes sense? So i can fire out these codes

  4. #4
    Andy Tacker is offline More than "Just Another Member"
    Join Date
    Jun 2001
    Location
    55°50' N 37°39' E
    Posts
    1,503

    Re: connect to nothing?

    eh! coming back to OBEX... take a look at those standards... I think that does for BT and IR... not really sure though...
    If you think you CAN, you can, If you think you CAN'T, you are probably right.

    Have some nice Idea to share? Write an Article Online or Email to us and You may WIN a Technical Book from CG.

  5. #5
    Join Date
    May 2003
    Location
    Edinburgh, UK
    Posts
    277

    Re: connect to nothing?

    ?



    IR differs in communication than BT. drats i am sooooo close for it to send signals but its just the connection problem. I think i will have to go low level (C/C++) to do this but i dont want to since i know nothing about C++ and prefer it to be done in .NET ... even if i can import standard system files and use its API's....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured