Festplattenaktivität ermitteln
-
Ich habe eine USB-Steckdosenleiste, mit der ich meine am Rechner befindlichen Festplatten ein- und ausschalten kann. Nun möchte ich ein Programm schreiben, dass die Festplatten automatisch ausschaltet, wenn eine bestimmte Zeit nicht mehr zugegriffen wurde. Gibt es in der Windows API eine Möglichkeit, den letzten Festplattenzugriff eines Laufwerks zu ermitteln ?
Vielen Dank für Ideen ...
-
Das einzige, was mir dazu einfällt, ist, dass es definitiv so etwas geben muss. Es gibt da so ein Programm, FileMonitor, das zeigt jeden Festplatten-Zugriff an. Vielleicht gibts auf deren HP irgendwelche Infos oder du schreibst der HP mal ne Mail oder so. Ich werd auch mal ein bisschen rumschnüffeln, ist ne interessante Frage

EDIT: Mit .NET gehts auf jeden Fall, siehe FileSystemWatcher
-
Hi,
Schaut euch mal hier um:
Performance Monitoring (MSDN)
A Desktop Performance Monitor (Codeproject)
-
Hab auch noch was gefunden, ist ne Win-API-Funktion:
FindFirstChangeNotification
-
How FileMon Works
For the Windows 9x driver, the heart of FileMon is in the virtual device driver, Filevxd.vxd. It is dynamically loaded, and in its initialization it installs a file system filter via the VxD service, IFSMGR_InstallFileSystemApiHook, to insert itself onto the call chain of all file system requests. On Windows NT the heart of FileMon is a file system driver that creates and attaches filter device objects to target file system device objects so that FileMon will see all IRPs and FastIO requests directed at drives. When FileMon sees an open, create or close call, it updates an internal hash table that serves as the mapping between internal file handles and file path names. Whenever it sees calls that are handle based, it looks up the handle in the hash table to obtain the full name for display. If a handle-based access references a file opened before FileMon started, FileMon will fail to find the mapping in its hash table and will simply present the handle's value instead.