time out on createobject

Is there a time out on createobject or cocreateinstance call?

If yes, how do I change the time out parameter.

I have a case that vb initiate my object using createobject. However, my object requires at least 4 min to initialize. That will cause the createobject call some kind of timeout.

LVL 26
Who is Participating?
p_biggelaarConnect With a Mentor Commented:
I'm afraid I only have a partial answer. Yes there is something like a time-out. It also depends on what you try to do, but you can count on a timout after about 2 minutes. Unfortunately I can't tell you what you can do about it.
Éric MoreauSenior .Net ConsultantCommented:
Have you check these properties:
EDDYKTAuthor Commented:
To emoreau,

I did but those doesn't seem to be it.
It is because by default OLeserverbusytimeout is 10 second and olerequestpendingtimeout is 5 second.

the timeout on createobject is at least 90 second.

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

You can set either of these timeouts to very large values, because they are stored as Longs. For example, 86,400,000 milliseconds is a day, which is equivalent to an infinite timeout.

Plus you can have VB raise an error, which you can handle in your code.
Check out for details
EDDYKTAuthor Commented:

I don't think this is what I want.

I did try this values, but there is no effect on createobject.

EDDYKTAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.