Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hex conversion i VPF
Message
De
23/11/1997 18:43:16
 
 
À
23/11/1997 18:39:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00061813
Message ID:
00061847
Vues:
51
>>Do you see any array in my sample code? :)
>>
>>Basically, you cannot use arrays to pass them to DLL functions. When you need an array as param for a DLL function, it's supposed that the array is stored in a contigous memory area. Can you be sure that your VFP array is stored contigous in memory? No. And it's not. This is why it doesn't work in the way you want to do it and this is why you need to use a string instead of an array.
>>
>>More: your array contains integers. How can you be sure these integers are stored on 2 bytes each? You cannot and they are not. This is the second reason to use a string and not an array.
>>
>>I don't know VB, so I can't help you translate that code. Anyway, I don't believe it will work if you translate it "mechanically".
>>
>>Vlad
>>
>
>Thanks Vlad for clearing things for me!!!
>
>So one question is it correct to pass the string by value or by reference??
>
>Per

Always pass strings by reference to DLL functions.

Vlad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform