Index: trunk/src/VBox/Additions/WINNT/SharedFolders/testcase/deletefile-1.cpp
===================================================================
--- trunk/src/VBox/Additions/WINNT/SharedFolders/testcase/deletefile-1.cpp	(revision 78610)
+++ trunk/src/VBox/Additions/WINNT/SharedFolders/testcase/deletefile-1.cpp	(revision 78610)
@@ -0,0 +1,33 @@
+/* $Id$ */
+/** @file
+ * VirtualBox Windows Guest Shared Folders FSD - Simple Testcase.
+ */
+
+/*
+ * Copyright (C) 2019 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+#include <windows.h>
+#include <stdio.h>
+
+int main(int argc, char **argv)
+{
+    for (int i = 1; i < argc; i++)
+    {
+        SetLastError(0);
+        if (DeleteFileA(argv[i]))
+            printf("%s: deleted\n", argv[i]);
+        else
+            fprintf(stderr, "%s: DeleteFileA failed: %u\n", argv[i], GetLastError());
+    }
+    return 0;
+}
+
Index: trunk/src/VBox/Additions/WINNT/SharedFolders/testcase/eof-1.cpp
===================================================================
--- trunk/src/VBox/Additions/WINNT/SharedFolders/testcase/eof-1.cpp	(revision 78610)
+++ trunk/src/VBox/Additions/WINNT/SharedFolders/testcase/eof-1.cpp	(revision 78610)
@@ -0,0 +1,60 @@
+/* $Id$ */
+/** @file
+ * VirtualBox Windows Guest Shared Folders FSD - Simple Testcase.
+ */
+
+/*
+ * Copyright (C) 2019 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+#include <iprt/nt/nt-and-windows.h>
+#include <stdio.h>
+
+int main(int argc, char **argv)
+{
+    for (int i = 1; i < argc; i++)
+    {
+        HANDLE hFile = CreateFileA(argv[i], GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
+                                   NULL /*pSecAttr*/, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+        if (hFile != INVALID_HANDLE_VALUE)
+        {
+#if 1
+            DWORD cbFileHi = 0;
+            DWORD cbFileLo = GetFileSize(hFile, &cbFileHi);
+            LONG offFileHi = cbFileHi;
+            if (SetFilePointer(hFile, cbFileLo + 1, &offFileHi, FILE_BEGIN) == INVALID_SET_FILE_POINTER)
+                fprintf(stderr, "%s: error: %s: SetFilePointer() -> %u\n", argv[0], argv[i], GetLastError());
+#else
+            //if (SetFilePointer(hFile, 0, &offWhateverHi, FILE_END) == INVALID_SET_FILE_POINTER)
+            //    fprintf(stderr, "%s: error: %s: SetFilePointer() -> %u\n", argv[0], argv[i], GetLastError());
+#endif
+
+
+            uint8_t         abBuf[64];
+            IO_STATUS_BLOCK const IosVirgin = RTNT_IO_STATUS_BLOCK_INITIALIZER;
+            IO_STATUS_BLOCK Ios  = RTNT_IO_STATUS_BLOCK_INITIALIZER;
+            NTSTATUS        rcNt = NtReadFile(hFile, NULL /*hEvent*/, NULL /*ApcRoutine*/, NULL /*ApcContext*/,
+                                              &Ios, abBuf, (ULONG)sizeof(abBuf), NULL /*poffFile*/, NULL /*Key*/);
+            Sleep(2);
+            if (rcNt == STATUS_END_OF_FILE && Ios.Status == IosVirgin.Status && Ios.Information == IosVirgin.Information)
+                fprintf(stderr, "%s: info: %s: PASSED\n", argv[0], argv[i]);
+            else
+                fprintf(stderr, "%s: info: %s: FAILED - rcNt=%#x (expected %#x) Ios.Status=%#x (expected %#x [untouched]), Info=%p (expected %p)\n",
+                        argv[0], argv[i], rcNt, STATUS_END_OF_FILE, Ios.Status, IosVirgin.Status, Ios.Information, IosVirgin.Information);
+
+            CloseHandle(hFile);
+        }
+        else
+            fprintf(stderr, "%s: error: %s: CreateFileA() -> %u\n", argv[0], argv[i], GetLastError());
+    }
+    return 0;
+}
+
Index: trunk/src/VBox/Additions/WINNT/SharedFolders/testcase/queryfileinfo-1.cpp
===================================================================
--- trunk/src/VBox/Additions/WINNT/SharedFolders/testcase/queryfileinfo-1.cpp	(revision 78610)
+++ trunk/src/VBox/Additions/WINNT/SharedFolders/testcase/queryfileinfo-1.cpp	(revision 78610)
@@ -0,0 +1,172 @@
+/* $Id$ */
+/** @file
+ * VirtualBox Windows Guest Shared Folders FSD - Simple Testcase.
+ */
+
+/*
+ * Copyright (C) 2019 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+#include <iprt/nt/nt-and-windows.h>
+#include <stdio.h>
+
+static const char * const g_apszFileInfoNames[] =
+{
+    "0",
+    "FileDirectoryInformation",
+    "FileFullDirectoryInformation",
+    "FileBothDirectoryInformation",
+    "FileBasicInformation",
+    "FileStandardInformation",
+    "FileInternalInformation",
+    "FileEaInformation",
+    "FileAccessInformation",
+    "FileNameInformation",
+    "FileRenameInformation",
+    "FileLinkInformation",
+    "FileNamesInformation",
+    "FileDispositionInformation",
+    "FilePositionInformation",
+    "FileFullEaInformation",
+    "FileModeInformation",
+    "FileAlignmentInformation",
+    "FileAllInformation",
+    "FileAllocationInformation",
+    "FileEndOfFileInformation",
+    "FileAlternateNameInformation",
+    "FileStreamInformation",
+    "FilePipeInformation",
+    "FilePipeLocalInformation",
+    "FilePipeRemoteInformation",
+    "FileMailslotQueryInformation",
+    "FileMailslotSetInformation",
+    "FileCompressionInformation",
+    "FileObjectIdInformation",
+    "FileCompletionInformation",
+    "FileMoveClusterInformation",
+    "FileQuotaInformation",
+    "FileReparsePointInformation",
+    "FileNetworkOpenInformation",
+    "FileAttributeTagInformation",
+    "FileTrackingInformation",
+    "FileIdBothDirectoryInformation",
+    "FileIdFullDirectoryInformation",
+    "FileValidDataLengthInformation",
+    "FileShortNameInformation",
+    "FileIoCompletionNotificationInformation",
+    "FileIoStatusBlockRangeInformation",
+    "FileIoPriorityHintInformation",
+    "FileSfioReserveInformation",
+    "FileSfioVolumeInformation",
+    "FileHardLinkInformation",
+    "FileProcessIdsUsingFileInformation",
+    "FileNormalizedNameInformation",
+    "FileNetworkPhysicalNameInformation",
+    "FileIdGlobalTxDirectoryInformation",
+    "FileIsRemoteDeviceInformation",
+    "FileUnusedInformation",
+    "FileNumaNodeInformation",
+    "FileStandardLinkInformation",
+    "FileRemoteProtocolInformation",
+    "FileRenameInformationBypassAccessCheck",
+    "FileLinkInformationBypassAccessCheck",
+    "FileVolumeNameInformation",
+    "FileIdInformation",
+    "FileIdExtdDirectoryInformation",
+    "FileReplaceCompletionInformation",
+    "FileHardLinkFullIdInformation",
+    "FileIdExtdBothDirectoryInformation",
+    "FileDispositionInformationEx",
+    "FileRenameInformationEx",
+    "FileRenameInformationExBypassAccessCheck",
+    "FileDesiredStorageClassInformation",
+    "FileStatInformation",
+    "FileMemoryPartitionInformation",
+    "FileStatLxInformation",
+    "FileCaseSensitiveInformation",
+    "FileLinkInformationEx",
+    "FileLinkInformationExBypassAccessCheck",
+    "FileStorageReserveIdInformation",
+    "FileCaseSensitiveInformationForceAccessCheck",
+    "FileMaximumInformation",
+    "FileMaximumInformation+1",
+    "FileMaximumInformation+2",
+    "FileMaximumInformation+3",
+    "FileMaximumInformation+4",
+    "FileMaximumInformation+5",
+    "FileMaximumInformation+6",
+    "FileMaximumInformation+7",
+    "FileMaximumInformation+8",
+    "FileMaximumInformation+9",
+    "FileMaximumInformation+10",
+    "FileMaximumInformation+11",
+    "FileMaximumInformation+12",
+};
+
+static const char *GetStatusName(NTSTATUS rcNt)
+{
+    switch (rcNt)
+    {
+        case STATUS_SUCCESS:                    return " (STATUS_SUCCESS)";
+        case STATUS_INVALID_INFO_CLASS:         return " (STATUS_INVALID_INFO_CLASS)";
+        case STATUS_INVALID_PARAMETER:          return " (STATUS_INVALID_PARAMETER)";
+        case STATUS_INVALID_DEVICE_REQUEST:     return " (STATUS_INVALID_DEVICE_REQUEST)";
+        case STATUS_NO_SUCH_DEVICE:             return " (STATUS_NO_SUCH_DEVICE)";
+        case STATUS_NOT_SUPPORTED:              return " (STATUS_NOT_SUPPORTED)";
+    }
+    return "";
+}
+
+static void DoQueries(HANDLE hFile)
+{
+    union
+    {
+        uint8_t abBuf[4096];
+    } uBuf;
+
+    IO_STATUS_BLOCK const VirginIos = RTNT_IO_STATUS_BLOCK_INITIALIZER;
+    for (unsigned iClass = 0; iClass < RT_ELEMENTS(g_apszFileInfoNames); iClass++)
+    {
+        IO_STATUS_BLOCK Ios = RTNT_IO_STATUS_BLOCK_INITIALIZER;
+        NTSTATUS rcNt = NtQueryInformationFile(hFile, &Ios, &uBuf, sizeof(uBuf), (FILE_INFORMATION_CLASS)iClass);
+        printf("  %45s: rcNt=%#x%s", g_apszFileInfoNames[iClass], rcNt, GetStatusName(rcNt));
+        if (   Ios.Information == VirginIos.Information
+            && Ios.Status == VirginIos.Status)
+            printf(" Ios=<not modified>\n", Ios.Status, Ios.Information);
+        else
+            printf(" Ios.Status=%#x%s Ios.Information=%p\n", Ios.Status, GetStatusName(Ios.Status), Ios.Information);
+        if (NT_SUCCESS(rcNt))
+        {
+        }
+    }
+}
+
+
+int main(int argc, char **argv)
+{
+    for (int i = 1; i < argc; i++)
+    {
+        printf("Querying info for: %s\n", argv[i]);
+        HANDLE hFile = CreateFileA(argv[i], GENERIC_READ, FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE,
+                                   NULL /*pSecAttr*/, OPEN_EXISTING,
+                                   FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS,
+                                   NULL /*hTemplate*/);
+        if (hFile != INVALID_HANDLE_VALUE)
+        {
+            DoQueries(hFile);
+            CloseHandle(hFile);
+        }
+        else
+            fprintf(stderr, "error opening '%s': %u\n", GetLastError());
+    }
+    return 0;
+}
+
Index: trunk/src/VBox/Additions/WINNT/SharedFolders/testcase/queryvolinfo-1.cpp
===================================================================
--- trunk/src/VBox/Additions/WINNT/SharedFolders/testcase/queryvolinfo-1.cpp	(revision 78610)
+++ trunk/src/VBox/Additions/WINNT/SharedFolders/testcase/queryvolinfo-1.cpp	(revision 78610)
@@ -0,0 +1,140 @@
+/* $Id$ */
+/** @file
+ * VirtualBox Windows Guest Shared Folders FSD - Simple Testcase.
+ */
+
+/*
+ * Copyright (C) 2019 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+#include <iprt/nt/nt-and-windows.h>
+#include <stdio.h>
+#include <string.h>
+
+static const char * const g_apszVolInfoNames[] =
+{
+    "0",
+    "FileFsVolumeInformation",
+    "FileFsLabelInformation",
+    "FileFsSizeInformation",          /**< FILE_FS_SIZE_INFORMATION */
+    "FileFsDeviceInformation",
+    "FileFsAttributeInformation",
+    "FileFsControlInformation",
+    "FileFsFullSizeInformation",
+    "FileFsObjectIdInformation",
+    "FileFsDriverPathInformation",
+    "FileFsVolumeFlagsInformation",
+    "FileFsSectorSizeInformation",
+    "FileFsDataCopyInformation",
+    "FileFsMaximumInformation",
+    "FileFsMaximumInformation+1",
+    "FileFsMaximumInformation+2",
+    "FileFsMaximumInformation+3",
+    "FileFsMaximumInformation+4",
+    "FileFsMaximumInformation+5",
+    "FileFsMaximumInformation+6",
+    "FileFsMaximumInformation+7",
+    "FileFsMaximumInformation+8",
+    "FileFsMaximumInformation+9",
+};
+
+static const char *GetStatusName(NTSTATUS rcNt)
+{
+    switch (rcNt)
+    {
+        case STATUS_SUCCESS:                    return " (STATUS_SUCCESS)";
+        case STATUS_INVALID_INFO_CLASS:         return " (STATUS_INVALID_INFO_CLASS)";
+        case STATUS_INVALID_PARAMETER:          return " (STATUS_INVALID_PARAMETER)";
+        case STATUS_INVALID_DEVICE_REQUEST:     return " (STATUS_INVALID_DEVICE_REQUEST)";
+        case STATUS_NO_SUCH_DEVICE:             return " (STATUS_NO_SUCH_DEVICE)";
+        case STATUS_NOT_SUPPORTED:              return " (STATUS_NOT_SUPPORTED)";
+    }
+    return "";
+}
+
+static void DoQueries(HANDLE hFile)
+{
+    union
+    {
+        uint8_t abBuf[4096];
+        struct
+        {
+            LARGE_INTEGER VolumeCreationTime;
+            ULONG   VolumeSerialNumber;
+            ULONG   VolumeLabelLength;
+            BOOLEAN SupportsObjects;
+            BOOLEAN Padding;
+            WCHAR   VolumeLabel[63];
+        } VolInfo;
+    } uBuf;
+
+    IO_STATUS_BLOCK const VirginIos = RTNT_IO_STATUS_BLOCK_INITIALIZER;
+    for (unsigned iClass = 0; iClass < RT_ELEMENTS(g_apszVolInfoNames); iClass++)
+    {
+        IO_STATUS_BLOCK Ios = RTNT_IO_STATUS_BLOCK_INITIALIZER;
+        NTSTATUS rcNt = NtQueryVolumeInformationFile(hFile, &Ios, &uBuf, sizeof(uBuf), (FS_INFORMATION_CLASS)iClass);
+        printf("  %45s: rcNt=%#x%s", g_apszVolInfoNames[iClass], rcNt, GetStatusName(rcNt));
+        if (   Ios.Information == VirginIos.Information
+            && Ios.Status == VirginIos.Status)
+            printf(" Ios=<not modified>\n", Ios.Status, Ios.Information);
+        else
+            printf(" Ios.Status=%#x%s Ios.Information=%p\n", Ios.Status, GetStatusName(Ios.Status), Ios.Information);
+        if (NT_SUCCESS(rcNt))
+        {
+            ULONG const cbNominal = Ios.Information;
+            for (ULONG cbLess = 0; cbLess < 8; cbLess++)
+            {
+                memset(&uBuf, 0xff, sizeof(uBuf));
+                rcNt = NtQueryVolumeInformationFile(hFile, &Ios, &uBuf, cbNominal - cbLess, (FS_INFORMATION_CLASS)iClass);
+                printf("  %45s    cbBuf=%u -> rcNt=%#x%s", "", cbNominal - cbLess, rcNt, GetStatusName(rcNt));
+                switch (iClass)
+                {
+                    case FileFsVolumeInformation:
+                    {
+                        printf(" VolNmLen=%#x:", uBuf.VolInfo.VolumeLabelLength);
+                        size_t const cwcMax = (  cbNominal - cbLess - 18 < uBuf.VolInfo.VolumeLabelLength
+                                               ? cbNominal - cbLess - 18 : uBuf.VolInfo.VolumeLabelLength) / sizeof(WCHAR);
+                        for (unsigned off = 0; off < cwcMax; off++)
+                            printf(" %02x", uBuf.VolInfo.VolumeLabel[off]);
+                        break;
+                    }
+                }
+                if (   Ios.Information == VirginIos.Information
+                    && Ios.Status == VirginIos.Status)
+                    printf(" Ios=<not modified>\n", Ios.Status, Ios.Information);
+                else
+                    printf(" Ios.Status=%#x%s Ios.Information=%p\n", Ios.Status, GetStatusName(Ios.Status), Ios.Information);
+            }
+        }
+    }
+}
+
+
+int main(int argc, char **argv)
+{
+    for (int i = 1; i < argc; i++)
+    {
+        printf("Querying info for: %s\n", argv[i]);
+        HANDLE hFile = CreateFileA(argv[i], GENERIC_READ, FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE,
+                                   NULL /*pSecAttr*/, OPEN_EXISTING,
+                                   FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS,
+                                   NULL /*hTemplate*/);
+        if (hFile != INVALID_HANDLE_VALUE)
+        {
+            DoQueries(hFile);
+            CloseHandle(hFile);
+        }
+        else
+            fprintf(stderr, "error opening '%s': %u\n", GetLastError());
+    }
+    return 0;
+}
+
Index: trunk/src/VBox/Additions/WINNT/SharedFolders/testcase/rename-1.cpp
===================================================================
--- trunk/src/VBox/Additions/WINNT/SharedFolders/testcase/rename-1.cpp	(revision 78610)
+++ trunk/src/VBox/Additions/WINNT/SharedFolders/testcase/rename-1.cpp	(revision 78610)
@@ -0,0 +1,39 @@
+/* $Id$ */
+/** @file
+ * VirtualBox Windows Guest Shared Folders FSD - Simple Testcase.
+ */
+
+/*
+ * Copyright (C) 2019 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+#include <windows.h>
+#include <stdio.h>
+
+int main(int argc, char **argv)
+{
+    if (argc != 3)
+    {
+        fprintf(stderr, "usage: %s <old> <new>\n", argv[0]);
+        return 2;
+    }
+
+    SetLastError(0);
+    if (MoveFileExA(argv[1], argv[2], 0 /*fFlags*/))
+        printf("%s: successfully renamed to: %s\n", argv[1], argv[2]);
+    else
+    {
+        fprintf(stderr, "%s: MoveFileExA(,%s,0) failed: %u\n", argv[1], argv[2], GetLastError());
+        return 1;
+    }
+    return 0;
+}
+
