mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-27 17:11:48 +01:00
df43fd0d74
I kinda just felt like doing it :P wanted to test myself, trying to make a cleaner UI
31 lines
1.2 KiB
C#
31 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Runtime.InteropServices;
|
|
namespace DS4Library
|
|
{
|
|
internal class NativeMethods
|
|
{
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
internal struct BLUETOOTH_FIND_RADIO_PARAMS
|
|
{
|
|
[MarshalAs(UnmanagedType.U4)]
|
|
public int dwSize;
|
|
}
|
|
|
|
[DllImport("bthprops.cpl", CharSet = CharSet.Auto)]
|
|
internal extern static IntPtr BluetoothFindFirstRadio(ref BLUETOOTH_FIND_RADIO_PARAMS pbtfrp, ref IntPtr phRadio);
|
|
|
|
[DllImport("bthprops.cpl", CharSet = CharSet.Auto)]
|
|
internal extern static bool BluetoothFindNextRadio(IntPtr hFind, ref IntPtr phRadio);
|
|
|
|
[DllImport("bthprops.cpl", CharSet = CharSet.Auto)]
|
|
internal extern static bool BluetoothFindRadioClose(IntPtr hFind);
|
|
|
|
[DllImport("kernel32.dll", SetLastError = true)]
|
|
internal static extern Boolean DeviceIoControl(IntPtr DeviceHandle, Int32 IoControlCode, ref long InBuffer, Int32 InBufferSize, IntPtr OutBuffer, Int32 OutBufferSize, ref Int32 BytesReturned, IntPtr Overlapped);
|
|
|
|
[DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true, CharSet = CharSet.Auto)]
|
|
internal static extern bool CloseHandle(IntPtr hObject);
|
|
}
|
|
}
|