I have some solution and question. I rummaged through the entire Internet, survived a sleepless week (well, almost :), but still I found a solution. Actually, here it is:
Create a stream that will be fully in power with WebCore Awesomium (and this will be the problem later):
Thread awesomiumThread = new Thread(new ThreadStart(() => { WebCore.Started += (s, crStr) => { awesomiumContext = SynchronizationContext.Current; }; WebCore.Run(); })); awesomiumThread.Start(); WebCore.Initialize(WebConfig.Default); SynchronizationContext awesomiumContext we have here is an amazing thing, bordering on magic (for me, at least :). Creates a context of the stream, with which you can then break into it at any time (look in more detail on the Internet).
And WebCore.Run() reserves (blocks) the thread in which it was launched, up to the call to WebCore.Shutdown() .
After this procedure, you can now call any method in the Awesomium stream with a command like this: awesomiumContext.Post(Method, Params); or awesomiumContext.Send(Method, Params) .
Now the biggest snag is actually my current problem. In the WebCore stream, there is no automatic update (in the usual sense), but it is possible to use events like DocumentReady or LoadingFrameComplete . But there is a big but. Wait for the update in the stream will not work, because any work in it blocks this thread and wait until the event triggers. So I had to scatter a rather big code into small pieces, throwing the poor browser from the main thread to the handler, then to another thread and back around, trying to catch the event handler's response. So I will be incredibly grateful if someone has a working way to wait for the page to load into Awesomium without ping-pong by WebViewer.
WebCore.Update(), by the way, can be called manually. - Regent