thank you both for the help, anyway I've managed to figure it out myself, however due to a netsplit I couldn't access codeproject.com, I made a func almost similar you described. btw. it's possible to get the size of a file with GetFileSize, as if it puts the high dword to the DWORD pointed by the second argument.