Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing CStrings in DLLs from VP5
Message
 
 
To
08/04/1998 23:53:08
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00090588
Message ID:
00090714
Views:
28
Vlad,

>If it uses CStrings, than it's C++...

Yes CString is the MFC string class.

>I don't believe that a function that returns a CString can be exported as C standard.

I've never written a C++ DLL routine that returns a string. Most of the time I pass a string reference to the DLL, so I can let VFP preallocate the buffer, but I'd guess that it isn't really a problem if you just assign a CString return value into the VPF memvar, I might just have to test this later.

But I know that my VFP Ole server returns a VFP string and the C++ code recieves it as a CString. VC++ seems pretty good at casting CStrings in and out.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform