Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / orbsvcs / tests / Bug_1334_Regression / client.cpp
blobd9abffac69500338082f890a32a143f992274b89
1 #include "tao/corba.h"
3 // Attempts to resolve the NameService.
4 // Returns:
5 // 0 if the NameService was resolved
6 // 1 if the NameService could not be resolved
7 // 2 if something else went wrong
8 //
9 int ACE_TMAIN (int argc, ACE_TCHAR *argv[])
11 try
13 CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
15 try
17 CORBA::Object_var naming =
18 orb->resolve_initial_references ("NameService");
19 if (CORBA::is_nil (naming.in ()))
21 return 1;
24 catch (const CORBA::Exception&)
26 return 1;
29 catch (const CORBA::Exception&)
31 return 2;
34 return 0;