We should call GetBinaryType() even before checking for utf-16 and utf-32 documents. This api can tell you whether it is an executable file (.exe or .dll) so that you don't have to read it in.