Página 1 de 1

Acesso dll inicio.. xharbour modo console.

Enviado: 19 Fev 2008 14:51
por FARLEY RIBEIRO
Pessoal,

Baixei o emulador e a dll no site abaixo...
http://www.bematech.com.br/suporte/dwn_fisc.asp

Instalei o bemafi32.ini e bemafi32.dll no \WINDOWS\SYSTEM32.
Instalei o emulador, fiz algumas alterações na configuração e não obtive sucesso... Alguém pode me ajudar?

Grato

Farley

Código: Selecionar todos


#include "FiveWin.ch"
#define DC_CALL_STD     0X0020
#define MAX_PATH   260
/*-----------------------------------------------------------------------------------------------*/
function main()

local oMenu
public oWnd

Set Exact   Off
Set Wrap On
Set Deleted On
Set Bell Off
Set Scoreboard Off
Set Date British
Set Confirm ON
Set Inte OFF
Set Multiple OFF
Set Century on
Set Exclusive Off
Set Epoch To 1910
Set Decimals to 2
Set talk OFF
SetHandleCount( 255 )

// Operador...
VOPERADOR:="CAIXA"

// Carrega a dll...
NDLL:=LoadLibrary("Bemafi32.dll")
RET:=DLLCALL(NDLL,32,"Bematech_FI_AbrePortaSerial")
IF RET=(-4)
   msgalert("Erro no arquivo Bemafi32.ini")
ENDIF
IF RET=(-5)
   msgalert("Erro ao abrir porta de comunicacao")
ENDIF

Menu oMenu
     MenuItem '&1-Leitura X'                      Action BemaLeituraX()
     MenuItem '&2-Vende Item'                     Action msginfo()
     MenuItem hb_oemtoansi('&3-Hora/Data ECF')    Action BemaHoraData()
     MenuItem hb_oemtoansi('&4-Redu‡Æo Z')        Action BemaReducaoZ()
     MenuItem '&X-Sair'                           Action oWnd:end()
EndMenu

DEFINE Window oWnd

oWnd:SetMenu( oMenu )

Activate Window oWnd

FreeLibrary(NDLL)

return nil

///////////////////////////////////////////////////////////////////////////////////////
func BemaLeituraX
RET:=DLLCALL(NDLL,32,"Bematech_FI_LeituraX")
return nil

///////////////////////////////////////////////////////////////////////////////////////
func BemaHoraData
vdata:=space(6)
vhora:=space(6)
RET:=DLLCALL(NDLL,32,"Bematech_FI_DataHoraImpressora",vdata,vhora)
msginfo( vdata )
msginfo( vhora )
return nil


///////////////////////////////////////////////////////////////////////////////////////
func BemaReducaoZ
RET:=DLLCALL(NDLL,32,"Bematech_FI_ReducaoZ")
return nil


Enviado: 19 Fev 2008 22:19
por sygecom