Hi Skizmo,

Oh I see, thank you. By any chance, do you know how I can check if a VARIANT has no value? I mean if it was initialized like this but did not assign any value.

VARIANT varAtt;

I am using this code now:

VARIANT varAtt;

IXMLDOMNode* pAtt = NULL;

_bstr_t tempb = attribute.c_str();
//Process varSource first to determine if to use WMI or TSVar
BSTR bstrAtt = tempb.copy();

if (pNodeMap != NULL)
{
pNodeMap->getNamedItem(bstrAtt,&pAtt);
if (pAtt != NULL)
{
pAtt->get_nodeValue(&varAtt);
SAFE_RELEASE(pAtt);
}
}

return varAtt;

So I can avoid getting an attribute if it does not exist. I want to check now if the returned VARIANT has been assigned to or not.

Thank you very much!