mmdevapi: Fix some DEVPKEY definitions.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Andrew Eikum 2016-08-09 10:17:04 -05:00 committed by Alexandre Julliard
parent 0dbd2e37f9
commit ba858c28fd
3 changed files with 7 additions and 6 deletions

View File

@ -356,6 +356,7 @@ static MMDevice *MMDevice_Create(WCHAR *name, GUID *id, EDataFlow flow, DWORD st
pv.vt = VT_LPWSTR; pv.vt = VT_LPWSTR;
pv.u.pwszVal = name; pv.u.pwszVal = name;
MMDevice_SetPropValue(id, flow, (const PROPERTYKEY*)&DEVPKEY_Device_FriendlyName, &pv); MMDevice_SetPropValue(id, flow, (const PROPERTYKEY*)&DEVPKEY_Device_FriendlyName, &pv);
MMDevice_SetPropValue(id, flow, (const PROPERTYKEY*)&DEVPKEY_DeviceInterface_FriendlyName, &pv);
MMDevice_SetPropValue(id, flow, (const PROPERTYKEY*)&DEVPKEY_Device_DeviceDesc, &pv); MMDevice_SetPropValue(id, flow, (const PROPERTYKEY*)&DEVPKEY_Device_DeviceDesc, &pv);
pv.u.pwszVal = guidstr; pv.u.pwszVal = guidstr;

View File

@ -64,7 +64,7 @@ static void test_propertystore(IPropertyStore *store)
pv.vt = VT_EMPTY; pv.vt = VT_EMPTY;
hr = IPropertyStore_GetValue(store, (const PROPERTYKEY*)&DEVPKEY_DeviceInterface_FriendlyName, &pv); hr = IPropertyStore_GetValue(store, (const PROPERTYKEY*)&DEVPKEY_DeviceInterface_FriendlyName, &pv);
ok(hr == S_OK, "Failed with %08x\n", hr); ok(hr == S_OK, "Failed with %08x\n", hr);
ok(pv.vt == VT_EMPTY, "Key should not be found\n"); ok(pv.vt == VT_LPWSTR && pv.u.pwszVal, "FriendlyName value had wrong type: 0x%x or was NULL\n", pv.vt);
pv.vt = VT_EMPTY; pv.vt = VT_EMPTY;
hr = IPropertyStore_GetValue(store, (const PROPERTYKEY*)&DEVPKEY_DeviceInterface_Enabled, &pv); hr = IPropertyStore_GetValue(store, (const PROPERTYKEY*)&DEVPKEY_DeviceInterface_Enabled, &pv);
@ -118,8 +118,8 @@ static void test_getat(IPropertyStore *store)
if (IsEqualPropertyKey(pkey, DEVPKEY_Device_DeviceDesc)) if (IsEqualPropertyKey(pkey, DEVPKEY_Device_DeviceDesc))
found_desc = TRUE; found_desc = TRUE;
} }
ok(found_name || broken(!found_name), "DEVPKEY_Device_FriendlyName not found\n"); ok(found_name, "DEVPKEY_Device_FriendlyName not found\n");
ok(found_desc == TRUE, "DEVPKEY_Device_DeviceDesc not found\n"); ok(found_desc, "DEVPKEY_Device_DeviceDesc not found\n");
} }
static void test_setvalue_on_wow64(IPropertyStore *store) static void test_setvalue_on_wow64(IPropertyStore *store)

View File

@ -57,6 +57,6 @@ DEFINE_DEVPROPKEY(DEVPKEY_Device_InstallState, 0xa45c254e,0xdf1c,0x4efd,0x80,0x2
DEFINE_DEVPROPKEY(DEVPKEY_Device_LocationPaths, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 37); DEFINE_DEVPROPKEY(DEVPKEY_Device_LocationPaths, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 37);
DEFINE_DEVPROPKEY(DEVPKEY_Device_BaseContainerId, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 38); DEFINE_DEVPROPKEY(DEVPKEY_Device_BaseContainerId, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 38);
DEFINE_DEVPROPKEY(DEVPKEY_DeviceInterface_FriendlyName, 0x026e516e,0x8b14,0x414b,0x83,0xcd,0x85,0x6d,0x6f,0xef,0x48,0x22, 2); DEFINE_DEVPROPKEY(DEVPKEY_DeviceInterface_FriendlyName, 0x026e516e,0xb814,0x414b,0x83,0xcd,0x85,0x6d,0x6f,0xef,0x48,0x22, 2);
DEFINE_DEVPROPKEY(DEVPKEY_DeviceInterface_Enabled, 0x026e516e,0x8b14,0x414b,0x83,0xcd,0x85,0x6d,0x6f,0xef,0x48,0x22, 3); DEFINE_DEVPROPKEY(DEVPKEY_DeviceInterface_Enabled, 0x026e516e,0xb814,0x414b,0x83,0xcd,0x85,0x6d,0x6f,0xef,0x48,0x22, 3);
DEFINE_DEVPROPKEY(DEVPKEY_DeviceInterface_ClassGuid, 0x026e516e,0x8b14,0x414b,0x83,0xcd,0x85,0x6d,0x6f,0xef,0x48,0x22, 4); DEFINE_DEVPROPKEY(DEVPKEY_DeviceInterface_ClassGuid, 0x026e516e,0xb814,0x414b,0x83,0xcd,0x85,0x6d,0x6f,0xef,0x48,0x22, 4);