Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
High Word and Low Word
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00493380
Message ID:
00493382
Vues:
14
>I am using DynaZip to retrieve information about files contained in a zip file. Two pieces of information provided by the DLL represent the size of the file in bytes. The 2 values are High and Low Word. How do I convert these to the actual file size in bytes? From a real example:
>High    Low   File Size
>----  -----   ---------
>  11   8811     729,707
>   0    420         420
>   1  50773     116,309
>  23  14057   1,521,385
Figured it out. From MSDN KB -- HOWTO: Package HiWord/LoWord Values Into a Long Parameter [ID: Q189170]:

lnSize = [HighWord * 16**4] + LowWord

23 * 16**4 + 14057 = 1,521,385
11 * 16**4 + 8811 = 729,707
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform