Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void* oDuplicateHandle;
- BOOL __stdcall hkDuplicateHandle(
- HANDLE hSourceProcessHandle,
- HANDLE hSourceHandle,
- HANDLE hTargetProcessHandle,
- LPHANDLE lpTargetHandle,
- DWORD dwDesiredAccess,
- BOOL bInheritHandle,
- DWORD dwOptions
- ) {
- auto ret = reinterpret_cast< decltype( &hkDuplicateHandle ) >( oDuplicateHandle )( hSourceProcessHandle, hSourceHandle, hTargetProcessHandle, lpTargetHandle, dwDesiredAccess, bInheritHandle, dwOptions );
- if ( !ret )
- SetLastError( 0 );
- return TRUE;
- }
- if ( !util::hooking::detour::create( DuplicateHandle, hkDuplicateHandle, &oDuplicateHandle ) )
- util::logger::fatal( "ya upal" );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement