m_lock

This call increments the system lock count, which prevents interruption of the currently running application while it is non-zero. That is, it causes other applications' hotkeys to be ignored, prevents alarm-induced task switching, and controls background task activation.

This could be used, for example, to prevent a task-switch until after an error message is acknowledged by the user.