Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

File System Filter : encrypt a folder.

198 views
Skip to first unread message

Antoine

unread,
Mar 15, 2006, 11:16:01 AM3/15/06
to
Hi,

After a small pause, I'm back to the project explain earlier. ("Can I
have your advice on a problematic" posted on
microsoft.public.windowsce.platbuilder)

I've clarified the problem.
I must create a filter which will be register on
HKEY_LOCAL_MACHINE\System\StorageManager\Filters.

I've deployed the sample "encfilt" on my ppc, and I've discovered that
the function FILTER_CreateFileW was called when I create a file... but
only when it's on a storage card!!!

But I've registered it on:
HKEY_LOCAL_MACHINE\System\StorageManager\Filters

And I read on the msdn:
> If there is a file system filter in
HKEY_LOCAL_MACHINE\System\StorageManager\Filters, then all file systems
get the filter.

If someone can explain me, it will be really great
--
Antoine BELSOEUR
Ingénieur R&D
Everbee Networks
41, boulevard des Capucines
75002 Paris
Tel: +33 1 44 55 01 55
Fax: +33 1 44 55 01 50
Email: abel...@everbee.com
Web: http://www.everbee.com

Anthony Pellerin

unread,
Mar 15, 2006, 11:56:10 AM3/15/06
to
Filters only works for external storage, not for RAM filesystem files.

HTH

--
--
--
----------------------------------------------------------------
Anthony Pellerin
ADENEO (ADESET)
Windows Embedded Consultant
<apellerin AT adeneo DOT adetelgroup DOT com>
http://www.adeneo.adetelgroup.com
Tél : +33 (0)4.72.18.57.77
Fax : +33 (0)4.72.18.57.78
----------------------------------------------------------------
"Antoine" <abel...@everbee.com> a écrit dans le message de news:
dv9ej2$1c27$1...@biggoron.nerim.net...

Antoine

unread,
Mar 15, 2006, 12:06:07 PM3/15/06
to
Are you sure of that?

So, for you, a file system filter can not be the solution for encrypt a
predefined folder in the pocket pc?

Anthony Pellerin a écrit :


> Filters only works for external storage, not for RAM filesystem files.
>
> HTH
>

--

Steve Maillet (eMVP)

unread,
Mar 15, 2006, 1:17:58 PM3/15/06
to
Anthony is correct. File System filters can only be applied to file systems
loaded from the storage manager as a File system driver the internal object
store RAM file system is implemented internally in filesys.exe and cannot be
filtered in that manner.

--
Steve Maillet
EmbeddedFusion
www.EmbeddedFusion.com
smaillet at EmbeddedFusion dot com


Antoine

unread,
Mar 16, 2006, 3:46:01 AM3/16/06
to
So, if I understand well, I must develop my own File System DRIVER for
cipher and decipher a predefine folder directly on the pocket pc. A File
System FILTER can just do that on external storage (like a storage card).

I'm right?

Steve Maillet (eMVP) a écrit :


> Anthony is correct. File System filters can only be applied to file systems
> loaded from the storage manager as a File system driver the internal object
> store RAM file system is implemented internally in filesys.exe and cannot be
> filtered in that manner.
>

--

Antoine

unread,
Mar 16, 2006, 5:28:50 AM3/16/06
to
An other forum has confirmed me.

I must developed a FSD!

So, is there someone who knows where I can find some samples to guide me
for this work?


Thanks

Antoine a écrit :

Anthony Pellerin

unread,
Mar 16, 2006, 6:12:21 AM3/16/06
to
You can have a look at the RAMDISK driver
(\WINCE500\PUBLIC\COMMON\OAK\DRIVERS\BLOCK\RAMDISK\). This should help you.

HTH

