int WINAPI BiMICRSetReadBackFunction(
int nHandle,
int (CALLBACK *pMicrCB)(void),
LPBYTE pReadBuffSize,
LPBYTE readCharBuff,
LPBYTE pStatus,
LPBYTE pDetail);
typedef int (CALLBACK* MICRCallback)(void);
typedef int (CALLBACK* StatusCallback)(DWORD);
int WINAPI BiSetInkStatusBackFunction(int nHandle,
int (CALLBACK *pStatusCB)(DWORD dwStatus)
);
I need to convert this function to Delphi.
I tried to use headconv4.2
but the resulting static unit is not completed, and errors occur when compiling.
Thanks in advance for your kind help :D
Supposing WINAPI
and CALLBACK
always being __stdcall
, DWORD
being unsigned int
and LPBYTE
as unsigned char *
, you could try this dirty conversion I made:
unit UHeader;
interface
// Data types
type
PByte = ^Byte;
PPByte = ^PByte;
// Prototypes
type
TMICRCallback = function: Integer; stdcall;
TStatusCallback = function(dwParam: Cardinal): Integer; stdcall;
// Functions
type
TBiMICRSetReadBackFunction =
function(nHande: Integer;
pMicrCB: TMICRCallback;
pReadBuffSize: PByte;
readCharBuff: PByte;
pStatus: PByte;
pDetail: PByte
): Integer; stdcall;
var
BiMICRSetReadBackFunction: TBiMICRSetReadBackFunction;
type
TBiSetInkStatusBackFunction =
function(nHandle: Integer;
pStatusCB: TStatusCallback
): Integer; stdcall;
var
BiSetInkStatusBackFunction: TBiSetInkStatusBackFunction;
implementation
end.
I'm not entirely sure, though, if this is correct... but this could be a path for you to try to convert it yourself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With