seadoggie01 Posted October 17, 2019 Share Posted October 17, 2019 I'm currently trying to get this Permissions UDF running again, partially because I want to be able to display who has a document open on a Shared Drive, and partially because I want more experience with DLL calls. I'm a bit stuck right now though because MSDN doesn't seem to have any documentation on Kernel32.dll or AdvAPI.dll, and I think that's where the UDF is giving me issues. I have no idea, however, and I feel like I'm flying blind. Right now I'm trying to find the value of $SE_PRIVILEGE_ENABLED documented anywhere. I found it in the UDF, in the SecurityConstants.au3, and on StackOverflow, but nowhere on MSDN. What am I missing here? All my code provided is Public Domain... but it may not work. Use it, change it, break it, whatever you want. Spoiler My Humble Contributions:Personal Function Documentation - A personal HelpFile for your functionsAcro.au3 UDF - Automating Acrobat ProToDo Finder - Find #ToDo: lines in your scriptsUI-SimpleWrappers UDF - Use UI Automation more Simply-erKeePass UDF - Automate KeePass, a password managerInputBoxes - Simple Input boxes for various variable types Link to comment Share on other sites More sharing options...
genius257 Posted October 17, 2019 Share Posted October 17, 2019 Google to the rescue. search string: "Kernel32 functions msdn" my 4th result: https://www.geoffchappell.com/studies/windows/win32/kernel32/api/index.htm search string: "AdvAPI functions msdn" my 2nd result: https://www.geoffchappell.com/studies/windows/win32/advapi32/api/index.htm SE_PRIVILEGE_ENABLED is "explained" here: https://docs.microsoft.com/en-us/windows/win32/api/securitybaseapi/nf-securitybaseapi-adjusttokenprivileges seadoggie01 1 My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser Link to comment Share on other sites More sharing options...
seadoggie01 Posted October 17, 2019 Author Share Posted October 17, 2019 (edited) Thanks genius! (I saw these, but I wasn't sure of their reliability, so I skipped over them.) With the SE_Privilege_Enabled what I really meant was this seems to be an undocumented Enum or something... There never is a reference to the actual values, just their names. I seem to run into this sort of thing with the docs all the time... that and getting redirected to the German docs Edited October 17, 2019 by seadoggie01 All my code provided is Public Domain... but it may not work. Use it, change it, break it, whatever you want. Spoiler My Humble Contributions:Personal Function Documentation - A personal HelpFile for your functionsAcro.au3 UDF - Automating Acrobat ProToDo Finder - Find #ToDo: lines in your scriptsUI-SimpleWrappers UDF - Use UI Automation more Simply-erKeePass UDF - Automate KeePass, a password managerInputBoxes - Simple Input boxes for various variable types Link to comment Share on other sites More sharing options...
genius257 Posted October 17, 2019 Share Posted October 17, 2019 If you mean the actual value of SE_Privilege_Enabled, that is something i run into a lot. I use google to search for definitions for the variable. So for your example i google this: #define "SE_Privilege_Enabled" this will most likely always return some .h or .cpp file with the value you searched for. If you are unsure if the variable is the actual variable in reference to what you need, pick multiple searches and look for references in the file to MSDN, windows or other windows API related definitions. In my example my first result from the search was: http://www.rensselaer.org/dept/cis/software/g77-mingw32/include/winnt.h The file itself seems to refer to windows and a comment mentions "windows.h", so i would personally have accepted this as a good lead. In this file SE_PRIVILEGE_ENABLED is defined as 2: #define SE_PRIVILEGE_ENABLED 2 Now this may be a horrible way of doing it. And if it is, I'm sure someone will come to your rescue in this thread and tell me how big of an idiot i am Anyway, i hope some of this is of use to you seadoggie01 1 My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now