Can someone help me?
why does

invoke OpenProcessToken, ps.th32ProcessID,TOKEN_ADJUST_PRIVILEGES or TOKEN_QUERY, addr htoken

returns ERROR_INVALID_HANDLE (00000006)
but i know for shure that that handle is valid.
Posted on 2006-10-07 19:04:50 by SET
You should be using the process handle not the process ID...

invoke GetCurrentProcess
mov ,eax

invoke OpenProcessToken, ,TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, offset hToken
test eax,eax
jnz >
    xor eax,eax
    ret
:
Posted on 2006-10-08 03:03:51 by donkey