Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accessing CStrings in DLLs from VP5
Message
De
10/04/1998 14:57:48
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00090588
Message ID:
00091161
Vues:
35
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform