https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6116262c747714787bf48…
commit 6116262c747714787bf481736be9c4eb9201ecea
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Wed Oct 16 22:22:30 2019 +0200
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Wed Oct 16 22:22:30 2019 +0200
[MOUNTMGR_APITEST] Dump returned mount points
---
modules/rostests/apitests/mountmgr/QueryPoints.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/modules/rostests/apitests/mountmgr/QueryPoints.c
b/modules/rostests/apitests/mountmgr/QueryPoints.c
index 169728a8d81..e0341aec7d1 100644
--- a/modules/rostests/apitests/mountmgr/QueryPoints.c
+++ b/modules/rostests/apitests/mountmgr/QueryPoints.c
@@ -7,6 +7,15 @@
#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)
{
BOOL Ret;
@@ -45,12 +54,19 @@ START_TEST(QueryPoints)
}
else
{
+ AllocatedPoints->NumberOfMountPoints = 0;
+
Ret = DeviceIoControl(MountMgrHandle, IOCTL_MOUNTMGR_QUERY_POINTS,
&SinglePoint, sizeof(MOUNTMGR_MOUNT_POINT),
AllocatedPoints, MountPoints.Size,
&BytesReturned, NULL);
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);
}