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. The following example, uses the WString type:

#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();

Related reference
CORBA C++ bindings for data types



Searchable topic ID:   rcor_copuws
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/corba/ref/rcor_copuws.html

Library | Support | Terms of Use | Feedback