With the appended program you can list all Windows CE Storage Devices ("Stores") and their partitions.
Regards,
H. Keller
With the appended program you can list all Windows CE Storage Devices ("Stores") and their partitions.
Regards,
H. Keller
Nice...is there also a possibility to read the user provided device name of an USB stick ?
I think the user device name is stored as a file name in the root directory of the device, usually with some special attributes appended, marking this entry as device volume. You may find this name by searching the root directory with FindFirstFileEx() giving the appropriate attributes.
Regards,
H. Keller
Thanks...is this file somehow visible to the explorer or command shell ? I tried several functions/options, but did not manage to retrieve the volume name
I found for WCE5.0 there is a function CeGetStoreInformation, but unfortunately it is neither available with WCE4.2 nor implemented at the NetDCU8.
What about the IOCTL_DISK_GET_STORAGEID ? Is it available for NetDCU8 and NetDCU6 ?
(what we are looking for is a simple way to protect files on an USB stick from being copied around and installed uncontrolledly, i.e. our update program should compare the stick identification with a file which contains the original one)
Just to be curious: when the example at the beginning of this thread is run, it displays no less than five (!) different names:
For each store (taken from struct STOREINFO
1. The DeviceName
2. The StoreName
For each partition on the store (taken from struct PARTINFO)
3. The PartitionName
4. The FilesysName
5. The VolumeName
Do you say that none of them is the name of the USB memory stick as seen in the explorer on a standard Windows Desktop system? Then I must say I'm really out of ideas.
Regards,
H. Keller
I named the stick "test" on my XP PC...cestorenames.exe reads the following (on a NetDCU8):
QuoteDisplay MoreStore 1:
DeviceName: DSK1:
StoreName: USB Hard Disk Drive
BytesPerSector: 512
Partition 0:
PartitionName: Part00
FilesysName: fatfsd.dll
VolumeName: \Hard Disk
NumSectors: 243711 -> 119MB
PartType: 0x0b: PART_DOS32 (FAT32)