P / Invoke tutorials?

Does anyone know of a good tutorial / e-book that goes deep into the System.Runtime.InteropServices namespace? I just read this tutorial on how to make the UAC screen appear in a button, and now I really want to find out.

PS How to look in the Windows system files to know that there is a method for displaying a UAC screen on a button?

+5
source share
3 answers

As for your ps, the code you need is in the information you provide. You use the SendMessage method to send the BCM_SETSHIELD message to the handle (in this case, the handle of your button) that should show it.

EDIT

pinvoke.net is a good place to get prototypes of your own functions, but if you don’t know what you are looking for, this is not the best. I would suggest a Windows API reference topic on MSDN . You can browse functions alphabetically, by category, and in Windows Release, all with a description of what they do, what they return, and flag options that control their actions.

+1
source
+9
source

Check out the P / Invoke Interop Assistant . It has great code and a very useful tool. This greatly facilitates the study.

+4
source