Re: The memory could not be "read". Application Crash??

From: Michael Culley (mculley_at_NOSPAMoptushome.com.au)
Date: 10/06/04


Date: Wed, 6 Oct 2004 13:57:24 +1000


"[SolarAngel]" <not-for-mail> wrote in message
news:u4TX$X1qEHA.3896@TK2MSFTNGP15.phx.gbl...
> !!!!!!!!
> Be sure to add in your subclassing test for WM_DESTROY
> and destroy there subclassing if somehow you haven't already!
> !!!!!!!!

This is not necessary. It is a good idea but it's not going to cause any
problems except maybe using up an element in an array in vb. As the window
has been destroyed your WndProc will never get a message again from that
window and will never try to call CallWndProc with an invalid value. Trust
me, I've actually tried to get VB to crash by not unsubclassing and
couldn't.

--
Michael Culley


Relevant Pages

  • Re: The memory could not be "read". Application Crash??
    ... > Be sure to add in your subclassing test for WM_DESTROY ... > and destroy there subclassing if somehow you haven't already! ... window and will never try to call CallWndProc with an invalid value. ...
    (microsoft.public.vb.winapi)
  • Re: The memory could not be "read". Application Crash??
    ... > Be sure to add in your subclassing test for WM_DESTROY ... > and destroy there subclassing if somehow you haven't already! ... window and will never try to call CallWndProc with an invalid value. ...
    (microsoft.public.vb.database.ado)
  • Re: The memory could not be "read". Application Crash??
    ... > Be sure to add in your subclassing test for WM_DESTROY ... > and destroy there subclassing if somehow you haven't already! ... window and will never try to call CallWndProc with an invalid value. ...
    (microsoft.public.vb.enterprise)
  • Re: Startup Button
    ... > correct exit value of -2. ... Otherwise - why would you want to kill your mainwindow? ... The only program that I have coded in a destroy after a certain time has ... been an alert window. ...
    (comp.lang.perl.tk)
  • Re: MDI as SDI
    ... > I decided to "fake" SDI by handling New, Open, Close, etc. such that only ... > // there are cases where destroying the documents may destroy the ... > // main window of the application. ... because the pointer is not NULL ...
    (microsoft.public.vc.mfc)