I can not figure out how to get BlockInput to work correctly.
Am I declaring it wrong?

Thanks.


BOOL BlockInput(BOOL fBlockIt);

.DATA

.CODE

Start:

BlockInput(TRUE); 

int 3

invoke ExitProcess, 0
Posted on 2009-10-07 09:20:50 by skywalker
I think you are mixing C and asm


Invoke BlockInput, TRUE


Include User32.inc and User32.lib and you will not need the prototype for the function.
Posted on 2009-10-07 09:33:15 by GoldStar611
I already have those includes and libraries.

Andy
Posted on 2009-10-07 11:45:40 by skywalker
Thanks I got it working.

It's too bad that Ctrl Alt Delete isn't blocked as well.
Would be nice if the BlockInput could be obfuscated as well.

; No.asm Blocks keyboard and mouse input
;            Slight irritation to code dissassemblers.
;        Ctrl Alt Delete allows enabling of input !!
;        Running this will immediately open a debugger
;
.386           
.MODEL FLAT, STDCALL
OPTION CASEMAP: NONE


    include \masm32\include\windows.inc
    include \masm32\include\user32.inc
    include \masm32\include\kernel32.inc
    include \masm32\include\advapi32.inc
    include \masm32\include\shlwapi.inc
    include \masm32\macros\macros.asm

    includelib  \masm32\lib\kernel32.lib
    includelib  \masm32\lib\user32.lib
    includelib  \masm32\lib\advapi32.lib
    includelib  \masm32\lib\shlwapi.lib

.DATA

.CODE

Start:

invoke BlockInput,TRUE;    ; block keyboard and mouse input 
int 3
invoke ExitProcess, 0

END Start
Posted on 2009-10-07 14:28:18 by skywalker