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. In c++ How to deny usb read write?

In c++ How to deny usb read write?

Scheduled Pinned Locked Moved C / C++ / MFC
c++helptutorialquestion
7 Posts 3 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.
  • M Offline
    M Offline
    Member 14872681
    wrote on last edited by
    #1

    Hello I'm looking for How to deny usb(cd, floppy, portable hard drive, blu ray...) read and write based on vs2019. File, Code, Class, anyone is ok. Development on Windows Drive Kit or just VS2019, contact on filter driver i do not know which one suitable method on me. plz Help me.....

    D 1 Reply Last reply
    0
    • M Member 14872681

      Hello I'm looking for How to deny usb(cd, floppy, portable hard drive, blu ray...) read and write based on vs2019. File, Code, Class, anyone is ok. Development on Windows Drive Kit or just VS2019, contact on filter driver i do not know which one suitable method on me. plz Help me.....

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

      Are you wanting this "denial" to happen only while your program is running, or all the time (service, or maybe something running in ring 1 or 2)?

      "One man's wage rise is another man's price increase." - Harold Wilson

      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

      "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

      M 1 Reply Last reply
      0
      • D David Crow

        Are you wanting this "denial" to happen only while your program is running, or all the time (service, or maybe something running in ring 1 or 2)?

        "One man's wage rise is another man's price increase." - Harold Wilson

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

        M Offline
        M Offline
        Member 14872681
        wrote on last edited by
        #3

        I really really appreciated your opinion. I want to deny media device when running my program. Course of, no one should be able to kill my program. Making my program unkillable is also a problem, but I want the media devices to be inaccessible when my program is running. I would wait your answer once again.

        D 1 Reply Last reply
        0
        • M Member 14872681

          I really really appreciated your opinion. I want to deny media device when running my program. Course of, no one should be able to kill my program. Making my program unkillable is also a problem, but I want the media devices to be inaccessible when my program is running. I would wait your answer once again.

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          There's already policies in place that take care of that. You don't have to write a single line of code. Google for "group policy disable usb write".

          Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
          Dave Kreskowiak

          M 1 Reply Last reply
          0
          • D Dave Kreskowiak

            There's already policies in place that take care of that. You don't have to write a single line of code. Google for "group policy disable usb write".

            Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
            Dave Kreskowiak

            M Offline
            M Offline
            Member 14872681
            wrote on last edited by
            #5

            Thank you for answer. However, I think that way, if I log in as an administrator, it's all through. I have to program to prevent all situations. Please tell me, if you have any other opinion. Thank you.

            D 1 Reply Last reply
            0
            • M Member 14872681

              Thank you for answer. However, I think that way, if I log in as an administrator, it's all through. I have to program to prevent all situations. Please tell me, if you have any other opinion. Thank you.

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              If you log in as admin, no it isn't all through. It's a machine policy. As an admin, if you write your app as a service, I can just kill the process. The ONLY way you're going to do this with code is writing a device driver you inject into the USB chain. Do not ask me how to do that. I have no idea.

              Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
              Dave Kreskowiak

              M 1 Reply Last reply
              0
              • D Dave Kreskowiak

                If you log in as admin, no it isn't all through. It's a machine policy. As an admin, if you write your app as a service, I can just kill the process. The ONLY way you're going to do this with code is writing a device driver you inject into the USB chain. Do not ask me how to do that. I have no idea.

                Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
                Dave Kreskowiak

                M Offline
                M Offline
                Member 14872681
                wrote on last edited by
                #7

                It was a big hint to me. I don't know if I can.... Thank you.

                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