Home > other >  Under Windows usb popup button (safely remove hardware and pop-up the media) to capture events
Under Windows usb popup button (safely remove hardware and pop-up the media) to capture events

Time:01-09

When we pull out U disk, right-click on the U disk, and then on the sub menu pop up click on the "pop up" button, what should I do to get the click event? I just want to when users click on this button to end a process, the remove of the U disk,

CodePudding user response:

Now did not find very suitable very direct train of thought, but can be by capturing all the window, and then determine whether one has "pop-up USB mass storage device when a problem" window to end their process of USB footprint, but in so doing, the need to pop up USB twice, ah, I dig a hole, or have to fill myself, I hope it can help the developers behind the,

CodePudding user response:

Now did not find very suitable very direct train of thought, but can be by capturing all the window, and then determine whether one has "pop-up USB mass storage device when a problem" window to end their process of USB footprint, but in so doing, the need to pop up USB twice, ah, I dig a hole, or have to fill myself, I hope it can help the developers behind the,

CodePudding user response:

For after the u disk in the disk Createfile, use the ReadDirectoryChangesW monitor changes in the disk file,
If found to have $the Extend of heading \ file has been modified, the u disk to be pop-up or formatted, then the CloseHandle immediately, will not affect the pop-up and format,
  • Related