Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Impresión (https://www.clubdelphi.com/foros/forumdisplay.php?f=4)
-   -   Error Raro sobre archivo "ntdll.dll" que no consigo encontrar el motivo (https://www.clubdelphi.com/foros/showthread.php?t=35222)

AGAG4 04-09-2006 22:34:41

Error Raro sobre archivo "ntdll.dll" que no consigo encontrar el motivo
 
Uso D6, QReport 4 Prof. y eDocEngine
Tengo una aplicación que envia Correos Electrónicos Adjuntando un archivo JPG, este archivo se genera apartir de una Exportación que se hace de un archivo .QRP del QrPreview al Componente gtQRExportInterface de los eDocengine, hasta aqui todo bien, les presento el código:
Código Delphi [-]
Procedure FormCreate(Sender: TObject);
....
    //Exportarlo de QRP a JPG
    try
      NPages:=0;
      //Si Existe Archivo .QRP, Borramos
      if FileExists('c:\tmp\PresupPag.qrp') then
        if not DeleteFile ('c:\tmp\PresupPag.qrp') then begin
          MensajesW('Archivo Bloqueado "PresupPag.qrp", No se Puede Crear, Cierre el Programa y Vuelva a Intentar el Envio del Correo.','Atención',48);
          abort;
        end;

      //Preparamos QrPreview
      qrRepPresup2.Prepare;

      //Tomamos Número de Páginas para Determinar el #Archivos a Adjuntar
      NPages:=qrRepPresup2.QRPrinter.PageCount;

     //Guardamos Preview a un archivo .QRP 
     qrRepPresup2.Printer.Save('c:\tmp\PresupPag.qrp');
     gtJPEGEngine.PagesToRender:='';

      //Exportamos QRP a JPG
      gtQRExportInterface.Engine := gtJPEGEngine;
      IgtDocumentEngine(gtQRExportInterface.Engine).FileName := 'c:\tmp\PresupPag.qrp';
      gtQRExportInterface.RenderDocument('c:\tmp\PresupPag.qrp');
    except
      on E:Exception do begin
        MensajesW(PChar(E.Message+', No es posible Crear PresupPag.QRP, Reporte Error.'),'Error',MB_ICONERROR);
      end;
    end;

    try
     //Abrimos QRPreview
      FQRPrinter := TQRPrinter.Create(Self);
      FQRPrinter.Load('c:\tmp\PresupPag.qrp');
      QRPreview.QRPrinter := FQRPrinter;
      QRPreview.Show;
    except
      on E:Exception do begin
        MensajesW(PChar(E.Message+', No es posible Abrir Archivo PresupPag.QRP, Reporte Error.'),'Error',MB_ICONERROR);
      end;
    end;

    //Adjuntamos Páginas al Correo
    for x := 1 to NPages do begin
      //Adjuntar JPG
      TIdAttachment.Create(IdMsgSend.MessageParts, 'c:\tmp\PresupPag'+IntToStr(x)+'.jpg');
      ResetAttachmentListView;
    end;
Al Cerrar el formulario borro el archivo .QRP

Código Delphi [-]
....
    FQRPrinter.Free;
    qrRepPresup2 :=Nil ;

    //Si existe Archivo .QRP lo Borramos
    if FileExists('c:\tmp\PresupPag.qrp') then
      if not DeleteFile ('c:\tmp\PresupPag.qrp') then begin
        MensajesW('Archivo Bloqueado "PresupPag.qrp", No se Puede Borrar.','Atención',48);
        abort;
      end;
El problema que tengo es que si cierro y abro el formulario como 20 veces en la 20 ó en la 21 me marca el siguiente error:

Access violation at address 7C928FEA in module 'ntdll.dll'. Write of address 00000010

Este error me lo marca al Crear el archivo .QRP ó al Abrirlo

Agradezco cualquier sugerencia.

ulario

jeane_23 23-11-2007 07:11:17

cree un foro sobre una sol q encontre..
 
tal vez te sirve


La franja horaria es GMT +2. Ahora son las 07:54:32.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi