DLL32 type object...

Post Reply
User avatar
Tatoo
Posts: 5
Joined: Thu Jul 09, 2009 6:25 pm

DLL32 type object...

Post by Tatoo »

Buenas...les consulto a los que saben..
Estoy haciendo unas pruebas con unas librerías de EPSON para escanear cheques TM-S1000 y abriendo la DLL he logrado ejecutar algunos comandos básicos...copiándome del ejemplo que trae de VB6.0

VB Public Declare Function BiOpenMonPrinter Lib "EpsStmApiWrapper.dll" (ByVal nType As Integer, ByVal pName As String) As Long
FWH DLL32 FUNCTION BiOpenMonPrinter(TYPE_PRINTER AS _INT, PRINTER_NAME AS STRING) AS _INT PASCAL FROM "BiOpenMonPrinter" LIB "EpsStmApiWrapper.dll"

Pero con la siguiente instrucción no tengo la respuesta para el tipo Object...

VB Public Declare Function BiSCNMICRFunctionPostPrint Lib "EpsStmApiWrapper.dll" (ByVal Handle As Long, ByVal Struct As Object, ByVal bFunction As Integer) As Long

Lo mismo me pasa con una estructura definida así:

Public Type MF_MICR
Rem:// MIC_OCR Section
iSize(1 To 4) As Byte
iVersion(1 To 4) As Byte
iRet(1 To 4) As Byte
bFont As Byte
bMicOcrSelect As Byte
blParsing(1 To 4) As Byte

bStatus As Byte
bDetail As Byte
szMicrStr(1 To MF_MICR_CHAR_MAX) As Byte
stOcrReliableInfo(1 To MF_MICR_CHAR_MAX) As MF_OCR_RELIABLE_INFO
szAccountNumber(1 To MF_MICR_CHAR_MAX) As Byte
szAmount(1 To MF_MICR_CHAR_MAX) As Byte
szBankNumber(1 To MF_MICR_CHAR_MAX) As Byte
szSerialNumber(1 To MF_MICR_CHAR_MAX) As Byte
szEPC(1 To MF_MICR_CHAR_MAX) As Byte
szTransitNumber(1 To MF_MICR_CHAR_MAX) As Byte
lCheckType(1 To 4) As Byte
lCountryCode(1 To 4) As Byte
End Type

Y utilizada en:

Public Declare Function BiGetMicrText Lib "EpsStmApiWrapper.dll" (ByVal Handle As Long, ByVal transactionNumber As Long, ByRef mfMicr As MF_MICR) As Long


Lo intenté por lo que estuve leyendo aquí con una rutina en C dentro de mi programa con infructuosos resultados ya que no logro pasarlo como parámetro a la DLL32...o no lo sé...

#pragma BEGINDUMP

#include <hbapi.h>

#define MF_MICR_CHAR_MAX 81

// Reliability structure
typedef struct
{
char cRecogChar;
LONG lPercentage;
} MF_OCR_RELIABILITY;

// Reliability information structure
typedef struct
{
LONG lPosition;
MF_OCR_RELIABILITY stFirstSelect;
MF_OCR_RELIABILITY stSecondSelect;
} MF_OCR_RELIABLE_INFO;

// MICR/OCR structure
typedef struct
{
int iSize;
int iVersion;
int iRet;
BYTE bFont;
BYTE bMicOcrSelect;
BOOL blParsing;
BYTE bStatus;
BYTE bDetail;
char szMicrStr[MF_MICR_CHAR_MAX];
MF_OCR_RELIABLE_INFO stOcrReliableInfo[MF_MICR_CHAR_MAX];
char szAccountNumber[MF_MICR_CHAR_MAX];
char szAmount[MF_MICR_CHAR_MAX];
char szBankNumber[MF_MICR_CHAR_MAX];
char szSerialNumber[MF_MICR_CHAR_MAX];
char szEPC[MF_MICR_CHAR_MAX];
char szTransitNumber[MF_MICR_CHAR_MAX];
long lCheckType;
long lCountryCode;
} MF_MICR;

#pragma ENDDUMP


Bueno...espero que alguien pueda ayudarme...
Muchas Gracias...
User avatar
karinha
Posts: 4882
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: DLL32 type object...

Post by karinha »

João Santos - São Paulo - Brasil
Post Reply