MCPcopy Index your code
hub / github.com/RustPython/RustPython / DeleteKeyEx

Function DeleteKeyEx

crates/vm/src/stdlib/winreg.rs:409–424  ·  view source on GitHub ↗
(args: DeleteKeyExArgs, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

407
408 #[pyfunction]
409 fn DeleteKeyEx(args: DeleteKeyExArgs, vm: &VirtualMachine) -> PyResult<()> {
410 let wide_sub_key = args.sub_key.to_wide_with_nul();
411 let res = unsafe {
412 Registry::RegDeleteKeyExW(
413 args.key.hkey.load(),
414 wide_sub_key.as_ptr(),
415 args.access,
416 args.reserved,
417 )
418 };
419 if res == 0 {
420 Ok(())
421 } else {
422 Err(vm.new_os_error(format!("error code: {res}")))
423 }
424 }
425
426 #[pyfunction]
427 fn EnumKey(key: PyRef<PyHkey>, index: i32, vm: &VirtualMachine) -> PyResult<String> {

Callers 4

test_named_argumentsMethod · 0.85
test_reflectionMethod · 0.85

Calls 5

to_wide_with_nulMethod · 0.80
new_os_errorMethod · 0.80
ErrClass · 0.50
loadMethod · 0.45
as_ptrMethod · 0.45

Tested by 4

test_named_argumentsMethod · 0.68
test_reflectionMethod · 0.68