Click here to Skip to main content
15,910,981 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Question64 bit programming issue... Pin
Kedar Potdar23-Aug-07 21:12
Kedar Potdar23-Aug-07 21:12 
Questiontormented by _CrtIsValidHeapPointer (t=day7) [modified] Pin
devvvy23-Aug-07 21:09
devvvy23-Aug-07 21:09 
AnswerRe: tormented by _CrtIsValidHeapPointer (t=day7) Pin
jhwurmbach23-Aug-07 21:56
jhwurmbach23-Aug-07 21:56 
GeneralRe: tormented by _CrtIsValidHeapPointer (t=day7) Pin
devvvy23-Aug-07 22:00
devvvy23-Aug-07 22:00 
GeneralRe: tormented by _CrtIsValidHeapPointer (t=day7) Pin
toxcct23-Aug-07 22:13
toxcct23-Aug-07 22:13 
Generalbecause this is stripped down test app with nothing more than init Pin
devvvy23-Aug-07 22:17
devvvy23-Aug-07 22:17 
GeneralRe: because this is stripped down test app with nothing more than init Pin
jhwurmbach23-Aug-07 23:52
jhwurmbach23-Aug-07 23:52 
AnswerRe: tormented by _CrtIsValidHeapPointer (t=day7) Pin
James R. Twine24-Aug-07 3:59
James R. Twine24-Aug-07 3:59 
   Are any string objects (or raw memory pointers) passed between functions in the DLL and in the executable?

   You may be looking at something like a debug/release problem.  For example, if the DLL is built is a debug build and the app is a release build, and you allocate memory in the app and free it in the DLL, you will be allocating from the non-debug heap and trying to free it back to the debug heap (or the reverse may be true).

   This is commonly seen in COM implementations done by inexperienced MFC developers that like to pass CString objects as parameters to COM methods.

   Moral - avoid handoff memory whenever possible, even if it is wrapped by an object (like a string object), and especially when dealing with lots of DLLs and/or COM objects.

   Peace!

-=- James
Please rate this message - let me know if I helped or not!<HR>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!
See DeleteFXPFiles

GeneralRe: tormented by _CrtIsValidHeapPointer (t=day7) Pin
devvvy24-Aug-07 4:45
devvvy24-Aug-07 4:45 
AnswerRe: tormented by _CrtIsValidHeapPointer (t=day7) Pin
cmk24-Aug-07 10:00
cmk24-Aug-07 10:00 
GeneralRe: tormented by _CrtIsValidHeapPointer (t=day7) Pin
devvvy29-Aug-07 2:53
devvvy29-Aug-07 2:53 
Questionmultiple document-view architecture Pin
Taruni23-Aug-07 19:59
Taruni23-Aug-07 19:59 
AnswerRe: multiple document-view architecture Pin
jhwurmbach23-Aug-07 21:57
jhwurmbach23-Aug-07 21:57 
AnswerRe: multiple document-view architecture Pin
Iain Clarke, Warrior Programmer23-Aug-07 22:00
Iain Clarke, Warrior Programmer23-Aug-07 22:00 
GeneralRe: multiple document-view architecture Pin
jhwurmbach23-Aug-07 23:55
jhwurmbach23-Aug-07 23:55 
GeneralRe: multiple document-view architecture Pin
jhwurmbach24-Aug-07 0:37
jhwurmbach24-Aug-07 0:37 
General[Message Deleted] Pin
devvvy24-Aug-07 0:47
devvvy24-Aug-07 0:47 
GeneralRe: multiple document-view architecture Pin
jhwurmbach24-Aug-07 0:52
jhwurmbach24-Aug-07 0:52 
GeneralRe: multiple document-view architecture Pin
David Crow24-Aug-07 6:03
David Crow24-Aug-07 6:03 
AnswerRe: multiple document-view architecture Pin
devvvy23-Aug-07 22:50
devvvy23-Aug-07 22:50 
GeneralRe: multiple document-view architecture Pin
Jim Crafton24-Aug-07 7:19
Jim Crafton24-Aug-07 7:19 
Questionstatic variable Pin
George_George23-Aug-07 19:22
George_George23-Aug-07 19:22 
AnswerRe: static variable Pin
User 58385223-Aug-07 19:27
User 58385223-Aug-07 19:27 
GeneralRe: static variable Pin
George_George23-Aug-07 19:35
George_George23-Aug-07 19:35 
GeneralRe: static variable Pin
User 58385223-Aug-07 19:42
User 58385223-Aug-07 19:42 

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.