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.
精彩评论