Zebediah Figura z.figura12@gmail.com writes:
- RegQueryInfoKeyW(drivers, 0, 0, 0, 0, 0, 0, 0, &valuelen, 0, 0, 0);
- value = heap_alloc(++valuelen * sizeof(WCHAR));
I'll put this is for now, but note that using RegQueryInfoKey() is almost always a bug. There's no guarantee that the maximum size won't change, so the right way is to grow the buffer as needed.