General information
Category:
Windows API functions
>>>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only