microsoft / Detours

Detours is a software package for monitoring and instrumenting API calls on Windows. It is distributed in source code form.
MIT License
5.18k stars 1.01k forks source link

Early return when detour_alloc_region_from_hi and lo fail #122

Closed danikdanik closed 4 years ago

danikdanik commented 4 years ago

Return early in case the VirtualAlloc fails in detour_alloc_region_from_lo() and detour_alloc_region_from_hi() with ERROR_DYNAMIC_CODE_BLOCKED error, aka "The operation was blocked as the process prohibits dynamic code generation"