[Enterprise Extensions only]

C++ bindings for CORBA WStrings

The WString type provides support for wide strings. It is fairly comparable to using strings except for type declarations and assignments:

#include wcstr.h // For WChar and WString support
...
const wchar_t* wcomments = L"This policy looks pretty good...";
wchar_t* wcommentsResult=::CORBA::wstring_alloc(wcslen(wcomments));
::CORBA::WString_var wcommentsResult_var(wcommentsResult);
policyVar->wcomments(wcomments);
 
if (!wcscmp(wcommentsResult_var, wcomments) )
{
   cout << "Wcomments not set" << endl;
      return 1;
}
else
{
   cout << "Wcomments set correctly..." << endl;
}
wcommentsResult = policyVar->wcomments();