summaryrefslogtreecommitdiff
path: root/cpp/demo
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/demo')
-rw-r--r--cpp/demo/Ice/MFC/client/HelloClientDlg.cpp2
-rw-r--r--cpp/demo/IceGrid/icebox/HelloI.cpp2
-rw-r--r--cpp/demo/IcePatch2/MFC/PatchClientDlg.cpp15
3 files changed, 8 insertions, 11 deletions
diff --git a/cpp/demo/Ice/MFC/client/HelloClientDlg.cpp b/cpp/demo/Ice/MFC/client/HelloClientDlg.cpp
index 640f8328ffe..dc85c224411 100644
--- a/cpp/demo/Ice/MFC/client/HelloClientDlg.cpp
+++ b/cpp/demo/Ice/MFC/client/HelloClientDlg.cpp
@@ -390,7 +390,7 @@ CHelloClientDlg::createProxy()
{
CString h;
_host->GetWindowText(h);
- string host = IceUtil::wnativeToNative(IceUtil::getProcessStringConverter(), 0, wstring(h));
+ string host = IceUtil::wstringToString(wstring(h), IceUtil::getProcessStringConverter());
if(host.size() == 0)
{
_status->SetWindowText(CString(" No hostname"));
diff --git a/cpp/demo/IceGrid/icebox/HelloI.cpp b/cpp/demo/IceGrid/icebox/HelloI.cpp
index 1e96d635ba9..dd30feaaddb 100644
--- a/cpp/demo/IceGrid/icebox/HelloI.cpp
+++ b/cpp/demo/IceGrid/icebox/HelloI.cpp
@@ -25,7 +25,7 @@ HelloI::sayHello(const Ice::Current&)
buf.resize(1024);
DWORD val = GetEnvironmentVariableW(L"LANG", &buf[0], static_cast<DWORD>(buf.size()));
string lang = (val > 0 && val < buf.size()) ?
- IceUtil::wnativeToNative(IceUtil::getProcessStringConverter(), 0, &buf[0]) : string("en");
+ IceUtil::wstringToString(&buf[0], IceUtil::getProcessStringConverter()) : string("en");
#else
char* val = getenv("LANG");
string lang = val ? string(val) : "en";
diff --git a/cpp/demo/IcePatch2/MFC/PatchClientDlg.cpp b/cpp/demo/IcePatch2/MFC/PatchClientDlg.cpp
index 015cfb31458..537c0b26ac0 100644
--- a/cpp/demo/IcePatch2/MFC/PatchClientDlg.cpp
+++ b/cpp/demo/IcePatch2/MFC/PatchClientDlg.cpp
@@ -148,7 +148,7 @@ CPatchDlg::checksumProgress(const string& path)
// TODO: indicate busy progress
CString file;
- file.Format(L" %s", IceUtil::nativeToWnative(IceUtil::getProcessStringConverter(), 0, getBasename(path)).c_str());
+ file.Format(L" %s", IceUtil::stringToWstring(getBasename(path)).c_str());
_file->SetWindowText(file);
processMessages();
@@ -206,7 +206,7 @@ CPatchDlg::patchStart(const string& path, Ice::Long size, Ice::Long totalProgres
}
CString file;
- file.Format(L" %s", IceUtil::nativeToWnative(IceUtil::getProcessStringConverter(), 0, getBasename(path)).c_str());
+ file.Format(L" %s", IceUtil::stringToWstring(getBasename(path)).c_str());
_file->SetWindowText(file);
return patchProgress(0, size, totalProgress, totalSize);
@@ -294,18 +294,15 @@ CPatchDlg::OnInitDialog()
// Set the patch directory and thorough flag from properties.
//
Ice::PropertiesPtr properties = _communicator->getProperties();
- CString path = IceUtil::nativeToWnative(
- IceUtil::getProcessStringConverter(), 0,
+ CString path = IceUtil::stringToWstring(
properties->getPropertyWithDefault("IcePatch2Client.Directory", "")).c_str();
_path->SetWindowText(path);
- CString thorough = IceUtil::nativeToWnative(
- IceUtil::getProcessStringConverter(), 0,
+ CString thorough = IceUtil::stringToWstring(
properties->getPropertyWithDefault("IcePatch2Client.Thorough", "0")).c_str();
_thorough->SetCheck(thorough != "0");
- CString remove = IceUtil::nativeToWnative(
- IceUtil::getProcessStringConverter(), 0,
+ CString remove = IceUtil::stringToWstring(
properties->getPropertyWithDefault("IcePatch2Client.Remove", "0")).c_str();
_remove->SetCheck(remove != "0");
@@ -402,7 +399,7 @@ CPatchDlg::OnStartPatch()
return;
}
properties->setProperty("IcePatch2Client.Directory",
- IceUtil::wnativeToNative(IceUtil::getProcessStringConverter(), 0, wstring(path)));
+ IceUtil::wstringToString(wstring(path)));
//
// Set the thorough patch flag.