Skip to content

Calling CloseInterface() on a PIEDevice results in an exception (.NET 8.0) #1

@ncory-hearst

Description

@ncory-hearst

When I call CloseInterface() on a PIEDevice object I've been using, I get the following exception:
System.PlatformNotSupportedException: 'Thread abort is not supported on this platform.'

Here is calling code (part of a function that cleans up after a device has been disconnected):

PIEDevice hwDevice = device.Device;
hwDevice.SetDataCallback(null);
hwDevice.SetErrorCallback(null);
hwDevice.CloseInterface();

This is using the PIEHidNetCore library within a WPF application built with .NET 8.0. I have previously used the same code, unmodified, using the PIEHid64Net library under a previous version of .NET. I recently updated my project to use .NET 8 and switched to the PIEHidNetCore library. I have not had any other issues besides this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions