[PATCH 3/3] wbemprox: Get the disk drive serial number from mountmgr.
Hans Leidekker
hans at codeweavers.com
Mon May 25 08:53:25 CDT 2020
On Thu, 2020-05-21 at 20:48 +0200, Alexandre Julliard wrote:
> Hans Leidekker <hans at codeweavers.com> writes:
>
> > Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49160
> > Signed-off-by: Hans Leidekker <hans at codeweavers.com>
> > ---
> > dlls/wbemprox/builtin.c | 40 +++++++++++++++++++++++++++++++++++--
> > dlls/wbemprox/tests/query.c | 26 ++++++++++++++++++++++++
> > 2 files changed, 64 insertions(+), 2 deletions(-)
> >
> > diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c
> > index ddd12d6ebcb..6a35737da59 100644
> > --- a/dlls/wbemprox/builtin.c
> > +++ b/dlls/wbemprox/builtin.c
> > @@ -44,6 +44,8 @@
> > #include "ntsecapi.h"
> > #include "winspool.h"
> > #include "setupapi.h"
> > +#define WINE_MOUNTMGR_EXTENSIONS
> > +#include <ddk/mountmgr.h>
>
> Couldn't this go through some Win32 APIs instead of directly accessing
> mountmgr?
I've submitted a different version that uses
IOCTL_STORAGE_QUERY_PROPERTY. While this works for drives mapped to
directories (c: -> ../drive_c) it fails for drives mapped to Unix mount
points (z: -> /) because in the latter case we try to open the
underlying Unix device, which usually returns a permission denied
error.
More information about the wine-devel
mailing list