title image


Smiley Re: direkter Zugriff aufs Laufwerk, habs vergessen
Hallo PovChick



ich bin mir nicht ganz sicher, obs damit funktioniert. Ich habs aus der API-Hilfe unter CreateFile:



You can use the CreateFile function to open a disk drive or a partition on a disk drive. The function returns a handle to the disk device; that handle can be used with the DeviceIOControl function. The following requirements must be met in order for such a call to succeed:



· The caller must have administrative privileges for the operation to succeed on a hard disk drive.

· The lpFileName string should be of the form \\.\PHYSICALDRIVEx to open the hard disk x. Hard disk numbers start at zero. For example:



String Meaning

\\.\PHYSICALDRIVE2 Obtains a handle to the third physical drive on the user's computer.

· The lpFileName string should be \\.\x: to open a floppy drive x or a partition x on a hard disk. For example:



String Meaning

\\.\A: Obtains a handle to drive A on the user's computer.

\\.\C: Obtains a handle to drive C on the user's computer.

Windows 95: This technique does not work for opening a logical drive. In Windows 95, specifying a string in this form causes CreateFile to return an error.



· The dwCreationDistribution parameter must have the OPEN_EXISTING value.

· When opening a floppy disk or a partition on a hard disk, you must set the FILE_SHARE_WRITE flag in the dwShareMode parameter.



geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: