Alvaro,
Tal vez esta pueda servir:
CLIPPER PRNSTATUS( PARAMS ) // cPrinter or cPrinterServer --> nStatus
{
HANDLE hPrinter = NULL;
DWORD cBytesNeeded = 0, cBytesUsed = 0, status = 0;
PRINTER_INFO_2 * pPrinterInfo = NULL;
if( OpenPrinter( _parc( 1 ), &hPrinter, NULL ) )
{
GetPrinter( hPrinter, 2, NULL, 0, &cBytesNeeded );
pPrinterInfo = ( PRINTER_INFO_2 * ) _xgrab( cBytesNeeded );
GetPrinter( hPrinter, 2, ( unsigned char * ) pPrinterInfo, cBytesNeeded, &cBytesUsed );
_retnl( pPrinterInfo->Status );
_xfree( pPrinterInfo );
ClosePrinter( hPrinter );
}
else
_retnl( PRINTER_STATUS_NOT_AVAILABLE );
}
Este es un ejemplo de uso:
#define PRINTER_STATUS_OK 0
#define PRINTER_STATUS_PAUSED 1
#define PRINTER_STATUS_ERROR 2
#define PRINTER_STATUS_PENDING_DELETION 4
#define PRINTER_STATUS_PAPER_JAM 8
#define PRINTER_STATUS_PAPER_OUT 16
#define PRINTER_STATUS_MANUAL_FEED 32
#define PRINTER_STATUS_PAPER_PROBLEM 64
#define PRINTER_STATUS_OFFLINE 128
#define PRINTER_STATUS_IO_ACTIVE 256
#define PRINTER_STATUS_BUSY 512
#define PRINTER_STATUS_PRINTING 1024
#define PRINTER_STATUS_OUTPUT_BIN_FULL 2048
#define PRINTER_STATUS_NOT_AVAILABLE 4096
#define PRINTER_STATUS_WAITING 8192
#define PRINTER_STATUS_PROCESSING 16384
#define PRINTER_STATUS_INITIALIZING 32768
#define PRINTER_STATUS_WARMING_UP 65536
#define PRINTER_STATUS_TONER_LOW 131072
#define PRINTER_STATUS_NO_TONER 262144
#define PRINTER_STATUS_PAGE_PUNT 524288
#define PRINTER_STATUS_USER_INTERVENTION 1048576
#define PRINTER_STATUS_OUT_OF_MEMORY 2097152
#define PRINTER_STATUS_DOOR_OPEN 4194304
#define PRINTER_STATUS_SERVER_UNKNOWN 8388608
#define PRINTER_STATUS_POWER_SAVE 16777216
function Main()
local nStatus := PrnStatus( "LPT1:" )
MsgInfo( nStatus )
return nil
Y este es el OBJ a reemplazar en FiveHC.lib:
http://hyperupload.com/download/01b93ba ... C.obj.html