Thanks for your reply. My problem is the application must be sure that when LPT signal change, the application will handle it immediately, so that I cannot let my thread sleeps.
TPN
Posts
-
LPT Listener -
LPT Listener using threadThanks for your reply. But the problem is the thread cannot sleep every 400ms before checking LPT port. The application must ensure that, where the LPT signal changes, it will immediately handle that.
-
LPT Listener using threadThanks for you reply. I use Inp32 function which is in the inpout32.dll library - a very common used.
-
LPT Listener using threadDear Moonen, Thank for your answer. But I need to clarify that ReadLPT is just only my pseudo code - the code that is responsible for reading LPT port signal/information. Thanks.
-
LPT ListenerHi 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 pins 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. (I have already put this message in the C++ forum first but then I find this should be put in this forum)
-
LPT Listener using threadHi 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.
-
Change system datetime using ASPHi everyone, Could you please show me how to change server system datetime using ASP code? Thanks in advance.
-
ON_NOTIFY_RANGE problem!Thanks you for your help! I don't want to use ON_NOTIFY because there are many controls and this will cause many ON_NOTIFY macro. I try with ON_CONTROL_RANGE and it work fine. But I am still not clear the difference between ON_NOTIFY_RANGE and ON_CONTROL_RANGE... Once again, thank you.
-
ON_NOTIFY_RANGE problem!Hi all, I design a form with about 50 combo boxes and I want to handle the notification message CBN_SELCHANGE of those combo boxes in a same routine, so I use the macro ON_NOTIFY_RANGE(CBN_SELCHANGE, IDC_COMBO1, IDC_COMBO50, MyMsgHandler). But it seems that nothing happens. Am I wrong? Pls help me to solve this. Thanks in advance.
-
ThreadingAs I know, there is no concept said that there is parent thread and child thread, so you must close each thread explicility. Thank you.
-
Draw selected image itemI try to develop a listcontrol - like (icon mode), my problem now is I don't know how to draw a selected item as normal list control, selected item in list control (icon mode) looks darkener than normal item. An item contain a bitmap and a text string as normal list control item. Could you please help me on this. Thank you in advance.
-
How to perform something after dialog is initialized and displayed.Thank you DavidCrow. I think your sugesstion is better than using a timer, because using a timer looks manually and not reliable. But I don't think that Windows doesn't support this situation. Once again, thank you.
-
How to perform something after dialog is initialized and displayed.Thank you, Sameer_Thakur. I just only want to start the file transfer operation automatically after the dialog box is displayed (exactly after OnInitDialog() called) without clicking any button, without any user action. Thank you.
-
How to perform something after dialog is initialized and displayed.Hi all, I want to perform file copy operations and display a progress-bar after my dialog has just been initialized and displayed with out any user action such as clicking on a button... However I cannot put that codes in the OnInitDialog() virtual function of that dialog. If I do that, the dialog will appear after all operations are ended. Please help to show me how to do that. Thanks in advance.
-
Embedding an application in an applicationThanks for your reply. I would like to clarify that the first application is mine and I write it but the second application that I need to call is not mine, it is any other existing application...
-
Embedding an application in an applicationHi everyone, There is a need of embedding an application in an application, is there anyway? I mean I write an application and then I call CreateProcess to start a new application, all that I need is the new application will run in the window of my application. :confused: Thanks in advance.
-
Backgound file operation monitoringHi every body, I now try to develop an application that can help the administrator monitor user file operations such as copy, delete, rename... but I don't know how and where to start. Could you please show me how to. Thank you for your kind help.
-
String Comparison in MS SQLThat's great! Thanks all of you!
-
String Comparison in MS SQLAs you know, the =, like operators for string comparison in MS SQL are just for not-case sensitive string comparison. So my concern is how to compare two strings in case sensitive mode? Thank in advance!
-
Page re-submisionPlease help me on this: How to prevent re-submision when the page is refreshed without using redirection. I have 01 html page and 01 asp page. User input their information on html page and then submit to asp page for processing (save into database). The asp page will then display a "thank you" message. Sometimes user press "F5" key in this page and once again, asp page re-processes. I can redirect user to another page after processing, but cannot with earlier browser version. Thank you.