3

I want to write a C++ program which does the following

input- executable files

output-yes/no

condition:

if(if all the dlls imported by my executable are registered with my system )
yes
else
no

so I need to know
1)how to write a custom registration system which can allows dlls to register and keep track of the registered ones
2)how to look into PEs of my input files to get imported dll info
3)how to check for the condition proposed above

I know dumpbin and depends.exe gives me the soln to point 2 above. But i want to do it in my program. I was told that i need to map the PEs to SEC_IMAGE and parse it, given that i want to look into PEs which are on my disk.is that right? I am an absolute windows newbie. Suggestions are welcome!!

ash
  • 1,170
  • 1
  • 15
  • 24
  • I found a solution to my question2 [here](http://stackoverflow.com/questions/597260/how-to-determine-a-windows-executables-dll-dependencies-programatically) I need a much simpler solution because all my dlls are going to b directly linked(no load library stuff) and also I am nt worried abt indirect dependencies which rules out the need to recursively do the stuff as indicated by someone in the post. All i need is to look for certain well known dlls in the Exe. In fact I can even prepare an exhaustive list to look for but again all of which might not be supported in all versions of my system. – ash May 26 '11 at 00:28

1 Answers1

0

http://msdn.microsoft.com/en-us/library/ms683198%28v=VS.85%29.aspx Should help you a lot.

johnathan
  • 2,315
  • 13
  • 20
  • @johnathon- Thank you! But I need to profile an exe file that is residing on the disk and not a process! – ash Jun 03 '11 at 22:01