There are those little things, they are so trivial, but you just can’t find the right API to do it. Now what?
Well, let’s use google for help.
hmm, does not return anything interesting.
Turns out there is little API called GetBinaryType, which will tell you whether a binary is an executable or not, and if it is, what type of executable it is.
Of course, once you find the solution, you want to record it somewhere so you won’t forget it anywhere.
This is exactly what I am doing now. And I want to record it in a web log, so people with the same question can find it useful.
Hopefully google will index this post, and future search on google will have a better hit.
Here is another useful API GetFileType. It returns the file type for the specified file.