Thanks,
Edit:
WNetAddConnection2A works very well (in most circumstances). But an additional dll is needed (mpr.dll).
Till now I tried to avoid additional dependencies as much as possible.
But maybe I should reconsider my methods if I really try to increase usability of zDInfo.
As suggested elsewhere by Wonko, outsourcing the mount/unmount/label functions as a separate tool should be kept in mind.
Anyway, I'm still much interested on feedback about the output values for the current version of zDInfo.
Erwan, I compared the drive SerialNr of CloneDisk with zDInfo.
The code I use additionally gets the DeviceInstanceID/DeviceInstancePath of USB Devices
(as seen in Properties-->Details-->DropDownBox: DeviceInstancePath;
example: SCSI\DISK&VEN_SAMSUNG&PROD_SSD_840_EVO_250G\4&15AD2E1C&0&000000).
I discovered that CloneDisk (v2.3.3) misses the last character/digit of the SerialNr for any kind of USB/Removable devices.
Any kind of a byte offset and/or length issue? But maybe this values go wrong for zDInfo instead for CloneDisk (or for both?).
Here're some examples:
USB3.0 harddisk connected:
DevInstID: USBSTOR\DISK&VEN_ST1000LM&PROD_024_HN-M101MBB&REV_2AR1\PROLIFICMP0000000D5&0
CloneDisk: RPLOFICIPM000000D
zDInfo: RPLOFICIPM000000D05
Four slot "combo" SD card reader: One micro SD-Card inserted
DevInstID: USBSTOR\DISK&VEN_GENERIC-&PROD_SD/MMC&REV_1.00\20060413092100000&2
CloneDisk: 0260403190120000
zDInfo: 02604031901200000
Just for notification - you may want to have a look at this.?
BTW,
I found new issues regarding the flags used by DefineDosDevice. My latest post has been updated.