Query default registry value?

How is it done?
I have tried both NULL as the ValueName and as the ValueName.Buffer ({0,0,NULL} and RTL_CONSTANT_STRING(NULL)). First one faults (even though docs say the parameter can be NULL), second one always returns 0xC0000034.

How about {0,2,L""} (cannot test myself, away from a PC) --pa

No, tried that also.
I finally figured it out, by observing RegSetValueKey while changing
the Default value of a key :slight_smile:
It is 0, 0, NULL, but the call to ZwQueryValueKey would fail with a
strange code, instead of the expected STATUS_OBJECT_NAME_NOT_FOUND or
similar, if the Default value does not exist yet.

How about {0,2,L""} (cannot test myself, away from a PC) --pa