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: Fri, 4 Jan 2008 15:08:01 -0800,    group: microsoft.public.inetsdk.html_authoring        back       


Activex control deconstruction function is not called when IE is c   
Hi,

I am working on debugging the memory leak of my activex control. Tracking 
with VS.net 2003, it told that the deconstruction function of the OCX is not 
called when IE is closed. I was guessing I may have memory overwritten 
somewhere. 

But later on I found even a blank OCX will have the same problem which 
deconstruction won't be called as well.  Is it possible that it is caused by 
my html file? Here is the sample of the html:

<html><head>
<title>Test</title>

</head>

<body onload="" onunload="closeOcx()" leftmargin=0 rightmargin=0 topmargin=0 
bottommargin=0>
<div id="main">
   <table border="0" cellSpacing="0" cellpadding="0" >

     <tr>  
      <td colspan=3> 
      <OBJECT id=TestOcx style="LEFT: 0px; TOP: 0px" codeBase=TestOcx.ocx 
height=480 
	width=720 align=center classid="clsid:016FD02F-9077-4286-8529-1DF5B189578E" 
name=TestOcx>
	<PARAM NAME="_Version" VALUE="65536">
	<PARAM NAME="_ExtentX" VALUE="19050">
	<PARAM NAME="_ExtentY" VALUE="12700">
	<PARAM NAME="_StockProps" VALUE="0"></OBJECT>
      </td>
    </tr>

    </table>
  </div>
</body>
</html>

Please help. Thanks a lot in advance!

Best regards,
Quentin
date: Fri, 4 Jan 2008 15:08:01 -0800   author:   Quentin

RE: Activex control deconstruction function is not called when IE is c   
Just searched the article in msdn and found this:

Internet Explorer does not unload controls when the browser is closed. 
Internet Explorer relies on proper COM reference counting. When the last 
reference to a control is released, the control will unload.

However, I traced to COleControl deconstruction function where is supposed 
to decrement the reference count. But it is not called as well. 

Where is wrong? This problem should be not new at all. Anyone meet with it 
before? Please help! Thanks!

Best regards,
Quentin

"Quentin" wrote:

> Hi,
> 
> I am working on debugging the memory leak of my activex control. Tracking 
> with VS.net 2003, it told that the deconstruction function of the OCX is not 
> called when IE is closed. I was guessing I may have memory overwritten 
> somewhere. 
> 
> But later on I found even a blank OCX will have the same problem which 
> deconstruction won't be called as well.  Is it possible that it is caused by 
> my html file? Here is the sample of the html:
> 
> <html><head>
> <title>Test</title>
> 
> </head>
> 
> <body onload="" onunload="closeOcx()" leftmargin=0 rightmargin=0 topmargin=0 
> bottommargin=0>
> <div id="main">
>    <table border="0" cellSpacing="0" cellpadding="0" >
> 
>      <tr>  
>       <td colspan=3> 
>       <OBJECT id=TestOcx style="LEFT: 0px; TOP: 0px" codeBase=TestOcx.ocx 
> height=480 
> 	width=720 align=center classid="clsid:016FD02F-9077-4286-8529-1DF5B189578E" 
> name=TestOcx>
> 	<PARAM NAME="_Version" VALUE="65536">
> 	<PARAM NAME="_ExtentX" VALUE="19050">
> 	<PARAM NAME="_ExtentY" VALUE="12700">
> 	<PARAM NAME="_StockProps" VALUE="0"></OBJECT>
>       </td>
>     </tr>
> 
>     </table>
>   </div>
> </body>
> </html>
> 
> Please help. Thanks a lot in advance!
> 
> Best regards,
> Quentin
date: Fri, 4 Jan 2008 16:57:06 -0800   author:   Quentin

Google
 
Web ureader.com


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