convert C to fivewin
convert C to fivewin
I need to utilize the functions of CEFDLL.DLL into my fivewin program
first i have run
IMPLIB cefdll.lib CEFDLL.DLL
for creating the cefdll.lib
now i need to convert the follow C function for fivewin:
DWORD CEFOpen (int intCom, DWORD dwBaudRate, BYTE byParity, BYTE byDataBit, BYTE byStopBit, BYTE byFlowControl, LPDWORD lpdwSysError)
DWORD CEFOpenEth (LPTSTR strIp, DWORD dwPort, LPDWORD lpdwSysError)
DWORD CEFOpenUSB (LPTSTR strPrinterName, LPDWORD lpdwSysError)
DWORD CEFWrite (unsigned char *lpCommand, LPDWORD lpdwSysError)
DWORD CEFClose (LPDWORD lpdwSysError)
DWORD CEFRead (unsigned char *lpMemArea, LPDWORD pdwByteRead, LPDWORD lpdwSysError)
DWORD CEFGetVersion (LPTSTR lpVer, LPDWORD lpdwSysError)
DWORD CEFOpenUnSafe (int intCom, DWORD dwBaudRate, BYTE byParity, BYTE byDataBit, BYTE byStopBit, BYTE byFlowControl, LPDWORD lpdwSysError)
DWORD CEFOpenEthUnSafe(LPTSTR strIp, DWORD dwPort, LPDWORD lpdwSysError)
DWORD CEFOpenUSBUnSafe(LPTSTR strPrinterName, LPDWORD lpdwSysError)
please help me
thanks
first i have run
IMPLIB cefdll.lib CEFDLL.DLL
for creating the cefdll.lib
now i need to convert the follow C function for fivewin:
DWORD CEFOpen (int intCom, DWORD dwBaudRate, BYTE byParity, BYTE byDataBit, BYTE byStopBit, BYTE byFlowControl, LPDWORD lpdwSysError)
DWORD CEFOpenEth (LPTSTR strIp, DWORD dwPort, LPDWORD lpdwSysError)
DWORD CEFOpenUSB (LPTSTR strPrinterName, LPDWORD lpdwSysError)
DWORD CEFWrite (unsigned char *lpCommand, LPDWORD lpdwSysError)
DWORD CEFClose (LPDWORD lpdwSysError)
DWORD CEFRead (unsigned char *lpMemArea, LPDWORD pdwByteRead, LPDWORD lpdwSysError)
DWORD CEFGetVersion (LPTSTR lpVer, LPDWORD lpdwSysError)
DWORD CEFOpenUnSafe (int intCom, DWORD dwBaudRate, BYTE byParity, BYTE byDataBit, BYTE byStopBit, BYTE byFlowControl, LPDWORD lpdwSysError)
DWORD CEFOpenEthUnSafe(LPTSTR strIp, DWORD dwPort, LPDWORD lpdwSysError)
DWORD CEFOpenUSBUnSafe(LPTSTR strPrinterName, LPDWORD lpdwSysError)
please help me
thanks
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: convert C to fivewin
// DWORD CEFOpen (int intCom, DWORD dwBaudRate, BYTE byParity, BYTE byDataBit, BYTE byStopBit, BYTE byFlowControl, LPDWORD lpdwSysError)
HB_FUNC( CEFOPEN )
{
DWORD dwSysError;
hb_retnl( CEFOpen( hb_parnl( 1 ), hb_parnl( 2 ), hb_parnl( 3 ), hb_parnl( 4 ), hb_parnl( 5 ), hb_parnl( 6 ), &dwSysError ) );
}
HB_FUNC( CEFOPEN )
{
DWORD dwSysError;
hb_retnl( CEFOpen( hb_parnl( 1 ), hb_parnl( 2 ), hb_parnl( 3 ), hb_parnl( 4 ), hb_parnl( 5 ), hb_parnl( 6 ), &dwSysError ) );
}
Re: convert C to fivewin
Dear Antonio,
thanks but now i get this error
Compiling: SA.HBP...
Compiling 'SA.PRG'...
Warning W8065 SA.PRG 53: Call to function 'CEFOpen' with no prototype in function HB_FUN_CEFOPEN
Error: Unresolved external '_CEFOpen' referenced from C:\USERS\SANTO\APPDATA\LOCAL\TEMP\HBMK_VE2YOI.DIR\SA.OBJ
Error: Unable to perform link
hbmk2[SA]: Error: Running linker. 2
1 Files, 1 Warnings, 3 Errors
Compile time: 1.26s Link time: 0s Total time: 1.26s
this is the documentation syntax
DWORD CEFOpen (int intCom, DWORD dwBaudRate, BYTE byParity, BYTE byDataBit, BYTE byStopBit, BYTE byFlowControl, LPDWORD lpdwSysError)
[Description]
Open communication port and set parameters for serial communication.
[Parameters]
intCom : serial communication port number;
dwBaudRate : baud rate;
byParity : parity;
byDataBit : data bits;
byStopBit : stop bits;
byFlowControl : fl ow control;
lpdwSysError : system error returned.
thanks
thanks but now i get this error
Compiling: SA.HBP...
Compiling 'SA.PRG'...
Warning W8065 SA.PRG 53: Call to function 'CEFOpen' with no prototype in function HB_FUN_CEFOPEN
Error: Unresolved external '_CEFOpen' referenced from C:\USERS\SANTO\APPDATA\LOCAL\TEMP\HBMK_VE2YOI.DIR\SA.OBJ
Error: Unable to perform link
hbmk2[SA]: Error: Running linker. 2
1 Files, 1 Warnings, 3 Errors
Compile time: 1.26s Link time: 0s Total time: 1.26s
this is the documentation syntax
DWORD CEFOpen (int intCom, DWORD dwBaudRate, BYTE byParity, BYTE byDataBit, BYTE byStopBit, BYTE byFlowControl, LPDWORD lpdwSysError)
[Description]
Open communication port and set parameters for serial communication.
[Parameters]
intCom : serial communication port number;
dwBaudRate : baud rate;
byParity : parity;
byDataBit : data bits;
byStopBit : stop bits;
byFlowControl : fl ow control;
lpdwSysError : system error returned.
thanks
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: convert C to fivewin
Are you linking cefdll.lib ?
You have to link it
You have to link it
Re: convert C to fivewin
I have linked the cefdll.lib
but i get always the errror
Warning W8065 SA.PRG 53: Call to function 'CEFOpen' with no prototype in function HB_FUN_CEFOPEN
Error: Unresolved external '_CEFOpen' referenced from C:\USERS\SANTO\APPDATA\LOCAL\TEMP\HBMK_VE2YOI.DIR\SA.OBJ
thanks
but i get always the errror
Warning W8065 SA.PRG 53: Call to function 'CEFOpen' with no prototype in function HB_FUN_CEFOPEN
Error: Unresolved external '_CEFOpen' referenced from C:\USERS\SANTO\APPDATA\LOCAL\TEMP\HBMK_VE2YOI.DIR\SA.OBJ
thanks
Re: convert C to fivewin
You do not have any file with extension .H ( for #include " .H" )
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
Re: convert C to fivewin
I do not have any file .H
the cefdll.dll is a dll for a cash register CUSTOM XKUBE
you can download from the follow link:
www.veneziasoft.com/download/custom/cefdll125.zip
there is any samples in the zip file
but i dont know how interface it with fivewin
thanks for you help
the cefdll.dll is a dll for a cash register CUSTOM XKUBE
you can download from the follow link:
www.veneziasoft.com/download/custom/cefdll125.zip
there is any samples in the zip file
but i dont know how interface it with fivewin
thanks for you help
Re: convert C to fivewin
Ok, try putting these lines at the beginning of the .C file, after the includes
---------------------------------- EDITED -------------------------------
I forgot to put ";" At the end of each line
Code: Select all
DWORD CEFOpen (int intCom, DWORD dwBaudRate, BYTE byParity, BYTE byDataBit, BYTE byStopBit, BYTE byFlowControl, LPDWORD lpdwSysError);
DWORD CEFOpenEth (LPTSTR strIp, DWORD dwPort, LPDWORD lpdwSysError);
DWORD CEFOpenUSB (LPTSTR strPrinterName, LPDWORD lpdwSysError);
DWORD CEFWrite (unsigned char *lpCommand, LPDWORD lpdwSysError);
DWORD CEFClose (LPDWORD lpdwSysError);
DWORD CEFRead (unsigned char *lpMemArea, LPDWORD pdwByteRead, LPDWORD lpdwSysError);
DWORD CEFGetVersion (LPTSTR lpVer, LPDWORD lpdwSysError);
DWORD CEFOpenUnSafe (int intCom, DWORD dwBaudRate, BYTE byParity, BYTE byDataBit, BYTE byStopBit, BYTE byFlowControl, LPDWORD lpdwSysError);
DWORD CEFOpenEthUnSafe(LPTSTR strIp, DWORD dwPort, LPDWORD lpdwSysError);
DWORD CEFOpenUSBUnSafe(LPTSTR strPrinterName, LPDWORD lpdwSysError);
I forgot to put ";" At the end of each line
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
Re: convert C to fivewin
hello i try but i get error
any sample please
thanks
any sample please
thanks
Re: convert C to fivewin
the problem is IMPLIB without -a
now it's ok
here the code:
thanks to all
===
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
DWORD CEFGetVersion(LPTSTR lpVer, LPDWORD lpdwSysError);
DWORD CEFRead(unsigned char *lpMemArea, LPDWORD pdwByteRead, LPDWORD lpdwSysError);
DWORD CEFWrite(unsigned char *lpCommand, LPDWORD lpdwSysError);
DWORD CEFClose(LPDWORD lpdwSysError);
DWORD CEFOpen(int intCom, DWORD dwBaudRate, BYTE byParity, BYTE byDataBit, BYTE byStopBit, BYTE byFlowControl, LPDWORD lpdwSysError);
DWORD CEFOpenEth(LPTSTR strIp, DWORD dwPort, LPDWORD lpdwSysError);
DWORD CEFOpenUSB(LPTSTR strPrinterName, LPDWORD lpdwSysError);
DWORD CEFOpenUnSafe(int intCom, DWORD dwBaudRate, BYTE byParity, BYTE byDataBit, BYTE byStopBit, BYTE byFlowControl, LPDWORD lpdwSysError);
DWORD CEFOpenEthUnSafe(LPTSTR strIp, DWORD dwPort, LPDWORD lpdwSysError);
DWORD CEFOpenUSBUnSafe(LPTSTR strPrinterName, LPDWORD lpdwSysError);
// DWORD CEFGetVersion(LPTSTR lpVer, LPDWORD lpdwSysError);
HB_FUNC( CEFVERSION )
{
DWORD dwSysError;
hb_retnl( CEFGetVersion( (LPSTR)hb_parc(1) , &dwSysError ) );
}
// DWORD CEFRead(unsigned char *lpMemArea, LPDWORD pdwByteRead, LPDWORD lpdwSysError);
HB_FUNC( CEFREAD )
{
DWORD dwSysError;
hb_retnl( CEFRead( (LPBYTE)hb_parc(1) , (LPDWORD)hb_parc(2) , &dwSysError ) );
}
// DWORD CEFWrite(unsigned char *lpCommand, LPDWORD lpdwSysError);
HB_FUNC( CEFWRITE )
{
DWORD dwSysError;
hb_retnl( CEFWrite( (LPBYTE)hb_parc(1) , &dwSysError ) );
}
// DWORD CEFClose(LPDWORD lpdwSysError);
HB_FUNC( CEFCLOSE )
{
DWORD dwSysError;
hb_retnl( CEFClose( &dwSysError ) );
}
// DWORD CEFOpen(int intCom, DWORD dwBaudRate, BYTE byParity, BYTE byDataBit, BYTE byStopBit, BYTE byFlowControl, LPDWORD lpdwSysError);
HB_FUNC( CEFOPEN )
{
DWORD dwSysError;
hb_retnl( CEFOpen( hb_parnl(1) , hb_parnl(2) , hb_parnl(3) , hb_parnl(4) , hb_parnl(5), hb_parnl(6) , &dwSysError ) );
}
// DWORD CEFOpenEth(LPTSTR strIp, DWORD dwPort, LPDWORD lpdwSysError);
HB_FUNC( CEFOPENETH )
{
LPSTR strIp = (LPSTR) hb_parc(1);
DWORD dwSysError;
hb_retnl( CEFOpenEth( strIp , hb_parnl(2) , &dwSysError ) );
}
// DWORD CEFOpenUSB(LPTSTR strPrinterName, LPDWORD lpdwSysError);
HB_FUNC( CEFOPENUSB )
{
LPSTR strPrinterName = (LPSTR) hb_parc(1);
DWORD dwSysError;
hb_retnl( CEFOpenUSB( strPrinterName , &dwSysError ) );
}
// DWORD CEFOpenUnSafe(int intCom, DWORD dwBaudRate, BYTE byParity, BYTE byDataBit, BYTE byStopBit, BYTE byFlowControl, LPDWORD lpdwSysError);
HB_FUNC( CEFOPENUNSAFE )
{
DWORD dwSysError;
hb_retnl( CEFOpenUnSafe( hb_parnl(1) , hb_parnl(2) , hb_parnl(3) , hb_parnl(4) , hb_parnl(5), hb_parnl(6) , &dwSysError ) );
}
// DWORD CEFOpenEthUnSafe(LPTSTR strIp, DWORD dwPort, LPDWORD lpdwSysError);
HB_FUNC( CEFOPENETHUNSAFE )
{
LPSTR strIp = (LPSTR) hb_parc(1);
DWORD dwSysError;
hb_retnl( CEFOpenEthUnSafe( strIp , hb_parnl(2) , &dwSysError ) );
}
// DWORD CEFOpenUSBUnSafe(LPTSTR strPrinterName, LPDWORD lpdwSysError);
HB_FUNC( CEFOPENUSBUNSAFE )
{
LPSTR strPrinterName = (LPSTR) hb_parc(1);
DWORD dwSysError;
hb_retnl( CEFOpenUSBUnSafe( strPrinterName , &dwSysError ) );
}
#pragma ENDDUMP
now it's ok
here the code:
thanks to all
===
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
DWORD CEFGetVersion(LPTSTR lpVer, LPDWORD lpdwSysError);
DWORD CEFRead(unsigned char *lpMemArea, LPDWORD pdwByteRead, LPDWORD lpdwSysError);
DWORD CEFWrite(unsigned char *lpCommand, LPDWORD lpdwSysError);
DWORD CEFClose(LPDWORD lpdwSysError);
DWORD CEFOpen(int intCom, DWORD dwBaudRate, BYTE byParity, BYTE byDataBit, BYTE byStopBit, BYTE byFlowControl, LPDWORD lpdwSysError);
DWORD CEFOpenEth(LPTSTR strIp, DWORD dwPort, LPDWORD lpdwSysError);
DWORD CEFOpenUSB(LPTSTR strPrinterName, LPDWORD lpdwSysError);
DWORD CEFOpenUnSafe(int intCom, DWORD dwBaudRate, BYTE byParity, BYTE byDataBit, BYTE byStopBit, BYTE byFlowControl, LPDWORD lpdwSysError);
DWORD CEFOpenEthUnSafe(LPTSTR strIp, DWORD dwPort, LPDWORD lpdwSysError);
DWORD CEFOpenUSBUnSafe(LPTSTR strPrinterName, LPDWORD lpdwSysError);
// DWORD CEFGetVersion(LPTSTR lpVer, LPDWORD lpdwSysError);
HB_FUNC( CEFVERSION )
{
DWORD dwSysError;
hb_retnl( CEFGetVersion( (LPSTR)hb_parc(1) , &dwSysError ) );
}
// DWORD CEFRead(unsigned char *lpMemArea, LPDWORD pdwByteRead, LPDWORD lpdwSysError);
HB_FUNC( CEFREAD )
{
DWORD dwSysError;
hb_retnl( CEFRead( (LPBYTE)hb_parc(1) , (LPDWORD)hb_parc(2) , &dwSysError ) );
}
// DWORD CEFWrite(unsigned char *lpCommand, LPDWORD lpdwSysError);
HB_FUNC( CEFWRITE )
{
DWORD dwSysError;
hb_retnl( CEFWrite( (LPBYTE)hb_parc(1) , &dwSysError ) );
}
// DWORD CEFClose(LPDWORD lpdwSysError);
HB_FUNC( CEFCLOSE )
{
DWORD dwSysError;
hb_retnl( CEFClose( &dwSysError ) );
}
// DWORD CEFOpen(int intCom, DWORD dwBaudRate, BYTE byParity, BYTE byDataBit, BYTE byStopBit, BYTE byFlowControl, LPDWORD lpdwSysError);
HB_FUNC( CEFOPEN )
{
DWORD dwSysError;
hb_retnl( CEFOpen( hb_parnl(1) , hb_parnl(2) , hb_parnl(3) , hb_parnl(4) , hb_parnl(5), hb_parnl(6) , &dwSysError ) );
}
// DWORD CEFOpenEth(LPTSTR strIp, DWORD dwPort, LPDWORD lpdwSysError);
HB_FUNC( CEFOPENETH )
{
LPSTR strIp = (LPSTR) hb_parc(1);
DWORD dwSysError;
hb_retnl( CEFOpenEth( strIp , hb_parnl(2) , &dwSysError ) );
}
// DWORD CEFOpenUSB(LPTSTR strPrinterName, LPDWORD lpdwSysError);
HB_FUNC( CEFOPENUSB )
{
LPSTR strPrinterName = (LPSTR) hb_parc(1);
DWORD dwSysError;
hb_retnl( CEFOpenUSB( strPrinterName , &dwSysError ) );
}
// DWORD CEFOpenUnSafe(int intCom, DWORD dwBaudRate, BYTE byParity, BYTE byDataBit, BYTE byStopBit, BYTE byFlowControl, LPDWORD lpdwSysError);
HB_FUNC( CEFOPENUNSAFE )
{
DWORD dwSysError;
hb_retnl( CEFOpenUnSafe( hb_parnl(1) , hb_parnl(2) , hb_parnl(3) , hb_parnl(4) , hb_parnl(5), hb_parnl(6) , &dwSysError ) );
}
// DWORD CEFOpenEthUnSafe(LPTSTR strIp, DWORD dwPort, LPDWORD lpdwSysError);
HB_FUNC( CEFOPENETHUNSAFE )
{
LPSTR strIp = (LPSTR) hb_parc(1);
DWORD dwSysError;
hb_retnl( CEFOpenEthUnSafe( strIp , hb_parnl(2) , &dwSysError ) );
}
// DWORD CEFOpenUSBUnSafe(LPTSTR strPrinterName, LPDWORD lpdwSysError);
HB_FUNC( CEFOPENUSBUNSAFE )
{
LPSTR strPrinterName = (LPSTR) hb_parc(1);
DWORD dwSysError;
hb_retnl( CEFOpenUSBUnSafe( strPrinterName , &dwSysError ) );
}
#pragma ENDDUMP
Re: convert C to fivewin
Great
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: convert C to fivewin
IMO, this should be this way:
// DWORD CEFRead(unsigned char *lpMemArea, LPDWORD pdwByteRead, LPDWORD lpdwSysError);
HB_FUNC( CEFREAD )
{
DWORD dwByteRead, dwSysError;
hb_retnl( CEFRead( ( LPBYTE ) hb_parnl(1) , &dwByteRead, &dwSysError ) );
}
// DWORD CEFRead(unsigned char *lpMemArea, LPDWORD pdwByteRead, LPDWORD lpdwSysError);
HB_FUNC( CEFREAD )
{
DWORD dwByteRead, dwSysError;
hb_retnl( CEFRead( ( LPBYTE ) hb_parnl(1) , &dwByteRead, &dwSysError ) );
}
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: convert C to fivewin
As all functions use DWORD dwSysError; you could use a static variable:
static DWORD dwSysError;
and remove it from all functions. Next you can implement a function to retrieve its value:
static DWORD dwSysError;
and remove it from all functions. Next you can implement a function to retrieve its value:
Code: Select all
HB_FUNC( CEF_GETSYSERROR )
{
hb_retnl( dwSysError );
}
Re: convert C to fivewin
Thank You Antonio
Re: convert C to fivewin
now it's better
here the new code:
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
static DWORD dwSysError;
DWORD CEFGetVersion(LPTSTR lpVer, LPDWORD lpdwSysError);
DWORD CEFRead(unsigned char *lpMemArea, LPDWORD pdwByteRead, LPDWORD lpdwSysError);
DWORD CEFWrite(unsigned char *lpCommand, LPDWORD lpdwSysError);
DWORD CEFClose(LPDWORD lpdwSysError);
DWORD CEFOpen(int intCom, DWORD dwBaudRate, BYTE byParity, BYTE byDataBit, BYTE byStopBit, BYTE byFlowControl, LPDWORD lpdwSysError);
DWORD CEFOpenEth(LPTSTR strIp, DWORD dwPort, LPDWORD lpdwSysError);
DWORD CEFOpenUSB(LPTSTR strPrinterName, LPDWORD lpdwSysError);
DWORD CEFOpenUnSafe(int intCom, DWORD dwBaudRate, BYTE byParity, BYTE byDataBit, BYTE byStopBit, BYTE byFlowControl, LPDWORD lpdwSysError);
DWORD CEFOpenEthUnSafe(LPTSTR strIp, DWORD dwPort, LPDWORD lpdwSysError);
DWORD CEFOpenUSBUnSafe(LPTSTR strPrinterName, LPDWORD lpdwSysError);
HB_FUNC( CEF_GETSYSERROR )
{
hb_retnl( dwSysError );
}
// DWORD CEFGetVersion(LPTSTR lpVer, LPDWORD lpdwSysError);
HB_FUNC( CEFVERSION )
{
hb_retnl( CEFGetVersion( (LPSTR)hb_parc(1) , &dwSysError ) );
}
// DWORD CEFRead(unsigned char *lpMemArea, LPDWORD pdwByteRead, LPDWORD lpdwSysError);
HB_FUNC( CEFREAD )
{
DWORD dwByteRead;
hb_retnl( CEFRead( (LPBYTE)hb_parnl(1) , &dwByteRead , &dwSysError ) );
}
// DWORD CEFWrite(unsigned char *lpCommand, LPDWORD lpdwSysError);
HB_FUNC( CEFWRITE )
{
hb_retnl( CEFWrite( (LPBYTE)hb_parc(1) , &dwSysError ) );
}
// DWORD CEFClose(LPDWORD lpdwSysError);
HB_FUNC( CEFCLOSE )
{
hb_retnl( CEFClose( &dwSysError ) );
}
// DWORD CEFOpen(int intCom, DWORD dwBaudRate, BYTE byParity, BYTE byDataBit, BYTE byStopBit, BYTE byFlowControl, LPDWORD lpdwSysError);
HB_FUNC( CEFOPEN )
{
hb_retnl( CEFOpen( hb_parnl(1) , hb_parnl(2) , hb_parnl(3) , hb_parnl(4) , hb_parnl(5), hb_parnl(6) , &dwSysError ) );
}
// DWORD CEFOpenEth(LPTSTR strIp, DWORD dwPort, LPDWORD lpdwSysError);
HB_FUNC( CEFOPENETH )
{
LPSTR strIp = (LPSTR) hb_parc(1);
hb_retnl( CEFOpenEth( strIp , hb_parnl(2) , &dwSysError ) );
}
// DWORD CEFOpenUSB(LPTSTR strPrinterName, LPDWORD lpdwSysError);
HB_FUNC( CEFOPENUSB )
{
LPSTR strPrinterName = (LPSTR) hb_parc(1);
hb_retnl( CEFOpenUSB( strPrinterName , &dwSysError ) );
}
// DWORD CEFOpenUnSafe(int intCom, DWORD dwBaudRate, BYTE byParity, BYTE byDataBit, BYTE byStopBit, BYTE byFlowControl, LPDWORD lpdwSysError);
HB_FUNC( CEFOPENUNSAFE )
{
hb_retnl( CEFOpenUnSafe( hb_parnl(1) , hb_parnl(2) , hb_parnl(3) , hb_parnl(4) , hb_parnl(5), hb_parnl(6) , &dwSysError ) );
}
// DWORD CEFOpenEthUnSafe(LPTSTR strIp, DWORD dwPort, LPDWORD lpdwSysError);
HB_FUNC( CEFOPENETHUNSAFE )
{
LPSTR strIp = (LPSTR) hb_parc(1);
hb_retnl( CEFOpenEthUnSafe( strIp , hb_parnl(2) , &dwSysError ) );
}
// DWORD CEFOpenUSBUnSafe(LPTSTR strPrinterName, LPDWORD lpdwSysError);
HB_FUNC( CEFOPENUSBUNSAFE )
{
LPSTR strPrinterName = (LPSTR) hb_parc(1);
hb_retnl( CEFOpenUSBUnSafe( strPrinterName , &dwSysError ) );
}
#pragma ENDDUMP
here the new code:
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
static DWORD dwSysError;
DWORD CEFGetVersion(LPTSTR lpVer, LPDWORD lpdwSysError);
DWORD CEFRead(unsigned char *lpMemArea, LPDWORD pdwByteRead, LPDWORD lpdwSysError);
DWORD CEFWrite(unsigned char *lpCommand, LPDWORD lpdwSysError);
DWORD CEFClose(LPDWORD lpdwSysError);
DWORD CEFOpen(int intCom, DWORD dwBaudRate, BYTE byParity, BYTE byDataBit, BYTE byStopBit, BYTE byFlowControl, LPDWORD lpdwSysError);
DWORD CEFOpenEth(LPTSTR strIp, DWORD dwPort, LPDWORD lpdwSysError);
DWORD CEFOpenUSB(LPTSTR strPrinterName, LPDWORD lpdwSysError);
DWORD CEFOpenUnSafe(int intCom, DWORD dwBaudRate, BYTE byParity, BYTE byDataBit, BYTE byStopBit, BYTE byFlowControl, LPDWORD lpdwSysError);
DWORD CEFOpenEthUnSafe(LPTSTR strIp, DWORD dwPort, LPDWORD lpdwSysError);
DWORD CEFOpenUSBUnSafe(LPTSTR strPrinterName, LPDWORD lpdwSysError);
HB_FUNC( CEF_GETSYSERROR )
{
hb_retnl( dwSysError );
}
// DWORD CEFGetVersion(LPTSTR lpVer, LPDWORD lpdwSysError);
HB_FUNC( CEFVERSION )
{
hb_retnl( CEFGetVersion( (LPSTR)hb_parc(1) , &dwSysError ) );
}
// DWORD CEFRead(unsigned char *lpMemArea, LPDWORD pdwByteRead, LPDWORD lpdwSysError);
HB_FUNC( CEFREAD )
{
DWORD dwByteRead;
hb_retnl( CEFRead( (LPBYTE)hb_parnl(1) , &dwByteRead , &dwSysError ) );
}
// DWORD CEFWrite(unsigned char *lpCommand, LPDWORD lpdwSysError);
HB_FUNC( CEFWRITE )
{
hb_retnl( CEFWrite( (LPBYTE)hb_parc(1) , &dwSysError ) );
}
// DWORD CEFClose(LPDWORD lpdwSysError);
HB_FUNC( CEFCLOSE )
{
hb_retnl( CEFClose( &dwSysError ) );
}
// DWORD CEFOpen(int intCom, DWORD dwBaudRate, BYTE byParity, BYTE byDataBit, BYTE byStopBit, BYTE byFlowControl, LPDWORD lpdwSysError);
HB_FUNC( CEFOPEN )
{
hb_retnl( CEFOpen( hb_parnl(1) , hb_parnl(2) , hb_parnl(3) , hb_parnl(4) , hb_parnl(5), hb_parnl(6) , &dwSysError ) );
}
// DWORD CEFOpenEth(LPTSTR strIp, DWORD dwPort, LPDWORD lpdwSysError);
HB_FUNC( CEFOPENETH )
{
LPSTR strIp = (LPSTR) hb_parc(1);
hb_retnl( CEFOpenEth( strIp , hb_parnl(2) , &dwSysError ) );
}
// DWORD CEFOpenUSB(LPTSTR strPrinterName, LPDWORD lpdwSysError);
HB_FUNC( CEFOPENUSB )
{
LPSTR strPrinterName = (LPSTR) hb_parc(1);
hb_retnl( CEFOpenUSB( strPrinterName , &dwSysError ) );
}
// DWORD CEFOpenUnSafe(int intCom, DWORD dwBaudRate, BYTE byParity, BYTE byDataBit, BYTE byStopBit, BYTE byFlowControl, LPDWORD lpdwSysError);
HB_FUNC( CEFOPENUNSAFE )
{
hb_retnl( CEFOpenUnSafe( hb_parnl(1) , hb_parnl(2) , hb_parnl(3) , hb_parnl(4) , hb_parnl(5), hb_parnl(6) , &dwSysError ) );
}
// DWORD CEFOpenEthUnSafe(LPTSTR strIp, DWORD dwPort, LPDWORD lpdwSysError);
HB_FUNC( CEFOPENETHUNSAFE )
{
LPSTR strIp = (LPSTR) hb_parc(1);
hb_retnl( CEFOpenEthUnSafe( strIp , hb_parnl(2) , &dwSysError ) );
}
// DWORD CEFOpenUSBUnSafe(LPTSTR strPrinterName, LPDWORD lpdwSysError);
HB_FUNC( CEFOPENUSBUNSAFE )
{
LPSTR strPrinterName = (LPSTR) hb_parc(1);
hb_retnl( CEFOpenUSBUnSafe( strPrinterName , &dwSysError ) );
}
#pragma ENDDUMP