From: Claire Girka claire@sitedethib.com
Note that while Windows also stores the property in that registry key, it serializes it as binary instead of storing the string representation. --- dlls/mmdevapi/devenum.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/dlls/mmdevapi/devenum.c b/dlls/mmdevapi/devenum.c index bfeb3f3ecd8..19caf36e8d3 100644 --- a/dlls/mmdevapi/devenum.c +++ b/dlls/mmdevapi/devenum.c @@ -225,6 +225,17 @@ static HRESULT MMDevice_SetPropValue(const GUID *devguid, DWORD flow, REFPROPERT ret = RegSetValueExW(regkey, buffer, 0, REG_SZ, (const BYTE*)pv->pwszVal, sizeof(WCHAR)*(1+lstrlenW(pv->pwszVal))); break; } + case VT_CLSID: + { + WCHAR guidstr[39 /* MAX_GUID_STRING_LEN */]; + /* While this shouldn't be an issue in practice, that serialization is not how Windows do it. + Instead, Windows outputs VT_CLSID followed by 2 unknown bytes, a DWORD with value 1, then + the binary representation of the ID */ + FIXME("Type VT_CLSID should be serialized as binary rather than as a string\n"); + StringFromGUID2(pv->puuid, guidstr, ARRAY_SIZE(guidstr)); + ret = RegSetValueExW(regkey, buffer, 0, REG_SZ, (const BYTE*)guidstr, sizeof(WCHAR) * 39); + break; + } default: ret = 0; FIXME("Unhandled type %u\n", pv->vt);