summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1996-12-12 09:48:12 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1996-12-12 09:48:12 +0000
commit75345c7af0da6cb17a5641ce9d0f88b20f3b2e1d (patch)
tree1a192fcd997c1cb3bee273ae6cd6a79d65ebc00c /examples
parent34d10b6298a7fd591cee1a0f77059b78ce5b233b (diff)
downloadATCD-75345c7af0da6cb17a5641ce9d0f88b20f3b2e1d.tar.gz
*** empty log message ***
Diffstat (limited to 'examples')
-rw-r--r--examples/Registry/test_registry_iterator.cpp6
-rw-r--r--examples/Registry/test_registry_update.cpp20
2 files changed, 15 insertions, 11 deletions
diff --git a/examples/Registry/test_registry_iterator.cpp b/examples/Registry/test_registry_iterator.cpp
index ab69116bdbe..c54af455eea 100644
--- a/examples/Registry/test_registry_iterator.cpp
+++ b/examples/Registry/test_registry_iterator.cpp
@@ -28,13 +28,17 @@ main (int argc, char *argv[])
int result;
ACE_Registry::Naming_Context naming_context;
+ LPCTSTR host = 0;
+ if (argc == 2)
+ host = ACE_WIDE_STRING (argv[1]);
+
// Connect to a predefined naming context
result = ACE_Predefined_Naming_Contexts::connect (naming_context,
HKEY_LOCAL_MACHINE,
// HKEY_CLASSES_ROOT,
// HKEY_USERS,
// HKEY_CURRENT_USER,
- argc == 2 ? argv[1] : 0);
+ host);
if (result != 0)
ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_Predefined_Naming_Contexts::connect failed"), -1);
diff --git a/examples/Registry/test_registry_update.cpp b/examples/Registry/test_registry_update.cpp
index 2c6dc0b1a61..5ea097cdbe9 100644
--- a/examples/Registry/test_registry_update.cpp
+++ b/examples/Registry/test_registry_update.cpp
@@ -124,22 +124,22 @@ setup_names ()
// Stupid implementation of STL is broken
/*
::application_context_name.reserve (4);
- ::application_context_name [0].id_ = "Software";
- ::application_context_name [1].id_ = "AcmeSoft";
- ::application_context_name [2].id_ = "AcmeApplication";
- ::application_context_name [3].id_ = "1.0";
+ ::application_context_name [0].id_ = __TEXT ("Software");
+ ::application_context_name [1].id_ = __TEXT ("AcmeSoft");
+ ::application_context_name [2].id_ = __TEXT ("AcmeApplication");
+ ::application_context_name [3].id_ = __TEXT ("1.0");
::counter_name.reserve (1);
- ::counter_name [0].id_ = "Instance Counter";
+ ::counter_name [0].id_ = __TEXT ("Instance Counter");
*/
ACE_Registry::Name_Component component;
- component.id_ = "Software", ::application_context_name.push_back (component);
- component.id_ = "AcmeSoft", ::application_context_name.push_back (component);
- component.id_ = "AcmeApplication", ::application_context_name.push_back (component);
- component.id_ = "1.0", ::application_context_name.push_back (component);
+ component.id_ = __TEXT ("Software"), ::application_context_name.push_back (component);
+ component.id_ = __TEXT ("AcmeSoft"), ::application_context_name.push_back (component);
+ component.id_ = __TEXT ("AcmeApplication"), ::application_context_name.push_back (component);
+ component.id_ = __TEXT ("1.0"), ::application_context_name.push_back (component);
- component.id_ = "Instance Counter", ::counter_name.push_back (component);
+ component.id_ = __TEXT ("Instance Counter"), ::counter_name.push_back (component);
}