BOOL LockInput(hReserved, hwndInput, fLock) | |||||
HANDLE hReserved; | /* reserved, must be NULL | */ | |||
HWND hwndInput; | /* handle of window to receive all input | */ | |||
BOOL fLock; | /* the lock/unlock flag, */ |
The LockInput function locks input to all tasks except the current one, if the fLock parameter is TRUE. The given window is made system modal; that is, it will receive all input. If fLock is FALSE, LockInput unlocks input and restores the system to its unlocked state.
hReserved
This parameter is reserved and must be NULL.
hwndInput
Identifies the window that is to receive all input. This window must be in the current task. If fLock is FALSE, this parameter should be NULL.
fLock
Indicates whether to lock or unlock input. A value of TRUE locks input; a value of FALSE unlocks input.
The return value is nonzero if the function is successful. Otherwise, it is zero.
Before entering hard mode, a Windows-based debugger calls LockInput, specifying TRUE for the fLock parameter. This action saves the current global state. To exit hard mode, the debugger calls LockInput, specifying FALSE for fLock. This restores the global state to the conditions that existed when the debugger entered hard mode. A debugger must restore the global state before exiting. Calls to LockInput cannot be nested.