Click here to Skip to main content
15,881,715 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: stl list::iterator for derived classes ?!? Pin
tbrake5-Jan-06 12:08
tbrake5-Jan-06 12:08 
GeneralRe: stl list::iterator for derived classes ?!? Pin
Christian Graus5-Jan-06 12:11
protectorChristian Graus5-Jan-06 12:11 
QuestionRe: stl list::iterator for derived classes ?!? Pin
tbrake5-Jan-06 12:29
tbrake5-Jan-06 12:29 
AnswerRe: stl list::iterator for derived classes ?!? Pin
Christian Graus5-Jan-06 12:32
protectorChristian Graus5-Jan-06 12:32 
GeneralRe: stl list::iterator for derived classes ?!? Pin
tbrake5-Jan-06 12:43
tbrake5-Jan-06 12:43 
GeneralRe: stl list::iterator for derived classes ?!? Pin
Christian Graus5-Jan-06 12:46
protectorChristian Graus5-Jan-06 12:46 
AnswerRe: stl list<>::iterator for derived classes ?!? Pin
Christian Graus5-Jan-06 12:55
protectorChristian Graus5-Jan-06 12:55 
QuestionGet Status of Comm Port Pin
tj_cts5-Jan-06 9:00
tj_cts5-Jan-06 9:00 
Hello all,
(My first post)

I am developing an application for WinCE 3.0 for a Pocket PC 2000 device in C++ using MFC / WinAPI.

In my application I use a Bluetooth CF card to communicate with a wireless printer. The drivers installed assign a COM port to the printer so I may
read / write to it using WinAPI calls for Files such as:

CreateFile( ... );<br />
ReadFile( ... );<br />
WriteFle( ... );


The wireless printer conserves battery by automatically turning off after a period of inactivity, so at times I must check to see if it is there before the user tries to print something.

The problem is that if I want to know anything about the file I must first get a handle with the CreateFile( ... ) function, which lags about 10-15 seconds before it times out if the printer is off, so usually the user is already trying to print something by the time I get back from that function call. Or if I make the user wait until I get back, they will get frustrated after so much time.

I tried using
CFile::GetStatus( ... )<br />

but it doesn't seem to work for COM ports, eg. I can call:
HANDLE hPrinter = CreateFile( _T("COM4:"),...);
and I get the handle but if I do this:
BOOL bIsPortAvailable = CFile::GetStatus( _T("COM4:"), ...);
I get FALSE back;

Is there a way to specify the timeout for the CreateFile( ... ) function or another way to check if that COM port is available?

Thanks Much,
T.J. Barbour
AnswerRe: Get Status of Comm Port Pin
KellyR5-Jan-06 9:12
KellyR5-Jan-06 9:12 
GeneralRe: Get Status of Comm Port Pin
tj_cts5-Jan-06 10:12
tj_cts5-Jan-06 10:12 
GeneralRe: Get Status of Comm Port Pin
Blake Miller5-Jan-06 12:31
Blake Miller5-Jan-06 12:31 
QuestionHow to submit information from an application? Pin
kevincwong5-Jan-06 8:47
kevincwong5-Jan-06 8:47 
AnswerRe: How to submit information from an application? Pin
Office Lineman5-Jan-06 9:19
Office Lineman5-Jan-06 9:19 
GeneralRe: How to submit information from an application? Pin
kevincwong6-Jan-06 11:50
kevincwong6-Jan-06 11:50 
GeneralRe: How to submit information from an application? Pin
Office Lineman6-Jan-06 12:19
Office Lineman6-Jan-06 12:19 
GeneralRe: How to submit information from an application? Pin
kevincwong6-Jan-06 19:15
kevincwong6-Jan-06 19:15 
QuestionDate Time Control Pin
LCI5-Jan-06 8:30
LCI5-Jan-06 8:30 
AnswerRe: Date Time Control Pin
Office Lineman5-Jan-06 8:54
Office Lineman5-Jan-06 8:54 
QuestionCFtpConnection trouble Pin
Anacreon5-Jan-06 7:44
Anacreon5-Jan-06 7:44 
AnswerRe: CFtpConnection trouble Pin
David Crow5-Jan-06 7:55
David Crow5-Jan-06 7:55 
GeneralRe: CFtpConnection trouble Pin
Anacreon5-Jan-06 8:01
Anacreon5-Jan-06 8:01 
GeneralRe: CFtpConnection trouble Pin
David Crow5-Jan-06 8:10
David Crow5-Jan-06 8:10 
AnswerRe: CFtpConnection trouble Pin
Office Lineman5-Jan-06 8:14
Office Lineman5-Jan-06 8:14 
GeneralRe: CFtpConnection trouble Pin
Anacreon5-Jan-06 8:27
Anacreon5-Jan-06 8:27 
AnswerRe: CFtpConnection trouble Pin
Anacreon6-Jan-06 3:53
Anacreon6-Jan-06 3:53 

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.