On 23.01.2015 10:24, Alistair Leslie-Hughes wrote:
ret = RegGetValueW(hkey, NULL, NULL, RRF_RT_REG_SZ, &keytype, NULL, &size);
if(ret == ERROR_SUCCESS)
{
*association = CoTaskMemAlloc(size * sizeof(WCHAR));
Does it really return length in characters? I thought it's always in bytes.
if(*association)
{
ret = RegGetValueW(hkey, NULL, NULL, RRF_RT_REG_SZ, &keytype, *association, &size);
if(ret == ERROR_SUCCESS)
hr = S_OK;
}
}
In case of !*association please return earlier with E_OUTOFMEMORY.