unregisterfunc1 (coredll)
Last changed: anonymous

.
Summary

C# Signature:

[DllImport("coredll.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool UnregisterFunc1(uint fsModifiers, uint id);

VB Signature:

                TODO

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

[DllImport("coredll.dll")]        
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool UnregisterFunc1(uint fsModifiers, uint id);

private const int MOD_ALT = 0x1;
private const int MOD_CONTROL = 0x2;
private const int MOD_SHIFT = 0x4;
private const int MOD_WIN = 0x8;
private const int WM_HOTKEY = 0x312;

private void BlockKey(HardwareKeys key)
{
    if(!UnregisterFunc1(MOD_WIN, (uint)key))
        System.Console.WriteLine("Could not block key: " + key.ToString());
}

Documentation