Asking this because I'm using the advertised "multi-threading by loading a dll multiple times and using its exported functions" approach to execute multiple scripts on the fly. However, there are some legacy scripts which autohotkey.dll v2 (alpha) refuses to run. So, I'm trying to execute them using the autohotkey.dll v1.1, but all I get is the mysterious "RegClass" message. I found out that this happens because the previously loaded autohotkey.dll v2 (alpha) did not call UnregisterClass to unregister "AutoHotkey" window class.

Thanks for quick reaction. As I said, I was using latest compiled binaries (Win32W) from http://hotkeyit.github.io/v2/. As for threading, I'm loading the dll from memory for each thread. The problem occured if autohotkey.dll v2 was unloaded, and autohotkey.dll v1.1 was loaded into the same address space afterwards. In this case both dlls were using the same hInstance, but autohotkey.dll v2 forgot to call UnregisterClass before unloading. This resulted in failure of autohotkey.dll v1.1 registering the class. Normally, this error would occur with autohotkey.dll v2 alone, unless its "RegClass" check was stripped out. Anyways, thanks for fixing the issue.

Last edited by salowabicz on 25 Nov 2017, 12:18, edited 1 time in total.