
186 DCE Replacement Strategies
Example 9-3 Initialize function of the CORBA application client
int initialize( int argc, char* argv[] ) {
int rc;
::CORBA::Object_ptr objPtr;
::CosNaming::NamingContext_var rootNameContext = NULL;
if ( ( rc = perform_initialization( argc, argv ) ) != 0 )
return rc;
cout << "Before getting naming context " << endl;
// Get the root naming context.
rootNameContext = get_naming_context();
if ( ::CORBA::is_nil( rootNameContext ) )
return -1;
// Find the Greet_Impl created by the server. Look up the
// object using the complex name of domain.GreetContext.GreetObject1,
// which is its full name from the root naming ...