I notice that if I assign a wide string to a CString the resulting CString is automatically converted from wide to char, as in the example below...
str = val.bstrVal;
where val is a VARIANT filled in by a query to WMI. The BSTR at val.bstrVal contains wide characters terminated by a NULL and after the assign str is the same text, but characters. Does anyone know where this is "cast" behavior is documented, if it is, and if I can rely on it always happening?