RE: Write protection or hiding specific partion
- From: trick14 <trick14@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 5 Sep 2008 00:19:01 -0700
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.
- Follow-Ups:
- Re: Write protection or hiding specific partion
- From: Michel Verhagen (eMVP)
- Re: Write protection or hiding specific partion
- References:
- Write protection or hiding specific partion
- From: trick14
- Write protection or hiding specific partion
- Prev by Date: Write protection or hiding specific partion
- Next by Date: Re: Problem in adding .NET CF 3.5 to CE 5.0
- Previous by thread: Write protection or hiding specific partion
- Next by thread: Re: Write protection or hiding specific partion
- Index(es):
Relevant Pages
|