summaryrefslogtreecommitdiff
path: root/TAO/examples/POA/Explicit_Activation/server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/examples/POA/Explicit_Activation/server.cpp')
-rw-r--r--TAO/examples/POA/Explicit_Activation/server.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/TAO/examples/POA/Explicit_Activation/server.cpp b/TAO/examples/POA/Explicit_Activation/server.cpp
index 924ce3bd0f1..255b27c4e2b 100644
--- a/TAO/examples/POA/Explicit_Activation/server.cpp
+++ b/TAO/examples/POA/Explicit_Activation/server.cpp
@@ -20,6 +20,7 @@
#include "ace/SString.h"
#include "test_i.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Explicit_Activation, server, "$Id$")
@@ -28,7 +29,7 @@ const char *ior_output_file = "ior";
static int
parse_args (int argc, char **argv)
{
- ACE_Get_Opt get_opts (argc, argv, "f:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "f:");
int c;
while ((c = get_opts ()) != -1)
@@ -65,9 +66,9 @@ write_iors_to_file (const char *first_ior,
ACE_OS::sprintf (ior_output_file_2, "%s_2", ior_output_file);
ACE_OS::sprintf (ior_output_file_3, "%s_3", ior_output_file);
- FILE *output_file_1 = ACE_OS::fopen (ior_output_file_1, "w");
- FILE *output_file_2 = ACE_OS::fopen (ior_output_file_2, "w");
- FILE *output_file_3 = ACE_OS::fopen (ior_output_file_3, "w");
+ FILE *output_file_1 = ACE_OS::fopen (ior_output_file_1, ACE_TEXT("w"));
+ FILE *output_file_2 = ACE_OS::fopen (ior_output_file_2, ACE_TEXT("w"));
+ FILE *output_file_3 = ACE_OS::fopen (ior_output_file_3, ACE_TEXT("w"));
if (output_file_1 == 0 ||
output_file_2 == 0 ||
@@ -118,21 +119,21 @@ write_iors_to_file (const char *first_ior,
}
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
{
// Initialize the ORB first.
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- int result = parse_args (argc, argv);
+ int result = parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (result != 0)
return result;