I have two functions! The first one is
GetUserName(LPSTR buffer, LPDWORD size);
And
SetInfo(LPCWSTR user, int secret);
I have to take the output from GetUserName
which is buffer
as an LPSTR
Then I have to use that string in the SetInfo
function as an LPCWSTR
My question is; What is the safest and best approach to doing this?
Can MultiByteToWideChar
be used here? Thanks!