public void Open() { _handle = _OpenDevice(_devicePath, false); _capabilities = _GetDeviceCapabilities(_handle); _readBufferPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(byte)) * Math.Max(_capabilities.FeatureReportByteLength, _capabilities.InputReportByteLength)); }