In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
How to use external DLL
-
- Mensajes: 339
- Registrado: Lun Jul 02, 2007 7:17 pm
How to use external DLL
Ignacio,
under FiveWin I use this (very simple) way to call functions of an external
DLL.
For example to call the functions "ElsterDialog" or "ElsterInit" of "tm98.dll":
DLL32 FUNCTION ElsterDialog( par1 AS LPSTR,;
par2 AS LPSTR,;
par3 AS LPSTR,;
par4 AS LONG) ;
AS BYTE FROM "ElsterDialog" LIB "tm98.dll"
DLL32 FUNCTION ElsterInit( par1 AS BYTE,;
par2 AS CHAR) ;
AS LONG FROM "ElsterInit" LIB "tm98.dll"
Please help me to code this in Xailer. Can you give me a sample?
Thank you in advance.
Regards
Ingo
under FiveWin I use this (very simple) way to call functions of an external
DLL.
For example to call the functions "ElsterDialog" or "ElsterInit" of "tm98.dll":
DLL32 FUNCTION ElsterDialog( par1 AS LPSTR,;
par2 AS LPSTR,;
par3 AS LPSTR,;
par4 AS LONG) ;
AS BYTE FROM "ElsterDialog" LIB "tm98.dll"
DLL32 FUNCTION ElsterInit( par1 AS BYTE,;
par2 AS CHAR) ;
AS LONG FROM "ElsterInit" LIB "tm98.dll"
Please help me to code this in Xailer. Can you give me a sample?
Thank you in advance.
Regards
Ingo
- ignacio
- Site Admin
- Mensajes: 9443
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
How to use external DLL
Ingo,
We believe that the DLL command has a lot of limitations and since
[x]Harbour can call any 'C' function directly, is better to use that
[x]Harbour feature.
For example:
#pragma BEGINDUMP
#include <windows.h>
#include <xailer.h>
XA_FUNC( ELSTERDIALOG )
{
hb_retc( ElsterDialog( hb_parc( 1 ), hb_parc( 2 ), hb_parc( 3 ),
hb_parnl( 4 ) ) );
}
#pragma ENDDUMP
As you can see it returns a strigns (array of bytes). I hope it works, in
case not, tell us the exact prototype of the DLL function.
For this to work you need to create the import library for your DLL with the
Borland utility IMPLIB.EXE and add that library to your project.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Ingo Junge-Herrmann" <[email=XPRO-0031BA74-01@10.0.0.11]XPRO-0031BA74-01@10.0.0.11[/email]> escribió en el mensaje
news:455196a0$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>
> Ignacio,
>
> under FiveWin I use this (very simple) way to call functions of an
> external
> DLL.
> For example to call the functions "ElsterDialog" or "ElsterInit" of
> "tm98.dll":
>
> DLL32 FUNCTION ElsterDialog( par1 AS LPSTR,;
> par2 AS LPSTR,;
> par3 AS LPSTR,;
> par4 AS LONG) ;
> AS BYTE FROM "ElsterDialog" LIB "tm98.dll"
>
> DLL32 FUNCTION ElsterInit( par1 AS BYTE,;
> par2 AS CHAR) ;
> AS LONG FROM "ElsterInit" LIB "tm98.dll"
>
> Please help me to code this in Xailer. Can you give me a sample?
>
> Thank you in advance.
> Regards
>
> Ingo
We believe that the DLL command has a lot of limitations and since
[x]Harbour can call any 'C' function directly, is better to use that
[x]Harbour feature.
For example:
#pragma BEGINDUMP
#include <windows.h>
#include <xailer.h>
XA_FUNC( ELSTERDIALOG )
{
hb_retc( ElsterDialog( hb_parc( 1 ), hb_parc( 2 ), hb_parc( 3 ),
hb_parnl( 4 ) ) );
}
#pragma ENDDUMP
As you can see it returns a strigns (array of bytes). I hope it works, in
case not, tell us the exact prototype of the DLL function.
For this to work you need to create the import library for your DLL with the
Borland utility IMPLIB.EXE and add that library to your project.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Ingo Junge-Herrmann" <[email=XPRO-0031BA74-01@10.0.0.11]XPRO-0031BA74-01@10.0.0.11[/email]> escribió en el mensaje
news:455196a0$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>
> Ignacio,
>
> under FiveWin I use this (very simple) way to call functions of an
> external
> DLL.
> For example to call the functions "ElsterDialog" or "ElsterInit" of
> "tm98.dll":
>
> DLL32 FUNCTION ElsterDialog( par1 AS LPSTR,;
> par2 AS LPSTR,;
> par3 AS LPSTR,;
> par4 AS LONG) ;
> AS BYTE FROM "ElsterDialog" LIB "tm98.dll"
>
> DLL32 FUNCTION ElsterInit( par1 AS BYTE,;
> par2 AS CHAR) ;
> AS LONG FROM "ElsterInit" LIB "tm98.dll"
>
> Please help me to code this in Xailer. Can you give me a sample?
>
> Thank you in advance.
> Regards
>
> Ingo
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
How to use external DLL
Ingo,
We believe that the DLL command has a lot of limitations and since
[x]Harbour can call any 'C' function directly, is better to use that
[x]Harbour feature.
For example:
#pragma BEGINDUMP
#include <windows.h>
#include <xailer.h>
XA_FUNC( ELSTERDIALOG )
{
hb_retc( ElsterDialog( hb_parc( 1 ), hb_parc( 2 ), hb_parc( 3 ),
hb_parnl( 4 ) ) );
}
#pragma ENDDUMP
As you can see it returns a strigns (array of bytes). I hope it works, in
case not, tell us the exact prototype of the DLL function.
For this to work you need to create the import library for your DLL with the
Borland utility IMPLIB.EXE and add that library to your project.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Ingo Junge-Herrmann" <[email=XPRO-0031BA74-01@10.0.0.11]XPRO-0031BA74-01@10.0.0.11[/email]> escribió en el mensaje
news:455196a0$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>
> Ignacio,
>
> under FiveWin I use this (very simple) way to call functions of an
> external
> DLL.
> For example to call the functions "ElsterDialog" or "ElsterInit" of
> "tm98.dll":
>
> DLL32 FUNCTION ElsterDialog( par1 AS LPSTR,;
> par2 AS LPSTR,;
> par3 AS LPSTR,;
> par4 AS LONG) ;
> AS BYTE FROM "ElsterDialog" LIB "tm98.dll"
>
> DLL32 FUNCTION ElsterInit( par1 AS BYTE,;
> par2 AS CHAR) ;
> AS LONG FROM "ElsterInit" LIB "tm98.dll"
>
> Please help me to code this in Xailer. Can you give me a sample?
>
> Thank you in advance.
> Regards
>
> Ingo
We believe that the DLL command has a lot of limitations and since
[x]Harbour can call any 'C' function directly, is better to use that
[x]Harbour feature.
For example:
#pragma BEGINDUMP
#include <windows.h>
#include <xailer.h>
XA_FUNC( ELSTERDIALOG )
{
hb_retc( ElsterDialog( hb_parc( 1 ), hb_parc( 2 ), hb_parc( 3 ),
hb_parnl( 4 ) ) );
}
#pragma ENDDUMP
As you can see it returns a strigns (array of bytes). I hope it works, in
case not, tell us the exact prototype of the DLL function.
For this to work you need to create the import library for your DLL with the
Borland utility IMPLIB.EXE and add that library to your project.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Ingo Junge-Herrmann" <[email=XPRO-0031BA74-01@10.0.0.11]XPRO-0031BA74-01@10.0.0.11[/email]> escribió en el mensaje
news:455196a0$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>
> Ignacio,
>
> under FiveWin I use this (very simple) way to call functions of an
> external
> DLL.
> For example to call the functions "ElsterDialog" or "ElsterInit" of
> "tm98.dll":
>
> DLL32 FUNCTION ElsterDialog( par1 AS LPSTR,;
> par2 AS LPSTR,;
> par3 AS LPSTR,;
> par4 AS LONG) ;
> AS BYTE FROM "ElsterDialog" LIB "tm98.dll"
>
> DLL32 FUNCTION ElsterInit( par1 AS BYTE,;
> par2 AS CHAR) ;
> AS LONG FROM "ElsterInit" LIB "tm98.dll"
>
> Please help me to code this in Xailer. Can you give me a sample?
>
> Thank you in advance.
> Regards
>
> Ingo
-
- Mensajes: 339
- Registrado: Lun Jul 02, 2007 7:17 pm
How to use external DLL
Ignacio,
thank you very much for the sample but it doesn't work.
The DLL is provided by the German finance administration and contains modules
for the electronic transmission of purchase tax datas to the finance office.
The function "Elsterdialog" e.g. is used for the input of personal datas
like the tax payer's account number and the appropriate finance office etc.
and for the validity check of them.
Because I haven't any experience in C++/C I don't know how to use the ability
of (x)Harbour to call 'C' functions directly. It is very kindly that you
will help me. Here the prototype of the DLL-function 'Elsterdialog':
int TM_DLL_EXP ElsterDialog
(
char* par1,
char* par2,
char* par3,
int Abfrageart
);
Thank's in advance
Ingo
"Ignacio Ortiz de Zúñiga" <NoName@xailer.com> wrote:
>Ingo,
>
>We believe that the DLL command has a lot of limitations and since
>[x]Harbour can call any 'C' function directly, is better to use that
>[x]Harbour feature.
>
>For example:
>
>#pragma BEGINDUMP
>
>#include <windows.h>
>#include <xailer.h>
>
>XA_FUNC( ELSTERDIALOG )
>{
> hb_retc( ElsterDialog( hb_parc( 1 ), hb_parc( 2 ), hb_parc( 3 ),
>hb_parnl( 4 ) ) );
>}
>
>#pragma ENDDUMP
>
>As you can see it returns a strigns (array of bytes). I hope it works, in
>case not, tell us the exact prototype of the DLL function.
>
>For this to work you need to create the import library for your DLL with
the
>Borland utility IMPLIB.EXE and add that library to your project.
>
>Regards,
>
>--
>Ignacio Ortiz de Zúñiga
>http://www.xailer.com
>"Ingo Junge-Herrmann" <[email=XPRO-0031BA74-01@10.0.0.11]XPRO-0031BA74-01@10.0.0.11[/email]> escribió en el mensaje
>news:455196a0$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>>
>> Ignacio,
>>
>> under FiveWin I use this (very simple) way to call functions of an
>> external
>> DLL.
>> For example to call the functions "ElsterDialog" or "ElsterInit" of
>> "tm98.dll":
>>
>> DLL32 FUNCTION ElsterDialog( par1 AS LPSTR,;
>> par2 AS LPSTR,;
>> par3 AS LPSTR,;
>> par4 AS LONG) ;
>> AS BYTE FROM "ElsterDialog" LIB "tm98.dll"
>>
>> DLL32 FUNCTION ElsterInit( par1 AS BYTE,;
>> par2 AS CHAR) ;
>> AS LONG FROM "ElsterInit" LIB "tm98.dll"
>>
>> Please help me to code this in Xailer. Can you give me a sample?
>>
>> Thank you in advance.
>> Regards
>>
>> Ingo
>
>
thank you very much for the sample but it doesn't work.
The DLL is provided by the German finance administration and contains modules
for the electronic transmission of purchase tax datas to the finance office.
The function "Elsterdialog" e.g. is used for the input of personal datas
like the tax payer's account number and the appropriate finance office etc.
and for the validity check of them.
Because I haven't any experience in C++/C I don't know how to use the ability
of (x)Harbour to call 'C' functions directly. It is very kindly that you
will help me. Here the prototype of the DLL-function 'Elsterdialog':
int TM_DLL_EXP ElsterDialog
(
char* par1,
char* par2,
char* par3,
int Abfrageart
);
Thank's in advance
Ingo
"Ignacio Ortiz de Zúñiga" <NoName@xailer.com> wrote:
>Ingo,
>
>We believe that the DLL command has a lot of limitations and since
>[x]Harbour can call any 'C' function directly, is better to use that
>[x]Harbour feature.
>
>For example:
>
>#pragma BEGINDUMP
>
>#include <windows.h>
>#include <xailer.h>
>
>XA_FUNC( ELSTERDIALOG )
>{
> hb_retc( ElsterDialog( hb_parc( 1 ), hb_parc( 2 ), hb_parc( 3 ),
>hb_parnl( 4 ) ) );
>}
>
>#pragma ENDDUMP
>
>As you can see it returns a strigns (array of bytes). I hope it works, in
>case not, tell us the exact prototype of the DLL function.
>
>For this to work you need to create the import library for your DLL with
the
>Borland utility IMPLIB.EXE and add that library to your project.
>
>Regards,
>
>--
>Ignacio Ortiz de Zúñiga
>http://www.xailer.com
>"Ingo Junge-Herrmann" <[email=XPRO-0031BA74-01@10.0.0.11]XPRO-0031BA74-01@10.0.0.11[/email]> escribió en el mensaje
>news:455196a0$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>>
>> Ignacio,
>>
>> under FiveWin I use this (very simple) way to call functions of an
>> external
>> DLL.
>> For example to call the functions "ElsterDialog" or "ElsterInit" of
>> "tm98.dll":
>>
>> DLL32 FUNCTION ElsterDialog( par1 AS LPSTR,;
>> par2 AS LPSTR,;
>> par3 AS LPSTR,;
>> par4 AS LONG) ;
>> AS BYTE FROM "ElsterDialog" LIB "tm98.dll"
>>
>> DLL32 FUNCTION ElsterInit( par1 AS BYTE,;
>> par2 AS CHAR) ;
>> AS LONG FROM "ElsterInit" LIB "tm98.dll"
>>
>> Please help me to code this in Xailer. Can you give me a sample?
>>
>> Thank you in advance.
>> Regards
>>
>> Ingo
>
>
-
- Mensajes: 339
- Registrado: Lun Jul 02, 2007 7:17 pm
How to use external DLL
Ignacio,
thank you very much for the sample but it doesn't work.
The DLL is provided by the German finance administration and contains modules
for the electronic transmission of purchase tax datas to the finance office.
The function "Elsterdialog" e.g. is used for the input of personal datas
like the tax payer's account number and the appropriate finance office etc.
and for the validity check of them.
Because I haven't any experience in C++/C I don't know how to use the ability
of (x)Harbour to call 'C' functions directly. It is very kindly that you
will help me. Here the prototype of the DLL-function 'Elsterdialog':
int TM_DLL_EXP ElsterDialog
(
char* par1,
char* par2,
char* par3,
int Abfrageart
);
Thank's in advance
Ingo
"Ignacio Ortiz de Zúñiga" <NoName@xailer.com> wrote:
>Ingo,
>
>We believe that the DLL command has a lot of limitations and since
>[x]Harbour can call any 'C' function directly, is better to use that
>[x]Harbour feature.
>
>For example:
>
>#pragma BEGINDUMP
>
>#include <windows.h>
>#include <xailer.h>
>
>XA_FUNC( ELSTERDIALOG )
>{
> hb_retc( ElsterDialog( hb_parc( 1 ), hb_parc( 2 ), hb_parc( 3 ),
>hb_parnl( 4 ) ) );
>}
>
>#pragma ENDDUMP
>
>As you can see it returns a strigns (array of bytes). I hope it works, in
>case not, tell us the exact prototype of the DLL function.
>
>For this to work you need to create the import library for your DLL with
the
>Borland utility IMPLIB.EXE and add that library to your project.
>
>Regards,
>
>--
>Ignacio Ortiz de Zúñiga
>http://www.xailer.com
>"Ingo Junge-Herrmann" <[email=XPRO-0031BA74-01@10.0.0.11]XPRO-0031BA74-01@10.0.0.11[/email]> escribió en el mensaje
>news:455196a0$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>>
>> Ignacio,
>>
>> under FiveWin I use this (very simple) way to call functions of an
>> external
>> DLL.
>> For example to call the functions "ElsterDialog" or "ElsterInit" of
>> "tm98.dll":
>>
>> DLL32 FUNCTION ElsterDialog( par1 AS LPSTR,;
>> par2 AS LPSTR,;
>> par3 AS LPSTR,;
>> par4 AS LONG) ;
>> AS BYTE FROM "ElsterDialog" LIB "tm98.dll"
>>
>> DLL32 FUNCTION ElsterInit( par1 AS BYTE,;
>> par2 AS CHAR) ;
>> AS LONG FROM "ElsterInit" LIB "tm98.dll"
>>
>> Please help me to code this in Xailer. Can you give me a sample?
>>
>> Thank you in advance.
>> Regards
>>
>> Ingo
>
>
thank you very much for the sample but it doesn't work.
The DLL is provided by the German finance administration and contains modules
for the electronic transmission of purchase tax datas to the finance office.
The function "Elsterdialog" e.g. is used for the input of personal datas
like the tax payer's account number and the appropriate finance office etc.
and for the validity check of them.
Because I haven't any experience in C++/C I don't know how to use the ability
of (x)Harbour to call 'C' functions directly. It is very kindly that you
will help me. Here the prototype of the DLL-function 'Elsterdialog':
int TM_DLL_EXP ElsterDialog
(
char* par1,
char* par2,
char* par3,
int Abfrageart
);
Thank's in advance
Ingo
"Ignacio Ortiz de Zúñiga" <NoName@xailer.com> wrote:
>Ingo,
>
>We believe that the DLL command has a lot of limitations and since
>[x]Harbour can call any 'C' function directly, is better to use that
>[x]Harbour feature.
>
>For example:
>
>#pragma BEGINDUMP
>
>#include <windows.h>
>#include <xailer.h>
>
>XA_FUNC( ELSTERDIALOG )
>{
> hb_retc( ElsterDialog( hb_parc( 1 ), hb_parc( 2 ), hb_parc( 3 ),
>hb_parnl( 4 ) ) );
>}
>
>#pragma ENDDUMP
>
>As you can see it returns a strigns (array of bytes). I hope it works, in
>case not, tell us the exact prototype of the DLL function.
>
>For this to work you need to create the import library for your DLL with
the
>Borland utility IMPLIB.EXE and add that library to your project.
>
>Regards,
>
>--
>Ignacio Ortiz de Zúñiga
>http://www.xailer.com
>"Ingo Junge-Herrmann" <[email=XPRO-0031BA74-01@10.0.0.11]XPRO-0031BA74-01@10.0.0.11[/email]> escribió en el mensaje
>news:455196a0$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>>
>> Ignacio,
>>
>> under FiveWin I use this (very simple) way to call functions of an
>> external
>> DLL.
>> For example to call the functions "ElsterDialog" or "ElsterInit" of
>> "tm98.dll":
>>
>> DLL32 FUNCTION ElsterDialog( par1 AS LPSTR,;
>> par2 AS LPSTR,;
>> par3 AS LPSTR,;
>> par4 AS LONG) ;
>> AS BYTE FROM "ElsterDialog" LIB "tm98.dll"
>>
>> DLL32 FUNCTION ElsterInit( par1 AS BYTE,;
>> par2 AS CHAR) ;
>> AS LONG FROM "ElsterInit" LIB "tm98.dll"
>>
>> Please help me to code this in Xailer. Can you give me a sample?
>>
>> Thank you in advance.
>> Regards
>>
>> Ingo
>
>
How to use external DLL
Ingo,
> Because I haven't any experience in C++/C I don't know how to use the
> ability
> of (x)Harbour to call 'C' functions directly. It is very kindly that you
> will help me. Here the prototype of the DLL-function 'Elsterdialog':
>
> int TM_DLL_EXP ElsterDialog
> (
> char* par1,
> char* par2,
> char* par3,
> int Abfrageart
> );
It should be:
XA_FUNC( ELSTERDIALOG )
{
hb_retni( ElsterDialog( hb_parc( 1 ), hb_parc( 2 ), hb_parc( 3 ),
hb_parni( 4 ) ) );
}
--
Regards,
Jose F. Gimenez
http://www.xailer.com
> Because I haven't any experience in C++/C I don't know how to use the
> ability
> of (x)Harbour to call 'C' functions directly. It is very kindly that you
> will help me. Here the prototype of the DLL-function 'Elsterdialog':
>
> int TM_DLL_EXP ElsterDialog
> (
> char* par1,
> char* par2,
> char* par3,
> int Abfrageart
> );
It should be:
XA_FUNC( ELSTERDIALOG )
{
hb_retni( ElsterDialog( hb_parc( 1 ), hb_parc( 2 ), hb_parc( 3 ),
hb_parni( 4 ) ) );
}
--
Regards,
Jose F. Gimenez
http://www.xailer.com
How to use external DLL
Ingo,
> Because I haven't any experience in C++/C I don't know how to use the
> ability
> of (x)Harbour to call 'C' functions directly. It is very kindly that you
> will help me. Here the prototype of the DLL-function 'Elsterdialog':
>
> int TM_DLL_EXP ElsterDialog
> (
> char* par1,
> char* par2,
> char* par3,
> int Abfrageart
> );
It should be:
XA_FUNC( ELSTERDIALOG )
{
hb_retni( ElsterDialog( hb_parc( 1 ), hb_parc( 2 ), hb_parc( 3 ),
hb_parni( 4 ) ) );
}
--
Regards,
Jose F. Gimenez
http://www.xailer.com
> Because I haven't any experience in C++/C I don't know how to use the
> ability
> of (x)Harbour to call 'C' functions directly. It is very kindly that you
> will help me. Here the prototype of the DLL-function 'Elsterdialog':
>
> int TM_DLL_EXP ElsterDialog
> (
> char* par1,
> char* par2,
> char* par3,
> int Abfrageart
> );
It should be:
XA_FUNC( ELSTERDIALOG )
{
hb_retni( ElsterDialog( hb_parc( 1 ), hb_parc( 2 ), hb_parc( 3 ),
hb_parni( 4 ) ) );
}
--
Regards,
Jose F. Gimenez
http://www.xailer.com