I wrote a program, several years old, which uses WriteFile to write to sector
0 on compact flash disks. As has been noted in other threads this fails
under Vista with an access denied message. (I haven't seen this change noted
in MSDN documentation.) The work around given in the threads is to write a
driver to do the write. Since this is an apparent common problem and I have
never before written a driver myself, I was hoping there might be some
example source code or hopefully an installable driver already avaialble.
Does anybody know of any?

Thanks in advance.

Re: Driver to work around WriteFile access denied issue in Vista by David

David
Fri Feb 01 17:59:33 CST 2008

Go out and buy a copy of WinHex. Try it on CF media that you have
dismounted. If that works, then it can be done from user mode. By sector
zero do you really mean sector zero? Or sector zero of the volume mounted?
They are not the same. One is the MBR (Master Boot Record) and the second
is the PBR (Partition Boot Record) a.k.a. DOS Boot Record. Make sure you
run WinHex in elevated status since a normal user should not be able to
write directly to sectors in a mounted volume.

"RFlaugher" <RFlaugher@discussions.microsoft.com> wrote in message
news:C09F257B-AB1C-4FE4-A2EE-3C76D03A0B28@microsoft.com...
>I wrote a program, several years old, which uses WriteFile to write to
>sector
> 0 on compact flash disks. As has been noted in other threads this fails
> under Vista with an access denied message. (I haven't seen this change
> noted
> in MSDN documentation.) The work around given in the threads is to write
> a
> driver to do the write. Since this is an apparent common problem and I
> have
> never before written a driver myself, I was hoping there might be some
> example source code or hopefully an installable driver already avaialble.
> Does anybody know of any?
>
> Thanks in advance.



Re: Driver to work around WriteFile access denied issue in Vista by Eugene

Eugene
Sat Feb 02 01:32:42 CST 2008

Hello!
You wrote on Fri, 1 Feb 2008 14:11:18 -0800:

R> I wrote a program, several years old, which uses WriteFile to write to
R> sector 0 on compact flash disks. As has been noted in other threads
R> this fails under Vista with an access denied message. (I haven't seen
R> this change noted in MSDN documentation.) The work around given in the
R> threads is to write a driver to do the write. Since this is an apparent
R> common problem and I have never before written a driver myself, I was
R> hoping there might be some example source code or hopefully an
R> installable driver already avaialble. Does anybody know of any?

RawDisk on http://www.eldos.com/rawdisk/

With best regards,
Eugene Mayevski
http://www.SecureBlackbox.com - the comprehensive component suite for
network security


Re: Driver to work around WriteFile access denied issue in Vista by Don

Don
Sat Feb 02 07:47:47 CST 2008

But before doing that check out Davids suggestion. Also realize that with
Vista some parts of the disk are accessible in the SYSTEM account but not
the Administrator account unlike previous systems where the actions were the
same.

--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply



"Eugene Mayevski" <mayevski@eldos.com> wrote in message
news:OEiuN3WZIHA.220@TK2MSFTNGP04.phx.gbl...
> Hello!
> You wrote on Fri, 1 Feb 2008 14:11:18 -0800:
>
> R> I wrote a program, several years old, which uses WriteFile to write to
> R> sector 0 on compact flash disks. As has been noted in other threads
> R> this fails under Vista with an access denied message. (I haven't seen
> R> this change noted in MSDN documentation.) The work around given in the
> R> threads is to write a driver to do the write. Since this is an
> apparent
> R> common problem and I have never before written a driver myself, I was
> R> hoping there might be some example source code or hopefully an
> R> installable driver already avaialble. Does anybody know of any?
>
> RawDisk on http://www.eldos.com/rawdisk/
>
> With best regards,
> Eugene Mayevski
> http://www.SecureBlackbox.com - the comprehensive component suite for
> network security