Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

DCOM : Connecting to a remote server

Posted on 1998-09-29
1
Medium Priority
?
178 Views
Last Modified: 2013-11-20
The client program I am working on contains the function CoCreateInstanceEx to connect to the server.  This works great as long as the server machine is running.

However, if the system is down, the function never returns and a message box pops up saying the server is busy.  

Is there some way to assign a timeout when calling this function?  Or is there another function you usually call
before this one to ensure the server system is up?  Thanks for your help.
0
Comment
Question by:rascal
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 86

Accepted Solution

by:
jkr earned 200 total points
ID: 1322705
I use 'NetServerGetInfo()' to check whether the server is accessible. There's also a timeout, but it's not very long. The problem with this function is just that NT and Win95 use different headers, DLLs and import libs, hence. So the best way is to call it dynamically after retrieveing a function pointer through 'GetProcAddress()'
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question