简体   繁体   中英

Do not allow to start kernel32.dll Sleep function

I have external dll (C++) and c# console app where I import this dll with

[DllImport(DllFileName, CallingConvention = CallingConvention.Cdecl)]

This external dll uses kernel32.dll Sleep function. Is there any possibility to cancel this sleep function or not allow to start it at all? I imagine it something like this

System.Threading.Thread.DoNotAllowSleep = true;

And whenever is Sleep called it just skip it without interrupting other code.Is there any possibility to achieve what I need?

Windows API拦截有几种方法,IAT修补是最适用的一种方法。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM