+ 1

WHY IS HANDLE NECESSARY HERE?

HANDLE aa = OpenProcess(PROCESS_ALL_ACESS, FALSE, id); why is HANDLE necessary here?

16th May 2017, 5:36 PM
iPower
iPower - avatar
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...
18th May 2017, 2:48 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 3
17th May 2017, 1:59 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 1
yea, i posted this before asking you
17th May 2017, 9:04 PM
iPower
iPower - avatar
+ 1
Just a quick question. Do you know whats a DWORD and when should i use it?
18th May 2017, 2:40 AM
iPower
iPower - avatar
+ 1
thanks!
18th May 2017, 2:51 AM
iPower
iPower - avatar