PREfast Warning 325 (Windows CE 5.0)
325 - Potential comparison of BSTR with NULL BSTRs can be (semantically) null in two ways, i.e., the encoded length of the BSTR is 0 or the pointer itself in NULL.
Question: Did you intend to call SysStringLen?
BSTR values can be semantically NULL in two ways: the encoded length of the BSTR is 0, or the pointer itself in NULL.
Example
Defective Source
BSTR tstr;
int flag;
if (tstr == NULL)
{
flag = 0;
}
Corrected Source
BSTR tstr;
int flag;
if (SysStringLen(tstr) == 0)
{
flag = 0;
}
Send Feedback on this topic to the authors