1 #include "ace/OS_main.h"
2 #include "ace/Naming_Context.h"
3 #include "ace/Log_Msg.h"
6 int ACE_TMAIN (int, ACE_TCHAR
*[])
10 ACE_STATIC_SVC_REGISTER(ACE_Naming_Context
);
12 ACE_Naming_Context
*ns_ptr
;
13 ACE_NEW_RETURN (ns_ptr
,
17 ACE_Name_Options
*name_options
= ns_ptr
->name_options ();
19 const ACE_TCHAR
*m_argv
[] =
22 ACE_TEXT("-cNODE_LOCAL") ,
23 #if defined (ACE_WIN32)
24 ACE_TEXT("-lC:\\temp\\non_existent"),
26 ACE_TEXT("-l/tmp/foobar.mine"),
27 #endif /* ACE_WIN32 */
32 sizeof (m_argv
) / sizeof (ACE_TCHAR
*) -1;
34 name_options
->parse_args (m_argc
, (ACE_TCHAR
**)m_argv
);
36 i
= ns_ptr
->open (ACE_Naming_Context::NODE_LOCAL
);
38 "(%P) opened with %d\n",
43 i
= ns_ptr
->bind ("Key_Value",
48 "(%P) bound with %d\n",