Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Enabling SE_LOCK_MEMORY_NAME privilege

Enabling SE_LOCK_MEMORY_NAME privilege

Scheduled Pinned Locked Moved C / C++ / MFC
c++questionvisual-studiocomhelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    garyflet
    wrote on last edited by
    #1

    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?

    G 1 Reply Last reply
    0
    • G garyflet

      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?

      G Offline
      G Offline
      garyflet
      wrote on last edited by
      #2

      I found the setting at Control panel->Local Security Policy->Local policies->User Rights Assignment->Lock pages in memory

      M 1 Reply Last reply
      0
      • G garyflet

        I found the setting at Control panel->Local Security Policy->Local policies->User Rights Assignment->Lock pages in memory

        M Offline
        M Offline
        Maximilien
        wrote on last edited by
        #3

        You should not have removed you original message. Your solution is worthless without knowing what the original problem was.

        Watched code never compiles.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups