General information
Category:
Windows API functions
>extern "C" __declspec(dllexport) int cname(char *pCname)
>{
> CString Cname( "long test now ");
> pCname= new char[Cname.GetLength()+1];
> strcpy(pCname,Cname);
>
>return 0; // based on previous operations Ok/not
>}
Don't allocate memory to the string in the cname function. You must allocate the necessary space in VFP (ie initialiaze the string in VFP long enough) and pass the string by reference form VFP.
>DECLARE INTEGER Cname IN "xxx.dll" STRING @ NAMES
The DLL function names are case sesitive. So:
DECLARE INTEGER cname IN "xxx.dll" STRING @ NAMES
To use it:
lcNames = space(100) && it must be long enough
lnAnInteger = cname(@lcNames)
Vlad
Previous
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