I've never bothered to work with wide character strings so consider this a guideline.
You can implement an algorithm like the following:
wchar_t * wide_string = L"something\0something else\0herp\0derp\0\0";
int size = 0;
int i = wcslen(wide_string + size); // length of wide string
size += i + 1; // length of wide string inc. null terminator
while (true)
{
int i = wcslen(wide_string + size); // length of wide string
size += i + 1; // length of wide string inc. null terminator
if (i == 0) break; // if length was 0 (2 nulls in a row) break
}
++size; // count final null as part of size
This will give you the size of the data in the buffer. Once you have that you can just use wmemcpy on it