GetCommModemStatus

  • Thread starter Thread starter marko
  • Start date Start date
M

marko

I trying to check if my modem is turned ON before calling...
So, I write the following statements:

uint s = 0;
if(hComm!=INVALID_HANDLE_VALUE){
GetCommModemStatus(hComm,ref s);
if((s & MS_DSR_ON) == 0)
return -1;
}

My modem is turned OFF but the uint s variable get 0x30 value! Why this?
How can I check this status?
I test my application with PocketPc Emulator of Visual Studio.

thanks
mkz
 
Hi,

I agree with Chris. Use actual hardware.

Also, make sure that the PPC serial port you are using supports DSR (some
internal ports do not), AND that your modem sets DSR high when powered up --
it should, but this function can be disabled by command or option setting,
AND that you modem cable is correctly wired.

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004. See
www.mabry.com/vbpgser4 to order.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top