Click here to Skip to main content
15,902,275 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCrashes in release mode but not in debug Pin
RedSonja2-Dec-08 3:59
RedSonja2-Dec-08 3:59 
AnswerRe: Crashes in release mode but not in debug Pin
Alan Balkany2-Dec-08 4:08
Alan Balkany2-Dec-08 4:08 
AnswerRe: Crashes in release mode but not in debug Pin
Hamid_RT2-Dec-08 4:08
Hamid_RT2-Dec-08 4:08 
AnswerRe: Crashes in release mode but not in debug Pin
bob169722-Dec-08 7:33
bob169722-Dec-08 7:33 
AnswerRe: Crashes in release mode but not in debug Pin
RedSonja3-Dec-08 1:24
RedSonja3-Dec-08 1:24 
QuestionHow to access servlet in VC++? Pin
AnithaSubramani2-Dec-08 2:10
AnithaSubramani2-Dec-08 2:10 
GeneralRe: How to access servlet in VC++? Pin
led mike2-Dec-08 4:15
led mike2-Dec-08 4:15 
Questionusing select with filehandles (not sockets) under windows Pin
sevenH2-Dec-08 2:02
sevenH2-Dec-08 2:02 
Hi,

I wonder if it´s possible to use the function "select" with serial ports. I think under linux it´s possible but under Windows select returns -1 and WSAGetLastError gives me 10038 (Socket operation on nonsocket. An operation was attempted on something that is not a socket. Either the socket handle parameter did not reference a valid socket, or for select, a member of an fd_set was not valid.)

pseudo code:

HANDLE h = CreateFile( COM1 )
...
FD_SET( (int)h, readfds)

select( 0, readfds, NULL, NULL, timeout )

read the data from serial port



I think the problem is the cast of the HANDLE h to int...

Another possibilty would be the function WaitCommMask but I need a timeout-feature. Has anyone an idea if select can be used with serial ports (under Win)?

Thanks in advance!

Sebastian
QuestionRe: using select with filehandles (not sockets) under windows Pin
led mike2-Dec-08 4:30
led mike2-Dec-08 4:30 
AnswerRe: using select with filehandles (not sockets) under windows Pin
JudyL_MD2-Dec-08 4:31
JudyL_MD2-Dec-08 4:31 
Questionsomething for comipler.. Pin
tasumisra2-Dec-08 1:47
tasumisra2-Dec-08 1:47 
AnswerRe: something for comipler.. Pin
gayatri.neelema2-Dec-08 1:50
gayatri.neelema2-Dec-08 1:50 
GeneralRe: something for comipler.. Pin
tasumisra2-Dec-08 1:56
tasumisra2-Dec-08 1:56 
AnswerRe: something for comipler.. Pin
Jijo.Raj2-Dec-08 2:20
Jijo.Raj2-Dec-08 2:20 
GeneralRe: something for comipler.. Pin
tasumisra2-Dec-08 2:24
tasumisra2-Dec-08 2:24 
GeneralRe: something for comipler.. Pin
Jijo.Raj2-Dec-08 2:42
Jijo.Raj2-Dec-08 2:42 
AnswerRe: something for comipler.. Pin
CPallini2-Dec-08 2:39
mveCPallini2-Dec-08 2:39 
AnswerRe: something for comipler.. Pin
David Crow2-Dec-08 3:17
David Crow2-Dec-08 3:17 
GeneralRe: something for comipler.. Pin
tasumisra2-Dec-08 4:07
tasumisra2-Dec-08 4:07 
QuestionRe: something for comipler.. Pin
David Crow2-Dec-08 4:16
David Crow2-Dec-08 4:16 
JokeRe: something for comipler.. Pin
CPallini2-Dec-08 6:00
mveCPallini2-Dec-08 6:00 
AnswerRe: something for comipler.. Pin
tasumisra3-Dec-08 17:40
tasumisra3-Dec-08 17:40 
Questioninvalid registry entries Pin
gayatri.neelema2-Dec-08 1:44
gayatri.neelema2-Dec-08 1:44 
AnswerRe: invalid registry entries Pin
Rajesh R Subramanian2-Dec-08 1:51
professionalRajesh R Subramanian2-Dec-08 1:51 
GeneralRe: invalid registry entries Pin
gayatri.neelema2-Dec-08 1:56
gayatri.neelema2-Dec-08 1:56 

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.