為什么我在使用AdjustTokenPrivileges回傳值是0,用GetLastError回傳值也是0,也就是ERROR_SUCCESS。。
這個與MSDN說的不一致啊。
MSDN是這么說的:
If the function succeeds, the return value is nonzero. To determine whether the function adjusted all of the specified privileges, call GetLastError, which returns one of the following values when the function succeeds:
ERROR_SUCCESS The function adjusted all specified privileges.
ERROR_NOT_ALL_ASSIGNED The token does not have one or more of the privileges specified in the NewState parameter. The function may succeed with this error value even if no privileges were adjusted. The PreviousState parameter indicates the privileges that were adjusted.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/69126.html
上一篇:請大神指點一下我這個程式的問題
下一篇:結題報告
