We can use the CreateFile(\\\\.\\G:) to open a physical block device in
Windows, is there a way in CE to open the physical device like that in
Windows?

Thank you very much!


Regards,
ZhangZQ

Re: How to open the physical block device in CE? by Steve

Steve
Thu Apr 28 10:19:00 CDT 2005

Just use CreateFile on the Block device (I.e. CreateFile_T("DSK1:"),...) )
(be sure to use OPEN_EXISTING)

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



Re: How to open the physical block device in CE? by Andrew

Andrew
Thu Apr 28 10:36:41 CDT 2005

The preferred method would be to use the storage manager API; this way you
can open the handle to an individual partition on the storage device or the
entire device.

// To open a handle to the ENTIRE storage device:
HANDLE hStore = OpenStore(L"DSK1:");
if (INVALID_HANDLE_VALUE == hStore) {
// fail
return 0;
}

// can now access the entire storage device using DeviceIoControl and
IOCTL_DISK_xxx control codes.

HANDLE hPartition = Open Partition(hStore, L"Part00");
if (INVALID_HANDLE_VALUE == hPartition) {
// fail
CloseHandle(hStore);
return 0;
}

// can now access partition one as a logical disk using DeviceIoControl and
IOCTL_DISK_xxx control codes

CloseHandle(hPartition);
CloseHandle(hStore);

You can also use FindFirst/NextStore and FindFirst/NextPartition APIs to
enumerate all storage devices and the partitions contained within.

--
Andrew Rogers
Microsoft Windows CE Core OS

___________________________________________________________
To reply directly, remove "online" from my email address.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Steve Maillet (eMVP)" <nospam1@EntelechyConsulting.com> wrote in message
news:ON88fWATFHA.3696@TK2MSFTNGP15.phx.gbl...
> Just use CreateFile on the Block device (I.e. CreateFile_T("DSK1:"),...) )
> (be sure to use OPEN_EXISTING)
>
> --
> Steve Maillet
> EmbeddedFusion
> www.EmbeddedFusion.com
> smaillet at EmbeddedFusion dot com
>
>



Re: How to open the physical block device in CE? by ZhangZQ

ZhangZQ
Thu Apr 28 18:25:47 CDT 2005

Andrew Rogers,

Actually, there is a CD-ROM device connected to WinCE board through USB
cable, I want the CD-ROM can play the Audio CD, then I referred some CD
ripper program and know the way to play Audio CD, read the TOC to get track
info, and go to the specified sector to get the raw PCM data.

My question is,
1. Does WinCE provide a way to play Audio CD.
2. If not, is OpenStore can work on the CD-ROM plugin-ed by USB.

Thank you very much!


Regards,
ZhangZQ



"Andrew Rogers [MSFT]" <arogers@online.microsoft.com> wrote in message
news:OO6pUgATFHA.3344@TK2MSFTNGP12.phx.gbl...
> The preferred method would be to use the storage manager API; this way you
> can open the handle to an individual partition on the storage device or
> the entire device.
>
> // To open a handle to the ENTIRE storage device:
> HANDLE hStore = OpenStore(L"DSK1:");
> if (INVALID_HANDLE_VALUE == hStore) {
> // fail
> return 0;
> }
>
> // can now access the entire storage device using DeviceIoControl and
> IOCTL_DISK_xxx control codes.
>
> HANDLE hPartition = Open Partition(hStore, L"Part00");
> if (INVALID_HANDLE_VALUE == hPartition) {
> // fail
> CloseHandle(hStore);
> return 0;
> }
>
> // can now access partition one as a logical disk using DeviceIoControl
> and IOCTL_DISK_xxx control codes
>
> CloseHandle(hPartition);
> CloseHandle(hStore);
>
> You can also use FindFirst/NextStore and FindFirst/NextPartition APIs to
> enumerate all storage devices and the partitions contained within.
>
> --
> Andrew Rogers
> Microsoft Windows CE Core OS
>
> ___________________________________________________________
> To reply directly, remove "online" from my email address.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> "Steve Maillet (eMVP)" <nospam1@EntelechyConsulting.com> wrote in message
> news:ON88fWATFHA.3696@TK2MSFTNGP15.phx.gbl...
>> Just use CreateFile on the Block device (I.e.
>> CreateFile_T("DSK1:"),...) ) (be sure to use OPEN_EXISTING)
>>
>> --
>> Steve Maillet
>> EmbeddedFusion
>> www.EmbeddedFusion.com
>> smaillet at EmbeddedFusion dot com
>>
>>
>
>



Re: How to open the physical block device in CE? by Steve

Steve
Thu Apr 28 18:35:25 CDT 2005

No, Windows CE does not provide a File system for CD audio. You can use
OpenStore() and do it directly or you can create an installable FileSystem
for it as you see fit.

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



Re: How to open the physical block device in CE? by Andrew

Andrew
Tue May 03 12:07:48 CDT 2005

The USB Mass Storage driver provided with CE does not support audio CDs. The
ATAPI driver, however, does support them and provides IOCTLs for playing,
pausing, seeking, reading toc, etc from audio CDs (see cdioctl.h in the
sdk). Since CE 4.1, the UDFS file system driver has provided simple file
navigation for audio CDs (each track appears as a file, as on the desktop).
This functionality requires audio CD support provided by the storage driver,
so it will not work with provided USB Mass Storage driver.

