ucwpotkan

[PAYING] C++ Function to AutoIt [SIMPLE]

6 posts in this topic

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;
}

 

Share this post


Link to post
Share on other sites

First one who translates, i will pay 5$ for him. Send me code via PM, include your btc address.

Share this post


Link to post
Share on other sites

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;
}

 

Share this post


Link to post
Share on other sites

Sorry, i forgot to write something and couldnt find edit.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now