3 #include "ace/Get_Opt.h"
4 #include "ace/OS_NS_unistd.h"
9 parse_args (int argc
, ACE_TCHAR
*argv
[])
11 ACE_Get_Opt
get_opts (argc
, argv
, ACE_TEXT("abc"));
14 while ((c
= get_opts ()) != -1)
23 ACE_ERROR_RETURN ((LM_ERROR
,
24 "usage: %s [-a|-b|-c]\n '%s' unknown"
30 return target
!= ' ' ? 0 : -1;
34 ACE_TMAIN (int argc
, ACE_TCHAR
*argv
[])
38 CORBA::ORB_var orb
= CORBA::ORB_init(argc
, argv
);
40 if (parse_args (argc
, argv
) != 0)
43 ACE_CString
ior ("file://TestObject_");
46 ACE_DEBUG ((LM_DEBUG
, "using target = %c, iorstr %s\n", target
, ior
.c_str()));
47 CORBA::Object_var obj
= orb
->string_to_object (ior
.c_str());
48 Test_var test
= Test::_narrow( obj
.in());
49 ACE_ASSERT (!CORBA::is_nil(test
.in()));
51 CORBA::Long spid
= test
->server_pid ();
52 ACE_DEBUG ((LM_DEBUG
, "client target %c got pid %d\n", target
, spid
));
58 catch(const CORBA::Exception
& ex
) {
59 ex
._tao_print_exception ("client:");