mirror of
https://github.com/reactos/reactos.git
synced 2025-06-20 07:36:05 +00:00
[MOUNTMGR_APITEST] Dump returned mount points
This commit is contained in:
parent
f5f52417cb
commit
6116262c74
1 changed files with 16 additions and 0 deletions
|
@ -7,6 +7,15 @@
|
||||||
|
|
||||||
#include "precomp.h"
|
#include "precomp.h"
|
||||||
|
|
||||||
|
VOID
|
||||||
|
TraceMountPoint(PMOUNTMGR_MOUNT_POINTS MountPoints,
|
||||||
|
PMOUNTMGR_MOUNT_POINT MountPoint)
|
||||||
|
{
|
||||||
|
trace("MountPoint: %p\n", MountPoint);
|
||||||
|
trace("\tSymbolicLinkName: %.*S\n", MountPoint->SymbolicLinkNameLength / sizeof(WCHAR), (PWSTR)((ULONG_PTR)MountPoints + MountPoint->SymbolicLinkNameOffset));
|
||||||
|
trace("\tDeviceName: %.*S\n", MountPoint->DeviceNameLength / sizeof(WCHAR), (PWSTR)((ULONG_PTR)MountPoints + MountPoint->DeviceNameOffset));
|
||||||
|
}
|
||||||
|
|
||||||
START_TEST(QueryPoints)
|
START_TEST(QueryPoints)
|
||||||
{
|
{
|
||||||
BOOL Ret;
|
BOOL Ret;
|
||||||
|
@ -45,12 +54,19 @@ START_TEST(QueryPoints)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
AllocatedPoints->NumberOfMountPoints = 0;
|
||||||
|
|
||||||
Ret = DeviceIoControl(MountMgrHandle, IOCTL_MOUNTMGR_QUERY_POINTS,
|
Ret = DeviceIoControl(MountMgrHandle, IOCTL_MOUNTMGR_QUERY_POINTS,
|
||||||
&SinglePoint, sizeof(MOUNTMGR_MOUNT_POINT),
|
&SinglePoint, sizeof(MOUNTMGR_MOUNT_POINT),
|
||||||
AllocatedPoints, MountPoints.Size,
|
AllocatedPoints, MountPoints.Size,
|
||||||
&BytesReturned, NULL);
|
&BytesReturned, NULL);
|
||||||
ok(Ret == TRUE, "IOCTL unexpectedly failed %lx\n", GetLastError());
|
ok(Ret == TRUE, "IOCTL unexpectedly failed %lx\n", GetLastError());
|
||||||
|
|
||||||
|
for (i = 0; i < AllocatedPoints->NumberOfMountPoints; ++i)
|
||||||
|
{
|
||||||
|
TraceMountPoint(AllocatedPoints, &AllocatedPoints->MountPoints[i]);
|
||||||
|
}
|
||||||
|
|
||||||
RtlFreeHeap(RtlGetProcessHeap(), 0, AllocatedPoints);
|
RtlFreeHeap(RtlGetProcessHeap(), 0, AllocatedPoints);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue