Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Impresión
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 27-04-2005
josemmerida josemmerida is offline
Miembro
 
Registrado: nov 2003
Ubicación: Málaga(España)
Posts: 60
Poder: 21
josemmerida Va por buen camino
Post OpenPrinter no compila.

De los trucos del club tengo este codigo :

Código Delphi [-]
 procedure ImprimirApi;
 var
    H,Size:Integer;
    Info:PAddJobInfo1;
    F:TextFile;
 begin
   with Printer do
      OpenPrinter(PChar(Printers[PrinterIndex]),H,nil); //  <------ aqui falla
      GetMem(Info,1000);
    try
       AddJob(H,1,Info,1000,Size);
        AssignFile(F,Info^.Path);
        Rewrite(F);
        try
          Writeln(F,'Linea1');
          Writeln(F,'Linea2');
          Writeln(F,'Linea3');
          Writeln(F,'Linea4');
          Writeln(F,'Linea5');
          Writeln(F,'Linea6');
          Writeln(F,'Linea7');
          Writeln(F,'Linea8');
        finally
          CloseFile(F);
        end;
        ScheduleJob(H,Info^.JobId);
     finally
     FreeMem(Info,1000);
     ClosePrinter(H);
    end;
 end;
Pues resulta que al compilar se para en la linea :

OpenPrinter(PChar(Printers[PrinterIndex]),H,nil);

y me dice "Types of actual formal and var parameters must be identical".

Debe ser algo sencillo, pero de Api ando muy verde

¿Alguien me ilumina?.

Gracias Anticipadas y saludos.

Última edición por Neftali [Germán.Estévez] fecha: 27-04-2005 a las 12:28:59. Razón: Añadir TGA's [delphi]...[/delphi] al código
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 18:00:24.


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
Copyright 1996-2007 Club Delphi