How can i get the reference file (dll) information from the other application (exe) file
-
In my windows application project, with the help of openfiledialog control i choose a other exe file like word.exe, notepad.exe... then how can i get the (dll) reference file and location information for that selected exe file. For example: when we add an exe file in a setup project then it will automatically insert all the reference/dependencies file with in it. Like that i need to get all the file and location information. Thanks in advance KV
-
In my windows application project, with the help of openfiledialog control i choose a other exe file like word.exe, notepad.exe... then how can i get the (dll) reference file and location information for that selected exe file. For example: when we add an exe file in a setup project then it will automatically insert all the reference/dependencies file with in it. Like that i need to get all the file and location information. Thanks in advance KV
Not sure, but I am going to guess that you will need to use reflection, although I think this will only work with .NET assemblies.
Steve Jowett ------------------------- Real programmers don't comment their code. If it was hard to write, it should be hard to read.
-
In my windows application project, with the help of openfiledialog control i choose a other exe file like word.exe, notepad.exe... then how can i get the (dll) reference file and location information for that selected exe file. For example: when we add an exe file in a setup project then it will automatically insert all the reference/dependencies file with in it. Like that i need to get all the file and location information. Thanks in advance KV
It's not listed in a file anywhere. You have to parse the .EXE and examine metadata, export and import tables. It would help greatly if you understood the PE file format. Without that knowledge, you'll find this project impossible. Google results for PE file format[^].
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008