On Sat Nov 16 11:35:05 2024 +0000, Jinoh Kang wrote:
Avoid hard-coding constants wherever possible.
if(pv->vt == VT_BLOB && pv->blob.pBlobData && pv->blob.cbSize == sizeof(VARIANT) && pv->blob.pBlobData[0] == VT_CLSID && IsEqualPropertyKey(*key, DEVPKEY_Device_ContainerId)) {
(Assuming this is VARIANT; correct me if this is not the case.)
And if that's the case, you probably want to cast pv->blob.pBlobData to a VARIANT * and check its fields.