1 #include "ace/OS_main.h"
2 #include "ace/Naming_Context.h"
3 #include "ace/Log_Msg.h"
4 #include "ace/OS_NS_stdio.h"
6 int ACE_TMAIN (int, ACE_TCHAR
*[])
8 static u_long ACE_DEFAULT_BASE_ADDR_1
= (1 * 64 * 1024 * 1024);
9 static u_long ACE_DEFAULT_BASE_ADDR_2
= (2 * 64 * 1024 * 1024);
13 ACE_STATIC_SVC_REGISTER(ACE_Naming_Context
);
15 ACE_Naming_Context
*ns_ptr
;
16 ACE_NEW_RETURN (ns_ptr
,
19 ACE_Name_Options
*name_options
=
20 ns_ptr
->name_options ();
22 ACE_Naming_Context
*ns_ptr1
;
23 ACE_NEW_RETURN (ns_ptr1
,
26 ACE_Name_Options
*name_options1
=
27 ns_ptr1
->name_options ();
29 ACE_TCHAR address_arg1
[BUFSIZ
];
30 ACE_TCHAR address_arg2
[BUFSIZ
];
31 ACE_OS::sprintf (address_arg1
,
33 ACE_DEFAULT_BASE_ADDR_1
);
35 const ACE_TCHAR
*m_argv
[] =
38 ACE_TEXT("-cNODE_LOCAL"),
43 sizeof (m_argv
) / sizeof (ACE_TCHAR
*) -1;
45 ACE_OS::sprintf (address_arg2
,
47 ACE_DEFAULT_BASE_ADDR_2
);
48 const ACE_TCHAR
*n_argv
[] =
51 ACE_TEXT("-cNODE_LOCAL"),
57 sizeof (n_argv
) / sizeof (ACE_TCHAR
*) -1;
59 name_options
->parse_args (m_argc
,
60 (ACE_TCHAR
**) m_argv
);
61 i
= ns_ptr
->open (ACE_Naming_Context::NODE_LOCAL
);
64 "(%P) opened with %d\n",
70 name_options1
->parse_args (n_argc
,
71 (ACE_TCHAR
**) n_argv
);
73 i
= ns_ptr1
->open (ACE_Naming_Context::NODE_LOCAL
);
76 "(%P) 1 opened with %d\n",