Alexandre Julliard : mountmgr: Return the drive unique id in IOCTL_MOUNTMGR_QUERY_POINTS.
Alexandre Julliard
julliard at winehq.org
Thu Oct 16 06:07:04 CDT 2008
Module: wine
Branch: master
Commit: 7b51cf49fcb68458d8842a3295835aed46204969
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7b51cf49fcb68458d8842a3295835aed46204969
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Oct 15 20:12:49 2008 +0200
mountmgr: Return the drive unique id in IOCTL_MOUNTMGR_QUERY_POINTS.
---
dlls/mountmgr.sys/mountmgr.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/mountmgr.sys/mountmgr.c b/dlls/mountmgr.sys/mountmgr.c
index b9e96dc..e24394a 100644
--- a/dlls/mountmgr.sys/mountmgr.c
+++ b/dlls/mountmgr.sys/mountmgr.c
@@ -291,6 +291,8 @@ static NTSTATUS query_mount_points( const void *in_buff, SIZE_T insize,
if (!matching_mount_point( &mount_points[i], input )) continue;
size += get_device_name(mount_points[i].device)->Length;
size += mount_points[i].link.Length;
+ size += strlen(mount_points[i].id) + 1;
+ size = (size + sizeof(WCHAR) - 1) & ~(sizeof(WCHAR) - 1);
j++;
}
pos = FIELD_OFFSET( MOUNTMGR_MOUNT_POINTS, MountPoints[j] );
@@ -308,8 +310,6 @@ static NTSTATUS query_mount_points( const void *in_buff, SIZE_T insize,
{
if (!mount_points[i].device) continue;
if (!matching_mount_point( &mount_points[i], input )) continue;
- info->MountPoints[j].UniqueIdOffset = 0; /* FIXME */
- info->MountPoints[j].UniqueIdLength = 0;
dev_name = get_device_name( mount_points[i].device );
info->MountPoints[j].DeviceNameOffset = pos;
@@ -321,6 +321,12 @@ static NTSTATUS query_mount_points( const void *in_buff, SIZE_T insize,
info->MountPoints[j].SymbolicLinkNameLength = mount_points[i].link.Length;
memcpy( (char *)out_buff + pos, mount_points[i].link.Buffer, mount_points[i].link.Length );
pos += mount_points[i].link.Length;
+
+ info->MountPoints[j].UniqueIdOffset = pos;
+ info->MountPoints[j].UniqueIdLength = strlen(mount_points[i].id) + 1;
+ memcpy( (char *)out_buff + pos, mount_points[i].id, strlen(mount_points[i].id) + 1 );
+ pos += strlen(mount_points[i].id) + 1;
+ pos = (pos + sizeof(WCHAR) - 1) & ~(sizeof(WCHAR) - 1);
j++;
}
info->Size = pos;
More information about the wine-cvs
mailing list