Module: wine Branch: master Commit: 6299544cdd731925eea0c960fcd1a57fab846a18 URL: http://source.winehq.org/git/wine.git/?a=commit;h=6299544cdd731925eea0c960fc...
Author: Maarten Lankhorst m.b.lankhorst@gmail.com Date: Sun Jan 17 13:38:32 2010 +0100
mmdevapi: Dump device id in test.
---
dlls/mmdevapi/tests/mmdevenum.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/dlls/mmdevapi/tests/mmdevenum.c b/dlls/mmdevapi/tests/mmdevenum.c index 35e0152..fa26b75 100644 --- a/dlls/mmdevapi/tests/mmdevenum.c +++ b/dlls/mmdevapi/tests/mmdevenum.c @@ -90,6 +90,18 @@ static void test_collection(IMMDeviceEnumerator *mme, IMMDeviceCollection *col) hr = IMMDeviceCollection_Item(col, 0, &dev); ok(hr == S_OK, "Valid Item returned 0x%08x\n", hr); ok(dev != NULL, "Device is null!\n"); + if (dev != NULL) + { + char temp[128]; + WCHAR *id = NULL; + if (IMMDevice_GetId(dev, &id) == S_OK) + { + temp[sizeof(temp)-1] = 0; + WideCharToMultiByte(CP_ACP, 0, id, -1, temp, sizeof(temp)-1, NULL, NULL); + trace("Device found: %s\n", temp); + CoTaskMemFree(id); + } + } if (dev) IUnknown_Release(dev); }