1 #include "tao/ORB_Core.h"
2 #include "tao/StringSeqC.h"
5 StringOutTest (CORBA::String_out so
)
13 StringInoutTest (char *& so
)
15 CORBA::string_free (so
);
16 so
= CORBA::string_dup ("StringInoutTest");
20 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
24 CORBA::ORB_var orb
= CORBA::ORB_init (argc
, argv
);
28 ts
[0] = CORBA::string_dup ("Hello World");
30 StringOutTest (ts
[0].out());
31 ACE_ASSERT (ACE_OS::strcmp (ts
[0].in(), "StringOutTest") == 0);
33 StringInoutTest (ts
[0].inout());
34 ACE_ASSERT (ACE_OS::strcmp (ts
[0].in(), "StringInoutTest") == 0);
36 CORBA::String_var sv
= ts
[0]._retn ();
37 ACE_ASSERT (ACE_OS::strcmp (ts
[0].in(), "") == 0);
39 ts
[0] = CORBA::string_dup ("Hello Again");
41 catch (const CORBA::Exception
&ex
)
43 ACE_ERROR ((LM_ERROR
, "Exception caught: %s\"%s\"\n"
44 , ex
._name(), ex
._rep_id ()));