I found this code to get windows write privileges but it does not working
问题 Im trying to create new file on D: drive with c/c++ I found this code to get windows write privileges but it does not working Can anybody help me i am new in c++? BOOL SetPrivilege( HANDLE hToken, // access token handle LPCTSTR lpszPrivilege, // name of privilege to enable/disable BOOL bEnablePrivilege // to enable (or disable privilege) ) { // Token privilege structure TOKEN_PRIVILEGES tp; // Used by local system to identify the privilege LUID luid; if(!LookupPrivilegeValue( NULL, // lookup