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]
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]