Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VB Call to API vs VFP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00255827
Message ID:
00256518
Vues:
25
>Hi George,
>
>>The reason I suggested a STRING is that a normal (not Unicode) one character string contains 8 bits which is the size of a BYTE. However, VFP may include a null terminator on the string (CHR(0)) which may be causing the problems you're seeing.
>
>But a string is always passed as a pointer? How should an additional byte at the memory address cause a GPF?
>
Hi Christof,

One more thought. Are you sure that a string is always passed by reference? I don't think so. Try this, declare GetProfileString() and don't declare the return buffer as being passed by reference, and don't pass it that way. The return value will indicate that characters have been written to the buffer, but the string will be empty on return. You have to explicitly declare it that way, once you do and pass it by reference, you get the same return value, and that many characters in the string.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform