Commit 591f06d8 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

mmdevapi: Use wide-char string literals.

parent 3bcabb24
......@@ -47,8 +47,7 @@ static HINSTANCE instance;
DriverFuncs drvs;
const WCHAR drv_keyW[] = {'S','o','f','t','w','a','r','e','\\',
'W','i','n','e','\\','D','r','i','v','e','r','s',0};
const WCHAR drv_keyW[] = L"Software\\Wine\\Drivers";
static const char *get_priority_string(int prio)
{
......@@ -68,12 +67,10 @@ static const char *get_priority_string(int prio)
static BOOL load_driver(const WCHAR *name, DriverFuncs *driver)
{
WCHAR driver_module[264];
static const WCHAR wineW[] = {'w','i','n','e',0};
static const WCHAR dotdrvW[] = {'.','d','r','v',0};
lstrcpyW(driver_module, wineW);
lstrcpyW(driver_module, L"wine");
lstrcatW(driver_module, name);
lstrcatW(driver_module, dotdrvW);
lstrcatW(driver_module, L".drv");
TRACE("Attempting to load %s\n", wine_dbgstr_w(driver_module));
......@@ -106,11 +103,7 @@ static BOOL load_driver(const WCHAR *name, DriverFuncs *driver)
static BOOL WINAPI init_driver(INIT_ONCE *once, void *param, void **context)
{
static const WCHAR drv_value[] = {'A','u','d','i','o',0};
static WCHAR default_list[] = {'p','u','l','s','e',',','a','l','s','a',',','o','s','s',',',
'c','o','r','e','a','u','d','i','o',',','a','n','d','r','o','i','d',0};
static WCHAR default_list[] = L"pulse,alsa,oss,coreaudio,android";
DriverFuncs driver;
HKEY key;
WCHAR reg_list[256], *p, *next, *driver_list = default_list;
......@@ -118,8 +111,7 @@ static BOOL WINAPI init_driver(INIT_ONCE *once, void *param, void **context)
if(RegOpenKeyW(HKEY_CURRENT_USER, drv_keyW, &key) == ERROR_SUCCESS){
DWORD size = sizeof(reg_list);
if(RegQueryValueExW(key, drv_value, 0, NULL, (BYTE*)reg_list,
&size) == ERROR_SUCCESS){
if(RegQueryValueExW(key, L"Audio", 0, NULL, (BYTE*)reg_list, &size) == ERROR_SUCCESS){
if(reg_list[0] == '\0'){
TRACE("User explicitly chose no driver\n");
RegCloseKey(key);
......
......@@ -384,8 +384,6 @@ static IMMNotificationClient notif = { &notif_vtbl };
/* Only do parameter tests here, the actual MMDevice testing should be a separate test */
START_TEST(mmdevenum)
{
static const WCHAR not_a_deviceW[] = {'n','o','t','a','d','e','v','i','c','e',0};
HRESULT hr;
IUnknown *unk = NULL;
IMMDeviceEnumerator *mme, *mme2;
......@@ -426,13 +424,13 @@ START_TEST(mmdevenum)
ok(!unk, "Unk not reset to null after invalid QI\n");
ok(hr == E_NOINTERFACE, "Invalid hr %08x returned on IID_NULL\n", hr);
hr = IMMDeviceEnumerator_GetDevice(mme, not_a_deviceW, NULL);
hr = IMMDeviceEnumerator_GetDevice(mme, L"notadevice", NULL);
ok(hr == E_POINTER, "GetDevice gave wrong error: %08x\n", hr);
hr = IMMDeviceEnumerator_GetDevice(mme, NULL, &dev);
ok(hr == E_POINTER, "GetDevice gave wrong error: %08x\n", hr);
hr = IMMDeviceEnumerator_GetDevice(mme, not_a_deviceW, &dev);
hr = IMMDeviceEnumerator_GetDevice(mme, L"notadevice", &dev);
ok(hr == E_INVALIDARG, "GetDevice gave wrong error: %08x\n", hr);
col = (void*)(LONG_PTR)0x12345678;
......
......@@ -33,14 +33,7 @@
static BOOL (WINAPI *pIsWow64Process)(HANDLE, BOOL *);
static const WCHAR software_renderW[] =
{ 'S','o','f','t','w','a','r','e','\\',
'M','i','c','r','o','s','o','f','t','\\',
'W','i','n','d','o','w','s','\\',
'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
'M','M','D','e','v','i','c','e','s','\\',
'A','u','d','i','o','\\',
'R','e','n','d','e','r',0 };
static const WCHAR propertiesW[] = {'P','r','o','p','e','r','t','i','e','s',0};
L"Software\\Microsoft\\Windows\\CurrentVersion\\MMDevices\\Audio\\Render";
static void test_propertystore(IPropertyStore *store)
......@@ -138,7 +131,7 @@ static void test_setvalue_on_wow64(IPropertyStore *store)
static const PROPERTYKEY PKEY_Bogus = {
{0x1da5d803, 0xd492, 0x4edd, {0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x00}}, 0x7f
};
static const WCHAR bogusW[] = {'{','1','D','A','5','D','8','0','3','-','D','4','9','2','-','4','E','D','D','-','8','C','2','3','-','E','0','C','0','F','F','E','E','7','F','0','0','}',',','1','2','7',0};
static const WCHAR bogusW[] = L"{1DA5D803-D492-4EDD-8C23-E0C0FFEE7F00},127";
PropVariantInit(&pv);
......@@ -172,7 +165,7 @@ static void test_setvalue_on_wow64(IPropertyStore *store)
ret = RegOpenKeyExW(root, guidW, 0, KEY_READ|KEY_WOW64_64KEY, &devkey);
ok(ret == ERROR_SUCCESS, "Couldn't open mmdevice guid key: %u\n", ret);
ret = RegOpenKeyExW(devkey, propertiesW, 0, KEY_READ|KEY_WOW64_64KEY, &props);
ret = RegOpenKeyExW(devkey, L"Properties", 0, KEY_READ|KEY_WOW64_64KEY, &props);
ok(ret == ERROR_SUCCESS, "Couldn't open mmdevice property key: %u\n", ret);
/* Note: the registry key exists even without calling IPropStore::Commit */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment