When doing a dll import like this:
[DllImport("user32.dll")]
static extern bool SwapMouseButton(bool fSwap);
private void button1_Click(object sender, EventArgs e)
{
SwapMouseButton(false);
}
How would one go about knowing that there is a method called SwapMouseButton within user32.dll that takes a bool parameter and returns a bool value?
Obviously there is no intellisense to save the day. So is there a website that lists this all out, or a program that I can type user32.dll into that will discover it for me?
`User32.dll’ is part of the Windows API itself, and the API is documented at MSDN. The typical way to find things there is to decide what you’re trying to do, and then search for that topic.
There’s no way to find the parameters for an unmanaged DLL’s functions. You can find the name of the functions (usually) with
depends.exe(part of VS), or with DependencyWalker. This won’t give you the parameters, though; those have to be obtained from the documentation for the library.