开发者

How to determine if calling a function requires administrative privileges

I am tryi开发者_开发技巧ng to find out if there is an easy way to tell if calling a function will require my program to be run as an administrator in order to work properly. Thanks!


Certainly. You can run the function, and if it fails with GetLastError() == ERROR_ACCESS_DENIED, then you needed administrative privileges.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