Results 1 to 4 of 4

Thread: com help!

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    com help!

    hi

    im new to this

    trying to fiddle around with COM etc... so I can send signals using CreateFile() and WriteFile().

    Almost there!

    I am deving in C# but using low level calls from dllimport.

    Current problem I have is that if I CreateFile() - I get a handler - cool
    If I WriteFile() I get error 1359 which is ERROR_INTERNAL_ERROR - no idea what this is or how to resolve it

    after reading more and more, came to the conclusion that you need to Set the comm state (parity settings, baud rate and so on) so I did this using SetCommState()

    Now, when I set the DCB and give it to SetCommState with the CreateFile() handler (to COM3) I get error 6 which is invalid handler

    ?!?!!?!?

    whats happening?

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: com help!

    Moved to C#

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: com help!

    Thanks Hack - was unsure - thought the original forum I posted it in was more appropriate as there would be not much reference to C# and technical is a low level C++ COM thing - but thank-you for moving it as appropriate

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: com help!

    *bump*

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