Click here to Skip to main content
15,917,062 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: interprocess communication between flash and visual c++ Pin
Nishad S26-Feb-09 1:58
Nishad S26-Feb-09 1:58 
AnswerRe: interprocess communication between flash and visual c++ Pin
lebaer26-Feb-09 19:22
lebaer26-Feb-09 19:22 
GeneralRe: interprocess communication between flash and visual c++ Pin
JackPuppy28-Feb-09 8:08
JackPuppy28-Feb-09 8:08 
QuestionLarge file handling using MFC Pin
Vikas K.26-Feb-09 1:03
Vikas K.26-Feb-09 1:03 
AnswerRe: Large file handling using MFC Pin
Vikas K.26-Feb-09 1:04
Vikas K.26-Feb-09 1:04 
AnswerRe: Large file handling using MFC Pin
«_Superman_»26-Feb-09 1:54
professional«_Superman_»26-Feb-09 1:54 
AnswerRe: Large file handling using MFC Pin
Nishad S26-Feb-09 2:06
Nishad S26-Feb-09 2:06 
AnswerRe: Large file handling using MFC Pin
Stuart Dootson26-Feb-09 4:02
professionalStuart Dootson26-Feb-09 4:02 
I've had pretty good performance with memory mapped files (I've only used files up to about 1GB). What you need to do is create a file mapping with CreateFileMapping and then use MapViewOfFile to map segments of the file.

I worked with 16MB windows on the file, which actually meant I mapped 32MB at a time, 16MB before and after the nominal file offset, so that negative random accesses from the file offset didn't fault over into the previous window - something like the diagram below:

+----------------+----------------+
|                |                |
|                |                |
|                |                |
+----------------+----------------+
^                ^                ^
|                |                |
-16MB        Requested        +16MB
          offset into file


I packaged this up into a MemoryMappedFile class which had an associated randomly-access iterator class (like a vector has an iterator). The memory mapped file could only be accessed using the iterator, which was exposed using 'begin' and 'end' methods of the memory mapped file class.

On a reasonable workstation (2.4GHz Core 2 Duo), I could traverse the file at around 100MB/second when counting data packets whose size was roughly 200 bytes.

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

GeneralRe: Large file handling using MFC Pin
Vikas K.3-Mar-09 19:22
Vikas K.3-Mar-09 19:22 
Questionwin 32 dll Pin
hrishiS26-Feb-09 0:10
hrishiS26-Feb-09 0:10 
AnswerRe: win 32 dll Pin
CPallini26-Feb-09 0:14
mveCPallini26-Feb-09 0:14 
GeneralRe: win 32 dll Pin
hrishiS26-Feb-09 0:18
hrishiS26-Feb-09 0:18 
GeneralRe: win 32 dll Pin
CPallini26-Feb-09 1:02
mveCPallini26-Feb-09 1:02 
GeneralRe: win 32 dll Pin
Iain Clarke, Warrior Programmer26-Feb-09 1:05
Iain Clarke, Warrior Programmer26-Feb-09 1:05 
JokeRe: win 32 dll Pin
Hamid_RT26-Feb-09 6:15
Hamid_RT26-Feb-09 6:15 
GeneralRe: win 32 dll Pin
Iain Clarke, Warrior Programmer26-Feb-09 6:39
Iain Clarke, Warrior Programmer26-Feb-09 6:39 
Questionadd-in for outlook express Pin
nikhil3125-Feb-09 23:44
nikhil3125-Feb-09 23:44 
AnswerRe: add-in for outlook express Pin
Vikas K.26-Feb-09 1:07
Vikas K.26-Feb-09 1:07 
AnswerRe: add-in for outlook express Pin
Crazy Kiya re26-Feb-09 17:36
Crazy Kiya re26-Feb-09 17:36 
Questionsetting background color of the dialog Pin
Member 163194525-Feb-09 23:08
Member 163194525-Feb-09 23:08 
JokeRe: setting background color of the dialog Pin
CPallini25-Feb-09 23:19
mveCPallini25-Feb-09 23:19 
JokeRe: setting background color of the dialog Pin
Hamid_RT26-Feb-09 6:11
Hamid_RT26-Feb-09 6:11 
AnswerRe: setting background color of the dialog Pin
«_Superman_»25-Feb-09 23:22
professional«_Superman_»25-Feb-09 23:22 
AnswerRe: setting background color of the dialog Pin
Nishad S26-Feb-09 0:41
Nishad S26-Feb-09 0:41 
AnswerRe: setting background color of the dialog Pin
Code-o-mat26-Feb-09 1:11
Code-o-mat26-Feb-09 1:11 

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.