You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RegOpenKeyEx always returns a null HKEYon success. The problem is that a null HKEY is constructed, then hKey.as_ptr() is passed into the raw function, which means it will store the newly opened HKEY into wherever hKey pointed at, which is null, rather than into hKey itself. I changed the function to look like this and it now works, but I imagine raw types like c_void probably aren’t supposed to appear here; I just don’t really quite understand all the type aliases so it was the fastest and simplest fix I could come up with:
RegOpenKeyEx
always returns a nullHKEY
on success. The problem is that a nullHKEY
is constructed, thenhKey.as_ptr()
is passed into the raw function, which means it will store the newly openedHKEY
into whereverhKey
pointed at, which is null, rather than intohKey
itself. I changed the function to look like this and it now works, but I imagine raw types likec_void
probably aren’t supposed to appear here; I just don’t really quite understand all the type aliases so it was the fastest and simplest fix I could come up with:The text was updated successfully, but these errors were encountered: