jfaguiar Posted June 14, 2013 Report Share Posted June 14, 2013 Ola meus amigos. Instalei o programa Bematech Winmfd2 para gerar o arquivo da nota fiscal paulista, que funcionou perfeitamente, mas que sem explicaçãp fez o meu programa parar de detectar a porta serial, resultando em impressora fiscal não detectada. Para maior clareza, estou em um micro com Windows XP e utiliso a função LodLib32() para carregar a dll bemafi32. Já desativei e ativei as portas seriais no gerenciador de dispositivo e nada. Alguém pode me dizer o poderar esta acontecendo? O brigado Quote Link to comment Share on other sites More sharing options...
jfaguiar Posted June 14, 2013 Author Report Share Posted June 14, 2013 I Love Daruma. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted June 14, 2013 Report Share Posted June 14, 2013 Ola, voce esta usando comando de FIVEWIN FOR CLIPPER e se esta em 32 bits: use: LoadLibrary() conforme modelo abaixo STATIC XDLL_BEMATECH //-> DLL DA IMPRESSORA FISCAL BEMATECH 3 FUNCTION DECLARA_BEMA() IF XMODELOECF = "3".AND. VAL(XPORTADOECF) > 0 IF !FILE( "BEMAFI32.DLL" ) MsgAlert( "O Arquivo " + "BEMAFI32.DLL " + ; "Não Foi Encontrado" + CRLF + ; "Entre em Contato Com o Suporte" + CRLF + ; "Pelos Fones: (11) 3106-2832 / 8243-5632", ; "Componente Ausente, Verifique!" ) RETURN NIL ENDIF // Abre a DLL da Bematech xDll_BemaTech := LoadLibrary( "BEMAFI32.DLL" ) CURSORWAIT() //-> verifica se a impressora esta ligada m->Int_Retorno := BmPrintLig() IF m->Int_Retorno = 1 //-> Impressora Ligada, Nada a Fazer ELSE MsgInfo( OemToAnsi( "Impressora BEMATECH Desligada, Verifique!" ), ; OemToAnsi( "Impressora BEMATECH Desligada, Verifique!" ) ) CURSORARROW() DBCLOSEALL() //-ÿ ligar depois RETURN NIL ENDIF ENDIF RETURN NIL //-> FECHA AS DLLS DAS IMPRESSORAS FISCAIS FUNCTION FECHA_DLLS_FISCAIS() PUBLIC XMODELOECF, XPORTADOECF IF VAL( XMODELOECF ) > 0 .AND. VAL( XPORTADOECF ) > 0 IF XMODELOECF = "1" //-> Pau com a DLL da Borland desliguei FreeLibrary( XDLL_DARUMA ) ENDIF IF XMODELOECF = "2" FreeLibrary( XDLL_SWEDA ) ENDIF IF XMODELOECF = "3" FreeLibrary( XDLL_BEMATECH ) ENDIF //-> 4 nao declarada ainda DATA REGIS IF XMODELOECF="4" FreeLibrary( XDLL_DATAREGIS ) ENDIF //-> 5 nao declarada ainda QUATTRO IF XMODELOECF="5" FreeLibrary( XDLL_QUATTRO ) ENDIF IF XMODELOECF="6" FreeLibrary( XDLL_AFRAC ) ENDIF //-> 7 Elgin, nao declarada IF XMODELOECF = "7" FreeLibrary( XDLL_ELGIN ) ENDIF IF XMODELOECF = "8" FreeLibrary( XDLL_EPSON ) ENDIF ENDIF RETURN NIL Quote Link to comment Share on other sites More sharing options...
jfaguiar Posted June 17, 2013 Author Report Share Posted June 17, 2013 Resolvido amigos. Alguma coisa, não sei se o programa Winmfd2 alterou a COM1 no arquivo befafi32.ini para COM14. Obrigado Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.