Solved

DCOM : Connecting to a remote server

Posted on 1998-09-29
1
167 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
1 Comment
 
LVL 86

Accepted Solution

by:
jkr earned 100 total points
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now