ucwpotkan Posted May 14, 2017 Share Posted May 14, 2017 Hello, could someone translate very very short code from cpp to AutoIt? Call to function should be something like: Protect($hProcess) DWORD ProtectProcess(void) { HANDLE hProcess = GetCurrentProcess(); PACL pEmptyDacl; DWORD dwErr; // using malloc guarantees proper alignment pEmptyDacl = (PACL)malloc(sizeof(ACL)); if (!InitializeAcl(pEmptyDacl, sizeof(ACL), ACL_REVISION)) { dwErr = GetLastError(); } else { dwErr = SetSecurityInfo(hProcess, SE_KERNEL_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL, pEmptyDacl, NULL); } free(pEmptyDacl); return dwErr; } Link to comment Share on other sites More sharing options...
ucwpotkan Posted May 14, 2017 Author Share Posted May 14, 2017 First one who translates, i will pay 5$ for him. Send me code via PM, include your btc address. Link to comment Share on other sites More sharing options...
ucwpotkan Posted May 14, 2017 Author Share Posted May 14, 2017 Hello, could someone translate very very short code from cpp to AutoIt? Call to function should be something like: Protect($hProcess) First one who translates, i will pay 5$ for him. Send me code via PM, include your btc address. DWORD ProtectProcess(void) { HANDLE hProcess = GetCurrentProcess(); PACL pEmptyDacl; DWORD dwErr; // using malloc guarantees proper alignment pEmptyDacl = (PACL)malloc(sizeof(ACL)); if (!InitializeAcl(pEmptyDacl, sizeof(ACL), ACL_REVISION)) { dwErr = GetLastError(); } else { dwErr = SetSecurityInfo(hProcess, SE_KERNEL_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL, pEmptyDacl, NULL); } free(pEmptyDacl); return dwErr; } Link to comment Share on other sites More sharing options...
Developers Jos Posted May 14, 2017 Developers Share Posted May 14, 2017 Where is the fire? No need to post multiple topics on the same subject, so just stick to this one. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ucwpotkan Posted May 14, 2017 Author Share Posted May 14, 2017 Sorry, i forgot to write something and couldnt find edit. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 14, 2017 Moderators Share Posted May 14, 2017 A google search of the function name and this website turned this up... Also, I'm fairly sure there's already a an include file running around here with a fair amount of process security functions in it. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. 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