CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Location
    AZ, USA
    Posts
    1

    serial communication

    I can open a serial port in this way.

    hCommPort = CreateFile("COM2", GENERIC_READ | GENERIC_WRITE, 0,
    NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);

    if ( hCommPort == INVALID_HANDLE_VALUE )
    {
    AfxMessageBox("NOT VALID COM2");
    return;
    }




    It detects if a port is in use. Unfortunately if my mouse is connected it hangs the mouse.

    How can I check if a port is free without hanging my mouse. Win95/98.

    Any ideas?

    Thanks




  2. #2
    Join Date
    May 1999
    Posts
    19

    Re: serial communication

    Maybe only you should use GENERIC_READ ?

    BTW: I would like my dial program (TAPI) to set volume and probably some registers on a modem. Do you know a way to do that?

    bye


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