Click here to Skip to main content
15,886,793 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
when i use GetIfEntry to get structure MIB_IFROW ,
i has a wchar array,
then how do i change this array to CString?

i test sometimes,but i just get the chars like "??????????"
Posted

A WCHAR is a 16 bit character and your CString needs to be the same type. If your program is not being compiled for Unicode then you should use CStringW to ensure it is compatible with the source.
 
Share this answer
 
Comments
Albert Holguin 12-Dec-11 13:31pm    
This pretty much sums it up... the CString has to be wide to be compatible.
it is so sad.
i use CStringW ensure it,but when i display it,it must be a CSting。
so ,it is also "??????????".
how do i change CStringW to CString?
 
Share this answer
 
Comments
Richard MacCutchan 14-Dec-11 5:23am    
Why do you need to convert it, you can display CStringW just the same as ordinary CString, as long as you use the wide version of any display function.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900