views:

74

answers:

1

I need to check programatically whether a given EXE binary is a COM EXE or Win32 EXE. Is there any way to do this? Is the Import Table an answer to this? If somehow I can determine this from the registry, where in the registry should I look to find out if a binary is regsitered for COM? (This is specific to EXEs, as DLLs are not a problem for me)

+1  A: 

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).

Vagaus