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.

http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=How+to+tell+if+a+DLL+is+64+bit+or+32+bit&btnG=Google+Search

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.