char szCounterPath[500];
snprintf(szCounterPath, sizeof(szCounterPath)-1,
"\\Network Interface(%s)\\Bytes Received/sec", (const char*)inter->m_interface);
WCHAR szCounterPathW[500];
UTF8ToUnicode(szCounterPath, szCounterPathW, sizeof(szCounterPathW) / sizeof(WCHAR));
status = PdhAddCounterW(query, szCounterPathW, NULL, &(inter->m_counterReceived));
if (status != ERROR_SUCCESS)
{
inter->m_bBad = TRUE;
continue;
}