HB_LibLoad() acusa erro com DLL Bematech
Moderador: Moderadores
- André Corrêa
- Usuário Nível 2

- Mensagens: 81
- Registrado em: 03 Nov 2015 07:46
- Localização: Caraguatatuba/SP
HB_LibLoad() acusa erro com DLL Bematech
Boa tarde,
Ao utilizar o HB_LibLoad() para carregar a mp2032.dll na versão atual (4.4.02), para comunicação com
a impressora Bematech não fiscal MP4200 TH, acusa o erro "Não foi possível localizar o ponto
de entrada do procedimento ?SI_ResetDevice@@YGHPAX@Z na biblioteca de vínculo dinâmico".
Se utilizar a mesma dll, porém na versão 2.03.23, fazendo a mesma chamada "HB_LibLoad("mp2032.dll")",
não ocorre esse erro.
Na documentação da impressora e nas informações do site, a orientação é para utilizar a versão atual.
Não consegui contato com o suporte deles para confirmar nenhuma informação.
Alguém saberia informar se o erro pode ser por incompatibilidade do Harbour 3.2 com a dll atual da Bematech,
ou se pode ser alguma falha na própria dll?
Obrigado,
Ao utilizar o HB_LibLoad() para carregar a mp2032.dll na versão atual (4.4.02), para comunicação com
a impressora Bematech não fiscal MP4200 TH, acusa o erro "Não foi possível localizar o ponto
de entrada do procedimento ?SI_ResetDevice@@YGHPAX@Z na biblioteca de vínculo dinâmico".
Se utilizar a mesma dll, porém na versão 2.03.23, fazendo a mesma chamada "HB_LibLoad("mp2032.dll")",
não ocorre esse erro.
Na documentação da impressora e nas informações do site, a orientação é para utilizar a versão atual.
Não consegui contato com o suporte deles para confirmar nenhuma informação.
Alguém saberia informar se o erro pode ser por incompatibilidade do Harbour 3.2 com a dll atual da Bematech,
ou se pode ser alguma falha na própria dll?
Obrigado,
-- André Corrêa
"Opte por aquilo que faz o seu coração vibrar, apesar de todas as consequências". - Osho
"Opte por aquilo que faz o seu coração vibrar, apesar de todas as consequências". - Osho
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
HB_LibLoad() acusa erro com DLL Bematech
Estou estranhando a mensagem de erro.
A mensagem de erro é na carga ou no uso?
Se for no uso... é porque mudaram o nome.
A mensagem de erro é na carga ou no uso?
Se for no uso... é porque mudaram o nome.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
HB_LibLoad() acusa erro com DLL Bematech
As declarações constantes no manual.
Pra Visual Basic, precisa converter pra Harbour.
Pra Visual Basic, precisa converter pra Harbour.
Código: Selecionar todos
Public Declare Function IniciaPorta Lib "MP2032.DLL" (ByVal Porta As String) As Integer
Public Declare Function BematechTX Lib "MP2032.DLL" (ByVal comando As String) As Integer
Public Declare Function ComandoTX Lib "MP2032.DLL" (ByVal BufTrans As String, ByVal Flag As Integer) As Integer
Public Declare Function CaracterGrafico Lib "MP2032.DLL" (ByVal BufTrans As String, ByVal TamBufTrans As Integer) As Integer
Public Declare Function Le_Status Lib "MP2032.DLL" () As Integer
Public Declare Function AutenticaDoc Lib "MP2032.DLL" (ByVal texto As String, ByVal tempo As Integer) As Integer
Public Declare Function DocumentInserted Lib "MP2032.DLL" () As Integer
Public Declare Function FechaPorta Lib "MP2032.DLL" () As Integer
Public Declare Function Le_Status_Gaveta Lib "MP2032.DLL" () As Integer
Public Declare Function ConfiguraTamanhoExtrato Lib "MP2032.DLL" (ByVal NumeroLinhas As Integer) As Integer
Public Declare Function HabilitaExtratoLongo Lib "MP2032.DLL" (ByVal Flag As Integer) As Integer
Public Declare Function HabilitaEsperaImpressao Lib "MP2032.DLL" (ByVal Flag As Integer) As Integer
Public Declare Function EsperaImpressao Lib "MP2032.DLL" () As Integer
Public Declare Function ConfiguraModeloImpressora Lib "MP2032.DLL" (ByVal ModeloImpressora As Integer) As Integer
Public Declare Function AcionaGuilhotina Lib "MP2032.DLL" (ByVal Modo As Integer) As Integer
Public Declare Function FormataTX Lib "MP2032.DLL" (ByVal BufTrans As String, ByVal TpoLtra As Integer, ByVal Italic As Integer, ByVal Sublin As Integer, ByVal Expand As Integer, ByVal Enfat As Integer) As Integer
Public Declare Function HabilitaPresenterRetratil Lib "MP2032.DLL" (ByVal iFlag As Integer) As Integer
Public Declare Function ProgramaPresenterRetratil Lib "MP2032.DLL" (ByVal iTempo As Integer) As Integer
Public Declare Function VerificaPapelPresenter Lib "MP2032.DLL" () As Integer
// Função para Configuração dos Códigos de Barras
Public Declare Function ConfiguraCodigoBarras Lib "MP2032.DLL" (ByVal Altura As Integer, ByVal Largura As Integer, ByVal PosicaoCaracteres As Integer, ByVal Fonte As Integer, ByVal Margem As Integer) As Integer
// Funções para impressão dos códigos de barras
Public Declare Function ImprimeCodigoBarrasUPCA Lib "MP2032.DLL" (ByVal Codigo As String) As Integer
Public Declare Function ImprimeCodigoBarrasUPCE Lib "MP2032.DLL" (ByVal Codigo As String) As Integer
Public Declare Function ImprimeCodigoBarrasEAN13 Lib "MP2032.DLL" (ByVal Codigo As String) As Integer
Public Declare Function ImprimeCodigoBarrasEAN8 Lib "MP2032.DLL" (ByVal Codigo As String) As Integer
Public Declare Function ImprimeCodigoBarrasCODE39 Lib "MP2032.DLL" (ByVal Codigo As String) As Integer
Public Declare Function ImprimeCodigoBarrasCODE93 Lib "MP2032.DLL" (ByVal Codigo As String) As Integer
Public Declare Function ImprimeCodigoBarrasCODE128 Lib "MP2032.DLL" (ByVal Codigo As String) As Integer
Public Declare Function ImprimeCodigoBarrasITF Lib "MP2032.DLL" (ByVal Codigo As String) As Integer
Public Declare Function ImprimeCodigoBarrasCODABAR Lib "MP2032.DLL" (ByVal Codigo As String) As Integer
Public Declare Function ImprimeCodigoBarrasISBN Lib "MP2032.DLL" (ByVal Codigo As String) As Integer
Public Declare Function ImprimeCodigoBarrasMSI Lib "MP2032.DLL" (ByVal Codigo As String) As Integer
Public Declare Function ImprimeCodigoBarrasPLESSEY Lib "MP2032.DLL" (ByVal Codigo As String) As Integer
Public Declare Function ImprimeCodigoBarrasPDF417 Lib "MP2032.DLL" (ByVal NivelCorrecaoErros As Integer, ByVal Altura As Integer, ByVal Largura As Integer, ByVal Colunas As Integer, ByVal Codigo As String) As Integer
Public Declare Function ImprimeCodigoQRCODE Lib "MP2032.DLL" ( ByVal errorCorrectionLevel As Integer, ByVal moduleSize as Integer, ByVal codeType As Integer, ByVal QRCodeVersion As Integer, ByVal encodingModes As Integer, ByVal codeQr As String) As Integer
// Funções para impressão de BitMap
Public Declare Function ImprimeBitmap Lib "MP2032.DLL" (ByVal Name As String, ByVal mode As Integer) As Integer
Public Declare Function ImprimeBmpEspecial Lib "MP2032.DLL" (ByVal Name As String, ByVal xScale As Integer, ByVal yScale As Integer, ByVal angle As Integer) As Integer
Public Declare Function AjustaLarguraPapel Lib "MP2032.DLL" (ByVal width As Integer) As Integer
Public Declare Function SelectDithering Lib "MP2032.DLL" (ByVal type As Integer) As Integer
Public Declare Function PrinterReset Lib "MP2032.DLL" () As integer
Public Declare Function LeituraStatusEstendido Lib "MP2032.DLL" (ByVal A() As Byte) As Integer
Public Declare Function IoControl Lib "MP2032.DLL" (ByVal flag as Integer, ByVal mode as Boolean) as Integer
Public Declare Function DefineNVBitmap Lib "MP2032.DLL" (ByVal count As Integer, ByVal filenames() As String) As Integer
Public Declare Function PrintNVBitmap Lib "MP2032.DLL" (ByVal image As Integer, ByVal mode As Integer)As Integer
Public Declare Function Define1NVBitmap Lib "MP2032.DLL" (ByVal filename As String) As Integer
Public Declare Function DefineDLBitmap Lib "MP2032.DLL" (ByVal filename As String) As Integer
Public Declare Function PrintDLBitmap Lib "MP2032.DLL" (ByVal mode As Integer) As Integer
// Função de Firmware
Public Declare Function AtualizaFirmware Lib "MP2032.DLL" ( ByVal fileName as String) as Integer
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- André Corrêa
- Usuário Nível 2

