1
0

feat(registry): add privilege check and improve ProgId handling

- Add WFHasPrivilege function to check user privileges
- Refactor ProgId structure to use standard format with optional version
- Improve registry operations with safer key/value handling
- Update dependencies to include Win32_System_Registry
This commit is contained in:
2025-10-19 14:10:21 +08:00
parent f37b4b6652
commit d5fed1e580
5 changed files with 135 additions and 92 deletions

View File

@ -90,6 +90,11 @@ pub extern "C" fn WFGetLastError() -> *const c_char {
get_last_error()
}
#[unsafe(no_mangle)]
pub extern "C" fn WFHasPrivilege() -> bool {
wfassoc::utilities::has_privilege()
}
#[unsafe(no_mangle)]
pub extern "C" fn WFAdd(left: u32, right: u32, rv: *mut u32) -> bool {
unsafe { *rv = left + right; }