Currently, I'm dealing with WMI for collecting the log files from a remote machine. I have the username of the remote machine initialized as given below.
wchar_t pszName[]=L"My username";
pszName[]
is a wchar_t
array. The trouble I face is that when I pass my username as a parameter of string datatype, I need to initialize wchar_t
array using a string.
I cannot use a wchar_t*
pointer because it gives me an error on the later part of the program. I need to initialize something like
string username = "My username";
wchar_t pszName[] = .....?.....;