You proabaly should use power management API functions.
Particularly, you can use DevicePowerEnumDevices
function to list divices, that can wake up computer and DevicePowerSetDeviceState
to enable/disable device from being sble to wake up computer.