Click here to Skip to main content
15,891,905 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: C++ Compiler for Win XP Pro Pin
toxcct18-Jan-06 21:38
toxcct18-Jan-06 21:38 
GeneralRe: C++ Compiler for Win XP Pro Pin
Cedric Moonen18-Jan-06 21:42
Cedric Moonen18-Jan-06 21:42 
QuestionHow to generate a VC studio IDE like framework? Pin
LeeeNN18-Jan-06 15:00
LeeeNN18-Jan-06 15:00 
AnswerRe: How to generate a VC studio IDE like framework? Pin
Owner drawn18-Jan-06 19:58
Owner drawn18-Jan-06 19:58 
AnswerRe: How to generate a VC studio IDE like framework? Pin
vikas amin18-Jan-06 20:29
vikas amin18-Jan-06 20:29 
QuestionThread in MDI with WaitForSingleObject Pin
dipuks18-Jan-06 14:19
dipuks18-Jan-06 14:19 
AnswerRe: Thread in MDI with WaitForSingleObject Pin
Stephen Hewitt18-Jan-06 16:51
Stephen Hewitt18-Jan-06 16:51 
QuestionCreateFile producing ERROR_INVALID_PARAMETER Pin
KellyR18-Jan-06 11:12
KellyR18-Jan-06 11:12 
Hihi,

I'm trying to use CreateFile to check whether or not a certain device is connected to the serial port. Here's the code:

HANDLE testport = CreateFile("\\\\.\\COM1",
GENERIC_READ | GENERIC_WRITE,
0,
NULL,
OPEN_EXISTING,
0,
NULL );

It's failing, and GetLastError is returning 87, ERROR_INVALID_PARAMETER.

This portion of the code is for WinCE, for WinXP I use "COM1:" instead of "\\\\.\\COM1"

Anyone know what could be wrong?

The device is connected to the COM port, so the result should not be a failure.




Kelly Ryan
AnswerRe: CreateFile producing ERROR_INVALID_PARAMETER Pin
Graham Bradshaw18-Jan-06 13:45
Graham Bradshaw18-Jan-06 13:45 
GeneralRe: CreateFile producing ERROR_INVALID_PARAMETER Pin
KellyR19-Jan-06 3:49
KellyR19-Jan-06 3:49 
GeneralRe: CreateFile producing ERROR_INVALID_PARAMETER Pin
KellyR19-Jan-06 3:57
KellyR19-Jan-06 3:57 
GeneralRe: CreateFile producing ERROR_INVALID_PARAMETER Pin
KellyR19-Jan-06 4:17
KellyR19-Jan-06 4:17 
Questionreading file header Pin
pnpfriend18-Jan-06 11:02
pnpfriend18-Jan-06 11:02 
AnswerRe: reading file header Pin
Stephen Hewitt18-Jan-06 12:30
Stephen Hewitt18-Jan-06 12:30 
GeneralRe: reading file header Pin
pnpfriend19-Jan-06 5:01
pnpfriend19-Jan-06 5:01 
GeneralRe: reading file header Pin
Blake Miller19-Jan-06 8:40
Blake Miller19-Jan-06 8:40 
QuestionCSliderCtrl redraw when transparent Pin
Jerry Ott III18-Jan-06 10:55
Jerry Ott III18-Jan-06 10:55 
AnswerRe: CSliderCtrl redraw when transparent Pin
Owner drawn18-Jan-06 17:57
Owner drawn18-Jan-06 17:57 
GeneralRe: CSliderCtrl redraw when transparent Pin
Jerry Ott III19-Jan-06 4:06
Jerry Ott III19-Jan-06 4:06 
QuestionVisual C++ and C programming Pin
thierrypp18-Jan-06 7:41
thierrypp18-Jan-06 7:41 
AnswerRe: Visual C++ and C programming Pin
Tombo18-Jan-06 8:02
Tombo18-Jan-06 8:02 
GeneralRe: Visual C++ and C programming Pin
FarPointer18-Jan-06 8:17
FarPointer18-Jan-06 8:17 
QuestionRe: Visual C++ and C programming Pin
David Crow18-Jan-06 8:27
David Crow18-Jan-06 8:27 
AnswerRe: Visual C++ and C programming Pin
thierrypp18-Jan-06 8:32
thierrypp18-Jan-06 8:32 
QuestionRe: Visual C++ and C programming Pin
David Crow18-Jan-06 8:39
David Crow18-Jan-06 8:39 

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.