- Mensagens: 81
- Registrado em: 03 Nov 2015 07:46
- Localização: Caraguatatuba/SP
HB_LibLoad() acusa erro com DLL Bematech
Olá Quintas,
O erro ocorre já na carga mesmo.
Parece que ela chama esse método SI_Reset aí automaticamente.
Obrigado,
O erro ocorre já na carga mesmo.
Parece que ela chama esse método SI_Reset aí automaticamente.
Obrigado,
-- André Corrêa
"Opte por aquilo que faz o seu coração vibrar, apesar de todas as consequências". - Osho
"Opte por aquilo que faz o seu coração vibrar, apesar de todas as consequências". - Osho
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
HB_LibLoad() acusa erro com DLL Bematech
fiz um teste, agora é só completar
Harbour 3.4
Resultado:
Harbour 3.4
Código: Selecionar todos
#include "hbdyn.ch"
#include "hbclass.ch"
PROCEDURE Main
LOCAL oPrinter := MP2032():New()
? oPrinter:Le_Status()
oPrinter:Destroy()
RETURN
CREATE CLASS MP2032
VAR nHandle
METHOD Init() INLINE ::nHandle := hb_LibLoad( "mp2032.dll" )
METHOD IniciaPorta( cPorta ) INLINE ::CallDllStd( "IniciaPorta", cPorta )
METHOD BematechTx( cComando ) INLINE ::CallDllStd( "BemathTX", cComando )
METHOD ComandoTx( cBufTrans, nFlag ) INLINE ::CallDllStd( "ComandoTX", cBufTrans, nFlag )
METHOD CaracterGrafico( cBufTrans, nTamBufTrans ) INLINE ::CallDllStd( "CaracterGrafico", cBufTrans, nTamBufTrans )
METHOD Le_Status() INLINE ::CallDllStd( "Le_Status" )
METHOD CallDllStd( cName, ... ) INLINE hb_DynCall( { cName, ::nHandle, HB_DYN_CALLCONV_STDCALL }, ... )
METHOD Destroy() INLINE hb_LibFree( ::nHandle )
ENDCLASS
//METHOD AutenticaDoc( cTexto, nTempo )
//METHOD DocumentInserted()
//METHOD FechaPorta()
//METHOD Le_Status_Gaveta()
//METHOD ConfiguraTamanhoExtrato( nNumeroLinhas )
//METHOD HabilitaExtratoLongo( nFlag )
//METHOD HabilitaEsperaImpressao( nFlag )
//METHOD EsperaImpressao()
//METHOD ConfiguraModeloImpressora( nModeloImpressora )
//METHOD AdicionaGuilhotina( nModo )
//METHOD FormataTx( cBufTrans, nTpoLtra, nItalic, nSublin, nExpand, nEnfat )
//METHOD HabilitaPresenterRetratil( nFlag )
//METHOD ProgramaPresenterRetratil( nTempo )
//METHOD VerificaPapelPresenter()
// Public Declare Function IniciaPorta Lib "MP2032.DLL" (ByVal Porta As String) As Integer
// Public Declare Function BematechTX Lib "MP2032.DLL" (ByVal comando As String) As Integer
// Public Declare Function ComandoTX Lib "MP2032.DLL" (ByVal BufTrans As String, ByVal Flag As Integer) As Integer
// Public Declare Function CaracterGrafico Lib "MP2032.DLL" (ByVal BufTrans As String, ByVal TamBufTrans As Integer) As Integer
// Public Declare Function Le_Status Lib "MP2032.DLL" () As Integer
// Public Declare Function AutenticaDoc Lib "MP2032.DLL" (ByVal texto As String, ByVal tempo As Integer) As Integer
// Public Declare Function DocumentInserted Lib "MP2032.DLL" () As Integer
// Public Declare Function FechaPorta Lib "MP2032.DLL" () As Integer
// Public Declare Function Le_Status_Gaveta Lib "MP2032.DLL" () As Integer
// Public Declare Function ConfiguraTamanhoExtrato Lib "MP2032.DLL" (ByVal NumeroLinhas As Integer) As Integer
// Public Declare Function HabilitaExtratoLongo Lib "MP2032.DLL" (ByVal Flag As Integer) As Integer
// Public Declare Function HabilitaEsperaImpressao Lib "MP2032.DLL" (ByVal Flag As Integer) As Integer
// Public Declare Function EsperaImpressao Lib "MP2032.DLL" () As Integer
// Public Declare Function ConfiguraModeloImpressora Lib "MP2032.DLL" (ByVal ModeloImpressora As Integer) As Integer
// Public Declare Function AcionaGuilhotina Lib "MP2032.DLL" (ByVal Modo As Integer) As Integer
// Public Declare Function FormataTX Lib "MP2032.DLL" (ByVal BufTrans As String, ByVal TpoLtra As Integer, ByVal Italic As Integer, ByVal Sublin As Integer, ByVal Expand As Integer, ByVal Enfat As Integer) As Integer
// Public Declare Function HabilitaPresenterRetratil Lib "MP2032.DLL" (ByVal iFlag As Integer) As Integer
// Public Declare Function ProgramaPresenterRetratil Lib "MP2032.DLL" (ByVal iTempo As Integer) As Integer
// Public Declare Function VerificaPapelPresenter Lib "MP2032.DLL" () As Integer
// Função para Configuração dos Códigos de Barras
// Public Declare Function ConfiguraCodigoBarras Lib "MP2032.DLL" (ByVal Altura As Integer, ByVal Largura As Integer, ByVal PosicaoCaracteres As Integer, ByVal Fonte As Integer, ByVal Margem As Integer) As Integer
// Funções para impressão dos códigos de barras
// Public Declare Function ImprimeCodigoBarrasUPCA Lib "MP2032.DLL" (ByVal Codigo As String) As Integer
// Public Declare Function ImprimeCodigoBarrasUPCE Lib "MP2032.DLL" (ByVal Codigo As String) As Integer
// Public Declare Function ImprimeCodigoBarrasEAN13 Lib "MP2032.DLL" (ByVal Codigo As String) As Integer
// Public Declare Function ImprimeCodigoBarrasEAN8 Lib "MP2032.DLL" (ByVal Codigo As String) As Integer
// Public Declare Function ImprimeCodigoBarrasCODE39 Lib "MP2032.DLL" (ByVal Codigo As String) As Integer
// Public Declare Function ImprimeCodigoBarrasCODE93 Lib "MP2032.DLL" (ByVal Codigo As String) As Integer
// Public Declare Function ImprimeCodigoBarrasCODE128 Lib "MP2032.DLL" (ByVal Codigo As String) As Integer
// Public Declare Function ImprimeCodigoBarrasITF Lib "MP2032.DLL" (ByVal Codigo As String) As Integer
// Public Declare Function ImprimeCodigoBarrasCODABAR Lib "MP2032.DLL" (ByVal Codigo As String) As Integer
// Public Declare Function ImprimeCodigoBarrasISBN Lib "MP2032.DLL" (ByVal Codigo As String) As Integer
// Public Declare Function ImprimeCodigoBarrasMSI Lib "MP2032.DLL" (ByVal Codigo As String) As Integer
// Public Declare Function ImprimeCodigoBarrasPLESSEY Lib "MP2032.DLL" (ByVal Codigo As String) As Integer
// Public Declare Function ImprimeCodigoBarrasPDF417 Lib "MP2032.DLL" (ByVal NivelCorrecaoErros As Integer, ByVal Altura As Integer, ByVal Largura As Integer, ByVal Colunas As Integer, ByVal Codigo As String) As Integer
// Public Declare Function ImprimeCodigoQRCODE Lib "MP2032.DLL" ( ByVal errorCorrectionLevel As Integer, ByVal moduleSize as Integer, ByVal codeType As Integer, ByVal QRCodeVersion As Integer, ByVal encodingModes As Integer, ByVal codeQr As String) As Integer
// Funções para impressão de BitMap
// Public Declare Function ImprimeBitmap Lib "MP2032.DLL" (ByVal Name As String, ByVal mode As Integer) As Integer
// Public Declare Function ImprimeBmpEspecial Lib "MP2032.DLL" (ByVal Name As String, ByVal xScale As Integer, ByVal yScale As Integer, ByVal angle As Integer) As Integer
// Public Declare Function AjustaLarguraPapel Lib "MP2032.DLL" (ByVal width As Integer) As Integer
// Public Declare Function SelectDithering Lib "MP2032.DLL" (ByVal type As Integer) As Integer
// Public Declare Function PrinterReset Lib "MP2032.DLL" () As integer
// Public Declare Function LeituraStatusEstendido Lib "MP2032.DLL" (ByVal A() As Byte) As Integer
// Public Declare Function IoControl Lib "MP2032.DLL" (ByVal flag as Integer, ByVal mode as Boolean) as Integer
// Public Declare Function DefineNVBitmap Lib "MP2032.DLL" (ByVal count As Integer, ByVal filenames() As String) As Integer
// Public Declare Function PrintNVBitmap Lib "MP2032.DLL" (ByVal image As Integer, ByVal mode As Integer)As Integer
// Public Declare Function Define1NVBitmap Lib "MP2032.DLL" (ByVal filename As String) As Integer
// Public Declare Function DefineDLBitmap Lib "MP2032.DLL" (ByVal filename As String) As Integer
// Public Declare Function PrintDLBitmap Lib "MP2032.DLL" (ByVal mode As Integer) As Integer
// Função de Firmware
// Public Declare Function AtualizaFirmware Lib "MP2032.DLL" ( ByVal fileName as String) as Integer
d:\temp>test
0
d:\temp>
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- André Corrêa
- Usuário Nível 2

