Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing CStrings in DLLs from VP5
Message
From
10/04/1998 14:57:48
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00090588
Message ID:
00091161
Views:
34
I'm pretty sure that when you send a CString as parameter for a char pointer (as in the case of strcpy), the LPTSTR operator is applied by default by VC++. Doing a trace in such code shows that previous entering the function, the parameter is send to the LPTSTR operator. But I didn't tested this once again right now...

I believe that when a dll function returns a CString, the conversion must be done by the caller (VFP in this case), etc.

Vlad

>Internally the CString is still just a char memory buffer with stored length. The online VC++ docs show it can be substituted for C char arrays. Since you can send it as the source to strcpy() that pretty much says it works the same. I think the crashing is simply related to a memory allocation issue.
Previous
Reply
Map
View

Click here to load this message in the networking platform