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

C / C++ / MFC

 
GeneralRe: mail project in vc++ (the connection can't be established) Pin
Jose Lamas Rios9-Aug-05 5:16
Jose Lamas Rios9-Aug-05 5:16 
GeneralRe: mail project in vc++ (the connection can't be established) Pin
ThatsAlok9-Aug-05 19:31
ThatsAlok9-Aug-05 19:31 
GeneralDLL Without MFC Pin
schoni9-Aug-05 1:51
schoni9-Aug-05 1:51 
GeneralRe: DLL Without MFC Pin
Chris Losinger9-Aug-05 2:12
professionalChris Losinger9-Aug-05 2:12 
GeneralRe: DLL Without MFC Pin
schoni9-Aug-05 2:28
schoni9-Aug-05 2:28 
GeneralRe: DLL Without MFC Pin
Cedric Moonen9-Aug-05 2:36
Cedric Moonen9-Aug-05 2:36 
GeneralRe: DLL Without MFC Pin
David Crow9-Aug-05 2:43
David Crow9-Aug-05 2:43 
GeneralRe: DLL Without MFC Pin
Tim Smith9-Aug-05 4:03
Tim Smith9-Aug-05 4:03 
Like others, I have no idea what you are asking, however, I think what Chris was trying to get at is that you must be careful how you allocate and deallocate memory between DLL/EXEs.

If your software is using CRTL linked statically, then the EXE and DLL will be using different heaps. Thus if you allocate memory in a DLL and return a pointer to that memory to your EXE, you must then invoke a routine in the DLL to free the memory. Otherwise the EXE will try to free that memory back to its heap that doesn't know about the memory. There are other ways to avoid this such as using the process heap or CoTaskAlloc from OLE/COM. That gets around the problem by using a process wide, well know allocation system that everyone in the process has access to.

Another common problem is improperly declared function prototypes. For example, if your EXE defines your routine as using C++ calling convention but it is really using __stdcall, then bad things will happen. The stack won't be properly managed and variables will appear not to be assigned properly back in your EXE.

Tim Smith

I'm going to patent thought. I have yet to see any prior art.
GeneralCFileDialog in CPropertySheet Pin
johny_d9-Aug-05 1:32
johny_d9-Aug-05 1:32 
GeneralRe: CFileDialog in CPropertySheet Pin
BlackDice9-Aug-05 2:47
BlackDice9-Aug-05 2:47 
GeneralRe: CFileDialog in CPropertySheet Pin
johny_d12-Aug-05 21:06
johny_d12-Aug-05 21:06 
GeneralRe: CFileDialog in CPropertySheet Pin
Maximilien6-Oct-20 10:29
Maximilien6-Oct-20 10:29 
Generalunmanaged .lib in VS.NET Pin
Alper KARS9-Aug-05 1:29
Alper KARS9-Aug-05 1:29 
GeneralRe: unmanaged .lib in VS.NET Pin
Jose Lamas Rios9-Aug-05 4:20
Jose Lamas Rios9-Aug-05 4:20 
GeneralRe: unmanaged .lib in VS.NET Pin
Alper KARS9-Aug-05 4:44
Alper KARS9-Aug-05 4:44 
GeneralThe troublesome BOOKMARK question of VC6.0 ! help ~~~~ Pin
CNHKfsh9-Aug-05 0:58
CNHKfsh9-Aug-05 0:58 
GeneralRe: The troublesome BOOKMARK question of VC6.0 ! help ~~~~ Pin
David Crow9-Aug-05 2:45
David Crow9-Aug-05 2:45 
GeneralRe: The troublesome BOOKMARK question of VC6.0 ! help ~~~~ Pin
ALittleTree9-Aug-05 4:33
ALittleTree9-Aug-05 4:33 
GeneralRe: The troublesome BOOKMARK question of VC6.0 ! help ~~~~ Pin
CNHKfsh9-Aug-05 17:02
CNHKfsh9-Aug-05 17:02 
Generalto BOOL or not to bool Pin
BadKarma8-Aug-05 23:50
BadKarma8-Aug-05 23:50 
GeneralRe: to BOOL or not to bool Pin
Eytukan9-Aug-05 0:09
Eytukan9-Aug-05 0:09 
GeneralRe: to BOOL or not to bool Pin
Marc Soleda9-Aug-05 0:14
Marc Soleda9-Aug-05 0:14 
GeneralRe: to BOOL or not to bool Pin
David Crow9-Aug-05 2:48
David Crow9-Aug-05 2:48 
GeneralRe: to BOOL or not to bool Pin
Marc Soleda9-Aug-05 3:12
Marc Soleda9-Aug-05 3:12 
GeneralRe: to BOOL or not to bool Pin
Tim Smith9-Aug-05 3:54
Tim Smith9-Aug-05 3:54 

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.