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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only