Reputation: 1
I made a WinForms app where you can choose devices (for MIDI output), select and play songs from .mid files. (virtual device is used for output, user has a choice which device to use) It works without any issues, no errors. Then I started to make a Package Installer. I've added Windows Package Installer to my solution, added my app to it's references, configured the certificate. When I try to run the app installed from the package I am greeted with an error (on app launch, on device change, on trying to play music)
The error is this:
************** Exception Text **************
Sanford.Multimedia.Midi.OutputDeviceException: Undefined external error. at Sanford.Multimedia.Midi.OutputDevice..ctor(Int32 deviceID) at LynMusic.Main.cbDevices_SelectedIndexChanged(Object sender, EventArgs e) at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e) at System.Windows.Forms.ComboBox.set_SelectedIndex(Int32 value) at LynMusic.Main.LoadMidiDevices() at LynMusic.Main.btnResetDevices_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam)
I am doing an action:
outputDevice = new OutputDevice(MidiSelectedDevice);
where MidiSelectedDevice is an id of a standard Windows MIDI device
When this action is performed I get the error above too. (The device is properly disposed before making a new instance. As I said, Self-Contained app works fine) I suspect that I need to specify some permissions for the app in Package Installer, but even ticking all the capabilities doesn't remove the error. That's why I am asking the question here.
Upvotes: 0
Views: 35