[omniORB] Contacting the Name Service
Kelly Burkhart
Kelly@tradebotsystems.com
Mon, 18 Dec 2000 08:31:11 -0500
The first item in the argv array should be a pointer to the name of your
program. The ORB command line arguments should be in argv[1] and argv[2].
-K
> -----Original Message-----
> From: owner-omniorb-list@uk.research.att.com
> [mailto:owner-omniorb-list@uk.research.att.com]On Behalf Of David Hyde
> Sent: Monday, December 18, 2000 6:08 AM
> To: 'omniorb-list@uk.research.att.com'
> Subject: [omniORB] Contacting the Name Service
>
>
> 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.