msdmo: Array parameter is passed to function as pointer so loses size information.

This commit is contained in:
Andrew Talbot 2008-04-07 22:39:33 +01:00 committed by Alexandre Julliard
parent 0f4f6fac3c
commit a9200b2401

View file

@ -291,8 +291,9 @@ lend:
*
* Get DMP Name from the registry
*/
HRESULT WINAPI DMOGetName(REFCLSID clsidDMO, WCHAR szName[80])
HRESULT WINAPI DMOGetName(REFCLSID clsidDMO, WCHAR szName[])
{
#define NAME_SIZE 80 /* Size of szName[] */
WCHAR szguid[64];
HRESULT hres;
HKEY hrkey = 0;
@ -311,7 +312,7 @@ HRESULT WINAPI DMOGetName(REFCLSID clsidDMO, WCHAR szName[80])
if (ERROR_SUCCESS != hres)
goto lend;
count = sizeof(szName);
count = NAME_SIZE;
hres = RegQueryValueExW(hkey, NULL, NULL, NULL,
(LPBYTE) szName, &count);
@ -323,6 +324,7 @@ lend:
RegCloseKey(hkey);
return hres;
#undef NAME_SIZE
}