Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Internet constants value
Message
De
01/06/2002 14:28:17
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00663784
Message ID:
00663803
Vues:
19
>>>
>>>#DEFINE INTERNET_FLAG_RELOAD 0x80000000
>>
>>this really should be recast explicitly if you're passing it as an INTEGER using BITOR(); VFP handles this as a positive value, while the API type INTEGER or LONG is actually a signed 32-bit integer, so that 0x80000000 is the maximum possible integer positive value. You can accomplish this by wrapping the INTEGER expression with BITOR(0,your potentially integer value) as follows:
>>
>>nMyIntegerArg = BITOR(INTERNET_FLAG_RELOAD + INTERNET_FLAG_NO_CACHE_WRITE,0)
>
>Hi Ed,
>
>Isn't 0x7FFFFFFF the max positive value in signed 32-bit integer?

Yes, the way integers are usually stored, 0x7...FF would be the maximum positive value, and -0x8...00 would be the maximum negative value, for integers of any size.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform