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
Titre:
Does VFP7 support two aliases per API call?
Divers
Thread ID:
00954439
Message ID:
00954439
Vues:
55
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!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform