How can we check that a binary EXE (PE) is COM Exe or Win32 Exe?
I need to check programatically whether a given EXE binary is a COM, EXE or Win32.exe, is this possible through the Import Table? Where in the registry should I look to find out if a binary is registered for COM? T开发者_StackOverflow中文版his is specific to EXEs, as DLLs are not a problem for me.
http://en.wikipedia.org/wiki/Component_Object_Model
If you have a DLL you can ask for its DllGetClassObject (AFAIK inprocess COM servers are required to export this function).
For exes, I am afraid you cant, at least not 100% sure. you may only apply heuristics such as checking if exe has typelibs in its resources (but keep in mind that it is not required).
精彩评论