I attempted to run the C++ code at http://msdn.microsoft.com/en-us/library/windows/desktop/aa366531(v=vs.85).aspx, however, it failed with:
Cannot enable the SE_LOCK_MEMORY_NAME privilege;
please check the local policy.
My OS is Win7 x64.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The problem is that the required group policy is disabled by default under Windows 7 x64.
Step 1: Find the name of the group policy, in control panel, that matches SE_LOCK_MEMORY:
The following page describes the group policy rights that are required for a process to enable SE_LOCK_MEMORY_NAME:
Note: the column after “SE_LOCK_MEMORY” states “User Right: Lock pages in memory.”. This is the name of the “Local Security Policy” that we want to set in the next step.
Step 2: Set the group policy described as “Lock pages in memory”:
The following pages describe how to add the “SE_LOCK_MEMORY” privilege to a username by changing group policy:
Note: You must reboot for this new policy to take effect (something that is not mentioned on the MSDN help page).