- Mensagens: 81
- Registrado em: 03 Nov 2015 07:46
- Localização: Caraguatatuba/SP
HB_LibLoad() acusa erro com DLL Bematech
Qual versão do Harbour você está usando, Quintas ?
Se não deu erro ao criar a classe, é porque o HB_LibLoad() funcionou.
Se não deu erro ao criar a classe, é porque o HB_LibLoad() funcionou.
-- André Corrêa
"Opte por aquilo que faz o seu coração vibrar, apesar de todas as consequências". - Osho
"Opte por aquilo que faz o seu coração vibrar, apesar de todas as consequências". - Osho
- André Corrêa
- Usuário Nível 2

- Mensagens: 81
- Registrado em: 03 Nov 2015 07:46
- Localização: Caraguatatuba/SP
HB_LibLoad() acusa erro com DLL Bematech
Falha minha, já vi a versão.
Aqui estou usando a 3.2, pode ser isso?
Aqui estou usando a 3.2, pode ser isso?
-- André Corrêa
"Opte por aquilo que faz o seu coração vibrar, apesar de todas as consequências". - Osho
"Opte por aquilo que faz o seu coração vibrar, apesar de todas as consequências". - Osho
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
HB_LibLoad() acusa erro com DLL Bematech
Achei chato só um zero, então aumentei o teste:
Será que é da impressora correta?
Código: Selecionar todos
#include "hbdyn.ch"
#include "hbclass.ch"
PROCEDURE Main
LOCAL oPrinter := MP2032():New()
? oPrinter:Le_Status()
? oPrinter:IniciaPorta()
? oPrinter:ComandoTx( "sei la" )
? oPrinter:nHandle
oPrinter:Destroy()
RETURN
Se tem handle, é porque foi carregada.d:\temp>test
0
0
0
0x001CD824
d:\temp>
Será que é da impressora correta?
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- André Corrêa
- Usuário Nível 2

