diff options
| author | Lyssa | 2025-04-02 10:06:52 +0000 |
|---|---|---|
| committer | Lyssa | 2025-04-02 10:06:52 +0000 |
| commit | b8558d8fb2de25a97572ec9d3e33618b8fac3027 (patch) | |
| tree | 4a6dc0d718918881f8461091974ea3afaf026186 /LibTSforge/SPP/SPSys.cs | |
| parent | 07f43e261381c8b9229fcf376e310d8f02ccb16d (diff) | |
| download | TSforge-b8558d8fb2de25a97572ec9d3e33618b8fac3027.zip | |
basic cleanup
Diffstat (limited to 'LibTSforge/SPP/SPSys.cs')
| -rw-r--r-- | LibTSforge/SPP/SPSys.cs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/LibTSforge/SPP/SPSys.cs b/LibTSforge/SPP/SPSys.cs index 10b8d04..18b3655 100644 --- a/LibTSforge/SPP/SPSys.cs +++ b/LibTSforge/SPP/SPSys.cs @@ -2,10 +2,7 @@ namespace LibTSforge.SPP { using Microsoft.Win32.SafeHandles; using System; - using System.Collections.Generic; - using System.Linq; using System.Runtime.InteropServices; - using System.Text; public class SPSys { @@ -24,7 +21,7 @@ namespace LibTSforge.SPP { SafeFileHandle file = CreateFileSafe(@"\\.\SpDevice"); IntPtr buffer = Marshal.AllocHGlobal(1); - int bytesReturned = 0; + int bytesReturned; DeviceIoControl(file, 0x80006008, IntPtr.Zero, 0, buffer, 1, out bytesReturned, IntPtr.Zero); bool running = Marshal.ReadByte(buffer) != 0; Marshal.FreeHGlobal(buffer); @@ -36,7 +33,7 @@ namespace LibTSforge.SPP { SafeFileHandle file = CreateFileSafe(@"\\.\SpDevice"); IntPtr buffer = Marshal.AllocHGlobal(4); - int bytesReturned = 0; + int bytesReturned; DeviceIoControl(file, start ? 0x8000a000 : 0x8000a004, IntPtr.Zero, 0, buffer, 4, out bytesReturned, IntPtr.Zero); int result = Marshal.ReadInt32(buffer); Marshal.FreeHGlobal(buffer); |
