This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern DWORD g_masterProcessId; | |
HANDLE DuplicateHandleToMaster( HANDLE handle ) | |
{ | |
HANDLE master_handle = NULL; | |
HANDLE master_process = OpenProcess( | |
PROCESS_DUP_HANDLE, FALSE, g_masterProcessId | |
); | |
if( ! master_process ) return NULL; |