4 * @author Carlos O'Ryan <coryan@atdesk.com>
8 #include "ace/Get_Opt.h"
10 const ACE_TCHAR
*ior
= ACE_TEXT("file://test.ior");
13 parse_args (int argc
, ACE_TCHAR
*argv
[])
15 ACE_Get_Opt
get_opts (argc
, argv
, ACE_TEXT("k:"));
18 while ((c
= get_opts ()) != -1)
22 ior
= get_opts
.opt_arg ();
27 ACE_ERROR_RETURN ((LM_ERROR
,
34 // Indicates successful parsing of the command line
39 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
44 CORBA::ORB_init (argc
, argv
);
46 if (parse_args (argc
, argv
) != 0)
49 CORBA::Object_var object
=
50 orb
->string_to_object (ior
);
53 Baz::C::_narrow (object
.in ());
55 if (CORBA::is_nil (cobject
.in ()))
57 ACE_ERROR_RETURN ((LM_ERROR
,
58 "Cannot narrow Baz::C object <%s>\n",
69 catch (const CORBA::Exception
& ex
)
71 ex
._tao_print_exception ("");