Click here to Skip to main content
15,905,785 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CEditView operation rediculously Slows down in Windows 7 Pin
Vijjuuu.10-Nov-11 6:28
Vijjuuu.10-Nov-11 6:28 
AnswerRe: CEditView operation rediculously Slows down in Windows 7 Pin
David Crow10-Nov-11 2:46
David Crow10-Nov-11 2:46 
GeneralRe: CEditView operation rediculously Slows down in Windows 7 Pin
Vijjuuu.10-Nov-11 4:59
Vijjuuu.10-Nov-11 4:59 
SuggestionRe: CEditView operation rediculously Slows down in Windows 7 Pin
David Crow10-Nov-11 5:05
David Crow10-Nov-11 5:05 
GeneralRe: CEditView operation rediculously Slows down in Windows 7 Pin
Vijjuuu.10-Nov-11 5:08
Vijjuuu.10-Nov-11 5:08 
QuestionHow to repeat call to MapViewOfFile with a different range on a file, to write bigger buffer.? Pin
G Haranadh9-Nov-11 17:52
G Haranadh9-Nov-11 17:52 
AnswerRe: How to repeat call to MapViewOfFile with a different range on a file, to write bigger buffer.? Pin
peterchen9-Nov-11 22:03
peterchen9-Nov-11 22:03 
QuestionRe: How to repeat call to MapViewOfFile with a different range on a file, to write bigger buffer.? Pin
G Haranadh14-Nov-11 0:11
G Haranadh14-Nov-11 0:11 
Thanks for your reply.
Hi I tried the same way, and changed approach. Added for loop, and used getsysteminfo and assigned the granularity at unitsize place. But first time the mapview was success and memory copy also success.
In second iteration it is just failing.
modified code as follows...

C++
	GetSystemInfo(&systemInfo);
	dwGranularity = systemInfo.dwAllocationGranularity;
....
	for( int n = 0; n < nCount; ++n )
	{
		if(n+1 == nCount)
			dwLength = lBuffSize - n*dwGranularity;

		// Map  view of a file mapping into the address space of a calling process.
		pViewMMFFile = MapViewOfFile( hFileMMF,
					FILE_MAP_WRITE,
					dwOffsetStart,
					dwOffsetStart + dwGranularity,
					dwGranularity);
...

Granularity is getting as 65536, and the output of GetLastError is 5.(AccessDenied).

Nice talking to you. Blush | :O
If you judge people, you have no time to love them. -- Mother Teresa


modified 15-Nov-11 3:37am.

GeneralRe: How to repeat call to MapViewOfFile with a different range on a file, to write bigger buffer.? Pin
peterchen14-Nov-11 20:50
peterchen14-Nov-11 20:50 
QuestionRe: How to repeat call to MapViewOfFile with a different range on a file, to write bigger buffer.? Pin
G Haranadh14-Nov-11 21:45
G Haranadh14-Nov-11 21:45 
Questionwin32 Listbox 101, Get Selected Value Pin
jkirkerx9-Nov-11 15:15
professionaljkirkerx9-Nov-11 15:15 
QuestionRe: win32 Listbox 101, Get Selected Value Pin
David Crow9-Nov-11 17:28
David Crow9-Nov-11 17:28 
AnswerRe: win32 Listbox 101, Get Selected Value Pin
jkirkerx10-Nov-11 5:27
professionaljkirkerx10-Nov-11 5:27 
AnswerRe: win32 Listbox 101, Get Selected Value Pin
jkirkerx10-Nov-11 5:45
professionaljkirkerx10-Nov-11 5:45 
GeneralRe: win32 Listbox 101, Get Selected Value Pin
David Crow10-Nov-11 5:50
David Crow10-Nov-11 5:50 
GeneralRe: win32 Listbox 101, Get Selected Value Pin
jkirkerx10-Nov-11 6:43
professionaljkirkerx10-Nov-11 6:43 
QuestionMFC new should throw Pin
bob169729-Nov-11 11:42
bob169729-Nov-11 11:42 
AnswerRe: MFC new should throw Pin
Chris Losinger9-Nov-11 15:07
professionalChris Losinger9-Nov-11 15:07 
AnswerRe: MFC new should throw Pin
Richard MacCutchan9-Nov-11 22:33
mveRichard MacCutchan9-Nov-11 22:33 
GeneralRe: MFC new should throw Pin
bob1697210-Nov-11 3:49
bob1697210-Nov-11 3:49 
GeneralRe: MFC new should throw Pin
Richard MacCutchan10-Nov-11 6:21
mveRichard MacCutchan10-Nov-11 6:21 
GeneralRe: MFC new should throw Pin
bob1697210-Nov-11 7:28
bob1697210-Nov-11 7:28 
GeneralRe: MFC new should throw Pin
Richard MacCutchan10-Nov-11 11:27
mveRichard MacCutchan10-Nov-11 11:27 
GeneralRe: MFC new should throw Pin
bob1697210-Nov-11 15:56
bob1697210-Nov-11 15:56 
AnswerRe: MFC new should throw Pin
Chuck O'Toole10-Nov-11 16:41
Chuck O'Toole10-Nov-11 16:41 

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.