Click here to Skip to main content
15,904,155 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Variant Types Pin
Grahamfff19-Aug-04 8:51
Grahamfff19-Aug-04 8:51 
QuestionHow to Save Fiels? Pin
Zero_One_ADO18-Aug-04 7:49
Zero_One_ADO18-Aug-04 7:49 
AnswerRe: How to Save Fiels? Pin
Carlos Antollini18-Aug-04 8:41
Carlos Antollini18-Aug-04 8:41 
AnswerRe: How to Save Fiels? Pin
David Crow19-Aug-04 3:07
David Crow19-Aug-04 3:07 
AnswerRe: How to Save Fiels? Pin
gamitech19-Aug-04 12:29
gamitech19-Aug-04 12:29 
QuestionAbout SetCursor? Pin
Zero_One_ADO18-Aug-04 7:47
Zero_One_ADO18-Aug-04 7:47 
AnswerRe: About SetCursor? Pin
vcplusplus18-Aug-04 8:28
vcplusplus18-Aug-04 8:28 
GeneralUnresolved external error: LNK2001 Pin
crushinghellhammer18-Aug-04 7:02
crushinghellhammer18-Aug-04 7:02 
GeneralRe: Unresolved external error: LNK2001 Pin
Mike K. Clark18-Aug-04 14:06
Mike K. Clark18-Aug-04 14:06 
GeneralLNK2005 Pin
фил18-Aug-04 7:00
фил18-Aug-04 7:00 
GeneralRe: LNK2005 Pin
Antony M Kancidrowski18-Aug-04 13:42
Antony M Kancidrowski18-Aug-04 13:42 
GeneralOwnerDrawn ComboBox & CDialogBar Pin
AJ12318-Aug-04 6:35
AJ12318-Aug-04 6:35 
GeneralRe: OwnerDrawn ComboBox & CDialogBar Pin
AJ12318-Aug-04 9:28
AJ12318-Aug-04 9:28 
GeneralDoc/View and CTRL+TAB Pin
Jay Carter18-Aug-04 6:05
Jay Carter18-Aug-04 6:05 
GeneralDoc/View and CTRL+TAB Pin
Jay Carter18-Aug-04 6:05
Jay Carter18-Aug-04 6:05 
GeneralNIIF_NONE Pin
BlackDice18-Aug-04 5:30
BlackDice18-Aug-04 5:30 
General#if (_WIN32_IE >= 0x0500) Pin
BlackDice18-Aug-04 5:45
BlackDice18-Aug-04 5:45 
GeneralRe: #if (_WIN32_IE >= 0x0500) Pin
Steve Thresher18-Aug-04 5:52
Steve Thresher18-Aug-04 5:52 
GeneralRe: NIIF_NONE Pin
Steve Thresher18-Aug-04 5:48
Steve Thresher18-Aug-04 5:48 
GeneralRe: NIIF_NONE Pin
BlackDice18-Aug-04 5:56
BlackDice18-Aug-04 5:56 
GeneralRe: NIIF_NONE Pin
BlackDice18-Aug-04 6:07
BlackDice18-Aug-04 6:07 
GeneralRe: NIIF_NONE Pin
Michael Dunn18-Aug-04 7:17
sitebuilderMichael Dunn18-Aug-04 7:17 
QuestionWhat wrong with this code? Pin
gilazilla18-Aug-04 4:51
gilazilla18-Aug-04 4:51 
GeneralDrag and Drop Using the CFSTR_FILEDESCRIPTOR / CFSTR_FILECONTENTS Formats Pin
Steve Thresher18-Aug-04 4:48
Steve Thresher18-Aug-04 4:48 
Generalnew in dll, delete in exe, bang :( Pin
Rüpel18-Aug-04 3:42
Rüpel18-Aug-04 3:42 
hi,

i'm writing a (legacy, non-MFC) dll and there might get an exception thrown in there. it is caught in the exe-file that uses that dll.

dll:
//some error<br />
throw new CSomeException();


exe:
catch (CSomeException *e)<br />
{<br />
  e->SomeFunction(); // works fine<br />
  delete e; // crash<br />
}


the delete-call crashes because the object is not a valid *local* heap-pointer.

stepping in dbgheap.c reveales the following passage
/*<br />
 * If this ASSERT fails, a bad pointer has been passed in. It may be<br />
 * totally bogus, or it may have been allocated from another heap.<br />
 * The pointer MUST come from the 'local' heap.<br />
 */<br />
_ASSERTE(_CrtIsValidHeapPointer(pUserData)); // fails


so, finally. how am i supposed to handle this? i mean throwing an exception in a library isn't that uncommon, is it? Confused | :confused:

:wq

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.