--
Andrew Rogers
Microsoft Windows CE Core OS

___________________________________________________________
To reply directly, remove "online" from my email address.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Steve Maillet (eMVP)" <nospam1@EntelechyConsulting.com> wrote in message
news:OP1e5rETFHA.2424@TK2MSFTNGP09.phx.gbl...
> No, Windows CE does not provide a File system for CD audio. You can use
> OpenStore() and do it directly or you can create an installable FileSystem
> for it as you see fit.
>
> --
> Steve Maillet
> EmbeddedFusion
> www.EmbeddedFusion.com
> smaillet at EmbeddedFusion dot com
>
>



Re: How to open the physical block device in CE? by ZhangZQ

ZhangZQ
Thu May 12 19:01:40 CDT 2005

Andrew Rogers,

If I can open the physical CD drive and can read the data in AudioCD sector
by sector, then it is possible to play the Audio CD, no matter to use Usb
mass storage or ATAPI driver, right?

I think the IOCTLs method to play CD is another way that make the audio
signal directly out from CD drive to sound card line-in, what I want is not
to get the audio signal but the PCM data from a CD.


Regards,
ZhangZQ


"Andrew Rogers [MSFT]" <arogers@online.microsoft.com> wrote in message
news:umNdALAUFHA.3596@TK2MSFTNGP14.phx.gbl...
> The USB Mass Storage driver provided with CE does not support audio CDs.
> The ATAPI driver, however, does support them and provides IOCTLs for
> playing, pausing, seeking, reading toc, etc from audio CDs (see cdioctl.h
> in the sdk). Since CE 4.1, the UDFS file system driver has provided simple
> file navigation for audio CDs (each track appears as a file, as on the
> desktop). This functionality requires audio CD support provided by the
> storage driver, so it will not work with provided USB Mass Storage driver.
>
> --
> Andrew Rogers
> Microsoft Windows CE Core OS
>
> ___________________________________________________________
> To reply directly, remove "online" from my email address.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> "Steve Maillet (eMVP)" <nospam1@EntelechyConsulting.com> wrote in message
> news:OP1e5rETFHA.2424@TK2MSFTNGP09.phx.gbl...
>> No, Windows CE does not provide a File system for CD audio. You can use
>> OpenStore() and do it directly or you can create an installable
>> FileSystem for it as you see fit.
>>
>> --
>> Steve Maillet
>> EmbeddedFusion
>> www.EmbeddedFusion.com
>> smaillet at EmbeddedFusion dot com
>>
>>
>
>



Re: How to open the physical block device in CE? by Andrew

Andrew
Tue May 24 16:09:22 CDT 2005

In order to read raw audio data from the CD, the storage driver must support
raw, 2340-byte sector reads. The USB Mass storage driver provided with
Windows CE does not currently provide this support-- you can only read 2048
byte data sectors, used by CDFS and UDFS, using the IOCTL_CDROM_READ_SG
ioctl. The USB Mass storage driver source code is provided with CE and so it
would be possible to modify it to support raw sector reads for audio data.

--
Andrew Rogers
Microsoft Windows CE Core OS

___________________________________________________________
To reply directly, remove "online" from my email address.
This posting is provided "AS IS" with no warranties, and confers no rights.
"ZhangZQ" <zhangzq71@gmail.com> wrote in message
news:u2K7z70VFHA.2684@TK2MSFTNGP09.phx.gbl...
> Andrew Rogers,
>
> If I can open the physical CD drive and can read the data in AudioCD
> sector by sector, then it is possible to play the Audio CD, no matter to
> use Usb mass storage or ATAPI driver, right?
>
> I think the IOCTLs method to play CD is another way that make the audio
> signal directly out from CD drive to sound card line-in, what I want is
> not to get the audio signal but the PCM data from a CD.
>
>
> Regards,
> ZhangZQ
>
>
> "Andrew Rogers [MSFT]" <arogers@online.microsoft.com> wrote in message
> news:umNdALAUFHA.3596@TK2MSFTNGP14.phx.gbl...
>> The USB Mass Storage driver provided with CE does not support audio CDs.
>> The ATAPI driver, however, does support them and provides IOCTLs for
>> playing, pausing, seeking, reading toc, etc from audio CDs (see cdioctl.h
>> in the sdk). Since CE 4.1, the UDFS file system driver has provided
>> simple file navigation for audio CDs (each track appears as a file, as on
>> the desktop). This functionality requires audio CD support provided by
>> the storage driver, so it will not work with provided USB Mass Storage
>> driver.
>>
>> --
>> Andrew Rogers
>> Microsoft Windows CE Core OS
>>
>> ___________________________________________________________
>> To reply directly, remove "online" from my email address.
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> "Steve Maillet (eMVP)" <nospam1@EntelechyConsulting.com> wrote in message
>> news:OP1e5rETFHA.2424@TK2MSFTNGP09.phx.gbl...
>>> No, Windows CE does not provide a File system for CD audio. You can use
>>> OpenStore() and do it directly or you can create an installable
>>> FileSystem for it as you see fit.
>>>
>>> --
>>> Steve Maillet
>>> EmbeddedFusion
>>> www.EmbeddedFusion.com
>>> smaillet at EmbeddedFusion dot com
>>>
>>>
>>
>>
>
>