GetModuleHandle() or GetCurrentProcess()
-
Are the handles returned from the following funcs going to be same?? GetModuleHandle(NULL) GetCurrentProcess(void)
-
Are the handles returned from the following funcs going to be same?? GetModuleHandle(NULL) GetCurrentProcess(void)
No they do not return the same thing. GetModuleHandler returns a handle to the module that you request, which cooincidnetally is the address at which the Module was loaded into memory. GetCurrentProcess returns a pseudo-handle, which if you use that handle value in any of the functions that expects a process handle, it will be interpreted as the current process.
Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life! -
No they do not return the same thing. GetModuleHandler returns a handle to the module that you request, which cooincidnetally is the address at which the Module was loaded into memory. GetCurrentProcess returns a pseudo-handle, which if you use that handle value in any of the functions that expects a process handle, it will be interpreted as the current process.
Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life!thanks!!