RE: Write protection or hiding specific partion

Tech-Archive recommends: Speed Up your PC by fixing your registry



I've tried as below.
-------------------------------------------------------------------
#include <storemgr.h>
HANDLE HStore;
HANDLE HPartition;

HStore = OpenStore(L"DSK1:");
if(HStore == INVALID_HANDLE_VALUE){ return 0;}

HPartition = OpenPartition(HStore, L"Part00");
if(HPartition == INVALID_HANDLE_VALUE){ return 0; }
if(SetPartitionAttributes(HPartition, PARTITION_ATTRIBUTE_READONLY) == FALSE)
{ return 0; }

MessageBox(NULL, TEXT("Done"), TEXT("Done"), MB_OK);

-------------------------------------------------------------------
I could see the Done Message box.
However I still can write on the disk. I confirmed the name of store and
partition.

What's wrong with this?

"trick14" wrote:

I'm using CE 5.0 and now I'm trying to hide a partition or set wrtie
protection to the partiton or a whole disk.

Is there any way to do it?

I don't mean to mount/unmout the disk, I just want to hide or set write
protection to the disk.

.



Relevant Pages

  • Re: Linux community software-update-anarchy polemic
    ... Remember, I'm just a monkey. ... That implies that if you have one disk per partition, ... Trust the kernel or don't trust the kernel, but either way, both ...
    (comp.os.linux.misc)
  • SUMMARY: Moving /usr From Under Root "/" To Its Own Partition
    ... One of the reasons for doing this is to end up with a smaller root ... Install the boot block and boot off the new drive. ... " In order for the root partition to be fscked and remounted ... D> temporarily on the existing disk. ...
    (SunManagers)
  • Re: Two "expert" issues I must solve before upgading
    ... I think backups are different than the other fluff you suggest - more ... out there who had a disk crash and had to start from scratch. ... >image of your current Windows 98 OS partition. ... you can restore the disk image and get back quickly ...
    (microsoft.public.windowsxp.newusers)
  • Re: Write protection or hiding specific partion
    ... File system fileter can really help for the write protection. ... it support the partition hiding? ... However I still can write on the disk. ...
    (microsoft.public.windowsce.embedded)
  • Re: Found the chkdsk log [STOP error, data unviewable etc...]
    ... The type of the file system is NTFS. ... CHKDSK is recovering lost files. ... 33013543 KB total disk space. ... partition, etc. Oh well... ...
    (microsoft.public.win2000.file_system)