Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Does VFP7 support two aliases per API call?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00954439
Message ID:
00954441
Vues:
17
Hi Anatoliy,

It works fine in VFP7SP1 and later.

>In VFP8 you can declare same API function with two aliases. The following code works in VFP8 and generates an error message in VFP6
>CLEAR
>CLEAR ALL
>
>DECLARE RtlMoveMemory IN kernel32 As MemToStr;
>	STRING @dst, INTEGER src, INTEGER nLength
>
>DECLARE RtlMoveMemory IN kernel32 As StrToMem;
>	INTEGER dst, STRING src, INTEGER nLength
>
>DECLARE INTEGER GlobalAlloc IN kernel32;
>	INTEGER wFlags, INTEGER dwBytes
>
>DECLARE INTEGER GlobalFree IN kernel32 INTEGER hMem
>
>PRIVATE hMem, cSrc, cDst, nBufsize
>cSrc="Test string"
>nBufsize = LEN(cSrc)
>hMem = GlobalAlloc(0, nBufsize)
>
>StrToMem(hMem, cSrc, nBufsize)
>
>cDst = SPACE(nBufsize)
>= MemToStr(@cDst, hMem, nBufsize)
>
>? cDst
>
>= GlobalFree(hMem)
>
>How about VFP7? If anybody could check if this code works in VFP7 that would be much appreciated. Thanks!
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform