Gramero
Gramero

Reputation: 1885

How can I get the P/Invoke definitions for Windows API functions?

I want to use functions from the Win32 API in my .NET application, but I don't know the signature of the methods declared in the DLL files. If I use DllImport, I have to provide a definition of the method in order to use it as an "extern method".

Or is there another way to do this?

Upvotes: 0

Views: 536

Answers (2)

Femaref
Femaref

Reputation: 61457

You could have a look at pinvoke.net, it is a collection of methods supported by various Win32 apis. Also it contains programs which can generate DllImport signatures if you have the C-style header.

Upvotes: 7

Matěj Zábský
Matěj Zábský

Reputation: 17272

Most Win32 API signatures are listed here.

Or you could try DLL Export Viewer.

Upvotes: 1

Related Questions