public void Dispose() { if (_deviceInfoSet != IntPtr.Zero) { Native.SetupDiDestroyDeviceInfoList(_deviceInfoSet); _deviceInfoSet = IntPtr.Zero; } }