John Goering
John Goering

Reputation: 39030

Which program in Visual Studio lets me look into DLLs to see its API?

See the question. I want to see the methods and classes offered by a DLLs library.

Upvotes: 59

Views: 129749

Answers (9)

Joshua McVey
Joshua McVey

Reputation: 96

In Visual Studio 2022 (and without creating or opening a solution) you can view a DLL's members.

  1. Open the Object Browser Tool Window (from the View option in the Main Menu).
  2. In that window it'll probably show a list of .NET components, but near the top there's a browse button (three dots). Click this.
  3. Here you'll add any DLLs you want to create a "Custom Component Set". Once you select and Add your DLL, then click OK.

You should see your DLL members in the Object Browser now.

Upvotes: 1

user4898056
user4898056

Reputation:

If you have limited options to download: In Visual Studio you could use Visual Studio Developer Command Prompt. Open it from windows menu -> All programs -> Visual Studio XX -> Visual Studio Tools -> Developer Command Prompt. Then: run command: ildasm

Example ildasm:

ildasm c:\MyNetAssembly.dll

If you have access to download any program you could use better options:
IlSpy
dotPeek
.net reflector
JustDecompile

Upvotes: 6

danielp
danielp

Reputation: 1187

  • ILSpy is an open-source tool which allows you to browse an assembly's packages and classes and also to decompile code.

  • Another free-of-charge tool is JetBrain's dotPeek.

Upvotes: 8

Knasterbax
Knasterbax

Reputation: 8207

For those coming from the old Visual Studio 6.0 days:

Dependency Walker is a nice free tool, that was formerly part of Visual Studio.

http://www.dependencywalker.com/

I like it still. Here is a screen shot:

enter image description here

Upvotes: 17

Gary Willoughby
Gary Willoughby

Reputation: 52498

If the DLL is a .NET assembly you might want to take a look at Reflector for a more detailed view.

Upvotes: 6

Thorsten79
Thorsten79

Reputation: 10128

There's also the DLL export viewer if you don't have VS installed on a machine.

Upvotes: 6

Suma
Suma

Reputation: 34403

Outside of Visual Studio, you can use a dependency tool which is able to inspect DLL and EXE imports and exports, it integrates with the shell and is very easy to use. It comes with some Microsoft SDKs. If you want to avoid the hassle of downloading and installing SDK just because of this, easy download links for all 32b/64b platforms are available at http://www.dependencywalker.com/

Microsoft documentation (no download) is available at MicroSoft Technet

Similar functionality is also available in SysInternals Process Explorer - best suited when inspecting running processes.

Upvotes: 1

Dominik Grabiec
Dominik Grabiec

Reputation: 10655

There's a dependency tracker tool that comes with the Windows SDK (formerly the Platform SDK), it's got a reasonable GUI for looking inside executables and DLL's.

There are also some command line tools that you can use to see inside of dll's, dumpbin in particular - check the MSDN help in visual studio for more information. You can run these tools from the command prompt in the Visual Studio start menu folder.

Upvotes: 2

Rob Cooper
Rob Cooper

Reputation: 28867

This is exactly what the Object Browser is for.

  • Add a reference to the DLL.
  • Right click it in the list.
  • Click View in Object Browser.

Upvotes: 55

Related Questions