Tengo una aplicación de gestión que facturaba por comprobante pre-impreso...
Ahora magicamente me piden que imprima por Impresora Fiscal "Hasas 320F", bueno... comencé bajando la Winfis32.dll de la página de http://www.hasar.com y arranqué a jugar con esto.
El tema es que medio como se me está complicando más de la cuenta...
Code: Select all
Function Prueba()
Local cBuffer:=SPACE(500)
local k // Número de COM a utilizar
local nHandler // Manejador del puerto serie
local nCod // Valor de retorno de funciones de winfis32.dll
k:=1
nHandler:=OpenComFiscal( k , 0 )
MsgInfo(STR(nHandler))
if nHandler < 0
MsgInfo("Error")
ELSE
MsgInfo("Conectado")
endif
nCod := InitFiscal( nHandler )
...
...
...
Code: Select all
DECLARE DLL_TYPE_INT OpenComFiscal( DLL_TYPE_INT nCom, DLL_TYPE_INT nMode) IN winfis32.DLL
DECLARE DLL_TYPE_INT ReOpenComFiscal( DLL_TYPe_INT nHand ) IN winfis32.dll
DECLARE DLL_TYPE_VOID CloseComFiscal( DLL_TYPE_INT nHand ) IN winfis32.DLL
DECLARE DLL_TYPE_INT MandaPaqueteFiscal( DLL_TYPE_INT nHand, DLL_TYPE_LPSTR cString ) IN winfis32.dll
DECLARE DLL_TYPE_INT UltimaRespuesta( DLL_TYPE_INT nHand, DLL_TYPE_LPSTR cString) IN winfis32.dll
DECLARE DLL_TYPE_INT InitFiscal( DLL_TYPE_INT nHand ) IN winFis32.dll
DECLARE DLL_TYPE_INT VersionDLLFiscal() IN winFis32.dll
Si alquien me da una mano estaré muy agradecido.
Saludos, Esteban.