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. How to lock a folder.

How to lock a folder.

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
7 Posts 4 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.
  • A Offline
    A Offline
    ashwath2005
    wrote on last edited by
    #1

    hi all, Can anyone please tell me how to lock a folder,so that the user does not have access to it. Thanks in advance,

    D H 2 Replies Last reply
    0
    • A ashwath2005

      hi all, Can anyone please tell me how to lock a folder,so that the user does not have access to it. Thanks in advance,

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      You'll need to search for Access Control Entry (ACE) and Access Control List (ACL).


      "Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

      "There is no death, only a change of worlds." - Native American Proverb

      A 1 Reply Last reply
      0
      • A ashwath2005

        hi all, Can anyone please tell me how to lock a folder,so that the user does not have access to it. Thanks in advance,

        H Offline
        H Offline
        Hamid Taebi
        wrote on last edited by
        #3

        Hi ashwath2005 maybe it is some helpful to you http://www.codeproject.com/win32/accessctrl4.asp[^]

        A 1 Reply Last reply
        0
        • D David Crow

          You'll need to search for Access Control Entry (ACE) and Access Control List (ACL).


          "Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

          "There is no death, only a change of worlds." - Native American Proverb

          A Offline
          A Offline
          ashwath2005
          wrote on last edited by
          #4

          hi, Can you provide me with a code snippet about how to lock a folder.

          F 1 Reply Last reply
          0
          • A ashwath2005

            hi, Can you provide me with a code snippet about how to lock a folder.

            F Offline
            F Offline
            FarPointer
            wrote on last edited by
            #5

            Well if it contains only few files keep it opened , or else go for ACL and look for the api 1.LockFileEx or 2.SetsecurityFIle (ACL) Regards, FarPointer

            A 1 Reply Last reply
            0
            • F FarPointer

              Well if it contains only few files keep it opened , or else go for ACL and look for the api 1.LockFileEx or 2.SetsecurityFIle (ACL) Regards, FarPointer

              A Offline
              A Offline
              ashwath2005
              wrote on last edited by
              #6

              hi, Does LockFileEx works for a folder also? I could not find the Api SetsecurityFile in the MSDN.

              1 Reply Last reply
              0
              • H Hamid Taebi

                Hi ashwath2005 maybe it is some helpful to you http://www.codeproject.com/win32/accessctrl4.asp[^]

                A Offline
                A Offline
                ashwath2005
                wrote on last edited by
                #7

                Can i use "SetNamedSecurityInfo" function to lock the folder. If yes,how can i use it.

                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