Convert void* representation of a dword to wstring
Posted
by graham.reeds
on Stack Overflow
See other posts from Stack Overflow
or by graham.reeds
Published on 2010-06-14T15:01:34Z
Indexed on
2010/06/14
15:12 UTC
Read the original article
Hit count: 297
I am having dumb monday so my apologies for posting such a newbie-like question.
I am using CRegKey.QueryValue to return a dword value from the registry. QueryValue writes the value into void* pData
and the length into ULONG* pnBytes
.
Now there is a way of getting it from pData into a wstring probably via stringstream. The closest I came was getting the result as a hex string. I was about to work on converting the hex representation to a dword and then from there to a wstring when I decided that was just dumb and ask on here instead of wasting another hour of my life on the problem.
© Stack Overflow or respective owner