| 11606 | |
| 11607 | |
| 11608 | ResultType Line::ScriptBlockInput(bool aEnable) |
| 11609 | // Adapted from the AutoIt3 source. |
| 11610 | // Always returns OK for caller convenience. |
| 11611 | { |
| 11612 | // Must be running Win98/2000+ for this function to be successful. |
| 11613 | // We must dynamically load the function to retain compatibility with Win95 (program won't launch |
| 11614 | // at all otherwise). |
| 11615 | typedef void (CALLBACK *BlockInput)(BOOL); |
| 11616 | static BlockInput lpfnDLLProc = (BlockInput)GetProcAddress(GetModuleHandle("User32.dll"), "BlockInput"); |
| 11617 | // Always turn input ON/OFF even if g_BlockInput says its already in the right state. This is because |
| 11618 | // BlockInput can be externally and undetectibly disabled, e.g. if the user presses Ctrl-Alt-Del: |
| 11619 | if (lpfnDLLProc) |
| 11620 | (*lpfnDLLProc)(aEnable ? TRUE : FALSE); |
| 11621 | g_BlockInput = aEnable; |
| 11622 | return OK; // By design, it never returns FAIL. |
| 11623 | } |
| 11624 | |
| 11625 | |
| 11626 |
nothing calls this directly
no outgoing calls
no test coverage detected