 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Thu Apr 13, 2006 10:03 am Post subject: WebBrowser multithreading problems |
|
|
Perhaps someone could help me with my problem.
I need to use a TWebBrowser object in a thread.It is created
dynamically within by:
constructor THTMLThread.Create
begin
inherited Create(False);
FreeOnTerminate := True;
CoInitialize(nil);
Oleinitialize(nil);
WebBrowser1:=TMyWebBrowser.Create(application);
SomeForm.InsertControl (WebBrowser1);
WebBrowser1.Visible:=true;
WebBrowser1.OnDocumentComplete:=WebBrowser1.onDocComplete;
end;
TMyWebBrowser a class that inherits directly from TWebBrowser.
The first time i use it - navigating to a page by:
Navigate(address);
and wait for the event to occur with
forms.application.processmessages,it works.
Then im even able to fill in the forms with
WebBrowser1.OleObject.Document.forms.item(0).elements.item(0).value:='test'
and make it appear by some more forms.application.processmessages.
The problem comes when im trying to Click a button on the form.I get an
unhandled exception in mshtml - Access violation.
The code works perfectly with single process (no threads).
I found some tips about using
CoMarshalInterThreadInterfaceInStream() and similar functions within
the thread,but they dont seem to work,or im just using them
incorrectly.So if you have any ideas,know how to use those functions I
would be grateful. |
|
| Back to top |
|
 |
Riki Wiki Guest
|
Posted: Sat Apr 15, 2006 9:03 am Post subject: Re: WebBrowser multithreading problems |
|
|
Hoi Jan
FYI this newsgroup do not officially exist, that is why there is so few
posts and so few viewers here. The newsgroup you should use is
b.p.d.vcl.components.using.win32, and you need to post to the Borland news
groups server.
Take a look here:
<http://tinyurl.com/8m5nw>
which links to
<http://delphi.wikicities.com/wiki/Delphi_Newsgroups> |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|