开发者

How to determine if calling a function requires administrative privileges

开发者 https://www.devze.com 2023-03-16 05:24 出处:网络
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

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

精彩评论

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