开发者

How can we check that a binary EXE (PE) is COM Exe or Win32 Exe?

开发者 https://www.devze.com 2023-01-05 04:40 出处:网络
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 registe

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

0

精彩评论

暂无评论...
验证码 换一张
取 消