--
--
--
----------------------------------------------------------------
Anthony Pellerin
ADENEO (ADESET)
Windows Embedded Consultant
<apellerin AT adeneo DOT adetelgroup DOT com>
http://www.adeneo.adetelgroup.com
Tél : +33 (0)4.72.18.57.77
Fax : +33 (0)4.72.18.57.78
----------------------------------------------------------------
"Antoine" <abel...@everbee.com> a écrit dans le message de news:

dvbek0$22i3$1...@biggoron.nerim.net...

Antoine

unread,
Mar 16, 2006, 8:38:21 AM3/16/06
to
Thanks for all.

I will watch it.

Anthony Pellerin a écrit :


> You can have a look at the RAMDISK driver
> (\WINCE500\PUBLIC\COMMON\OAK\DRIVERS\BLOCK\RAMDISK\). This should help you.
>
> HTH
>

--

Steve Maillet (eMVP)

unread,
Mar 16, 2006, 12:31:01 PM3/16/06
to
An FSD still can't touch what is in the RAM object sore. You can, as Anthony
points out, use RAMDISK to create a RAM based disk driver and use the normal
FAT FSD which you CAN put a filter onto. Such that all files in
"\mysecureramdisk" are all encrypted. (If you wanted to get fancy you could
compress them too!)

I'll be doing a session at MEDC2006 (www.medc2006.com) that covers
FileSystems and Filters.

Antoine

unread,
Mar 17, 2006, 3:56:15 AM3/17/06
to
Thank you, Steve and Anthony, for all your help. Your advices really
guide me.

