Skip to content

Conversation

@andymac4182
Copy link

This includes the update to netstandard2 and a refactor to help make the code slightly easier to understand

list.Add(dev);
// freeing the enumeration releases the device,
// do it as soon as you can, so we dont block device from others
HidApi.hid_free_enumeration(pDev);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hid_free_enumeration() frees the entire list and should be called only once after the loop finished (with pointer returned by hid_enumerate() as parameter).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants