I create a DLL with Windows.Forms and add it to Unity pugins directory.
In this dll i open a simple Window and create Windows.Forms components …
Yes, i required these dll, and require windows forms
The frist time when i call the Windows.Forms.Form f = new Windows.Forms.Form(); no error, all ok
i close the window and open it again i get these error message twice: Could not register the window class, win32 error 0
I think the error occurs when you rebuild the dll on Visual Studio, and go back to Unity, and try to call the dll function before newly built dll is fully reloaded.
You can rebuild the dll, then give a Unity a time to reload it will fix the problem.
If that doesn’t fix the error, restart Unity.