Is it possible to specify a function with both extern and override modifiers?
- by Jeffrey Greenham
I'm trying to override the behavior of an external function in user32.dll because I don't want a certain window to show up.
What I'm trying to do is this:
[DllImport("user32.dll")]
public extern override IntPtr GetSystemMenu(IntPtr hMenu, bool bRevert)
{
return new IntPtr();
}
but this won't work because I get the following errors:
... no suitable method found to override
and
... cannot be extern and declare a body
Is there any way to simulate what I'm trying to do?