Enabling SE_LOCK_MEMORY_NAME privilege
-
I'm working with Visual C++ service pack 6 and attempting to use AWE, the Addressing Windows Extensions on Windows XP. I'm using the example at http://msdn.microsoft.com/en-us/libr...31(VS.85).aspx which has the following code: ****** // Adjust the privilege. Result = AdjustTokenPrivileges ( Token, FALSE, (PTOKEN_PRIVILEGES) &Info, 0, NULL, NULL); // Check the result. if( Result != TRUE ) { printf ("Cannot adjust token privileges (%u)\n", GetLastError() ); return FALSE; } else { if( GetLastError() != ERROR_SUCCESS ) { printf ("Cannot enable the SE_LOCK_MEMORY_NAME privilege; "); printf ("please check the local policy.\n"); return FALSE; } } ***** I get the "Cannot enable the SE_LOCK_MEMORY_NAME privilege". I'm assuming there's a way for a user with administrative privileges to allow the program to enable it. How do I do it?
-
I'm working with Visual C++ service pack 6 and attempting to use AWE, the Addressing Windows Extensions on Windows XP. I'm using the example at http://msdn.microsoft.com/en-us/libr...31(VS.85).aspx which has the following code: ****** // Adjust the privilege. Result = AdjustTokenPrivileges ( Token, FALSE, (PTOKEN_PRIVILEGES) &Info, 0, NULL, NULL); // Check the result. if( Result != TRUE ) { printf ("Cannot adjust token privileges (%u)\n", GetLastError() ); return FALSE; } else { if( GetLastError() != ERROR_SUCCESS ) { printf ("Cannot enable the SE_LOCK_MEMORY_NAME privilege; "); printf ("please check the local policy.\n"); return FALSE; } } ***** I get the "Cannot enable the SE_LOCK_MEMORY_NAME privilege". I'm assuming there's a way for a user with administrative privileges to allow the program to enable it. How do I do it?
-
I found the setting at Control panel->Local Security Policy->Local policies->User Rights Assignment->Lock pages in memory
You should not have removed you original message. Your solution is worthless without knowing what the original problem was.
Watched code never compiles.