Hello, does anybody know how to get the correct size of files bigger than 2GB?

Files above 2GB give a totally wrong negative value.
I read somewhere that you can use the calculation: ((2^31)*2) + Negative Value
But with a 2.2GB file it seems to be about 3mb off, which is too much as quite a few things in my app rely on the file size.

Any ideas?