How to convert a LPCWSTR aka const(wchar)* to string

Vinod K Chandran kcvinu82 at gmail.com
Tue May 10 00:50:09 UTC 2022


Hi all.
I want to convert an LPCWSTR to string.
I have a struct like this
```cpp
typedef struct tagNMDATETIMESTRINGW {
   NMHDR      nmhdr;
   LPCWSTR    pszUserString;
   SYSTEMTIME st;
   DWORD      dwFlags;
} NMDATETIMESTRINGW, *LPNMDATETIMESTRINGW;
```
I want to convert this `pszUserString` to a string. How to do it. 
Thanks in advance.


More information about the Digitalmars-d-learn mailing list