Hans Leidekker <hans(a)codeweavers.com> writes:
+ for (i = 0; i < output->NumberOfMountPoints; i++) + { + if (output->MountPoints[i].DeviceNameOffset) + { + const WCHAR *device = (const WCHAR *)((const char *)output + output->MountPoints[i].DeviceNameOffset); + UINT device_len = output->MountPoints[i].DeviceNameLength / sizeof(WCHAR); + int drive = map_dos_device( device, device_len ); + + if (drive != -1) + { + len += 4; + if (volumepathname && len < buflen) + { + path[0] = 'A' + drive; + path[1] = ':'; + path[2] = '\\'; + path[3] = 0; + path += 4; + } + } + }
This won't allow you to support GUID volume names. I think you should query all mount points that match the device, not just the DOS drives. Either way you should use MOUNTMGR_QUERY_POINTS instead of trying every drive one by one. -- Alexandre Julliard julliard(a)winehq.org