I have written a program that uses lots of stuff (activex
components and indy internet components)

I have written an install script to install it on another
machine and the install goes fine, the activex component is
registered as well, and the program runs...

Until I try and save a png image to the installation directory and then I am
getting an access violation happening

Basically I create a teechart on processing and try and do this

{*****************************************************************}
{*                                                               *}
{*   procedure converts the chart to a png file stored locally   *}
{*   on the hard drive to be uploaded to the ftp server and      *}
{*   uploaded into the database as a blob                        *}
{*                                                               *}
{*****************************************************************}
procedure ChartToPNG(s_filename:string);
var
  tmp:tpngexportformat;
begin
  //set up the png image
  tmp:= TPNGExportFormat.Create;
  //assign the chart to the png image
  tmp.Panel := form4.Chart1;

  //check to see if we have already saved a chart for this site and block
  if fileexists(s_filename) then
  begin
    //we have so delete it first as it is going to be freplaced
    deletefile(s_filename);
  end;

  //save the png image to file
  tmp.SaveToFile(s_filename);

  //free the memory
  tmp.free;
end;{charttopng}

The error is happening on the tmp.savetofile call, and the only
thing I can think of is folder permissions or something, but Ive
changed all those and still no joy...Ive also copied all the
teechart bpl files to the winnt\system32 directory and still
nothing working as it should.

I also tried copying the exe to another folder created by me and running it
from there, and yet again, still crashing with eaccessviolation with read of
address of 00000000, is this significant as well?

The file is created but is 0 bytes big...

Like I say it works fine on my computer (usual story).

Can anyone please point me in the right direction for a solution?

Cheers

Chris Veale

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.408 / Virus Database: 230 - Release Date: 24/10/02




______________________________________________________
The contents of this e-mail are privileged and/or confidential to the
named recipient and are not to be used by any other person and/or
organisation. If you have received this e-mail in error, please notify 
the sender and delete all material pertaining to this e-mail.
______________________________________________________
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to