Closed toby11 closed 2 years ago
Windows 10 and .net 4.7.2 - vs2021, tried building it with x86 and AnyCPU but still the same error.
Thanks for the issue. Can you please say is your Windows 32 or 64 bit?
@melanchall thanks for the quick reply its 64bit
Processor Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz 3.30 GHz Installed RAM 32.0 GB System type 64-bit operating system, x64-based processor Pen and touch Pen and touch support with 10 touch points
Edition Windows 10 Enterprise Version 21H1 Installed on 22/10/2020 OS build 19043.1415 Experience Windows Feature Experience Pack 120.2212.3920.0
in fact just changed my project to compile in x64 and it now works with no errors
however on using InputDevice.GetAll()
I get "Enumeration yielded no results" whereas I have multiple midi input devices.
Actually I was connected to my dev machine via rdp so think that's why it was returning no input devices.
So the issue was resolved by just compiling as x64 in visual studio. Thanks
I'm reopening the issue. I'm able to reproduce the error in a fresh WinForms app running in 32-bit process. The library is supposed to work in 32-bit Windows apps too, so I'll try to fix the issue.
The problem is solved now. You can install prerelease version of the library NuGet package – 6.1.0-prerelease1.
:rocket: 6.1.0 version is released now!
Prerelease NuGet packages will be unlisted soon, so please update the package references to the new version.
Thanks for using the library!
In in a windows .net forms app on calling
var allDevices = InputDevice.GetAll()
I get this exception?
Managed Debugging Assistant 'PInvokeStackImbalance' : 'A call to PInvoke function 'Melanchall.DryWetMidi!Melanchall.DryWetMidi.Multimedia.MidiDevicesSessionApi32::OpenSession_Win' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.'