Thread: What's a DWORD?

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    29
    Rep Power
    0

    What's a DWORD?


    I'm trying to get the size of a file with CFileFind's GetLength function. It returns the size as a DWORD (supposedly).

    Question is, what's a DWORD? How can I put that into a double so I can use it?

    Also, when I'm CString.Format'ing, do I just put doubles in as ("%d", myDouble)? Thanks!
  2. #2
  3. Contributing User
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2003
    Location
    USA
    Posts
    7,145
    Rep Power
    2222
    In Windows, a DWORD is defined as a long int. It is not a floating-point number.

    Off the top of my head, the format specifier should be %ld .

    EDIT:
    I had written that during class break last night.

    Visual C++6 Help File definition:
    DWORD A 32-bit unsigned integer or the address of a segment and its associated offset.

    Therefore the format specifier should be %lu .
    Last edited by dwise1_aol; September 17th, 2003 at 03:12 PM.

IMN logo majestic logo threadwatch logo seochat tools logo