Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Win32Exception thrown in even the most basic program #24

Open
scottismyname opened this issue Mar 10, 2022 · 0 comments
Open

Win32Exception thrown in even the most basic program #24

scottismyname opened this issue Mar 10, 2022 · 0 comments

Comments

@scottismyname
Copy link

scottismyname commented Mar 10, 2022

While using this in my program I noticed I was getting a lot of exceptions. I created a new temporary program that is the most basic possible and I'm still seeing them in the output window of Visual Studio 2019.

Here is my code:

using System;
using System.Windows.Forms;
using WK.Libraries.HotkeyListenerNS;

namespace TestApp
{
    public partial class Form1 : Form
    {
        private HotkeyListener keyhook;

        public Form1()
        {
            InitializeComponent();
            keyhook = new HotkeyListener();
            keyhook.Add(new Hotkey("Control+Alt+L"));
            keyhook.HotkeyPressed += Hkl_HotkeyPressed;
        }

        private void Hkl_HotkeyPressed(object sender, HotkeyEventArgs e)
        {
            Console.WriteLine("hotkey received");
        }
    }
}

No exception is thrown until I press the hotkey combo, and then I get this (each time I press the hotkey):

''TestApp.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Symbols loaded.
'TestApp.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Users\scottismyname\source\repos\TestApp\TestApp\bin\Debug\TestApp.exe'. Symbols loaded.
'TestApp.exe' (CLR v4.0.30319: TestApp.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'. Symbols loaded.
'TestApp.exe' (CLR v4.0.30319: TestApp.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Symbols loaded.
'TestApp.exe' (CLR v4.0.30319: TestApp.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Symbols loaded.
'TestApp.exe' (CLR v4.0.30319: TestApp.exe): Loaded 'C:\Users\scottismyname\source\repos\TestApp\TestApp\bin\Debug\HotkeyListener.dll'. 
'TestApp.exe' (CLR v4.0.30319: TestApp.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Symbols loaded.
'TestApp.exe' (CLR v4.0.30319: TestApp.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. 
'TestApp.exe' (CLR v4.0.30319: TestApp.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Symbols loaded.
'TestApp.exe' (CLR v4.0.30319: TestApp.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Accessibility\v4.0_4.0.0.0__b03f5f7f11d50a3a\Accessibility.dll'. Symbols loaded.
Exception thrown: 'System.ComponentModel.Win32Exception' in System.dll
Exception thrown: 'System.ComponentModel.Win32Exception' in System.dll
'TestApp.exe' (CLR v4.0.30319: TestApp.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\UIAutomationClient\v4.0_4.0.0.0__31bf3856ad364e35\UIAutomationClient.dll'. 
'TestApp.exe' (CLR v4.0.30319: TestApp.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\UIAutomationTypes\v4.0_4.0.0.0__31bf3856ad364e35\UIAutomationTypes.dll'. 
'TestApp.exe' (CLR v4.0.30319: TestApp.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dll'. 
'TestApp.exe' (CLR v4.0.30319: TestApp.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\UIAutomationProvider\v4.0_4.0.0.0__31bf3856ad364e35\UIAutomationProvider.dll'. 
'TestApp.exe' (CLR v4.0.30319: TestApp.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\UIAutomationClientsideProviders\v4.0_4.0.0.0__31bf3856ad364e35\UIAutomationClientsideProviders.dll'. 
Exception thrown: 'System.ComponentModel.Win32Exception' in System.dll
Exception thrown: 'System.ComponentModel.Win32Exception' in System.dll
Exception thrown: 'System.ComponentModel.Win32Exception' in System.dll
Exception thrown: 'System.ComponentModel.Win32Exception' in System.dll
Exception thrown: 'System.ComponentModel.Win32Exception' in System.dll
Exception thrown: 'System.ComponentModel.Win32Exception' in System.dll
hotkey received
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

No branches or pull requests

1 participant