Consulta HMG_CallDLL
Posted: Sun Nov 17, 2019 3:59 pm
Hola Amigos :
les hago una consulta respecto a la funcion HMG_Calldll() .
Necesito utilizar una dll , donde tengo ejemplos en la cual se usa la misma con Visual Basic , intento adecuar la sintaxis para HMG pero no logro resultados .
La dll esta dedicada a la impresión en una impresora fiscal Epson , el ticket se realiza pero en el nombre del articulo solo imprime el primer caracter y en el precio no logro que imprima los centavos sino solo los enteros .
He utilizado sin problemas otras dll donde he adaptado ejemplos realizados en Visual basic sin mayores problemas pero ahora no comprendo que puede estar pasando .
Saludos
Mario Rafael Mansilla
Hello friends :
I ask you a question about the HMG_Calldll () function.
I need to use a dll, where I have examples in which it is used with Visual Basic, I try to adapt the syntax for HMG but I don't get results.
The dll is dedicated to printing on an Epson fiscal printer, the ticket is made but in the name of the article it only prints the first character and in the price I can not print the pennies but only the integers.
I have used other dll without problems where I have adapted examples made in Visual basic without major problems but now I do not understand what may be happening.
Regards
Mario Rafael Mansilla
Ejemplo Visual basic 6.0
*-----------
*-- Item ---
*-----------
/*
Private Declare Function ImprimirItem Lib "EpsonFiscalInterface.dll" (ByVal id_modificador As Long,
ByVal descripcion As String,
ByVal cantidad As String,
ByVal precio As String,
ByVal id_tasa_iva As Long,
ByVal ii_id As Long,
ByVal ii_valor As String,
ByVal id_codigo As Long,
ByVal codigo As String,
ByVal codigo_unidad_matrix As String,
ByVal codigo_unidad_medida As Long) As Long
' item
error = ImprimirItem(ID_MODIFICADOR_AGREGAR_ITEM,
"Sardinas",
"1.0000",
"100.0000",
ID_TASA_IVA_21_00,
ID_IMPUESTO_NINGUNO,
"",
ID_CODIGO_INTERNO,
"CodigoInterno4567890123456789012345678901234567890",
"", AFIP_CODIGO_UNIDAD_MEDIDA_KILOGRAMO)
msg = MsgBox(error, vbOKOnly, "Error: ImprimirItem()")
*/
Ejemplo adaptado a HMG
nHandler := HMG_CallDLL("EpsonFiscalInterface.dll" , HB_DYN_CTYPE_LONG, "ImprimirItem" , ;
200 , ; // Modificador de item
"Item de prueba 0001" , ; // Descripcion
"1.5000" , ; // Cantidad (5,4)
"1.5000" , ; // Precio (7,4)
5 , ; // Tasa de iva 5 (21.00)
0 , ; // Impuesto interno 0 (ninguno)
"" , ; // Valor impuesto interno
1 , ; // Tipo codigo de producto ( 1 interno 2 matrix)
"CodigoInterno1234" , ; // Valor codigo interno
"" , ; // Valor codigo matrix
7 ) // Codigo unidad de producto
If nHandler <> 0
msginfo(Str(nHandler))
Endif
les hago una consulta respecto a la funcion HMG_Calldll() .
Necesito utilizar una dll , donde tengo ejemplos en la cual se usa la misma con Visual Basic , intento adecuar la sintaxis para HMG pero no logro resultados .
La dll esta dedicada a la impresión en una impresora fiscal Epson , el ticket se realiza pero en el nombre del articulo solo imprime el primer caracter y en el precio no logro que imprima los centavos sino solo los enteros .
He utilizado sin problemas otras dll donde he adaptado ejemplos realizados en Visual basic sin mayores problemas pero ahora no comprendo que puede estar pasando .
Saludos
Mario Rafael Mansilla
Hello friends :
I ask you a question about the HMG_Calldll () function.
I need to use a dll, where I have examples in which it is used with Visual Basic, I try to adapt the syntax for HMG but I don't get results.
The dll is dedicated to printing on an Epson fiscal printer, the ticket is made but in the name of the article it only prints the first character and in the price I can not print the pennies but only the integers.
I have used other dll without problems where I have adapted examples made in Visual basic without major problems but now I do not understand what may be happening.
Regards
Mario Rafael Mansilla
Ejemplo Visual basic 6.0
*-----------
*-- Item ---
*-----------
/*
Private Declare Function ImprimirItem Lib "EpsonFiscalInterface.dll" (ByVal id_modificador As Long,
ByVal descripcion As String,
ByVal cantidad As String,
ByVal precio As String,
ByVal id_tasa_iva As Long,
ByVal ii_id As Long,
ByVal ii_valor As String,
ByVal id_codigo As Long,
ByVal codigo As String,
ByVal codigo_unidad_matrix As String,
ByVal codigo_unidad_medida As Long) As Long
' item
error = ImprimirItem(ID_MODIFICADOR_AGREGAR_ITEM,
"Sardinas",
"1.0000",
"100.0000",
ID_TASA_IVA_21_00,
ID_IMPUESTO_NINGUNO,
"",
ID_CODIGO_INTERNO,
"CodigoInterno4567890123456789012345678901234567890",
"", AFIP_CODIGO_UNIDAD_MEDIDA_KILOGRAMO)
msg = MsgBox(error, vbOKOnly, "Error: ImprimirItem()")
*/
Ejemplo adaptado a HMG
nHandler := HMG_CallDLL("EpsonFiscalInterface.dll" , HB_DYN_CTYPE_LONG, "ImprimirItem" , ;
200 , ; // Modificador de item
"Item de prueba 0001" , ; // Descripcion
"1.5000" , ; // Cantidad (5,4)
"1.5000" , ; // Precio (7,4)
5 , ; // Tasa de iva 5 (21.00)
0 , ; // Impuesto interno 0 (ninguno)
"" , ; // Valor impuesto interno
1 , ; // Tipo codigo de producto ( 1 interno 2 matrix)
"CodigoInterno1234" , ; // Valor codigo interno
"" , ; // Valor codigo matrix
7 ) // Codigo unidad de producto
If nHandler <> 0
msginfo(Str(nHandler))
Endif