2 #include "ace/Get_Opt.h"
4 #if defined (ACE_OPENVMS)
5 // need this to circumvent link error on OpenVMS
6 // has to do with interference in template instantiations
7 // because multiple executables are build in one directory
8 // reuising eachothers object files.
9 ACE_Time_Value dum
= ACE_Time_Value::zero
;
12 const ACE_TCHAR
*ior
= ACE_TEXT("file://test.ior");
15 parse_args (int argc
, ACE_TCHAR
*argv
[]);
18 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
21 "Starting shutdown\n"));
25 CORBA::ORB_init (argc
, argv
);
27 if (parse_args (argc
, argv
) != 0)
30 CORBA::Object_var tmp
=
31 orb
->string_to_object(ior
);
33 Test::Echo_Caller_var server
=
34 Test::Echo_Caller::_narrow(tmp
.in ());
36 if (CORBA::is_nil (server
.in ()))
38 ACE_ERROR_RETURN ((LM_DEBUG
,
39 "Nil Test::Echo_Caller reference <%s>\n",
48 catch (const CORBA::Exception
& ex
)
50 ex
._tao_print_exception ("Exception caught:");
58 parse_args (int argc
, ACE_TCHAR
*argv
[])
60 ACE_Get_Opt
get_opts (argc
, argv
, ACE_TEXT("k:"));
63 while ((c
= get_opts ()) != -1)
67 ior
= get_opts
.opt_arg ();
72 ACE_ERROR_RETURN ((LM_ERROR
,
79 // Indicates successful parsing of the command line