Click here to Skip to main content
15,889,843 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Set CStatic text from a float??? Pin
Cedric Moonen13-Feb-06 4:29
Cedric Moonen13-Feb-06 4:29 
GeneralRe: Set CStatic text from a float??? Pin
ldsdbomber13-Feb-06 5:06
ldsdbomber13-Feb-06 5:06 
AnswerRe: Set CStatic text from a float??? Pin
ThatsAlok14-Feb-06 19:54
ThatsAlok14-Feb-06 19:54 
Questionhow to exchange large string between any prog and dll Pin
tbrake13-Feb-06 3:40
tbrake13-Feb-06 3:40 
AnswerRe: how to exchange large string between any prog and dll Pin
Rage13-Feb-06 3:45
professionalRage13-Feb-06 3:45 
AnswerRe: how to exchange large string between any prog and dll Pin
James R. Twine13-Feb-06 4:12
James R. Twine13-Feb-06 4:12 
GeneralRe: how to exchange large string between any prog and dll Pin
BadKarma13-Feb-06 4:57
BadKarma13-Feb-06 4:57 
JokeRe: how to exchange large string between any prog and dll Pin
James R. Twine13-Feb-06 7:31
James R. Twine13-Feb-06 7:31 
   Actually, I abhor writing hand-off memory functions, where memory is allocated by the called function and returned from it with the understanding that the caller is now responsible for it.  IME, there seems to be an "out of sight, out of mind" mentality where if the caller did not make an explicit call to a memory allocating function/operator that they are familiar with (new, malloc(...), SysAllocString(...), etc.), they tend not to realize that they are now responsible for deallocating it.

   I tend to write functions that need memory such that they take a pointer to a previously-allocated block of memory and the size of that block.  That way, it is clear that the caller manages the memory.

   I was just detailing examples for the poster.  Besides, I am fairly certain that a DLL loaded into your address space can allocate memory that you can free (as long as it was allocated while in the context of your process, and not another).

   Peace!

-=- James
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
DeleteFXPFiles & CheckFavorites
(Please rate this post!)
GeneralRe: how to exchange large string between any prog and dll Pin
BadKarma13-Feb-06 8:33
BadKarma13-Feb-06 8:33 
QuestionMulti architecture setup Pin
Allad13-Feb-06 3:30
Allad13-Feb-06 3:30 
QuestionSTL in MFC projects, why??? Pin
Andre xxxxxxx13-Feb-06 2:54
Andre xxxxxxx13-Feb-06 2:54 
AnswerRe: STL in MFC projects, why??? Pin
toxcct13-Feb-06 3:04
toxcct13-Feb-06 3:04 
GeneralRe: STL in MFC projects, why??? Pin
Andre xxxxxxx13-Feb-06 3:40
Andre xxxxxxx13-Feb-06 3:40 
GeneralRe: STL in MFC projects, why??? Pin
toxcct13-Feb-06 3:51
toxcct13-Feb-06 3:51 
GeneralRe: STL in MFC projects, why??? Pin
Andre xxxxxxx13-Feb-06 4:01
Andre xxxxxxx13-Feb-06 4:01 
GeneralRe: STL in MFC projects, why??? Pin
Rob Caldecott13-Feb-06 4:05
Rob Caldecott13-Feb-06 4:05 
GeneralRe: STL in MFC projects, why??? Pin
toxcct13-Feb-06 4:10
toxcct13-Feb-06 4:10 
GeneralRe: STL in MFC projects, why??? Pin
Andre xxxxxxx13-Feb-06 4:22
Andre xxxxxxx13-Feb-06 4:22 
GeneralRe: STL in MFC projects, why??? Pin
Eytukan13-Feb-06 4:58
Eytukan13-Feb-06 4:58 
GeneralRe: STL in MFC projects, why??? Pin
ThatsAlok14-Feb-06 19:56
ThatsAlok14-Feb-06 19:56 
AnswerRe: STL in MFC projects, why??? Pin
David Crow13-Feb-06 3:09
David Crow13-Feb-06 3:09 
GeneralRe: STL in MFC projects, why??? Pin
Andre xxxxxxx13-Feb-06 3:45
Andre xxxxxxx13-Feb-06 3:45 
GeneralRe: STL in MFC projects, why??? Pin
Rage13-Feb-06 3:48
professionalRage13-Feb-06 3:48 
GeneralRe: STL in MFC projects, why??? Pin
Andre xxxxxxx13-Feb-06 4:06
Andre xxxxxxx13-Feb-06 4:06 
GeneralRe: STL in MFC projects, why??? Pin
Rob Caldecott13-Feb-06 4:08
Rob Caldecott13-Feb-06 4: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.