Exemple #1
0
		internal static extern bool CeGetSystemPowerStatusEx(out SYSTEM_POWER_STATUS_EX pStatus, bool fUpdate);
Exemple #2
0
		/// <summary>
		/// This function fills in a SYSTEM_POWER_STATUS_EX structure
		/// </summary>
		/// <param name="PowerStatus"></param>
		public void GetDeviceSystemPowerStatus(out SYSTEM_POWER_STATUS_EX PowerStatus)
		{
			CheckConnection();

			try
			{
				CeGetSystemPowerStatusEx(out PowerStatus, true);
			}
			catch(Exception)
			{
				throw new RAPIException("Error retrieving system power status.");
			}
		}