Click here to Skip to main content
15,912,072 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: How to detect whether a reader is connected to a Serial port ? Pin
kapardhi14-Oct-08 23:48
kapardhi14-Oct-08 23:48 
AnswerRe: How to detect whether a reader is connected to a Serial port ? Pin
SandipG 14-Oct-08 23:56
SandipG 14-Oct-08 23:56 
AnswerRe: How to detect whether a reader is connected to a Serial port ? Pin
kapardhi15-Oct-08 0:18
kapardhi15-Oct-08 0:18 
GeneralRe: How to detect whether a reader is connected to a Serial port ? Pin
SandipG 15-Oct-08 0:27
SandipG 15-Oct-08 0:27 
QuestionRe: How to detect whether a reader is connected to a Serial port ? Pin
kapardhi15-Oct-08 23:25
kapardhi15-Oct-08 23:25 
QuestionRe: How to detect whether a reader is connected to a Serial port ? Pin
Roger Stoltz14-Oct-08 23:56
Roger Stoltz14-Oct-08 23:56 
QuestionRe: How to detect whether a reader is connected to a Serial port ? Pin
kapardhi15-Oct-08 0:12
kapardhi15-Oct-08 0:12 
AnswerRe: How to detect whether a reader is connected to a Serial port ? Pin
Roger Stoltz15-Oct-08 1:19
Roger Stoltz15-Oct-08 1:19 
kapardhi wrote:
Serial port cable to computers Serial port


Ahh, that explains it.
I assumed it was a USB device, sorry about that.


kapardhi wrote:
now if i use ReadFile() it waits infinitely to receive a response !


Don't know if you by this mean that the call blocks, but if that's a problem you can use overlapped mode instead. I would recommend overlapped mode whether this is a problem or not. However, the read request to the driver will not be completed until the timeout set by ::SetCommTimeouts() expires.

If the card reader would set one of the signals, e.g. DSR or CTS, to an active state it would be possible to use ::GetCommModemStatus() to check if the device is present. Have you investigated this possibility?


"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown


QuestionRe: How to detect whether a reader is connected to a Serial port ? Pin
kapardhi15-Oct-08 23:24
kapardhi15-Oct-08 23:24 
AnswerRe: How to detect whether a reader is connected to a Serial port ? Pin
Roger Stoltz15-Oct-08 23:41
Roger Stoltz15-Oct-08 23:41 
QuestionHow to put all data and codes into one section within PE? Pin
Joseph Marzbani14-Oct-08 23:06
Joseph Marzbani14-Oct-08 23:06 
QuestionPlotting a Graph Using MSChart in MFC Pin
vikram kamaraj14-Oct-08 22:43
vikram kamaraj14-Oct-08 22:43 
QuestionC1004: unexpected end of file found Pin
Member 560524014-Oct-08 22:19
Member 560524014-Oct-08 22:19 
AnswerRe: C1004: unexpected end of file found Pin
_AnsHUMAN_ 14-Oct-08 22:51
_AnsHUMAN_ 14-Oct-08 22:51 
AnswerRe: C1004: unexpected end of file found Pin
Joseph Marzbani14-Oct-08 23:09
Joseph Marzbani14-Oct-08 23:09 
Question[Message Deleted] Pin
MsmVc14-Oct-08 20:54
MsmVc14-Oct-08 20:54 
QuestionRe: SetRange Pin
Rajesh R Subramanian14-Oct-08 20:59
professionalRajesh R Subramanian14-Oct-08 20:59 
Answer[Message Deleted] Pin
MsmVc14-Oct-08 21:18
MsmVc14-Oct-08 21:18 
GeneralRe: SetRange Pin
Rajesh R Subramanian14-Oct-08 21:25
professionalRajesh R Subramanian14-Oct-08 21:25 
RantRe: [Message Deleted] Pin
Rajesh R Subramanian15-Oct-08 3:20
professionalRajesh R Subramanian15-Oct-08 3:20 
QuestionBasic string manipulation question Pin
monsieur_jj14-Oct-08 20:42
monsieur_jj14-Oct-08 20:42 
AnswerRe: Basic string manipulation question Pin
Vijjuuu.14-Oct-08 21:02
Vijjuuu.14-Oct-08 21:02 
AnswerRe: Basic string manipulation question Pin
Jose David Pujo14-Oct-08 21:48
Jose David Pujo14-Oct-08 21:48 
AnswerRe: Basic string manipulation question Pin
CPallini14-Oct-08 22:57
mveCPallini14-Oct-08 22:57 
AnswerMe too! Pin
Rajesh R Subramanian15-Oct-08 0:16
professionalRajesh R Subramanian15-Oct-08 0:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.