I need to run this code :
asm
push eax
mov eax, esp
push 0
push 4
...
call NtQueryInformationThread
...
end;
But I get the error message that NtQueryInformationThread is
“Undeclared identifier: ‘NtQueryInformationThread'”.
Can you please help me declare it?
Thanks in advance.
What you are missing is that you need to make your program import the function from
ntdll.dll. What’s more you don’t needasmfor this and you really should avoid using it because it will make your program hard to maintain.You can import the function just like any other Windows API function:
You will need a couple of type declarations too: