Does anyone know of a good tutorial/e-book that goes in depth on the System.Runtime.InteropServices namespace? I just got through reading this tutorial on how to make the UAC shield show up in a button and now I really want to learn this.
P.S. How do look in the windows system files to know that a method exist to show a UAC shield in a button?
There are lots of practical examples at http://pinvoke.net.
Check out the P/Invoke Interop Assistant, as well. There's some great code there, and a very useful tool. It makes it much easier to learn.
As for your p.s., the code you need is in the information you provided. You use the SendMessage method to send the BCM_SETSHIELD message to a handle (in this case, the handle of your button) that should show it.
pinvoke.net is a good place to get the prototypes of native functions, but if you don't know what you are looking for, it's not the best. I would suggest the Windows API reference section of MSDN. You can browse functions in alphabetical order, by category, and by Windows Release, all with descriptions of what they do, what they return and the flag options that control their actions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With