Click here to Skip to main content
15,898,035 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Locking keyboard and mouse of a computer in the same LAN using C++ or Java Pin
Sara_fjr4-Feb-07 10:32
Sara_fjr4-Feb-07 10:32 
GeneralRe: Locking keyboard and mouse of a computer in the same LAN using C++ or Java Pin
Waldermort4-Feb-07 11:26
Waldermort4-Feb-07 11:26 
GeneralRe: Locking keyboard and mouse of a computer in the same LAN using C++ or Java Pin
Sara_fjr4-Feb-07 11:44
Sara_fjr4-Feb-07 11:44 
GeneralRe: Locking keyboard and mouse of a computer in the same LAN using C++ or Java Pin
Mark Salsbery4-Feb-07 11:54
Mark Salsbery4-Feb-07 11:54 
GeneralRe: Locking keyboard and mouse of a computer in the same LAN using C++ or Java Pin
Sara_fjr4-Feb-07 12:12
Sara_fjr4-Feb-07 12:12 
GeneralRe: Locking keyboard and mouse of a computer in the same LAN using C++ or Java Pin
Mark Salsbery4-Feb-07 12:22
Mark Salsbery4-Feb-07 12:22 
GeneralRe: Locking keyboard and mouse of a computer in the same LAN using C++ or Java Pin
Sara_fjr4-Feb-07 12:44
Sara_fjr4-Feb-07 12:44 
QuestionReadDirectoryChangesW() in threads [modified] Pin
Klempie4-Feb-07 2:31
Klempie4-Feb-07 2:31 
I am having a problem with the block on ReadDirectoryChangesW operating in two threads.

Each thread is watching a separate directory. For illustration, Directory1 has a new file written to it periodically, say every 30 seconds. E.g. 1.txt, 2.txt,...,[n-1].txt, [n].txt. In Directory2, there is a single file, sequenceinfo.txt, which has new data written to it on an incremental basis where each line is some reference to each file being written in Directory1. For example,

1: 1.txt ref info
2: 2.txt ref info
...
[n-l]: [n-1].txt ref info
[n]: [n].txt ref info

So basically, ReadDirectoryChangesW watches Directory1 for new files being written sequentially. Each time a new file is written, the file is opened and the data funnelled into a database. The thread watching Directory2 watches for file size changes, seeks to the last line, and funnels the last line into the database being matched to the relevant file info read from Directory1.

The problem I am experiencing is that the longer the watching continues, the longer it takes for the events to fire. There seems to a constant deceleration in the time it takes for ReadDirectoryChangesW to unblock. Is there perhaps a buffer that needs flushing somewhere ot something?

Any ideas or suggestions will be much appreciated.


-- modified at 8:39 Sunday 4th February, 2007
AnswerRe: ReadDirectoryChangesW() in threads Pin
Waldermort4-Feb-07 6:36
Waldermort4-Feb-07 6:36 
GeneralRe: ReadDirectoryChangesW() in threads Pin
Klempie4-Feb-07 7:18
Klempie4-Feb-07 7:18 
GeneralRe: ReadDirectoryChangesW() in threads Pin
Waldermort4-Feb-07 7:55
Waldermort4-Feb-07 7:55 
GeneralRe: ReadDirectoryChangesW() in threads Pin
Klempie4-Feb-07 9:21
Klempie4-Feb-07 9:21 
GeneralRe: ReadDirectoryChangesW() in threads Pin
Waldermort4-Feb-07 10:00
Waldermort4-Feb-07 10:00 
Questionmainboard or bios serial number Pin
hameduser3-Feb-07 19:48
hameduser3-Feb-07 19:48 
AnswerRe: mainboard or bios serial number Pin
Hamid_RT3-Feb-07 23:48
Hamid_RT3-Feb-07 23:48 
QuestionInteractive service in windows Pin
rana743-Feb-07 18:46
rana743-Feb-07 18:46 
AnswerRe: Interactive service in windows Pin
ThatsAlok6-Feb-07 20:20
ThatsAlok6-Feb-07 20:20 
QuestionIncrementing and enum? Pin
Stick^3-Feb-07 15:58
Stick^3-Feb-07 15:58 
AnswerRe: Incrementing and enum? Pin
Michael Dunn3-Feb-07 19:17
sitebuilderMichael Dunn3-Feb-07 19:17 
QuestionDrag and Drop file onto Microsoft Word Pin
mahesh_patil1663-Feb-07 15:54
mahesh_patil1663-Feb-07 15:54 
QuestionOracleDataReader undeclared identifier error Pin
Reveille3-Feb-07 15:43
Reveille3-Feb-07 15:43 
AnswerRe: OracleDataReader undeclared identifier error Pin
Hamid_RT4-Feb-07 0:14
Hamid_RT4-Feb-07 0:14 
QuestionRandom Float number generator Pin
Ming Luo3-Feb-07 10:10
Ming Luo3-Feb-07 10:10 
AnswerRe: Random Float number generator Pin
Chris Losinger3-Feb-07 11:14
professionalChris Losinger3-Feb-07 11:14 
QuestionLNK2019 Error!!! Pin
arbster13-Feb-07 9:27
arbster13-Feb-07 9:27 

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.