[omniORB] Contacting the Name Service

David Hyde davidh@cavendish.co.uk
Mon, 18 Dec 2000 12:07:30 -0000


Hi,

Using OmniORB 3.0.2 on Winnt 4 to build a COM control I am trying to access
the nameservice.  As far as I can see I should be able to specify a name
server without using a configuration file.  Here's what I am doing:

int argc = 2;
char * argv[2];
argv[0] = "-ORBInitRef";
argv[1] = "NameService=corbaname::Machine1";

try
{   
	g_pOrb = CORBA::ORB_init(argc,argv,"omniORB3");
	...

then in a different method:
..
obj = g_pOrb->resolve_initial_references("NameService");
...

This is resulting an a CORBA::ORB::InvalidName exception.  The only way
around it is to have a configuration file with the line:
ORBInitRef NameService=corbaname::Machine1
in it.

Does anyone know what i am doing wrong?

Thanks

David

________________________________________________________
David Hyde
The Cavendish Organisation Ltd.        
Admiral House                       
St. Leonards Rd				Tel: +44 1753 836600 
Windsor					Fax: +44 1753 855021         
Berkshire SL4 3BL 
United Kingdom

email: davidh@cavendish.co.uk

http://www.cavendish.co.uk/ 

Confidential Information may be in this message. If you are not the intended
addressee please treat it as confidential, contact us immediately. Thank
you.
______________________________________________________________