Reading data from COM PORT in asynchronous mode.

I am using VC++ 6.0. I want a application to read data from COM port
whenever it comes, immediately I want to write in text file. It should work 24 hours. I copied source code from MSDN Library:- Serial Sample: Communications
Demonstration,The COMM sample (TTY) demonstrates using the Win32
communications functions while maintaining a common code base with
16-bit Windows code

I modified as my requirement. If I run it, it is reading and writing.
Suppose if I minimize the window or open some other application like word
it is not reading and writing. What is problem? How to over come from this?
Is it possible to write a application to run in background?


murugaiahAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Vinayak KumbarSr Program ManagerCommented:
Hi,

here is the sample code that spies COM1 and COM2 running in background. Take a look at it.

http://www.sysinternals.com/portmon.htm 

Hope that helps.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.