I have not tried this myself, but you can try CeGetVolumeInfo and check the value of dwBlockSize. It looks like it could be cluster size.
If this does not work, it becomes a little more attractive.
Memory cards are usually formatted in FAT format .
You need to access the low-level procedures in CE to read at disk level and read the FAT BPB, which determines the type of FAT and cluster size.
Use the Storage Manager FindFirstStore / FindNextStore functions to find the memory card that you are using. Then open the memory card using the CreateFile API.
HANDLE hDisk (CreateFile (storeInfo.szDeviceName, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_WRITE | FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL));
Then you need to read the FAT BPB, which is in the first sector for super disks (which will be the usual thing for devices with a memory card) or in MBR format.
SG_REQ req; DWORD cb; req.sr_start = 0; req.sr_num_sec = 1; req.sr_num_sg = 1; req.sr_status = 0; req.sr_callback = 0; req.sr_sglist[0].sb_buf = sectorBuffer; req.sr_sglist[0].sb_len = storeInfo.dwBytesPerSector; DeviceIoControl(hDisk, DISK_IOCTL_READ, &req, sizeof(req), 0, 0, &cb, 0);
After you have BPB, you need to determine what fat format it is (FAT12 / FAT16 / FAT32), and then pull out the cluster size from it.
As you do above, C # is up to you. I see in the repository manager reference that it can go to the partition level, and you can query the type of partition. This will tell you the type of FAT, so you don't need to figure it out.