feat: add wrapper for WFHasPrivilege in c++ header
This commit is contained in:
@@ -79,6 +79,18 @@ inline void _Check(wfassoc::WFError result) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Check if the current process has administrative privileges
|
||||||
|
*
|
||||||
|
* @return true if the current process has administrative privileges, false otherwise
|
||||||
|
* @throws std::runtime_error if the operation fails
|
||||||
|
*/
|
||||||
|
inline bool HasPrivilege() {
|
||||||
|
bool result = false;
|
||||||
|
_Check(wfassoc::WFHasPrivilege(&result));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Schema object for defining a program's file association configuration
|
* @brief Schema object for defining a program's file association configuration
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user