Groups > Borland > Borland C plus plus builder Active X > RPC Server is Unavailable




RPC Server is Unavailable

RPC Server is Unavailable
Fri, 13 Jul 2007 21:18:53 -050
I am programming in BCB6.0 and I am developing a COM link between my app and 
a program that receives stock data from the internet and then works as a 
server to third party programs like my app. The server program has an API 
interface used by third party developers to create a COM link. I have used 
the BCB6.0 import type library feature to create a wrapper component that 
now has an icon in the BCB ActiveX component pallet. I am able to drop the 
component on a BCB form and get the interface running. After several minutes 
of use, when I call one of the COM functions, the server program crashes and 
I get an error message that lists the name of the function I called when the 
crash occurred and the message "RPC Server is unavailable". I have
been 
researching this error messages and it seen to have a variety of causes. 
Some articles describe the problem as the Windows operating system losing 
track of the server program that my client app is linked too. I am using 
Windows XP Home edition. Most of the discussion about this error has to do 
with linking to a server across the internet rather than working with a COM 
link. Any advice I can use to resolve this problem would be greatly 
appreciated.


MS Web Page for  "RPC Server is unavailable".
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q224370


The ActiveX object is named Hooks1. Creating the COM link to the server is a 
simple 3 step process as seen below. This works and I am able to use the 
link for several minutes before it crashes.

  //1) call Connect
  Hooks1->Connect();

  //2) My client app must identify itself to server
  Hooks1->SetApplication( "UserName" );

  //3) Verify my client has permission to access the server
  if(Hooks1->IsEntitled == true){

    //we are connected successfully so do some work
  }



Thanks
Larry Johnson

Post Reply
about | contact