79782680

Date: 2025-10-04 21:09:55
Score: 1
Natty:
Report link

As answered by @LenHolgate, there are no timers that directly generate a IOCP completion.

But it is possible to generate a IOCP completion for "waitable timers" and any other synchronization object using the NT API.

By using NtCreateWaitCompletionPacket and NtAssociateWaitCompletionPacket, you can create a handle to a completion packet and associate it with any synchronization object. This will generate a new IOCP completion once the object is signalled.

This association is always one-shot, so if your "waitable timer" is periodic, you will need to call NtAssociateWaitCompletionPacket on each expiration.

Please note that this solution uses the native NT APIs, which may change or break in future versions of Windows.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @LenHolgate
  • Low reputation (1):
Posted by: Xumaquer