+ if (user_size == wxNO_LEN)
+ {
+ switch (format)
+ {
+ case wxIPC_TEXT:
+ case wxIPC_UTF8TEXT:
+ user_size = strlen((const char *)user_data) + 1; // includes final NUL
+ break;
+ case wxIPC_UNICODETEXT:
+ user_size = (wcslen((const wchar_t *)user_data) + 1) * sizeof(wchar_t); // includes final NUL
+ break;
+ default:
+ user_size = 0;
+ }
+ }