Click here to Skip to main content
13,050,904 members (63,980 online)
Rate this:
Please Sign up or sign in to vote.
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 12-Dec-11 4:42am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
Albert Holguin 12-Dec-11 13:31pm
This pretty much sums it up... the CString has to be wide to be compatible.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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?
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170713.1 | Last Updated 14 Dec 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100