By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,780 Members | 1,520 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,780 IT Pros & Developers. It's quick & easy.

time out

P: n/a
Hi
I have some lines of code that call an external COM object if they are
responding all is OK however it they are not I sit waiting...

So how can I set a timeout for them? the com Object returns an XML Doc the
line is as follows:
xml_doc.LoadXml(my.AxOb());

So how do I only wait for 1Sec and if its not returned carry on?

Thanks
May 11 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hello, Adrian!

A> So how can I set a timeout for them? the com Object returns an XML Doc
A> the line is as follows:
A> xml_doc.LoadXml(my.AxOb());

A> So how do I only wait for 1Sec and if its not returned carry on?

What threading model xml_doc uses?
If it is free threaded (MTA) then you can invoke LoadXml method on the other thread and wait for that thread for specific timeout.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
May 11 '06 #2

P: n/a
Hi Thanks
C# is new to me as is (will be) using threads. How would I do what you
suggest?

thanks

"Vadym Stetsyak" <va*****@ukr.net> wrote in message
news:uK**************@TK2MSFTNGP05.phx.gbl...
Hello, Adrian!

A> So how can I set a timeout for them? the com Object returns an XML Doc
A> the line is as follows:
A> xml_doc.LoadXml(my.AxOb());

A> So how do I only wait for 1Sec and if its not returned carry on?

What threading model xml_doc uses?
If it is free threaded (MTA) then you can invoke LoadXml method on the
other thread and wait for that thread for specific timeout.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com

May 12 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.