Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
0x0000000000001
Message
De
20/11/2006 10:51:31
James Hansen
Canyon Country Consulting
Flagstaff, Arizona, États-Unis
 
 
À
20/11/2006 10:19:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Versions des environnements
Database:
Visual FoxPro
Divers
Thread ID:
01171178
Message ID:
01171183
Vues:
9
Peter,

The first one represents four bytes (a word), the second two bytes, the third one byte and the last a nibble, which ends up being a byte in storage. This doesn't matter much to FoxPro in general, but it does to C type languages and when doing bit manipulation.

...Jim

>
? 0x00000001
>? 0x00001
>? 0x01
>? 0x1
>
>All are 1. However, in the next piece of code the declaration is 0x00000001. Can anyone tell me why? Will 0x1 not do the job?
>
>
#define FILE_ATTRIBUTE_READONLY    0x00000001
>#define FILE_ATTRIBUTE_HIDDEN      0x00000002
>#define FILE_ATTRIBUTE_SYSTEM      0x00000004
>
>local lnNewAttr
>lnNewAttr = iif(tlReadonly,FILE_ATTRIBUTE_READONLY,0)+;
>	  iif(tlHidden,FILE_ATTRIBUTE_HIDDEN,0)+;
>	  iif(tlSystem,FILE_ATTRIBUTE_SYSTEM,0)
>
>declare integer SetFileAttributes in Win32API ;
>	string @ lpFileName,  integer dwFileAttributes
>declare integer GetFileAttributes in Win32API ;
>  string @ lpFileName
>
>return ( SetFileAttributes(@tcFilename, ;
>	bitor(bitand(GetFileAttributes(@tcFilename),0xFFFFFFF8),;
>        lnNewAttr)) = 1)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform