summaryrefslogtreecommitdiffstats
path: root/win/C#/EncodeQueue/Encode.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-06-12 14:19:19 +0000
committersr55 <[email protected]>2009-06-12 14:19:19 +0000
commite9bbd49dc361b3e40300553f501e20877f637792 (patch)
tree591e00d78d3d7ed1fde05b4b4795324ffde6dd0c /win/C#/EncodeQueue/Encode.cs
parentff7639bdf5ae1cd3977ca16f0a0892d58f554f7a (diff)
WinGui:
- Move all DllImports into win32.cs git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2523 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/EncodeQueue/Encode.cs')
-rw-r--r--win/C#/EncodeQueue/Encode.cs11
1 files changed, 2 insertions, 9 deletions
diff --git a/win/C#/EncodeQueue/Encode.cs b/win/C#/EncodeQueue/Encode.cs
index 77b2b2957..22518bfb2 100644
--- a/win/C#/EncodeQueue/Encode.cs
+++ b/win/C#/EncodeQueue/Encode.cs
@@ -8,19 +8,12 @@ using System;
using System.Diagnostics;
using System.Windows.Forms;
using System.IO;
-using System.Runtime.InteropServices;
using Handbrake.Functions;
namespace Handbrake.EncodeQueue
{
public class Encode
{
- // DLL Imports
- [DllImport("user32.dll")]
- private static extern void LockWorkStation();
- [DllImport("user32.dll")]
- private static extern int ExitWindowsEx(int uFlags, int dwReason);
-
/// <summary>
/// Execute a HandBrakeCLI process.
/// </summary>
@@ -121,7 +114,7 @@ namespace Handbrake.EncodeQueue
Process.Start("Shutdown", "-s -t 60");
break;
case "Log Off":
- ExitWindowsEx(0, 0);
+ Win32.ExitWindowsEx(0, 0);
break;
case "Suspend":
Application.SetSuspendState(PowerState.Suspend, true, true);
@@ -130,7 +123,7 @@ namespace Handbrake.EncodeQueue
Application.SetSuspendState(PowerState.Hibernate, true, true);
break;
case "Lock System":
- LockWorkStation();
+ Win32.LockWorkStation();
break;
case "Quit HandBrake":
Application.Exit();