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. Setting file/folder permission

Setting file/folder permission

Scheduled Pinned Locked Moved C / C++ / MFC
securityjson
7 Posts 6 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.
  • S Offline
    S Offline
    scorpion king
    wrote on last edited by
    #1

    Is there a API to set security attributes of file/folder(s) while creating them. thanks in advance

    R R 2 Replies Last reply
    0
    • S scorpion king

      Is there a API to set security attributes of file/folder(s) while creating them. thanks in advance

      R Offline
      R Offline
      Rajesh R Subramanian
      wrote on last edited by
      #2

      Member 3068970 wrote:

      Is there a API to set security attributes of file/folder(s) while creating them.

      Try SetFileAttributes()

      Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

      S 1 Reply Last reply
      0
      • R Rajesh R Subramanian

        Member 3068970 wrote:

        Is there a API to set security attributes of file/folder(s) while creating them.

        Try SetFileAttributes()

        Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

        S Offline
        S Offline
        scorpion king
        wrote on last edited by
        #3

        Can i make a file/folder password protected as Microsoft Word do.

        1 Reply Last reply
        0
        • S scorpion king

          Is there a API to set security attributes of file/folder(s) while creating them. thanks in advance

          R Offline
          R Offline
          Rajkumar R
          wrote on last edited by
          #4

          Member 3068970 wrote:

          Is there a API to set security attributes of file/folder(s)

          [SetFileSecurity ^] replaced by [SetNamedSecurityInfo^].

          Member 3068970 wrote:

          while creating them.

          HANDLE CreateFile( LPCTSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile );

          T 1 Reply Last reply
          0
          • R Rajkumar R

            Member 3068970 wrote:

            Is there a API to set security attributes of file/folder(s)

            [SetFileSecurity ^] replaced by [SetNamedSecurityInfo^].

            Member 3068970 wrote:

            while creating them.

            HANDLE CreateFile( LPCTSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile );

            T Offline
            T Offline
            tina newcoder
            wrote on last edited by
            #5

            any example for its usage ... ? :)

            D 1 Reply Last reply
            0
            • T tina newcoder

              any example for its usage ... ? :)

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

              Two links and a function were provided. How much more do you need? :rolleyes:

              "Love people and use things, not love things and use people." - Unknown

              "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

              H 1 Reply Last reply
              0
              • D David Crow

                Two links and a function were provided. How much more do you need? :rolleyes:

                "Love people and use things, not love things and use people." - Unknown

                "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

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

                For future. ;)

                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