Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to declare DLL
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00260473
Message ID:
00260518
Views:
17
>I am using a vb sample to develop my vfp 6 project. The vb code assigns names and assigns long integers:
>Declare Function HeapAlloc Lib "kernel32" (ByVal hHeap As Long, ByVal dwFlags As Long, ByVal dwBytes As Long) As Long
>
>I initially converted it to:
>declare long HeapAlloc in kernel32.dll long hHeap, long dwFlags, long dwBytes
>
>But then noticed a VFP snippet in the thread that did:
>DECLARE Integer HeapAlloc in Win32Api Integer, Integer, Integer
>
>Are there significance differences between long and integer types?
>Do I need the names (ex hHeap)?
>My VFP editor accepted the "any" type. Is that okay, though undocumented?
>Thanks

Hi Terry,

The LONG and INTEGER types are eseentially the same thing.

No, you don't need the names, but I think it helps make the declaration self-documenting if meanful names for the parameters are used.

In VB, "Any" usually refers to a structure. Use STRING to emulate a structure in VFP. Christof Lange has a file here, however, that makes working with structures in VFP very easy. You might want to take a look.
George

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

Click here to load this message in the networking platform