Jump to content

Recommended Posts

This solved an issue of not knowing which additional dll's to include when building the exe. One dll may call a number of other dll's etc.

Used PowerShell & ran the following:

[Reflection.Assembly]::LoadFile('C:\absolute\path\to\my.dll').GetReferencedAssemblies()

 

This neatly produces a list

image.png.7590d3b92305e47881e7ecb240971af1.png

Share this post


Link to post
Share on other sites

Neat trick but that's for .Net assemblies only and won't work for standard DLLs, will it?

I use Dependency Checker for that. It's an old tool that hasn't been updated to deal with some newer Windows features very well and gets somewhat confused about DLLs that are of different bitness than itself, but it is usually enough to see the non standard system DLLs and its dependencies. Anything like kernel32.dll etc you shouldn't have to worry about anyhow.

Share this post


Link to post
Share on other sites

On linux, you may just use ldd:

$ ldd my_binary

Or if the loader refuses to run it on current platform, but you still need to know:

$ readelf -d my_binary

For Windows - there are tons of "PE Viewers" and "PE Explorers" which lets you look at import table.

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.