{"id":57539,"library":"kernel32-sys","title":"kernel32-sys","description":"Contains function definitions for the Windows API library kernel32. See winapi for types and constants.","status":"deprecated","version":"0.2.2","language":"rust","source_language":null,"source_url":"https://github.com/retep998/winapi-rs","tags":["windows","kernel32","winapi","deprecated"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\nkernel32-sys = \"0.2.2\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add kernel32-sys","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"GetLastError","correct":"use kernel32::GetLastError;"}],"quickstart":{"code":"use kernel32::GetLastError;\n\nfn main() {\n    unsafe {\n        let error = GetLastError();\n        println!(\"Last error: {}\", error);\n    }\n}","lang":"rust","description":"Calls GetLastError to retrieve the last Windows error code."},"warnings":[{"fix":"Replace with `winapi` and use its `um::errhandlingapi::GetLastError`.","message":"This crate is deprecated in favor of the `winapi` crate which provides safer and more complete bindings.","severity":"breaking","affected_versions":">=0.2.0"}],"env_vars":null,"search_vec":"'api':10 'constant':18 'contain':4 'definit':6 'deprec':22 'function':5 'kernel32':2,12,20 'kernel32-sys':1 'librari':11 'see':13 'sys':3 'type':16 'winapi':14,21 'window':9,19","created_at":"2026-06-16T15:46:25.001495+00:00","updated_at":"2026-06-16T15:46:25.001495+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/retep998/winapi-rs","github":"https://github.com/retep998/winapi-rs","docs":"https://docs.rs/kernel32-sys/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["other"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-16","next_check":"2026-12-13","install_tag":null}}