I wrote a test application to enumerates all EDB volumes on my WM6.1 devices. Here is the code piece:
CEGUID guid; CREATE_INVALIDGUID(&guid); while (CeEnumDBVolumes(&guid, wszName, 255)) if (GetLastError != ERROR_NO_MORE_ITEMS) |
According the MSDN, the size of wszName should be enough to CEDB_MAXDBASENAMELEN. But actually I got ERROR_INSUFFICIENT_BUFFER error when using that size.
After increase the size to 255, the enumeration finish normally, and here is the output in my device.
VOL: \Documents and Settings\default.vol |
It’s more than I expected….
And notice the first one, the length is absolutely larger then CEDB_MAXDBASENAMELEN (32), that means the reference guide of CeEnumDBVolumes() was wrong.
Back to the list I got, there are more than that when I searching the *.vol files on root file system. Cause CeEnumDBVolumes() only list the mounted database volumes.
And of course, the volumes listed has been locked after my mobile device boot up, there is a long road for me to understand how to release them for backup/restore purpose.
沒有留言:
張貼留言