Loading...

Closing image shows memory error using as ActiveX

Support for GdViewer OCX and GdViewer Pro ActiveX/SDK.

Closing image shows memory error using as ActiveX

Postby Marcio » Wed Mar 05, 2008 2:34 pm

Hello,

I'm having a big problem.
I'm developing an ActiveX application using Delphi 7, to show tiff images from web browser.
It is just simple open an image: Imaging1.CreateImageFromURL(Host, PathImg, 80).

The problem is when I try to close the image:
Imaging1.CloseImage(gdviewer1.GetNativeImage);
GdViewer1.Clear;
GdViewer1.ImageClosed;

When closing the browser, the Internet Explorer shows me an error of memory, then it closes, problably because the image is still opened, and Internet Explorer continues in memory, I have to kill manually the iexplore.exe process by the task manager:

AppName: iexplore.exe AppVer: 7.0.6000.16608 ModName: msvbvm60.dll
ModVer: 6.0.97.82 Offset: 0005208d

I think Internet Explorer closes faster than the ActiveX, so I can't trigger any kind of form destroy events: OnDestroy, OnDeactivate, to close the image.

Any ideas?

Thanks,
Marcio.
Marcio
 
Posts: 9
Joined: Tue Mar 04, 2008 4:08 pm

Re: Closing image shows memory error using as ActiveX

Postby Loïc » Wed Mar 05, 2008 3:39 pm

Hi Marcio,

Could you send me your activex and a webpage wich show this behaviour ?

Best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4441
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Closing image shows memory error using as ActiveX

Postby Marcio » Wed Mar 05, 2008 3:52 pm

Hello Loic,
Thanks for your prompt answer.

Searching in the web I found out that in ActiveX the event onDestroy does not work.
We have to use the event BeforeDestruction, which isn't declared by default (when you create your application).

procedure BeforeDestruction; override;

procedure Twebtif.BeforeDestruction;
begin
Imaging1.CloseImage(gdviewer1.GetNativeImage);
GdViewer1.Clear;
GdViewer1.ImageClosed;
end;

Thanks,
Marcio.
Marcio
 
Posts: 9
Joined: Tue Mar 04, 2008 4:08 pm


Return to GdViewer [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest