Merge pull request #2222 from jwillemsen/jwi-dllexportwarning
[ACE_TAO.git] / TAO / tests / Bug_3470_Regression / test.cpp
blobea15591c6280ad9179bb8faf4b9f6674a4991624
1 /* Test wether list_initial_services returns an ObjectURL or an ObjectId as
2 * it should be when an ORBInitRef is set.
4 * launch test like this:
5 * <execname> -ORBInitRef MyObjectId=file://myobj.ior
6 */
8 #include "tao/ORB.h"
9 #include "tao/Object.h"
10 #include "tao/ObjectIdListC.h"
12 int ACE_TMAIN( int argc, ACE_TCHAR * argv[] )
14 int retcode = 1;
16 try
18 CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
20 CORBA::ORB_ObjectIdList_var listsrv = orb->list_initial_services();
21 for (CORBA::ULong index = 0 ; index < listsrv->length(); index++ )
22 if (ACE_OS::strcmp(listsrv[index],"MyObjectId") == 0)
23 retcode = 0;
25 orb->destroy();
27 catch (const CORBA::Exception& ex)
29 ex._tao_print_exception ("Exception caught:");
30 return 1;
33 return retcode;