Remove duplicate code by using Nt* functions for PulseEvent,