ULONG nCount = 64;
ULONG nCount = (sizeof(szGUID) / sizeof(szGUID[0])) - 1;
CLSID xpc_GetCLSIDForType(const char *mimeType){    if (mimeType == NULL)    {        return CLSID_NULL;    }    // Read the registry to see if there is a CLSID for an object to be associated with    // this MIME type.    USES_CONVERSION;    CRegKey keyMimeDB;    if (keyMimeDB.Open(HKEY_CLASSES_ROOT, _T("MIME\\Database\\Content Type"), KEY_READ) == ERROR_SUCCESS)    {        CRegKey keyMimeType;        if (keyMimeType.Open(keyMimeDB, A2CT(mimeType), KEY_READ) == ERROR_SUCCESS)        {	        USES_CONVERSION;	        TCHAR szGUID[64];	        ULONG nCount = 64;            GUID guidValue = GUID_NULL;            if (keyMimeType.QueryValue(_T("CLSID"), szGUID, &nCount) == ERROR_SUCCESS &&                SUCCEEDED(::CLSIDFromString(T2OLE(szGUID), &guidValue)))            {                return guidValue;            }        }    }    return CLSID_NULL;}