Click here to Skip to main content
15,894,405 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Seraching criteria Pin
vijay_aroli13-Dec-07 19:17
vijay_aroli13-Dec-07 19:17 
GeneralConsole application and MFC-DLL application Pin
CodingLover13-Dec-07 17:15
CodingLover13-Dec-07 17:15 
GeneralDetecting internet connection using InternetGetConnectedState in VC++ Pin
Kogee San13-Dec-07 16:58
Kogee San13-Dec-07 16:58 
GeneralRe: Detecting internet connection using InternetGetConnectedState in VC++[Modified] Pin
Naveen13-Dec-07 17:11
Naveen13-Dec-07 17:11 
GeneralRe: Detecting internet connection using InternetGetConnectedState in VC++[Modified] Pin
Kogee San13-Dec-07 17:19
Kogee San13-Dec-07 17:19 
GeneralRe: Detecting internet connection using InternetGetConnectedState in VC++[Modified] Pin
Naveen13-Dec-07 18:34
Naveen13-Dec-07 18:34 
GeneralRe: Detecting internet connection using InternetGetConnectedState in VC++[Modified] Pin
David Crow14-Dec-07 3:40
David Crow14-Dec-07 3:40 
GeneralRe: Detecting internet connection using InternetGetConnectedState in VC++[Modified] Pin
Kogee San16-Dec-07 14:28
Kogee San16-Dec-07 14:28 
GeneralTemplate Pin
james_dixon_200813-Dec-07 15:23
james_dixon_200813-Dec-07 15:23 
GeneralRe: Template Pin
Mark Salsbery13-Dec-07 16:26
Mark Salsbery13-Dec-07 16:26 
GeneralRe: Template Pin
james_dixon_200813-Dec-07 17:19
james_dixon_200813-Dec-07 17:19 
GeneralRe: Template Pin
Mark Salsbery13-Dec-07 18:50
Mark Salsbery13-Dec-07 18:50 
GeneralRe: Template Pin
Nibu babu thomas13-Dec-07 16:32
Nibu babu thomas13-Dec-07 16:32 
GeneralCheck for input from console in C++ Pin
dabs13-Dec-07 14:45
dabs13-Dec-07 14:45 
GeneralRe: Check for input from console in C++ Pin
Naveen13-Dec-07 16:12
Naveen13-Dec-07 16:12 
GeneralRe: Check for input from console in C++ Pin
dabs14-Dec-07 3:28
dabs14-Dec-07 3:28 
GeneralCString into string Pin
CodingLover13-Dec-07 14:27
CodingLover13-Dec-07 14:27 
GeneralRe: CString into string Pin
Mark Salsbery13-Dec-07 15:16
Mark Salsbery13-Dec-07 15:16 
GeneralRe: CString into string Pin
CodingLover13-Dec-07 15:34
CodingLover13-Dec-07 15:34 
GeneralRe: CString into string [modified] Pin
Mark Salsbery13-Dec-07 16:19
Mark Salsbery13-Dec-07 16:19 
GeneralRe: CString into string Pin
CodingLover13-Dec-07 17:02
CodingLover13-Dec-07 17:02 
QuestionReadFile() hang Pin
MMM Computers13-Dec-07 12:40
MMM Computers13-Dec-07 12:40 
I have two applications running on one computer. The first app imports data from elsewhere, parses it, and writes out several files using CreateFile and WriteFile to a directory. The second app reads each of these files from the first app using FindFirstFile, CreateFile and ReadFile, and does further processing.

The data written to these files is fairly big in each case (~8 MB), so each file write can take 2-3 seconds. Also, each batch of files can potentially be large (say 100 or more). So, while the first app is busy writing each file, the second app should be able to take the first file it finds (via FindFirstFile), and open and read it. The problem is, ReadFile doesn't return for that first file until the first app has written out ALL of its files. So this ReadFile call in essence hangs for a few minutes, possibly causing havoc elsewhere in the app.

I'm closing my file handles properly in the first app (at least I think I am), so there shouldn't be any reason for ReadFile to wait on file writes that are on different files in the same directory. Is there some "feature" in the Win32 file API that would explain this behavior? I'm writing the files using FILE_FLAG_SEQUENTIAL_SCAN and sharing disabled, if it matters; I've also played with FILE_FLAG_NO_BUFFERING to attempt to improve performance.
GeneralRe: ReadFile() hang Pin
Mark Salsbery13-Dec-07 13:00
Mark Salsbery13-Dec-07 13:00 
QuestionRe: ReadFile() hang Pin
David Crow14-Dec-07 3:45
David Crow14-Dec-07 3:45 
GeneralRe: ReadFile() hang Pin
KarstenK14-Dec-07 4:09
mveKarstenK14-Dec-07 4:09 

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.