Click here to Skip to main content
12,552,615 members (60,699 online)
Rate this:
Please Sign up or sign in to vote.
See more: serialport
I have a problem.

My serial acquistion of data is losing few bytes when sound is played in the background.This happens in windows 7.

I use ReadFile to read the data and it reads data of current packet and also first bytes of next packet

so I assume few byte are lost from current packet.

any idea to prevent this ?
Posted 28-Oct-12 2:28am
Sergey Alexandrovich Kryukov 28-Oct-12 10:43am
Not believable; not enough information.

Obviously, it's impossible to give any answer due to lack of important information. Just some advice:

Check up your observations -- they can be wrong. For a human being, it's typical to mistakenly recognize a random coincidence as a correlation, a trait fixed by the evolution.

If, by a rare chance, there is a correlation, it should not do anything with the nature of "distracting action": it could be sound or something else. To analyze such possibility, find out if there is race condition in your code:

If you still need help, you need to reproduce this problem on a very simple but complete code sample (not your full code). It already can help you the solution. If not, post the sample, using "Improve question".


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.161021.1 | Last Updated 28 Oct 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100