summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/examples/CosEC/TypedSimple
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/examples/CosEC/TypedSimple')
-rw-r--r--TAO/orbsvcs/examples/CosEC/TypedSimple/Consumer.cpp9
-rw-r--r--TAO/orbsvcs/examples/CosEC/TypedSimple/CosEC_TypedSimple.mpc2
-rw-r--r--TAO/orbsvcs/examples/CosEC/TypedSimple/Supplier.cpp6
3 files changed, 11 insertions, 6 deletions
diff --git a/TAO/orbsvcs/examples/CosEC/TypedSimple/Consumer.cpp b/TAO/orbsvcs/examples/CosEC/TypedSimple/Consumer.cpp
index db6437a39bd..1143417a9f0 100644
--- a/TAO/orbsvcs/examples/CosEC/TypedSimple/Consumer.cpp
+++ b/TAO/orbsvcs/examples/CosEC/TypedSimple/Consumer.cpp
@@ -4,21 +4,23 @@
#include "orbsvcs/CosTypedEventChannelAdminC.h"
#include "Country_i.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (CosEC_Examples,
Consumer,
"$Id$")
int
-main (int argc, char* argv[])
+ACE_TMAIN (int argc, ACE_TCHAR* argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
// ORB initialization...
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_obj =
@@ -79,8 +81,7 @@ main (int argc, char* argv[])
const char* ior_file_name = "Consumer.ior";
FILE *output_file=
- ACE_OS::fopen (ACE_TEXT_CHAR_TO_TCHAR(ior_file_name),
- ACE_LIB_TEXT("w"));
+ ACE_OS::fopen (ior_file_name, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/orbsvcs/examples/CosEC/TypedSimple/CosEC_TypedSimple.mpc b/TAO/orbsvcs/examples/CosEC/TypedSimple/CosEC_TypedSimple.mpc
index cddcd128801..974ee82d6e3 100644
--- a/TAO/orbsvcs/examples/CosEC/TypedSimple/CosEC_TypedSimple.mpc
+++ b/TAO/orbsvcs/examples/CosEC/TypedSimple/CosEC_TypedSimple.mpc
@@ -2,6 +2,7 @@
// $Id$
project(*Consumer) : event_skel, orbsvcsexe, portableserver, naming {
+ exename = Consumer
requires += ec_typed_events
source_files {
Consumer.cpp
@@ -10,6 +11,7 @@ project(*Consumer) : event_skel, orbsvcsexe, portableserver, naming {
}
project(*Supplier) : event_skel, orbsvcsexe, portableserver, naming {
+ exename = Supplier
requires += ec_typed_events
after += CosEC_TypedSimple_Consumer
idl_files {
diff --git a/TAO/orbsvcs/examples/CosEC/TypedSimple/Supplier.cpp b/TAO/orbsvcs/examples/CosEC/TypedSimple/Supplier.cpp
index d384fad33cf..c61ee91be55 100644
--- a/TAO/orbsvcs/examples/CosEC/TypedSimple/Supplier.cpp
+++ b/TAO/orbsvcs/examples/CosEC/TypedSimple/Supplier.cpp
@@ -3,19 +3,21 @@
#include "orbsvcs/CosNamingC.h"
#include "orbsvcs/CosTypedEventChannelAdminC.h"
#include "CountryC.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(CosEC_Examples, Supplier, "$Id:")
int
-main (int argc, char* argv[])
+ACE_TMAIN (int argc, ACE_TCHAR* argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
// ORB initialization boiler plate...
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Obtain the event channel using the Naming Service.