i am writing a program that will allow me to shut down my pc after a specified length of time ( as i listen to my music whale i am falling asleep and want the pc to turn off automatically) . i know there are many ways to do this out there but i wana make my own. im going to use the "ExitWindowsEx function from the Win32 api. there are various constants such as EWX_LOGOFF, EWX_POWEROFF etc that i need to use but i dont know what values are needed in them. can anyone tell me where to get the data contained in theese constants, or how to include a headder file of c++ in c#. hope you all know what i mean. thanks