Ver Mensaje Individual
  #1  
Antiguo 04-09-2006
Avatar de AGAG4
AGAG4 AGAG4 is offline
Miembro
 
Registrado: ago 2004
Ubicación: Los Mochis, Sinaloa, México
Posts: 1.420
Reputación: 21
AGAG4 Va por buen camino
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
Responder Con Cita