Solved

DCOM : Connecting to a remote server

Posted on 1998-09-29
1
170 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
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
lucky13 challenge 11 145
Line meaning 9 86
mapAB Challlenge 35 145
unix example issues 18 90
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

777 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