C# invokescript not working

13.06.2018 | by Fermin
I have added code to my application to abort and restart the secondary thread, but the thread never actually gets aborted. This appears to be because of a deadlock in the Google Maps Javascript. The actual ILSpy line is UnsafeNativeMethods. Microsoft has no help regarding this and googling didnt do the trick either.
When you call InvokeScript, it is intended to execute a function that is already defined in the page's JavaScript. But the line int iDsOfNames dispatch. GetScript as UnsafeNativeMethods. I am using the WebBrowser control in a secondary thread to accomplish this.
I'm using WebBrowser to load a page. How to Draw a Simple Elephant, Step by Step, safari animals. However, occasionally the InvokeScript calls will lock the secondary thread. One thing I'm not sure about is the UnsafeNativeMethods. I have never been able to make puffed and soft pooris.