Announcement

Collapse
No announcement yet.

0xFFFFFFFF ?????

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 0xFFFFFFFF ?????

    Hi!

    Does anyone know what the "& 0xFFFFFFFF" is doing
    in this C statement? ft is a FILETIME type. qwResult
    is a 64 bit integer (quadword in C). Thanks in advance!

    ft.dwLowDateTime = (DWORD) (qwResult & 0xFFFFFFFF );

    Taken from MSKB article: http://support.microsoft.com/support.../Q188/7/68.ASP

    Scott
    Scott Wolfington
    [url="http://www.boogietools.com"]http://www.boogietools.com[/url]

  • #2
    It is performing a logical AND function... it is a fast way to extract the lower 32 bits of a larger variable. Another technique to achieve the same task is to use the MOD function, but the value would need to be (&H0FFFFFFFF + 1).


    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    Lance
    mailto:[email protected]

    Comment

    Working...
    X