title: Event name for Disabling power button
body: <p>on Windown Mobile 6, under Settings\System\Power\Misc there is a "Disable Power Switch" what I have to check programatically to get rid of popup menu. By comparing registried I figured out, that it can be set trough 'Drivers\BuiltIn\Power\Settings' registry key, settings DisablePwrSwitch to 1.</p>
  
  <p>The problem is, that it is not enough to set registry, you also have to set event for the driver to force him to reload settings (or you can reset device, but it is an ugly solution).</p>
  
  <p>I can achieve it teoretically with:</p>
  
  <pre><code>private static void DoAutoResetEvent()
  {
      string eventString = "OMNIBOOK_EVENT_SHUTDOWN";
  
      IntPtr newHandle = CreateEvent(IntPtr.Zero, false, false, eventString);
      EventModify(newHandle, (int)EventFlags.EVENT_SET);
      CloseHandle(newHandle);
  }
  
  private enum EventFlags
  {
      EVENT_PULSE = 1,
      EVENT_RESET = 2,
      EVENT_SET = 3
  }
  
  [DllImport("coredll.dll", SetLastError = true)]
  private static extern IntPtr CreateEvent(IntPtr lpEventAttributes, bool bManualReset, bool bInitialState, string lpName);
  
  [DllImport("coredll")]
  static extern bool EventModify(IntPtr hEvent, int func);
  
  [DllImport("coredll.dll", SetLastError = true)]
  private static extern bool CloseHandle(IntPtr hObject);
  </code></pre>
  
  <p>But I do not know the actual eventStrign for that. <code>"OMNIBOOK_EVENT_SHUTDOWN"</code> is of course not the correct one.</p>
  
  <p>Have somebody an idea, what is the eventName to reload settings by this driver?</p>