- Mensagens: 81
- Registrado em: 03 Nov 2015 07:46
- Localização: Caraguatatuba/SP
HB_LibLoad() acusa erro com DLL Bematech
Então Quintas, não tem handle, ele acusa o erro logo ao
carregar, na HB_LibLoad() mesmo. O handle retorna nulo.
Por isso fiquei na dúvida se pode ser incompatibilidade com a versão do Harbour.
Aqui nós usamos a versão 3.2. Não podemos usar a 3.4 no momento.
carregar, na HB_LibLoad() mesmo. O handle retorna nulo.
Por isso fiquei na dúvida se pode ser incompatibilidade com a versão do Harbour.
Aqui nós usamos a versão 3.2. Não podemos usar a 3.4 no momento.
-- André Corrêa
"Opte por aquilo que faz o seu coração vibrar, apesar de todas as consequências". - Osho
"Opte por aquilo que faz o seu coração vibrar, apesar de todas as consequências". - Osho
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
HB_LibLoad() acusa erro com DLL Bematech
É Harbour 3.4 puro, sem nada adicional.
Mas faz parte do Harbour core, deveria ser igual nos dois.
Compile somente o meu exemplo pra ver se funciona.
Se funcionar... pode ser compatibilidade xHarbour atrapalhando.
Lembro da outra vez que olhei LIBs da Bematech, que a lib de uma impressora não tem nada a ver com a outra, mas isso seria no uso, não na carga.
Mas faz parte do Harbour core, deveria ser igual nos dois.
Compile somente o meu exemplo pra ver se funciona.
Se funcionar... pode ser compatibilidade xHarbour atrapalhando.
Lembro da outra vez que olhei LIBs da Bematech, que a lib de uma impressora não tem nada a ver com a outra, mas isso seria no uso, não na carga.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
-
marcosgambeta
- Usuário Nível 3

