Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DCom taking too long when server not found

Status
Not open for further replies.

steveblum

Programmer
Aug 6, 1999
55
US
I am using DCOM to call a VB DLL I wrote that is running on a different machine than my executable that calls it. I use the code:

Dim obj As MyDLL.clsMyClass
Set obj = CreateObject("MyDLL.clsMyClass","ServerName")

This works great as long as that server exists. Even if the server exists but my DLL is not on it or is the wrong version, I get an error immediately and can show a message to the user.

The problem is when the user registers a new server, if the name entered is invalid and no server with that name exists on the network, the CreateObject line above takes about 1 minute to time out and give an error. At that point I can finally tell the user the server name is invalid.

Does anyone know of a way to:
1) Set a faster timeout on the CreateObject statement
2) Do a ping in code first to see if the server is found
3) Verify if the server is valid using some other means

Thanks. [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top