+ 1
WHY IS HANDLE NECESSARY HERE?
HANDLE aa = OpenProcess(PROCESS_ALL_ACESS, FALSE, id); why is HANDLE necessary here?
5 Answers
+ 2
DWORD is an unsigned 32 bit integer used specifically in windows...
It is used to represent constants or variables for switches...
In the function I posted earlier,
HANDLE out= GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(out,FOREGROUND_RED);
FOREGROUND_RED is a WORD, which is 16 bits.
Similarly, there is DWORD to represent larger data where WORD is insufficient...
It is normally used to create large pointers for storing useful data,
Eg - Console Stats, Procedures, Current Messages, etc...
You may use it anywhere where you have to store a large integer or memory...
But is it usually not so preffered as WORD proves to be sufficient most of the time...
+ 3
https://www.sololearn.com/discuss/392276/?ref=app
Are your doubts finally clear?
+ 1
yea, i posted this before asking you
+ 1
Just a quick question. Do you know whats a DWORD and when should i use it?
+ 1
thanks!