Hopes this thread helps,

Opening and reading binary files in C?