There is no need for a conversion.
LPWSTR
is a pointer to a wide string and
ws
is an array of wide characters. So you can just write:
usri1_name = ws;
But you must take care of the memory pointed to by
usri1_name
. The pointer will become invalid when
ws
goes out of scope (e.g. when leaving the function or block where
ws
is defined). Then you must allocate memory on the heap using
new
or
malloc
for
usri1_name
, copy the content of
ws
into it, and release the memory when no longer needed.