size_t ACE_WString_Helper::encode (void *buf, const ACE_WString &wstr) { ACE_UINT16 *wptr = (ACE_UINT16 *) buf; size_t i; for (i= 0; i <= wstr.length (); i++) wptr[i] = htons (wstr[i]); return i * sizeof (ACE_UINT16); }
int ACE_Registry_Name_Space::rebind (const ACE_WString &name, const ACE_WString &value, const char *type) { // Pointer to data const ACE_USHORT16 *data = value.fast_rep (); // Size u_long size = value.length () * sizeof (ACE_USHORT16); // Represent value as an ACE_Registry::Object ACE_Registry::Object object ((void *) data, size, REG_SZ); // Add new <key>/<value> pair return this->context_.rebind (name.fast_rep (), object); }