Pierre Schweitzer pierre@reactos.org writes:
if (RegQueryInfoKeyW(remembered, NULL, NULL, NULL, NULL, &size, NULL, NULL, NULL, NULL, NULL, NULL) != ERROR_SUCCESS)
{
HeapFree(GetProcessHeap(), 0, ret);
ret = NULL;
}
ret->specific.remembered.len = size + 1;
That error handling can't possibly work. Also using RegQueryInfoKeyW() to size buffers is always a bug, the registry contents can change in the meantime.