Skip to content

API Documentation

Work in progress

Define/include necessary types

public static Guid GUID_DEVINTERFACE_BTHPS3_SIXAXIS => Guid.Parse("7B0EAE3D-4414-4024-BCBD-1C21523768CE");
public static Guid GUID_DEVINTERFACE_BTHPS3_NAVIGATION => Guid.Parse("3E53723A-440C-40AF-8895-EA439D75E7BE");
public static Guid GUID_DEVINTERFACE_BTHPS3_MOTION => Guid.Parse("BCEC605D-233C-4BEF-9A10-F2B81B5297F6");
public static Guid GUID_DEVINTERFACE_BTHPS3_WIRELESS => Guid.Parse("64CB1EE2-B428-4CE8-8794-F68036E57BE5");
#include <BthPS3.h>

Device detection dependencies

Install-Package Nefarius.Devcon
Install-Package PInvoke.Kernel32
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <SetupAPI.h>
#pragma comment(lib, "SetupAPI.lib")

Enumerate detected devices

var instanceId = 0;

//
// Enumerate GUID_DEVINTERFACE_BTHPS3_SIXAXIS
// 
while (Devcon.Find(
    GUID_DEVINTERFACE_BTHPS3_SIXAXIS,
    out var path,
    out var instance,
    instanceId++
))
{
    // Connected SIXAXIS/DualShock 3 found
}
/* to be filled */