This won't tell you the size of the file. You're asking where the get pointer is, hint: it hasn't moved since you opened the file, and then you setting the get pointer back to the beginning of the stream. You're obviously using the WinAPI in other parts of your code so why not just stick with it? "GetFileSize()" is a pretty straight forward function: http://msdn.microsoft.com/en-us/library/windows/desktop/aa364955(v=vs.85).aspx . Let us know if you need help with it. Regarding the name of this function, are you working with a network stream? Because if that's the case then we need to rethink this whole thing. Also, what's the thing you've been confused about? I can understand if you want to figure it out for yourself but I'd like to at least offer you an answer.
EDIT: D'oh! I missed the "ios::ate" on Line 5. I would still encourage you to use "GetFileSize()" but you're fine.