- Mensagens: 332
- Registrado em: 16 Jun 2005 22:53
HB_LibLoad() acusa erro com DLL Bematech
Confira se a dll é dependente de outras dll's e se elas estão atualizadas também.André Corrêa escreveu:Ao utilizar o HB_LibLoad() para carregar a mp2032.dll na versão atual (4.4.02), para comunicação com
a impressora Bematech não fiscal MP4200 TH, acusa o erro "Não foi possível localizar o ponto
de entrada do procedimento ?SI_ResetDevice@@YGHPAX@Z na biblioteca de vínculo dinâmico".
O erro pode estar, não na dll carregada, mas talvez numa outra que ela tenta usar.
Peguei um arquivo da Bematech para checar o conteúdo e vi que tem uma dll chamada SiUSBXp.dll (o erro cita a função SI_ResetDevice). Talvez o problema seja com ela.
http://arquivospartners.bematech.com.br ... P20_MI.zip
Atenciosamente,
Marcos Antonio Gambeta
Marcos Antonio Gambeta
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
HB_LibLoad() acusa erro com DLL Bematech
É justamente o que ia mostrar, que tem outra DLL na pasta, e se não fosse necessária não colocariam lá.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- André Corrêa
- Usuário Nível 2

- Mensagens: 81
- Registrado em: 03 Nov 2015 07:46
- Localização: Caraguatatuba/SP
HB_LibLoad() acusa erro com DLL Bematech
Todas essas dlls estão na pasta de trabalho.
Estranho é que se acessar a página da impressora MP4200TH, no site
da Bematech, não tem as dlls para download. Só encontrei no site de suporte
deles, o partners.bematech. Para outras impressoras, como a MP100S TH, tem
a dll para download direto na página e consta que é a mesma para a MP4200.
Baixei de lá também, mas ocorre o mesmo erro. Só carrega corretamente com
essa versão antiga.
Estranho é que se acessar a página da impressora MP4200TH, no site
da Bematech, não tem as dlls para download. Só encontrei no site de suporte
deles, o partners.bematech. Para outras impressoras, como a MP100S TH, tem
a dll para download direto na página e consta que é a mesma para a MP4200.
Baixei de lá também, mas ocorre o mesmo erro. Só carrega corretamente com
essa versão antiga.
-- André Corrêa
"Opte por aquilo que faz o seu coração vibrar, apesar de todas as consequências". - Osho
"Opte por aquilo que faz o seu coração vibrar, apesar de todas as consequências". - Osho
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
HB_LibLoad() acusa erro com DLL Bematech
Uia, nem sabia que este utilitário servia pra isso.
Mostra as dependências, e os nomes de funções da DLL.
o utilitário é depends
Mostra as dependências, e os nomes de funções da DLL.
o utilitário é depends
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
HB_LibLoad() acusa erro com DLL Bematech
http://partners.bematech.com.br/suporte ... aspx?ID=90
Diz 4200TH e MP100STH e o download está embaixo
Diz 4200TH e MP100STH e o download está embaixo
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/