calling external DLL (lptstr call)

This forum is for general support of Xbase++
Post Reply
Message
Author
skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

calling external DLL (lptstr call)

#1 Post by skiman »

Hello,

I have an external DLL which I need to use with DLLFUNCTION. In the docs there is mentioned that everything can be called by 'stdcall'.

There are two type of functions, which are explained as follows in the documentation:

int CALL cFunctionOne( SESSION* session)

LPTSTR CALL cFunctionTwo(SESSION* session)

In case of the functions returning an INT, everything is working. In case of the LPTSTR, where the return value should be a string, this isn't working. I always receive a numeric value. In de Xbase++ docs there is mentioned the following: "If the DLL complies with the Xbase++ calling convention, the value may be of any Xbase++ data type. Otherwise, the return value is of numeric data type".

I already tried with dllpreparecall() and dllExecutecall(), but this doesn't affect the result of the function, it just changes the way the function is called.

Any suggestions?
Best regards,

Chris.
www.aboservice.be

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: calling external DLL (lptstr call)

#2 Post by skiman »

Hi,

Pablo Botella answered already my question: stringof() from BAP is doing what I want.
Best regards,

Chris.
www.aboservice.be

Post Reply