File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -493,6 +493,26 @@ def get_key_info(
493493 timeout = timeout ,
494494 )
495495
496+ if response .status != 0 :
497+ log_runtime .error (
498+ "Got status %s while querying key info" , hex (response .status )
499+ )
500+ raise ValueError (response .status )
501+
502+ if response .lpClassOut .Length > 2 :
503+ # There is a Class info stored. We need to
504+ # get it by specifying the proper MaximumLength.
505+ # By default the size is "2".
506+ response = self .sr1_req (
507+ BaseRegQueryInfoKey_Request (
508+ hKey = key_handle ,
509+ lpClassIn = RPC_UNICODE_STRING (
510+ MaximumLength = response .lpClassOut .Length
511+ ),
512+ ),
513+ timeout = timeout ,
514+ )
515+
496516 if response .status != 0 :
497517 log_runtime .error (
498518 "Got status %s while querying key info" , hex (response .status )
@@ -588,7 +608,6 @@ def enum_subkeys(
588608
589609 index += 1
590610 results .append (response .lpNameOut .valueof ("Buffer" )[:- 1 ].decode ())
591-
592611 return results
593612
594613 def enum_values (
You can’t perform that action at this time.
0 commit comments