DLL
DLL
Hello Antonio
I have a cash register with Windows CE.NET 4.20
The program works very well.
Now I have to link with a DLL , I need only 3 functions
1) DLL FUNCTION RCHOpen() AS LONG PASCAL FROM "RCHOpen" LIB "RCHGlobe.dll"
2) DLL FUNCTION RCHClose() AS LONG PASCAL FROM "RCHClose" LIB "RCHGlobe.dll"
This 2 functions works and return correctly 0
3) DLL FUNCTION RCHSendData(sIn AS STRING ,sOut AS STRING) AS LONG PASCAL FROM "RCHSendData" LIB "RCHGlobe.dll"
VB.NET Code is = Public Shared Function RCHSendData(ByVal a As String, ByVal b As String) As Int32 )
I call the function
sIn := AnsiToWide("=K")
sOut := AnsiToWide(space(40))
nRet := RchSendData(sIn,sOut)
But return always an error
(I try without AnsiToWide)
Antonio , are you able to give me some clue as to solve this problem ?
Regards MAurizio
I know that this problem could be due to the cash.
Antonio , are you able to give me some clue as to solve this problem ?
I have a cash register with Windows CE.NET 4.20
The program works very well.
Now I have to link with a DLL , I need only 3 functions
1) DLL FUNCTION RCHOpen() AS LONG PASCAL FROM "RCHOpen" LIB "RCHGlobe.dll"
2) DLL FUNCTION RCHClose() AS LONG PASCAL FROM "RCHClose" LIB "RCHGlobe.dll"
This 2 functions works and return correctly 0
3) DLL FUNCTION RCHSendData(sIn AS STRING ,sOut AS STRING) AS LONG PASCAL FROM "RCHSendData" LIB "RCHGlobe.dll"
VB.NET Code is = Public Shared Function RCHSendData(ByVal a As String, ByVal b As String) As Int32 )
I call the function
sIn := AnsiToWide("=K")
sOut := AnsiToWide(space(40))
nRet := RchSendData(sIn,sOut)
But return always an error
(I try without AnsiToWide)
Antonio , are you able to give me some clue as to solve this problem ?
Regards MAurizio
I know that this problem could be due to the cash.
Antonio , are you able to give me some clue as to solve this problem ?
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: DLL
Try AS LPSTR instead of the two AS STRING.Maurizio wrote:3) DLL FUNCTION RCHSendData(sIn AS STRING ,sOut AS STRING) AS LONG PASCAL FROM "RCHSendData" LIB "RCHGlobe.dll"
EMG
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Code: Select all
#pragma BEGINDUMP
#include <hbapi.h>
HB_FUNC( RCHSENDDATA )
{
hb_retnl( RCHSendData( hb_parc( 1 ), hb_parc( 2 ) ) );
}
#pragma ENDDUMP
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Antonio
cann you help me with a problem . I am not able to transform the DLL in the LIB .
Thank to Enrico's help I use this command , but it dosnt work.
c:\vce\bin\link corelibc.lib /LIBPATH:c:\vce\lib\arm /NOLOGO /SUBSYSTEM:WINDOWSCE,4.20 /MACHINE:ARM /DLL /IMPLIB:rchglobe.dll /OUT:rchglobe.lib
Regards MAurizio
cann you help me with a problem . I am not able to transform the DLL in the LIB .
Thank to Enrico's help I use this command , but it dosnt work.
c:\vce\bin\link corelibc.lib /LIBPATH:c:\vce\lib\arm /NOLOGO /SUBSYSTEM:WINDOWSCE,4.20 /MACHINE:ARM /DLL /IMPLIB:rchglobe.dll /OUT:rchglobe.lib
Regards MAurizio