mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-21 17:14:10 +00:00
dplayx: Use wide-char string literals.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d489c58e7b
commit
33f1de3ed7
|
@ -5770,14 +5770,6 @@ static HRESULT DirectPlayEnumerateAW(LPDPENUMDPCALLBACKA lpEnumCallbackA,
|
||||||
LPVOID lpContext)
|
LPVOID lpContext)
|
||||||
{
|
{
|
||||||
HKEY hkResult;
|
HKEY hkResult;
|
||||||
static const WCHAR searchSubKey[] = {
|
|
||||||
'S', 'O', 'F', 'T', 'W', 'A', 'R', 'E', '\\',
|
|
||||||
'M', 'i', 'c', 'r', 'o', 's', 'o', 'f', 't', '\\',
|
|
||||||
'D', 'i', 'r', 'e', 'c', 't', 'P', 'l', 'a', 'y', '\\',
|
|
||||||
'S', 'e', 'r', 'v', 'i', 'c', 'e', ' ', 'P', 'r', 'o', 'v', 'i', 'd', 'e', 'r', 's', 0 };
|
|
||||||
static const WCHAR guidKey[] = { 'G', 'u', 'i', 'd', 0 };
|
|
||||||
static const WCHAR descW[] = { 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'i', 'o', 'n', 'W', 0 };
|
|
||||||
|
|
||||||
DWORD dwIndex;
|
DWORD dwIndex;
|
||||||
FILETIME filetime;
|
FILETIME filetime;
|
||||||
|
|
||||||
|
@ -5797,7 +5789,7 @@ static HRESULT DirectPlayEnumerateAW(LPDPENUMDPCALLBACKA lpEnumCallbackA,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Need to loop over the service providers in the registry */
|
/* Need to loop over the service providers in the registry */
|
||||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, searchSubKey,
|
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\DirectPlay\\Service Providers",
|
||||||
0, KEY_READ, &hkResult) != ERROR_SUCCESS)
|
0, KEY_READ, &hkResult) != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
/* Hmmm. Does this mean that there are no service providers? */
|
/* Hmmm. Does this mean that there are no service providers? */
|
||||||
|
@ -5854,7 +5846,7 @@ static HRESULT DirectPlayEnumerateAW(LPDPENUMDPCALLBACKA lpEnumCallbackA,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get the GUID from the registry */
|
/* Get the GUID from the registry */
|
||||||
if (RegQueryValueExW(hkServiceProvider, guidKey,
|
if (RegQueryValueExW(hkServiceProvider, L"Guid",
|
||||||
NULL, NULL, (LPBYTE) guidKeyContent, &sizeOfGuidKeyContent) != ERROR_SUCCESS)
|
NULL, NULL, (LPBYTE) guidKeyContent, &sizeOfGuidKeyContent) != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
ERR(": missing GUID registry data member for service provider %s.\n", debugstr_w(subKeyName));
|
ERR(": missing GUID registry data member for service provider %s.\n", debugstr_w(subKeyName));
|
||||||
|
@ -5899,8 +5891,8 @@ static HRESULT DirectPlayEnumerateAW(LPDPENUMDPCALLBACKA lpEnumCallbackA,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DWORD sizeOfDescription = 0;
|
DWORD sizeOfDescription = 0;
|
||||||
|
|
||||||
if (RegQueryValueExW(hkServiceProvider, descW,
|
if (RegQueryValueExW(hkServiceProvider, L"DescriptionW",
|
||||||
NULL, NULL, NULL, &sizeOfDescription) != ERROR_SUCCESS)
|
NULL, NULL, NULL, &sizeOfDescription) != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
ERR(": missing 'DescriptionW' registry data member for service provider %s.\n", debugstr_w(subKeyName));
|
ERR(": missing 'DescriptionW' registry data member for service provider %s.\n", debugstr_w(subKeyName));
|
||||||
|
@ -5912,7 +5904,7 @@ static HRESULT DirectPlayEnumerateAW(LPDPENUMDPCALLBACKA lpEnumCallbackA,
|
||||||
max_sizeOfDescriptionW = sizeOfDescription;
|
max_sizeOfDescriptionW = sizeOfDescription;
|
||||||
}
|
}
|
||||||
descriptionW = HeapAlloc(GetProcessHeap(), 0, sizeOfDescription);
|
descriptionW = HeapAlloc(GetProcessHeap(), 0, sizeOfDescription);
|
||||||
RegQueryValueExW(hkServiceProvider, descW,
|
RegQueryValueExW(hkServiceProvider, L"DescriptionW",
|
||||||
NULL, NULL, (LPBYTE) descriptionW, &sizeOfDescription);
|
NULL, NULL, (LPBYTE) descriptionW, &sizeOfDescription);
|
||||||
|
|
||||||
if (!lpEnumCallbackW(&guid_cache[dwIndex], descriptionW, 6, 0, lpContext))
|
if (!lpEnumCallbackW(&guid_cache[dwIndex], descriptionW, 6, 0, lpContext))
|
||||||
|
|
|
@ -6764,13 +6764,6 @@ done:
|
||||||
|
|
||||||
static HRESULT set_firewall( enum firewall_op op )
|
static HRESULT set_firewall( enum firewall_op op )
|
||||||
{
|
{
|
||||||
static const WCHAR dplaysvrW[] =
|
|
||||||
{'d','p','l','a','y','s','v','r','.','e','x','e',0};
|
|
||||||
static const WCHAR separator[] = {'\\',0};
|
|
||||||
static const WCHAR clientW[] =
|
|
||||||
{'d','p','l','a','y','_','c','l','i','e','n','t',0};
|
|
||||||
static const WCHAR serverW[] =
|
|
||||||
{'d','p','l','a','y','_','s','e','r','v','e','r',0};
|
|
||||||
HRESULT hr, init;
|
HRESULT hr, init;
|
||||||
INetFwMgr *mgr = NULL;
|
INetFwMgr *mgr = NULL;
|
||||||
INetFwPolicy *policy = NULL;
|
INetFwPolicy *policy = NULL;
|
||||||
|
@ -6791,8 +6784,7 @@ static HRESULT set_firewall( enum firewall_op op )
|
||||||
SysFreeString( image );
|
SysFreeString( image );
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
lstrcatW(path, separator);
|
lstrcatW( path, L"\\dplaysvr.exe" );
|
||||||
lstrcatW(path, dplaysvrW);
|
|
||||||
|
|
||||||
init = CoInitializeEx( 0, COINIT_APARTMENTTHREADED );
|
init = CoInitializeEx( 0, COINIT_APARTMENTTHREADED );
|
||||||
|
|
||||||
|
@ -6820,7 +6812,7 @@ static HRESULT set_firewall( enum firewall_op op )
|
||||||
hr = INetFwAuthorizedApplication_put_ProcessImageFileName( app, image );
|
hr = INetFwAuthorizedApplication_put_ProcessImageFileName( app, image );
|
||||||
if (hr != S_OK) goto done;
|
if (hr != S_OK) goto done;
|
||||||
|
|
||||||
name = SysAllocString( clientW );
|
name = SysAllocString( L"dplay_client" );
|
||||||
hr = INetFwAuthorizedApplication_put_Name( app, name );
|
hr = INetFwAuthorizedApplication_put_Name( app, name );
|
||||||
SysFreeString( name );
|
SysFreeString( name );
|
||||||
ok( hr == S_OK, "got %08x\n", hr );
|
ok( hr == S_OK, "got %08x\n", hr );
|
||||||
|
@ -6845,7 +6837,7 @@ static HRESULT set_firewall( enum firewall_op op )
|
||||||
hr = INetFwAuthorizedApplication_put_ProcessImageFileName( app, image );
|
hr = INetFwAuthorizedApplication_put_ProcessImageFileName( app, image );
|
||||||
if (hr != S_OK) goto done;
|
if (hr != S_OK) goto done;
|
||||||
|
|
||||||
name = SysAllocString( serverW );
|
name = SysAllocString( L"dplay_server" );
|
||||||
hr = INetFwAuthorizedApplication_put_Name( app, name );
|
hr = INetFwAuthorizedApplication_put_Name( app, name );
|
||||||
SysFreeString( name );
|
SysFreeString( name );
|
||||||
ok( hr == S_OK, "got %08x\n", hr );
|
ok( hr == S_OK, "got %08x\n", hr );
|
||||||
|
|
Loading…
Reference in a new issue