|
From: zack on 23 Jul 2008 11:13 Hi i have done program that read and write from USB and SD card the all image include the FAT and MBR,Now at the end i want to close the Disk for Write, to move the disk to be WRITE PROTECTED. I am working with vista SP1 and with visual studio and with MFC application. After i write new image to the SD CARD, I would like to Enable Write protect that the SD willn't be available for Writing/Copy files ? i have tried to do that with IOCTL_DISK_SET_DRIVE_LAYOUT_EX and to change: pBuf->PartitionEntry->RewritePartition = FALSE; the code is working but i can still write to the SD Card. first i would like to know if this is the correct way to do that ? any other way to write protect the SD CARD?
From: Zack on 24 Jul 2008 07:20 I believe i have found the define i want to use inorder to write protect the flash: MEDIA_WRITE_PROTECTED But i don't see any function of set i can use to set the Flash to be write protected? Any one knows function for setting the write protected ? "zack" <zack(a)discussions.microsoft.com> wrote in message news:2CBC12EC-1BB6-41F2-AA21-F0879471A33D(a)microsoft.com... > Hi > i have done program that read and write from USB and SD card the all image > include the FAT and MBR,Now at the end i want to close the Disk for Write, > to > move the disk to be WRITE PROTECTED. > I am working with vista SP1 and with visual studio and with MFC > application. > After i write new image to the SD CARD, I would like to Enable Write > protect > that the SD willn't be available for Writing/Copy files ? > i have tried to do that with IOCTL_DISK_SET_DRIVE_LAYOUT_EX and to change: > pBuf->PartitionEntry->RewritePartition = FALSE; > the code is working but i can still write to the SD Card. > first i would like to know if this is the correct way to do that ? > any other way to write protect the SD CARD?
|
Pages: 1 Prev: File Sharing Broken Next: symbols, windbg and crashdump analysis |