I am looking for some kind help regarding below query.
I am trying to write(using WriteFile()) to a windows disk partition from WIN PE environment by opening a disk handle and seeking to the partition starting offset. WriteFile() is returning error code 5->ACCESS DENIED error. I believe it is because the application has not locked the volume before writing to the volume.My application has only the partition number as input.The ioctl FSCTL_LOCK_VOLUME needs a volume handle which is returned by CreateFile() and this needs a volume GUID as path. So how to get volume GUID from partition number in case of MBR. I know in case of GPT, it can directly be got from the partition table.
Regards.
Aucun commentaire:
Enregistrer un commentaire