Click here to Skip to main content
15,922,512 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Date Pin
Stefan Pedersen26-Mar-03 13:57
Stefan Pedersen26-Mar-03 13:57 
GeneralAvoiding memory problems Pin
trimtrom26-Mar-03 13:45
trimtrom26-Mar-03 13:45 
GeneralRe: Avoiding memory problems Pin
Stefan Pedersen26-Mar-03 14:01
Stefan Pedersen26-Mar-03 14:01 
GeneralRe: Avoiding memory problems Pin
John R. Shaw26-Mar-03 18:45
John R. Shaw26-Mar-03 18:45 
GeneralRe: Avoiding memory problems Pin
Member 13901626-Mar-03 21:34
Member 13901626-Mar-03 21:34 
GeneralRe: Avoiding memory problems Pin
John R. Shaw27-Mar-03 8:28
John R. Shaw27-Mar-03 8:28 
GeneralRe: Avoiding memory problems Pin
trimtrom27-Mar-03 9:55
trimtrom27-Mar-03 9:55 
GeneralRe: Avoiding memory problems Pin
John R. Shaw27-Mar-03 12:04
John R. Shaw27-Mar-03 12:04 
You do not download into a diskfile via virtual memory, you just copy the memory contents to a file in the normal way.

Actualy what I was refering to by virtual memory was GlobalAlloc() which uses virtual memory via the heap. Depending on the flags used, if the handle is not locked its memory contents may be swaped to the disk in the background untill needed (this is done by the system not you). When you need access to the memory contents you simply lock the handle and the system will swap it back into normal memory for you. This is all transparent from our perspective and most of us do not need to know how it works, it is enough that is does.

Note: You treat the pointer return my GlobalLock() the same as you would a pointer returned by malloc() or calloc().

If you want more control of the memory, and a head ack, you could use VirtualAlloc()/VirtualFree() directly instead.

Well I am off to go refesh my memory on all this virtual memory stuff, since I have not studied the subject in years.

Trust in the code Luke. Yea right!
GeneralWindowsMaker Pin
John R. Shaw26-Mar-03 13:24
John R. Shaw26-Mar-03 13:24 
GeneralRe: WindowsMaker Pin
Maximilien26-Mar-03 13:31
Maximilien26-Mar-03 13:31 
GeneralRe: WindowsMaker Pin
John R. Shaw28-Mar-03 17:50
John R. Shaw28-Mar-03 17:50 
QuestionMath Expressions? Pin
LiquidKnight26-Mar-03 11:27
LiquidKnight26-Mar-03 11:27 
AnswerRe: Math Expressions? Pin
Chris Losinger26-Mar-03 11:47
professionalChris Losinger26-Mar-03 11:47 
GeneralSuggestions needed regarding Application Developement Pin
Suryaanil26-Mar-03 11:27
sussSuryaanil26-Mar-03 11:27 
GeneralRe: Suggestions needed regarding Application Developement Pin
Stefan Pedersen26-Mar-03 14:04
Stefan Pedersen26-Mar-03 14:04 
Generaldeclaring DLL in VC++ Pin
Yank126-Mar-03 11:10
Yank126-Mar-03 11:10 
GeneralRe: declaring DLL in VC++ Pin
Dave Bryant26-Mar-03 11:22
Dave Bryant26-Mar-03 11:22 
GeneralRe: declaring DLL in VC++ Pin
Yank126-Mar-03 11:32
Yank126-Mar-03 11:32 
GeneralRe: declaring DLL in VC++ Pin
Dave Bryant26-Mar-03 12:00
Dave Bryant26-Mar-03 12:00 
GeneralMS Word Pin
Brian Delahunty26-Mar-03 10:14
Brian Delahunty26-Mar-03 10:14 
GeneralRe: MS Word Pin
François Gasnier26-Mar-03 10:37
François Gasnier26-Mar-03 10:37 
GeneralRe: MS Word Pin
Amit Dey26-Mar-03 12:52
Amit Dey26-Mar-03 12:52 
GeneralRe: MS Word Pin
Trollslayer26-Mar-03 13:14
mentorTrollslayer26-Mar-03 13:14 
QuestionHow to GetWindowDC Pin
ray_li26-Mar-03 10:02
ray_li26-Mar-03 10:02 
AnswerRe: How to GetWindowDC Pin
Dave Bryant26-Mar-03 10:08
Dave Bryant26-Mar-03 10:08 

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.