Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DWORD!!!
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00321371
Message ID:
00322005
Views:
22
>>>A DWORD is a 32 byte integer. VFP's INTEGER declaration matches this.
>>
>>There's one big difference: DWORD is always positive, while INTEGER can be negative.
>>
>Hi Vlad,
>
>Does this mean that a LONG is unsigned?

No. LONG and INTEGER are signed integers. They are really the "long" and "int" from C/C++. In Win32, "int" has the same length (4 bytes) as "long",
so, they are the same thing.

> There's no indication of this in the documentation. The only difference there is that an INTEGER is referred to as a "32 bit integer" and a LONG is referred to as a "32 bit long integer".

This comes from C/C++ where "long" and "int" does not have, necessarily, the same length/size. They are the same on WIn32.
The rule is that the size of int must be less or equal than the size of long. That's really not important in VFP.

>In C++, doesn't the suffix UL mean unsigned long, while L simply means long (and possibly signed)?

Right.

The catch is mainly with output DWORD params. If the value (always positive) of the output param is greater than
the max value of INTEGER (2,147,483,647), than that value is received as a negative value in VFP and it must be
converted.

Vlad
Previous
Reply
Map
View

Click here to load this message in the networking platform