Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2007

Tip: Looking for answers? Try searching our database.

Setting low level flag for Serial Port in Java

Thread view: 
Homer - 16 Jul 2007 20:14 GMT
Hi All,

How can I set a low level flag for Serial Port. Using C++ I can say:

if((m_hComaptm=::CreateFile(/*(LPCTSTR)port,*/"COM1", GENERIC_READ|
GENERIC_WRITE, 0,  NULL,
         OPEN_EXISTING, FILE_FLAG_OVERLAPPED,
NULL))==INVALID_HANDLE_VALUE)
    {
        IsError();// to format system error
        printf("Failed to access COM1...\n");
        return NULL;
    }
    ::SetupComm(m_hComaptm, 1024,1024);
    DCB m_dcb;
    ::GetCommState(m_hComaptm,&m_dcb);
//    m_dcb.BaudRate          = CBR_9600;
//    m_dcb.fBinary           = 1;
//    m_dcb.fParity           = 0;
//    m_dcb.fOutxCtsFlow      = 0;
//    m_dcb.fOutxDsrFlow      = 0;
//    m_dcb.fDtrControl       = DTR_CONTROL_ENABLE;
//    m_dcb.fDsrSensitivity   = 0;

I am using Java Win32Com library and trying to set fDsrSensitivity to
Zero in Java but there is no such a function. any idea?

Thanks in advance,

Homer
Knute Johnson - 16 Jul 2007 23:30 GMT
> Hi All,
>
[quoted text clipped - 26 lines]
>
> Homer

What does it do?  I've never seen that before.  It is not a function of
the UART, is it a Windows driver function?

Signature

Knute Johnson
email s/nospam/knute/



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.