Open hverstoep opened 7 months ago
Hi, thanks for the report. I'll take a look tomorrow evening.
Sorry for the delay, was caught up in some work.
Hmm maybe we should just expose the size parameter as a pointer? So maybe just
regQueryValueEx' :: HKEY -> String -> LPBYTE -> Ptr Int -> IO RegValueType
since you have to create value anyway, but maybe this is a less natural fit.
I think we should avoid the deference unless the results is ERROR_MORE_DATA
and so leaving it up to the caller seems more natural.
I can't retrieve registry value size. This is needed to be able to provide a buffer of the right size. See function here: https://learn.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regqueryvalueexa
Current Behavior
We can specify the buffer size (Int):
But it isn't returned. I need to call the function once with 0 to get the required buffer size, the allocate the buffer, and call the function again. Perhaps something like:
Your Environment