Versions des environnements
Hello,
i don't know of a free C IDE that can create FLL's. The problem lies in the fact that FLL functions use the _fastcall calling convention, which is microsoft specific and which none free IDE i know of supports.
Borland C++ Builder also supports the _fastcall calling convention, but Borland _fastcall is not binary compatible with MS's one.
With a normal DLL it would also work, but the function definition and the code has to be restructured, cause one cannot return binary data easily to FoxPro from C like in an FLL.
the function definition of the normal DLL version would look like:
void _stdcall SomeName(char *pInput, int nInputLen, char *pOutput, int *nOutputLen)
{
&& conversion code here..
}
which is DECLARED in FoxPro:
DECLARE SomeName IN some.dll STRING, INTEGER, STRING @, INTEGER @
and one needs a wrapper like this to call it ..
FUNCTION ToBinary(lcString)
LOCAL lcBuffer, lnLen, lnInputLen
lnLen = 0
lnInputLen = LEN(lcString)
lcBuffer = SPACE(lnInputLen)
SomeName(lcString,lnInputLen,@lcBuffer,@lnLen)
RETURN LEFT(lcBuffer,lnLen)
ENDFUNC
if you're not that comfortable with C, i could also create the FLL for you,
if you want? I'm currently unemployed and i have more than enough time and i wouldn't need more than half an hour anyway.
As another option I could include the function inside my freeware FLL i'm currently developing.
Regards
Christian
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement