Click here to Skip to main content
16,004,529 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionshort and long worker thread VS sincronization and global efficiency Pin
Russell'25-May-10 4:44
Russell'25-May-10 4:44 
AnswerRe: short and long worker thread VS sincronization and global efficiency Pin
Russell'25-May-10 4:49
Russell'25-May-10 4:49 
AnswerRe: short and long worker thread VS sincronization and global efficiency Pin
Aescleal25-May-10 4:52
Aescleal25-May-10 4:52 
GeneralRe: short and long worker thread VS sincronization and global efficiency Pin
Russell'25-May-10 5:59
Russell'25-May-10 5:59 
GeneralRe: short and long worker thread VS sincronization and global efficiency Pin
Aescleal25-May-10 8:26
Aescleal25-May-10 8:26 
GeneralRe: short and long worker thread VS sincronization and global efficiency Pin
Russell'25-May-10 21:33
Russell'25-May-10 21:33 
AnswerRe: short and long worker thread VS sincronization and global efficiency Pin
David Crow25-May-10 7:26
David Crow25-May-10 7:26 
Questionabout Memory-Mapped Files do with the big file. Pin
lxlenovostar25-May-10 3:23
lxlenovostar25-May-10 3:23 
i have wirtten a demo, which i want to chip the big file into the small ones by Memory-Mapped Files.
the main code:

HANDLE hFile = CreateFile(filePathName, GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
HANDLE hFileMap = CreateFileMapping(hFile, NULL, PAGE_READWRITE, 0, 0, NULL);
pvFile = MapViewOfFile(hFileMap, FILE_MAP_READ, 0, 0, dwCurPart);

HANDLE hNewFile = CreateFile(fileName, GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
HANDLE hNewFileMap = CreateFileMapping(hFile, NULL, PAGE_READWRITE, 0, dwCurPart, NULL);
PVOID pvNewFile = MapViewOfFile(hNewFileMap, FILE_MAP_WRITE, 0, 0, 0);



memcpy(pvNewFile, pvFile, dwCurPart);



i can get the new files,but the file don't get any content.i think the "memcpy();" can let the content
copy into the new files. thanks for your help.
AnswerRe: about Memory-Mapped Files do with the big file. [modified] Pin
«_Superman_»25-May-10 5:44
professional«_Superman_»25-May-10 5:44 
Question"Launch Now" is not working Pin
rahul.kulshreshtha25-May-10 1:10
rahul.kulshreshtha25-May-10 1:10 
AnswerRe: "Launch Now" is not working Pin
ThatsAlok25-May-10 1:51
ThatsAlok25-May-10 1:51 
GeneralRe: "Launch Now" is not working Pin
rahul.kulshreshtha25-May-10 2:46
rahul.kulshreshtha25-May-10 2:46 
AnswerRe: "Launch Now" is not working Pin
Aescleal25-May-10 2:58
Aescleal25-May-10 2:58 
GeneralRe: "Launch Now" is not working Pin
rahul.kulshreshtha25-May-10 3:45
rahul.kulshreshtha25-May-10 3:45 
QuestionRe: "Launch Now" is not working [modified] Pin
rahul.kulshreshtha25-May-10 21:10
rahul.kulshreshtha25-May-10 21:10 
QuestionListCtrl SetItemText Pin
Sakhalean25-May-10 0:07
Sakhalean25-May-10 0:07 
QuestionRe: ListCtrl SetItemText Pin
CPallini25-May-10 0:41
mveCPallini25-May-10 0:41 
AnswerRe: ListCtrl SetItemText Pin
Sakhalean25-May-10 0:46
Sakhalean25-May-10 0:46 
QuestionRe: ListCtrl SetItemText Pin
CPallini25-May-10 0:53
mveCPallini25-May-10 0:53 
AnswerRe: ListCtrl SetItemText Pin
Sakhalean25-May-10 1:01
Sakhalean25-May-10 1:01 
AnswerRe: ListCtrl SetItemText Pin
Sakhalean25-May-10 1:42
Sakhalean25-May-10 1:42 
GeneralRe: ListCtrl SetItemText Pin
CPallini25-May-10 1:44
mveCPallini25-May-10 1:44 
GeneralRe: ListCtrl SetItemText Pin
Sakhalean25-May-10 1:58
Sakhalean25-May-10 1:58 
GeneralRe: ListCtrl SetItemText Pin
Sakhalean25-May-10 2:23
Sakhalean25-May-10 2:23 
GeneralRe: ListCtrl SetItemText Pin
josda100025-May-10 3:13
josda100025-May-10 3:13 

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.