Click here to Skip to main content
15,887,175 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: tray icon -right click option Pin
Mark Salsbery22-Dec-07 7:23
Mark Salsbery22-Dec-07 7:23 
Generalcannot create unicode file using wofstream Pin
xanagan66621-Dec-07 18:02
xanagan66621-Dec-07 18:02 
Generalproblem about alloc memory in another library and free in the main project Pin
kcynic21-Dec-07 15:01
kcynic21-Dec-07 15:01 
GeneralRe: problem about alloc memory in another library and free in the main project Pin
Mark Salsbery21-Dec-07 15:10
Mark Salsbery21-Dec-07 15:10 
GeneralRe: problem about alloc memory in another library and free in the main project Pin
kcynic21-Dec-07 15:26
kcynic21-Dec-07 15:26 
GeneralRe: problem about alloc memory in another library and free in the main project Pin
Mark Salsbery21-Dec-07 15:33
Mark Salsbery21-Dec-07 15:33 
GeneralRe: problem about alloc memory in another library and free in the main project Pin
kcynic21-Dec-07 18:16
kcynic21-Dec-07 18:16 
GeneralRe: problem about alloc memory in another library and free in the main project Pin
Stephen Hewitt21-Dec-07 19:30
Stephen Hewitt21-Dec-07 19:30 
The problem here is that your EXE and the DLL are using different heaps: you are trying to free memory in one heap that was allocated in another.

There are two common ways around this problem:
1. Add a “DLL_free” exported function to the DLL which you use in the client to free any memory allocated by the DLL. It simply calls “free” but because the code which does this is in the DLL and not the client the correct heap is used.
2. Build the EXE and the DLL using a DLL version of the CRT.

Option 1 is more flexible and professional.
Steve

GeneralRe: problem about alloc memory in another library and free in the main project Pin
kcynic21-Dec-07 19:41
kcynic21-Dec-07 19:41 
GeneralRe: problem about alloc memory in another library and free in the main project Pin
kcynic21-Dec-07 21:05
kcynic21-Dec-07 21:05 
GeneralNumber Lock activation Pin
Larry Mills Sr21-Dec-07 13:52
Larry Mills Sr21-Dec-07 13:52 
GeneralRe: Number Lock activation Pin
Mark Salsbery21-Dec-07 14:59
Mark Salsbery21-Dec-07 14:59 
GeneralRe: Number Lock activation Pin
Larry Mills Sr22-Dec-07 9:50
Larry Mills Sr22-Dec-07 9:50 
Question.RC file formating differences Pin
KayakCoder21-Dec-07 10:40
KayakCoder21-Dec-07 10:40 
GeneralI hate programming today (project conflict/calling convention conflict, ... ) Pin
Maximilien21-Dec-07 7:24
Maximilien21-Dec-07 7:24 
GeneralGetting the bitmap in and out of a CGIPLUS Image class Pin
Anthony Appleyard21-Dec-07 6:39
Anthony Appleyard21-Dec-07 6:39 
GeneralRe: Getting the bitmap in and out of a CGIPLUS Image class Pin
Mark Salsbery21-Dec-07 7:32
Mark Salsbery21-Dec-07 7:32 
GeneralRe: Getting the bitmap in and out of a CGIPLUS Image class Pin
Anthony Appleyard21-Dec-07 12:19
Anthony Appleyard21-Dec-07 12:19 
GeneralRe: Getting the bitmap in and out of a CGIPLUS Image class Pin
Mark Salsbery21-Dec-07 12:39
Mark Salsbery21-Dec-07 12:39 
GeneralRe: Getting the bitmap in and out of a CGIPLUS Image class [modified] Pin
Anthony Appleyard21-Dec-07 23:29
Anthony Appleyard21-Dec-07 23:29 
GeneralRe: Getting the bitmap in and out of a CGIPLUS Image class Pin
Mark Salsbery22-Dec-07 7:06
Mark Salsbery22-Dec-07 7:06 
GeneralRe: Getting the bitmap in and out of a CGIPLUS Image class Pin
poda18-Mar-10 19:53
poda18-Mar-10 19:53 
GeneralGDI+ Why does the trick fail, one Rect to two Points Pin
followait21-Dec-07 6:16
followait21-Dec-07 6:16 
GeneralRe: GDI+ Why does the trick fail, one Rect to two Points Pin
Mark Salsbery21-Dec-07 6:26
Mark Salsbery21-Dec-07 6:26 
GeneralRe: GDI+ Why does the trick fail, one Rect to two Points Pin
followait21-Dec-07 7:45
followait21-Dec-07 7:45 

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.