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. About "SHChangeNotifyRegister"

About "SHChangeNotifyRegister"

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialc++comlinuxhelp
2 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.
  • N Offline
    N Offline
    Na_Su
    wrote on last edited by
    #1

    I'd like to ask about "SHChangeNotifyRegister". If anyone knows, please tell me. My PC environment is Windows XP SP1 and VC++ SP5 with including the latest MS SDK files. I read below three articles: http://www.codeproject.com/shell/shchangenotifyregister.asp[^] http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shchangenotifyregister.asp[^] http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shchangenotify.asp[^] The problem is the event ID "SHCNE_CREATE". For example, creating ".txt" file. When I right-click and select "New" -> "text document"("text file"?) on the desktop, "SHCNE_CREATE" can be caught. However, when I execute "Notepad.exe" and save file on the desktop, "SHCNE_CREATE" can't be caught. I appoint parameters of "SHChangeNotifyRegister" function is below: second parameter:0x0001 | 0x0002 third parameter:SHCNE_ALLEVENTS I'd like to know below two points: (1)Whether the upper problem is the specification? (2)How to catch "SHCNE_CREATE" when creating file from "save file" in menu of application.

    B 1 Reply Last reply
    0
    • N Na_Su

      I'd like to ask about "SHChangeNotifyRegister". If anyone knows, please tell me. My PC environment is Windows XP SP1 and VC++ SP5 with including the latest MS SDK files. I read below three articles: http://www.codeproject.com/shell/shchangenotifyregister.asp[^] http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shchangenotifyregister.asp[^] http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shchangenotify.asp[^] The problem is the event ID "SHCNE_CREATE". For example, creating ".txt" file. When I right-click and select "New" -> "text document"("text file"?) on the desktop, "SHCNE_CREATE" can be caught. However, when I execute "Notepad.exe" and save file on the desktop, "SHCNE_CREATE" can't be caught. I appoint parameters of "SHChangeNotifyRegister" function is below: second parameter:0x0001 | 0x0002 third parameter:SHCNE_ALLEVENTS I'd like to know below two points: (1)Whether the upper problem is the specification? (2)How to catch "SHCNE_CREATE" when creating file from "save file" in menu of application.

      B Offline
      B Offline
      Blake Miller
      wrote on last edited by
      #2

      Sometimes (actually, a lot of the time...) the application does not properly call the shell notification routines from within itself. It uses lower level IO routines which do not report activity to the shell. You might not be able to catch these types of events. If you REALLY need to monitor for a file or directory change to a specific location, use FindFirstChangeNotification.

      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