Maurizio,
The linked functions from the LIB are forcing the DLL to get loaded when the application starts. This is automatically performed by Windows.
Maurizio,
The linked functions from the LIB are forcing the DLL to get loaded when the application starts. This is automatically performed by Windows.
Hi All,
please, anyone can help me?
Regards,
Kok
Kok,
You can only use extern "C" when you are compiling a C++ file or in C++ mode.
Simply remove those lines:
LONG GetReaderInfo( LPSTR ,LPSTR ,LPSTR ,LPSTR ,LPSTR ) ;
HB_FUNC(GETREADERINFO)
{
hb_retnl(GetReaderInfo(hb_parc(1),hb_parc(2),hb_parc(3),hb_parc(4),hb_parc(5))) ;
}
Hi Antonio,
After remove as you suggest ,
this warning is appear :
RFID156.PRG (209) Warning C4013 : 'GetReaderInfo',undetifined, assuming extern returning int
Regards,
Kok
Hi Antonio,
sorry , this error is appear :
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ FiveWin for Pocket PC - February 2010 Harbour development power ³Ü
³ (c) FiveTech Software, 1993-2010 for Microsoft Windows Pocket PC ³Û
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
Compiling...
rfid156.c
rfid156.prg(209) : warning C4090: 'function' : different 'const' qualifiers
rfid156.prg(209) : warning C4024: 'GetReaderInfo' : different types for formal and actual parameter 1
rfid156.prg(209) : warning C4090: 'function' : different 'const' qualifiers
rfid156.prg(209) : warning C4024: 'GetReaderInfo' : different types for formal and actual parameter 2
rfid156.prg(209) : warning C4090: 'function' : different 'const' qualifiers
rfid156.prg(209) : warning C4024: 'GetReaderInfo' : different types for formal and actual parameter 3
rfid156.prg(209) : warning C4090: 'function' : different 'const' qualifiers
rfid156.prg(209) : warning C4024: 'GetReaderInfo' : different types for formal and actual parameter 4
rfid156.prg(209) : warning C4090: 'function' : different 'const' qualifiers
rfid156.prg(209) : warning C4024: 'GetReaderInfo' : different types for formal and actual parameter 5
* Application successfully built *
1 file(s) copied.
Regards,
Kok
Kok,
Change it this way:
hb_retnl( GetReaderInfo( ( char * ) hb_parc(1), ( char * ) hb_parc(2), ( char * ) hb_parc(3), ( char * ) hb_parc(4), ( char * ) hb_parc(5) ) );
Dear Antonio,
Thank you for your help, the warning is disappear, I will try it with my handheld rfid and let you know later.
regards,
Kok
Dear Antonio,
how I can get the return value from hb_parc(1) , hb_parc(2) , hb_parc(3) , hb_parc(4) , hb_parc(5) ?
regards,
kok
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
LONG GetReaderInfo( LPSTR ,LPSTR ,LPSTR ,LPSTR ,LPSTR ) ;
LPWSTR AnsiToWide( LPSTR );
HB_FUNC(GETREADERINFO)
{
LPWSTR ComAdr        =   AnsiToWide( (char *) hb_parc( 1 ) );
LPWSTR VersionInfo      =  AnsiToWide( (char *) hb_parc( 2 ) );
LPWSTR ReaderType      =  AnsiToWide( (char *) hb_parc( 3 ) );
LPWSTR TrType         =  AnsiToWide( (char *) hb_parc( 4 ) );
LPWSTR InventoryScanTime   =  AnsiToWide( (char *) hb_parc( 5 ) );
hb_retnl( GetReaderInfo( ( char * ) ComAdr, ( char * ) Â VersionInfo, ( char * ) Â ReaderType , ( char * ) Â TrType, ( char * ) Â InventoryScanTime) );
hb_xfree (ComAdr);
hb_xfree (VersionInfo);
hb_xfree (ReaderType);
hb_xfree (TrType);
hb_xfree (InventoryScanTime);
}
#pragma ENDDUMPLONG GetReaderInfo( LPWSTR ,LPWSTR ,LPWSTR ,LPWSTR ,LPWSTR ) ;
LPWSTR AnsiToWide( LPSTR );
HB_FUNC( GETREADERINFO )
{
LPWSTR ComAdr = AnsiToWide( (char ) hb_parc( 1 ) );
LPWSTR VersionInfo = AnsiToWide( (char ) hb_parc( 2 ) );
LPWSTR ReaderType = AnsiToWide( (char ) hb_parc( 3 ) );
LPWSTR TrType = AnsiToWide( (char ) hb_parc( 4 ) );
LPWSTR InventoryScanTime = AnsiToWide( (char *) hb_parc( 5 ) );
LPSTR p1, p2, p3, p4, p5;
GetReaderInfo( ComAdr, VersionInfo, ReaderType, TrType, InventoryScanTime );
p1 = WideToAnsi( ComAdr );
p2 = WideToAnsi( VersionInfo );
p3 = WideToAnsi( ReaderType );
p4 = WideToAnsi( TrType );
p5 = WideToAnsi( InventoryScanTime );
hb_reta( 5 );
hb_storc( p1, -1, 1 );
hb_storc( p2, -1, 2 );
hb_storc( p3, -1, 3 );
hb_storc( p4, -1, 4 );
hb_storc( p5, -1, 5 );
hb_xfree( ComAdr );
hb_xfree( VersionInfo );
hb_xfree( ReaderType );
hb_xfree( TrType );
hb_xfree( InventoryScanTime );
hb_xfree( p1 );
hb_xfree( p2 );
hb_xfree( p3 );
hb_xfree( p4 );
hb_xfree( p5 );
}
Hi Antonio,
Thank you for your help, but still error :
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ FiveWin for Pocket PC - February 2010 Harbour development power ³Ü
³ (c) FiveTech Software, 1993-2010 for Microsoft Windows Pocket PC ³Û
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
Compiling...
rfid156.c
rfid156.prg(216) : warning C4013: 'WideToAnsi' undefined; assuming extern returning int
rfid156.prg(216) : warning C4047: '=' : 'char ' differs in levels of indirection from 'int '
rfid156.prg(217) : warning C4047: '=' : 'char ' differs in levels of indirection from 'int '
rfid156.prg(218) : warning C4047: '=' : 'char ' differs in levels of indirection from 'int '
rfid156.prg(219) : warning C4047: '=' : 'char ' differs in levels of indirection from 'int '
rfid156.prg(220) : warning C4047: '=' : 'char *' differs in levels of indirection from 'int '
rfid156.prg(223) : warning C4020: 'hb_storc' : too many actual parameters
rfid156.prg(224) : warning C4020: 'hb_storc' : too many actual parameters
rfid156.prg(225) : warning C4020: 'hb_storc' : too many actual parameters
rfid156.prg(226) : warning C4020: 'hb_storc' : too many actual parameters
rfid156.prg(227) : warning C4020: 'hb_storc' : too many actual parameters
* Application successfully built *
1 file(s) copied.
regards,
kok
Kok,
I forgot to include this declaration at the header:
LPSTR WideToAnsi( LPWSTR );
Dear Antonio,
still error :
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ FiveWin for Pocket PC - February 2010 Harbour development power ³Ü
³ (c) FiveTech Software, 1993-2010 for Microsoft Windows Pocket PC ³Û
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
Compiling...
rfid156.c
rfid156.prg(224) : warning C4020: 'hb_storc' : too many actual parameters
rfid156.prg(225) : warning C4020: 'hb_storc' : too many actual parameters
rfid156.prg(226) : warning C4020: 'hb_storc' : too many actual parameters
rfid156.prg(227) : warning C4020: 'hb_storc' : too many actual parameters
rfid156.prg(228) : warning C4020: 'hb_storc' : too many actual parameters
* Application successfully built *
1 file(s) copied.
regards,
Kok
Kok,
Those are warnings that you can safely ignore
Is the function call working fine ? Do you get an array with the requested info ?