summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/examples/CosEC/Simple/Service.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/examples/CosEC/Simple/Service.cpp')
-rw-r--r--TAO/orbsvcs/examples/CosEC/Simple/Service.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/TAO/orbsvcs/examples/CosEC/Simple/Service.cpp b/TAO/orbsvcs/examples/CosEC/Simple/Service.cpp
index 07a78aea874..cf07d735aea 100644
--- a/TAO/orbsvcs/examples/CosEC/Simple/Service.cpp
+++ b/TAO/orbsvcs/examples/CosEC/Simple/Service.cpp
@@ -4,6 +4,7 @@
#include "orbsvcs/CosEvent/CEC_Default_Factory.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID (CosEC_Simple,
Service,
@@ -14,8 +15,10 @@ const char *ior_output_file = "ec.ior";
int parse_args (int argc, char *argv[]);
int
-main (int argc, char* argv[])
+ACE_TMAIN (int argc, ACE_TCHAR* argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
TAO_CEC_Default_Factory::init_svcs ();
ACE_DECLARE_NEW_CORBA_ENV;
@@ -23,10 +26,10 @@ main (int argc, char* argv[])
{
// 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;
- if (parse_args (argc, argv) == -1)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) == -1)
{
ACE_ERROR ((LM_ERROR,
"Usage: Service [-o IOR_file_name]\n"));
@@ -65,7 +68,7 @@ main (int argc, char* argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
@@ -99,7 +102,7 @@ main (int argc, char* argv[])
int parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)