mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-03 01:38:30 +00:00
Improve documentation
The Cosmo API documentation page is pretty good now https://justine.lol/cosmopolitan/documentation.html
This commit is contained in:
parent
13437dd19b
commit
1bc3a25505
367 changed files with 2542 additions and 26178 deletions
|
@ -17,19 +17,21 @@
|
|||
│ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA │
|
||||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/calls/internal.h"
|
||||
#include "libc/nt/privilege.h"
|
||||
#include "libc/nt/struct/tokenprivileges.h"
|
||||
#include "libc/calls/internal.h"
|
||||
|
||||
/**
|
||||
* Sets NT permission thing, e.g.
|
||||
*
|
||||
* int64_t htoken;
|
||||
* if (OpenProcessToken(GetCurrentProcess(),
|
||||
* kNtTokenAdjustPrivileges | kNtTokenQuery, &htoken)) {
|
||||
* ntsetprivilege(htoken, u"SeManageVolumePrivilege", kNtSePrivilegeEnabled);
|
||||
* CloseHandle(htoken);
|
||||
* }
|
||||
* int64_t htoken;
|
||||
* if (OpenProcessToken(GetCurrentProcess(),
|
||||
* kNtTokenAdjustPrivileges | kNtTokenQuery,
|
||||
* &htoken)) {
|
||||
* ntsetprivilege(htoken, u"SeManageVolumePrivilege",
|
||||
* kNtSePrivilegeEnabled);
|
||||
* CloseHandle(htoken);
|
||||
* }
|
||||
*/
|
||||
textwindows bool32 ntsetprivilege(int64_t token, const char16_t *name,
|
||||
uint32_t attrs) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue