Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does VFP7 support two aliases per API call?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00954439
Message ID:
00954740
Views:
14
>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!

Anatoliy,

Why bother? Use SYS(2600) in 7.0 and beyond.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform