Click here to Skip to main content
15,890,506 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Shutting Down Remote PC Pin
GauranG Shah28-Sep-07 3:26
GauranG Shah28-Sep-07 3:26 
QuestionRe: Shutting Down Remote PC Pin
David Crow28-Sep-07 3:47
David Crow28-Sep-07 3:47 
AnswerRe: Shutting Down Remote PC Pin
GauranG Shah28-Sep-07 4:02
GauranG Shah28-Sep-07 4:02 
QuestionRe: Shutting Down Remote PC Pin
David Crow28-Sep-07 4:17
David Crow28-Sep-07 4:17 
QuestionDLGTemplate MapDialogRect() problem Pin
prithaa26-Sep-07 21:55
prithaa26-Sep-07 21:55 
AnswerRe: DLGTemplate MapDialogRect() problem Pin
Jason Teagle26-Sep-07 22:38
Jason Teagle26-Sep-07 22:38 
AnswerRe: DLGTemplate MapDialogRect() problem Pin
Mark Salsbery27-Sep-07 5:43
Mark Salsbery27-Sep-07 5:43 
QuestionLPT Listener using thread Pin
TPN26-Sep-07 21:05
TPN26-Sep-07 21:05 
Hi All,

I am writing an application which checks LPT signal for doing something. My code looks like:

void LPTThread()
{
while (1)
{
if (ReadLPT(pinX) = signal level Y) {do something;}
}
//pin is one of pin of LPT port
//signal level of each pin is 0 or 1 at a time
}

This loop cause the CPU usage always 100%, is there any way to prevent it? Can we catch this change by any event handler, it mean when a change occurs at LPT or, this event handler will be called?

Thank you for your help.



AnswerRe: LPT Listener using thread Pin
Cedric Moonen26-Sep-07 22:19
Cedric Moonen26-Sep-07 22:19 
GeneralRe: LPT Listener using thread Pin
TPN27-Sep-07 0:44
TPN27-Sep-07 0:44 
GeneralRe: LPT Listener using thread Pin
Cedric Moonen27-Sep-07 4:34
Cedric Moonen27-Sep-07 4:34 
GeneralRe: LPT Listener using thread Pin
TPN27-Sep-07 19:53
TPN27-Sep-07 19:53 
AnswerRe: LPT Listener using thread Pin
Rahul Vaishnav27-Sep-07 1:13
Rahul Vaishnav27-Sep-07 1:13 
GeneralRe: LPT Listener using thread Pin
TPN27-Sep-07 19:57
TPN27-Sep-07 19:57 
GeneralRe: LPT Listener using thread Pin
JudyL_MD28-Sep-07 1:59
JudyL_MD28-Sep-07 1:59 
GeneralRe: LPT Listener using thread Pin
JudyL_MD28-Sep-07 2:03
JudyL_MD28-Sep-07 2:03 
AnswerRe: LPT Listener using thread Pin
David Crow27-Sep-07 3:30
David Crow27-Sep-07 3:30 
AnswerRe: LPT Listener using thread Pin
Rahul Vaishnav2-Oct-07 20:07
Rahul Vaishnav2-Oct-07 20:07 
Questiona pointer Pin
youbo26-Sep-07 21:01
youbo26-Sep-07 21:01 
AnswerRe: a pointer Pin
youbo26-Sep-07 21:31
youbo26-Sep-07 21:31 
GeneralRe: a pointer Pin
toxcct26-Sep-07 21:39
toxcct26-Sep-07 21:39 
AnswerRe: a pointer Pin
toxcct26-Sep-07 21:35
toxcct26-Sep-07 21:35 
GeneralRe: a pointer Pin
John R. Shaw26-Sep-07 21:52
John R. Shaw26-Sep-07 21:52 
GeneralRe: a pointer Pin
toxcct26-Sep-07 21:54
toxcct26-Sep-07 21:54 
GeneralRe: a pointer Pin
John R. Shaw26-Sep-07 23:12
John R. Shaw26-Sep-07 23:12 

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.