c++ - Convert void* representation of a dword to wstring -
I am dumb Monday, so I apologize for posting such a newbie question.
I'm using the registry to return a dword value. QueryValue writes values to void * pData and there is a way to get the length
ULONG * pnBytes
Now in wstring from pdata. Perhaps through stringstream I was getting the closest result as a hex string. I was about to convert hex representation into a single den and work from there on a wstring when I decided it was just dumb and instead of wasting another hour of my life on this problem I ask here .
Why do not you use CRegKey :: QueryDWORDValue instead? Then you can swprintf_s to print it in string only (if you want).
Comments
Post a Comment