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

Function EnableReflectionKey

crates/vm/src/stdlib/winreg.rs:1077–1084  ·  view source on GitHub ↗
(key: PyRef<PyHkey>, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1075
1076 #[pyfunction]
1077 fn EnableReflectionKey(key: PyRef<PyHkey>, vm: &VirtualMachine) -> PyResult<()> {
1078 let res = unsafe { Registry::RegEnableReflectionKey(key.hkey.load()) };
1079 if res == 0 {
1080 Ok(())
1081 } else {
1082 Err(vm.new_os_error(format!("error code: {res}")))
1083 }
1084 }
1085
1086 #[pyfunction]
1087 fn QueryReflectionKey(key: PyRef<PyHkey>, vm: &VirtualMachine) -> PyResult<bool> {

Callers 2

Calls 3

new_os_errorMethod · 0.80
ErrClass · 0.50
loadMethod · 0.45

Tested by 2