Click here to Skip to main content
15,904,494 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionActiveX call OLEDraw to draw Flash(swf) Pin
l_arrow14-Mar-09 18:28
l_arrow14-Mar-09 18:28 
QuestionSerial port read latency (SERIOUS - NEED HELP FAST!) Pin
PeniWize14-Mar-09 14:24
PeniWize14-Mar-09 14:24 
AnswerRe: Serial port read latency (SERIOUS - NEED HELP FAST!) Pin
Luc Pattyn14-Mar-09 15:21
sitebuilderLuc Pattyn14-Mar-09 15:21 
GeneralRe: Serial port read latency (SERIOUS - NEED HELP FAST!) Pin
PeniWize14-Mar-09 20:48
PeniWize14-Mar-09 20:48 
GeneralRe: Serial port read latency (SERIOUS - NEED HELP FAST!) Pin
Luc Pattyn15-Mar-09 4:49
sitebuilderLuc Pattyn15-Mar-09 4:49 
GeneralRe: Serial port read latency (SERIOUS - NEED HELP FAST!) Pin
PeniWize15-Mar-09 10:13
PeniWize15-Mar-09 10:13 
GeneralRe: Serial port read latency (SERIOUS - NEED HELP FAST!) Pin
CPallini14-Mar-09 23:59
mveCPallini14-Mar-09 23:59 
AnswerRe: Serial port read latency (SERIOUS - NEED HELP FAST!) Pin
Stuart Dootson14-Mar-09 19:24
professionalStuart Dootson14-Mar-09 19:24 
PeniWize wrote:
This solution seems to work fairly well for a few minutes and then suddenly ReadFile() begins returning the data after 100ms or more instead of the 10ms-15ms it was previously


That's probably because some other thread is getting a time-slice instead of your responder thread. You could try marking your thread[^] with a time-critical priority in an attempt that it isn't interrupted.

However, a WIndows XP embedded time-slice (aka thread quantum) is around 90-100 milliseconds[^] which means that if you let any thread have processing time instead of your, you will not be able to respond to events in that 90-100ms window. That is why Windows XP (even the embedded version) is not a real-time operating system - you cannot deterministically respond to events within a small time-frame.

You could try reducing the thread quantum[^], but you can't get it below about 30ms.

PeniWize wrote:
The protocol code is very large and complex so moving it into a driver is so undesirable that we will probably move to embedded Linux instead (if it’s necessary).


A driver was what I was going to suggest - but embedded Linux is a good option so long as it has a real-time kernel[^].

Good luck!

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

GeneralRe: Serial port read latency (SERIOUS - NEED HELP FAST!) Pin
PeniWize14-Mar-09 20:55
PeniWize14-Mar-09 20:55 
GeneralRe: Serial port read latency (SERIOUS - NEED HELP FAST!) Pin
Stuart Dootson14-Mar-09 23:19
professionalStuart Dootson14-Mar-09 23:19 
GeneralRe: Serial port read latency (SERIOUS - NEED HELP FAST!) Pin
grassrootkit14-Mar-09 23:29
grassrootkit14-Mar-09 23:29 
GeneralRe: Serial port read latency (SERIOUS - NEED HELP FAST!) Pin
Stuart Dootson14-Mar-09 23:44
professionalStuart Dootson14-Mar-09 23:44 
GeneralRe: Serial port read latency (SERIOUS - NEED HELP FAST!) Pin
PeniWize15-Mar-09 9:59
PeniWize15-Mar-09 9:59 
GeneralRe: Serial port read latency (SERIOUS - NEED HELP FAST!) Pin
grassrootkit14-Mar-09 20:56
grassrootkit14-Mar-09 20:56 
AnswerRe: Serial port read latency (SERIOUS - NEED HELP FAST!) Pin
Trollslayer15-Mar-09 4:06
mentorTrollslayer15-Mar-09 4:06 
AnswerRe: Serial port read latency (SERIOUS - NEED HELP FAST!) Pin
Joe Woodbury15-Mar-09 17:42
professionalJoe Woodbury15-Mar-09 17:42 
Questionwin32 programming - How to use multiple colors in the same line of text? Pin
Member 294013214-Mar-09 12:14
Member 294013214-Mar-09 12:14 
AnswerRe: win32 programming - How to use multiple colors in the same line of text? Pin
Stuart Dootson14-Mar-09 12:35
professionalStuart Dootson14-Mar-09 12:35 
AnswerRe: win32 programming - How to use multiple colors in the same line of text? Pin
Code-o-mat14-Mar-09 13:05
Code-o-mat14-Mar-09 13:05 
QuestionHow to disable minimzing? Pin
daavena14-Mar-09 11:37
daavena14-Mar-09 11:37 
AnswerRe: How to disable minimzing? Pin
hxhl9514-Mar-09 12:11
hxhl9514-Mar-09 12:11 
GeneralRe: How to disable minimzing? Pin
daavena14-Mar-09 12:32
daavena14-Mar-09 12:32 
GeneralRe: How to disable minimzing? Pin
«_Superman_»14-Mar-09 19:35
professional«_Superman_»14-Mar-09 19:35 
QuestionRe: How to disable minimzing? Pin
David Crow14-Mar-09 15:20
David Crow14-Mar-09 15:20 
AnswerRe: How to disable minimzing? Pin
daavena15-Mar-09 7:04
daavena15-Mar-09 7:04 

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.