Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: 3 Mar 2006 12:41:19 -0800,    group: microsoft.public.inetsdk.programming.html_objmodel        back       


How to trap IE refresh in Activex Control   
There is a activex written using MFC and COM .
The main class inherits
CComObjectRootEx
IDispatchImpl
CComCoClass
IObjectSafetyImpl

Now 2threads are created inside this class in the constructor.
When IE is refreshed/reloaded, I loss the pointer of the process and
threads are not deallocated.

So what I did is, made thread ID's as static in the class and
deallocate them in the constructor before creating new threads.
When I WaitforSingleObject() I always get time out(258).
so I call TerminateThread().
I know this is wrong way.
Now this method is leaving lot of leaks.

Please suggest me a remedy so that I can trap the refresh ask my thread
to exit gracefully.

Thanks a lot in advance.
date: 3 Mar 2006 12:41:19 -0800   author:   Happy

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us