This last solution is really good, and seem to be simpler than develop a
FSD (especially if a fsd doesn't resolve my problem!).

Now, it's me to play.

Steve Maillet (eMVP) a écrit :

> An FSD still can't touch what is in the RAM object sore. You can, as Anthony
> points out, use RAMDISK to create a RAM based disk driver and use the normal
> FAT FSD which you CAN put a filter onto. Such that all files in
> "\mysecureramdisk" are all encrypted. (If you wanted to get fancy you could
> compress them too!)
>
> I'll be doing a session at MEDC2006 (www.medc2006.com) that covers
> FileSystems and Filters.
>

--

Antoine

unread,
Mar 23, 2006, 5:50:46 AM3/23/06
to
Hi,

I've adopted the solution that you proposed last time.

I've finished the first step consisting to develop my fsd filter. This
filter works as wanted.

Now, I must compile the RAMDISK sample.
But it would be too simple if that compiled with the first test.

I work under Visual studio 2005. I've created a new project, have added
the file, have modified project setting (I have added the file .def).
But I've this message:
> 1>.\TestRamDisk.cpp(72) : error C2731: 'DllMain' : function cannot be overloaded
> 1> .\TestRamDisk.cpp(71) : see declaration of 'DllMain'
> 1>.\TestRamDisk.cpp(311) : error C3861: 'PSLGetCallerTrust': identifier not found
> 1>.\TestRamDisk.cpp(321) : error C2065: 'FILE_DEVICE_DISK' : undeclared identifier
> 1>.\TestRamDisk.cpp(321) : error C2065: 'METHOD_BUFFERED' : undeclared identifier
> 1>.\TestRamDisk.cpp(321) : error C2065: 'FILE_READ_ACCESS' : undeclared identifier
> 1>.\TestRamDisk.cpp(321) : error C3861: 'CTL_CODE': identifier not found
> 1>.\TestRamDisk.cpp(321) : error C2051: case expression not constant
> 1>.\TestRamDisk.cpp(323) : error C2065: 'FILE_WRITE_ACCESS' : undeclared identifier
> 1>.\TestRamDisk.cpp(323) : error C3861: 'CTL_CODE': identifier not found
> 1>.\TestRamDisk.cpp(323) : error C2051: case expression not constant
> 1>.\TestRamDisk.cpp(332) : error C2065: 'FILE_ANY_ACCESS' : undeclared identifier
> 1>.\TestRamDisk.cpp(332) : error C3861: 'CTL_CODE': identifier not found
> 1>.\TestRamDisk.cpp(332) : error C2051: case expression not constant
> 1>.\TestRamDisk.cpp(339) : error C3861: 'CTL_CODE': identifier not found
> 1>.\TestRamDisk.cpp(339) : error C2051: case expression not constant
> 1>.\TestRamDisk.cpp(349) : error C3861: 'CTL_CODE': identifier not found
> 1>.\TestRamDisk.cpp(349) : error C2051: case expression not constant
> 1>.\TestRamDisk.cpp(358) : error C3861: 'CTL_CODE': identifier not found
> 1>.\TestRamDisk.cpp(358) : error C2051: case expression not constant
> 1>.\TestRamDisk.cpp(365) : error C3861: 'CTL_CODE': identifier not found
> 1>.\TestRamDisk.cpp(365) : error C2051: case expression not constant
> 1>.\TestRamDisk.cpp(373) : error C3861: 'CTL_CODE': identifier not found
> 1>.\TestRamDisk.cpp(373) : error C2051: case expression not constant
> 1>.\TestRamDisk.cpp(387) : error C3861: 'CTL_CODE': identifier not found
> 1>.\TestRamDisk.cpp(387) : error C2051: case expression not constant
> 1>.\TestRamDisk.cpp(389) : error C3861: 'CTL_CODE': identifier not found
> 1>.\TestRamDisk.cpp(389) : error C2051: case expression not constant
> 1>.\TestRamDisk.cpp(403) : error C3861: 'CTL_CODE': identifier not found
> 1>.\TestRamDisk.cpp(403) : error C2051: case expression not constant
> 1>.\TestRamDisk.cpp(404) : error C3861: 'CTL_CODE': identifier not found
> 1>.\TestRamDisk.cpp(408) : error C3861: 'CTL_CODE': identifier not found
> 1>.\TestRamDisk.cpp(408) : error C2051: case expression not constant
> 1>.\TestRamDisk.cpp(416) : error C3861: 'CTL_CODE': identifier not found
> 1>.\TestRamDisk.cpp(416) : error C2051: case expression not constant
> 1>.\TestRamDisk.cpp(420) : error C3861: 'CTL_CODE': identifier not found
> 1>.\TestRamDisk.cpp(420) : error C2051: case expression not constant
> 1>.\TestRamDisk.cpp(424) : error C3861: 'CTL_CODE': identifier not found
> 1>.\TestRamDisk.cpp(424) : error C2051: case expression not constant

If someone can help me?

Andy

unread,
Mar 23, 2006, 11:10:56 AM3/23/06
to
I just compiled this up on EVC4 a few days ago. I needed to add
includes for windev.h and pkfuncs.h aswell. Appreciate its a different
compiler but should get rid of your undeclared identifiers on VS2005

Andy

Andy

unread,
Mar 23, 2006, 11:11:19 AM3/23/06
to
I just compiled this up on EVC4 a few days ago. I needed to add
includes for windev.h and pkfuncs.h aswell. Appreciate its a different
compiler but should get rid of your undeclared identifiers on VS2005

Andy

Antoine

unread,
Mar 23, 2006, 11:34:34 AM3/23/06
to
Thanks for your help, but when I try, I've this message:

Deleting intermediate files and output files for project 'testramdisk -
Win32 (WCE ARMV4) Debug'.
--------------------Configuration: testramdisk - Win32 (WCE ARMV4)
Debug--------------------
Compiling...
system.c
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\system.c(304) : warning C4013:
'PSLGetCallerTrust' undefined; assuming extern returning int
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\system.c(314) : warning C4013: 'CTL_CODE'
undefined; assuming extern returning int
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\system.c(314) : error C2065:
'FILE_DEVICE_DISK' : undeclared identifier
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\system.c(314) : error C2065:
'METHOD_BUFFERED' : undeclared identifier
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\system.c(314) : error C2065:
'FILE_READ_ACCESS' : undeclared identifier
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\system.c(314) : error C2051: case
expression not constant
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\system.c(316) : error C2065:
'FILE_WRITE_ACCESS' : undeclared identifier
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\system.c(316) : error C2051: case
expression not constant
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\system.c(325) : error C2065:
'FILE_ANY_ACCESS' : undeclared identifier
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\system.c(325) : error C2051: case
expression not constant
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\system.c(332) : error C2051: case
expression not constant
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\system.c(342) : error C2051: case
expression not constant
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\system.c(351) : error C2051: case
expression not constant
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\system.c(358) : error C2051: case
expression not constant
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\system.c(366) : error C2051: case
expression not constant
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\system.c(380) : error C2051: case
expression not constant
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\system.c(382) : error C2051: case
expression not constant
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\system.c(396) : error C2051: case
expression not constant
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\system.c(397) : warning C4018: '==' :
signed/unsigned mismatch
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\system.c(401) : error C2051: case
expression not constant
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\system.c(409) : error C2051: case
expression not constant
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\system.c(413) : error C2051: case
expression not constant
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\system.c(417) : error C2051: case
expression not constant
diskio.c
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\diskio.c(171) : error C2065:
'STORAGE_DEVICE_FLAG_XIP' : undeclared identifier
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\diskio.c(328) : warning C4013:
'MapCallerPtr' undefined; assuming extern returning int
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\diskio.c(349) : warning C4013: 'CTL_CODE'
undefined; assuming extern returning int
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\diskio.c(349) : error C2065:
'FILE_DEVICE_DISK' : undeclared identifier
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\diskio.c(349) : error C2065:
'METHOD_BUFFERED' : undeclared identifier
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\diskio.c(349) : error C2065:
'FILE_READ_ACCESS' : undeclared identifier
c:\documents and settings\spikenet\mes documents\tests préliminaires\fsd
test\provi antoine\testramdisk\diskio.c(349) : warning C4018: '==' :
signed/unsigned mismatch
Error executing clarm.exe.

testramdisk.dll - 24 error(s), 6 warning(s)

And I've never developed any dll with embedded, so I don't know where
add the file .def

Andy a écrit :


> I just compiled this up on EVC4 a few days ago. I needed to add
> includes for windev.h and pkfuncs.h aswell. Appreciate its a different
> compiler but should get rid of your undeclared identifiers on VS2005
>
> Andy

Andy

unread,
Mar 23, 2006, 12:29:00 PM3/23/06
to
There's still something wrong with your include paths there as CTL_CODE
is defined in windev and PSLGetCallerTrust is in pkfuncs.h. You
shouldn't get those errors if the paths are ok.

Andy

Antoine

unread,
Mar 24, 2006, 9:30:01 AM3/24/06
to
Thanks for your help,

Thats was effectively an include which missed.

Antoine

unread,
Mar 24, 2006, 10:53:32 AM3/24/06
to
Hi,

I've developed my own file system filter to encrypt files.

I've used the sample "RAMDISK" to create a folder (considered like a sd
card).

Everything is ok excepted one detail: When I do a soft reset, every data
of my new folder is deleted! I believe that it's because the dll is
killed and restarted. So it destroy the folder and create an other.


How can I do to protect these data?

Steve Maillet (eMVP)

unread,
Mar 24, 2006, 12:08:25 PM3/24/06
to
It's a RAMDISK! RAM contents are lost/cleared on a reset. You need to put
the data someplace other than RAM or in a portion of RAM the system
9hardware AND BSP) guarantee will remain valid across resets.

Andy

unread,
Mar 24, 2006, 3:41:55 PM3/24/06
to
Steve,

Sort of on topic here, but I noticed at the bottom of one of your posts
in this thread that you would be doing a section on File Systems and
Filters at MEDC 2006. I was wondering if any notes from your session
would be available online after the even. Unfortunately I won't be able
to get to the event and some background on this would be really great.
Other people following this thread may find it useful too.

Andy

0 new messages