Click here to Skip to main content
15,923,789 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRegsvr32 not picked up by Build environment. Pin
Rob Wainwright19-Oct-00 8:31
Rob Wainwright19-Oct-00 8:31 
GeneralCrash when expanding ATL COM objects under the debugger. Pin
Rob Wainwright19-Oct-00 8:28
Rob Wainwright19-Oct-00 8:28 
GeneralConcatenate two Files in C++ Pin
Cheickna19-Oct-00 6:21
Cheickna19-Oct-00 6:21 
GeneralRe: Concatenate two Files in C++ Pin
Chris Losinger19-Oct-00 9:28
professionalChris Losinger19-Oct-00 9:28 
GeneralDirectDraw Pin
kk919-Oct-00 5:22
kk919-Oct-00 5:22 
QuestionHow it works? (About the memory which allocate by function) Pin
Member 291119-Oct-00 5:12
Member 291119-Oct-00 5:12 
AnswerRe: How it works? (About the memory which allocate by function) Pin
Chris Losinger19-Oct-00 9:31
professionalChris Losinger19-Oct-00 9:31 
AnswerRe: How it works? (About the memory which allocate by function) Pin
Erik Funkenbusch19-Oct-00 11:52
Erik Funkenbusch19-Oct-00 11:52 
You often see this? You shouldn't. That's very poor programming style.

There are a few cases in the C Runtime library where you see this, but what happens here is that the C runtime library allocates the memory and cleans it up when the program exits.

Generally, memory should be copied, or passed to a function through a pointer or reference, and that memory should be used by the function.

Additionally, COM utilizes a mechanism where the Caller has to clean up memory when using SysAllocString and IMalloc. These rules are clearly documented though. you can't just assume people will clean up your allocations.

GeneralRe: How it works? (About the memory which allocate by function) Pin
Member 291119-Oct-00 13:43
Member 291119-Oct-00 13:43 
QuestionDon't I understand virtual functions? Pin
Joep19-Oct-00 0:43
Joep19-Oct-00 0:43 
AnswerRe: Don't I understand virtual functions? Pin
frydaysoft19-Oct-00 1:14
sussfrydaysoft19-Oct-00 1:14 
AnswerRe: Don't I understand virtual functions? Pin
Erik Funkenbusch19-Oct-00 11:57
Erik Funkenbusch19-Oct-00 11:57 
GeneralATL COM interfaces Pin
Gerry19-Oct-00 0:39
Gerry19-Oct-00 0:39 
GeneralRe: ATL COM interfaces Pin
Rob Wainwright19-Oct-00 8:35
Rob Wainwright19-Oct-00 8:35 
GeneralEQ Pin
Eq18-Oct-00 22:39
Eq18-Oct-00 22:39 
GeneralInernetGetConnectedState Pin
Sylvain Demers18-Oct-00 11:08
sussSylvain Demers18-Oct-00 11:08 
QuestionSetEnvironmentVariable not working ? Pin
Dennis18-Oct-00 10:32
Dennis18-Oct-00 10:32 
QuestionHow to make an MFC application in a service Pin
Xzyeena18-Oct-00 9:40
sussXzyeena18-Oct-00 9:40 
AnswerRe: How to make an MFC application in a service Pin
Tim Deveaux18-Oct-00 11:32
Tim Deveaux18-Oct-00 11:32 
AnswerRe: How to make an MFC application in a service Pin
frydaysoft19-Oct-00 8:03
sussfrydaysoft19-Oct-00 8:03 
QuestionHow to choose between two views on Form-based MDI? Pin
Member 1176625718-Oct-00 9:26
Member 1176625718-Oct-00 9:26 
Generaliexplore Pin
valec18-Oct-00 8:44
valec18-Oct-00 8:44 
GeneralRe: iexplore Pin
Michael Dunn18-Oct-00 15:59
sitebuilderMichael Dunn18-Oct-00 15:59 
GeneralDialog in MFC Pin
Frank L.18-Oct-00 8:36
Frank L.18-Oct-00 8:36 
GeneralRe: Dialog in MFC Pin
Klaass197618-Oct-00 8:57
Klaass197618-Oct-00 8:57 

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.