WinStationWaitSystemEvent - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _WINSTA_H

// rev
/**
 * Waits for a terminal-services system event on a Remote Desktop Session Host server.
 *
 * \param ServerHandle A handle to an RD Session Host server, or WINSTATION_CURRENT_SERVER for the local server.
 * \param EventMask A bitwise combination of WEVENT_* values that identifies the events for which to wait.
 * \param EventFlags A pointer to a variable that receives the WEVENT_* flags for the events that occurred.
 * \return BOOLEAN Nonzero if the function succeeds, or zero otherwise. To get extended error information, call GetLastError.
 */
NTSYSAPI
BOOLEAN
NTAPI
WinStationWaitSystemEvent(
    _In_opt_ HANDLE ServerHandle,
    _In_ ULONG EventMask,
    _Out_ PULONG EventFlags
    );

#endif

View code on GitHub

NtDoc

This function is a wrapper over an RPC method documented in the [MS-TSTS] specification.