Evgeniy Berezovsky
Evgeniy Berezovsky

Reputation: 19248

How can I check if a DLL uses P/Invoke (DllImport)?

Given a DLL, how can I make sure it does (or does not) use P/Invoke, with a command line tool?

Upvotes: 0

Views: 123

Answers (1)

Evgeniy Berezovsky
Evgeniy Berezovsky

Reputation: 19248

ildasm /text file.dll | findstr pinvokeimpl

If the result is empty, pinvoke is not being used by the dll (or exe), otherwise it is.

N.B. ildasm should come installed with Visual Studio, and is easiest to call when using the Visual Studio Developer Command Prompt.

Upvotes: 2

Related Questions