I'm writing an application that blocks user input until something is done in an application that launches as soon as user logs on.
I'm using the BlockInput (PInvoke) to block keyboard and mouse, below:
[System.Runtime.InteropServices.DllImportAttribute("user32.dll", EntryPoint = "BlockInput")] [return: System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.Bool)] public static extern bool BlockInput([System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.Bool)] bool fBlockIt);When I launch the application from Visual Studio it works fine, but when the app launches automatically after logon, it doesn't block anything. I figure that the OS is preventing this, but I'm not sure. Any ideas??
NR