Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pointer to a memory address
Message
De
23/10/2001 17:15:29
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00571491
Message ID:
00572335
Vues:
23
>Declare second parameter as a string passed by reference. This'll pass pointer to the string into function. Anyway it's not a good idea to keep a pointer to VFP memory variable because VFP could change string location in memory when it's doing internal "garbage collection".
DECLARE RtlMoveMemory IN kernel32 As CopyMemory;
>    STRING  @ Destination,;
>    <b>String  @ Source, </b>;
>    INTEGER   nLength
>lpBuffer = SPACE(100)
>lcTemp = Getenv("temp")
>= CopyMemory (@lpBuffer, @lcTemp, Len(lpBuffer))
Take a look at file#986and file#9557 for some related info.


Sergey,

Many thanks for the info. I thought if the WinApi description or the function contains for the second parameter
int
, I am forced to declare it Integer, but it seem I am wrong. Now I understand what's happening there: it doesn't matter what type I declare if I send the correct parameter to the Api function.

Thank you again. The solution you gave works.

Three stars here :)
Grigore Dolghin
Class Software.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform