Comparing two DWORD Values. - Programmer

This is a discussion on Comparing two DWORD Values. - Programmer ; Greetings, Can someone help me with this issue? I was able to obtain the size of a file as a DWORD value, however, I would like to compare it to a specific size, such as 5 Meg. And if it ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Comparing two DWORD Values.

  1. Comparing two DWORD Values.

    Greetings,
    Can someone help me with this issue?

    I was able to obtain the size of a file as a DWORD value, however, I
    would like to compare it to a specific size, such as 5 Meg. And if it
    is larger than 5 Meg do something.

    Regards,


    JS

  2. Re: Comparing two DWORD Values.

    if (GetFileSize(handle_to_your_file, NULL) > 5 * 1024 * 1024)
    DoSomething();

    --
    Tim Robinson (MVP, Windows SDK)
    http://www.themobius.co.uk/

    "Johnny Sandaire" wrote in message
    news:15baeecf.0307180512.685db166@posting.google.c om...
    > Greetings,
    > Can someone help me with this issue?
    >
    > I was able to obtain the size of a file as a DWORD value, however, I
    > would like to compare it to a specific size, such as 5 Meg. And if it
    > is larger than 5 Meg do something.
    >
    > Regards,
    >
    >
    > JS




+ Reply to Thread