Index: trunk/src/VBox/Additions/os2/VBoxSF/VBoxSF.cpp
===================================================================
--- trunk/src/VBox/Additions/os2/VBoxSF/VBoxSF.cpp	(revision 76109)
+++ trunk/src/VBox/Additions/os2/VBoxSF/VBoxSF.cpp	(revision 76118)
@@ -1315,14 +1315,10 @@
             struct
             {
-                SHFLCREATEPARMS Params;
-                union
-                {
-                    SHFLSTRING Path;
-                    uint8_t    abPadding[SHFLSTRING_HEADER_SIZE + 4 * sizeof(RTUTF16)];
-                };
+                VBOXSFCREATEREQ Req;
+                uint8_t         PathStringSpace[4 * sizeof(RTUTF16)];
             } Open;
             struct
             {
-                SHFLVOLINFO VolInfo;
+                VBOXSFVOLINFOREQ Req;
                 union
                 {
@@ -1331,4 +1327,5 @@
                 };
             } Info;
+            VBOXSFCLOSEREQ Close;
         } *pu = (union FsInfoBufs *)VbglR0PhysHeapAlloc(sizeof(*pu));
         if (!pu)
@@ -1338,24 +1335,23 @@
          * To get the info we need to open the root of the folder.
          */
-        RT_ZERO(pu->Open.Params);
-        pu->Open.Params.CreateFlags = SHFL_CF_DIRECTORY   | SHFL_CF_ACT_FAIL_IF_NEW  | SHFL_CF_ACT_OPEN_IF_EXISTS
-                                    | SHFL_CF_ACCESS_READ | SHFL_CF_ACCESS_ATTR_READ | SHFL_CF_ACCESS_DENYNONE;
-        pu->Open.Path.u16Size   = 3 * sizeof(RTUTF16);
-        pu->Open.Path.u16Length = 2 * sizeof(RTUTF16);
-        pu->Open.Path.String.utf16[0] = '\\';
-        pu->Open.Path.String.utf16[1] = '.';
-        pu->Open.Path.String.utf16[2] = '\0';
-
-        int vrc = VbglR0SfCreate(&g_SfClient, &pFolder->hHostFolder, &pu->Open.Path, &pu->Open.Params);
-        LogFlow(("FS32_FSINFO: VbglR0SfCreate -> %Rrc Result=%d Handle=%#RX64\n", vrc, pu->Open.Params.Result, pu->Open.Params.Handle));
+        RT_ZERO(pu->Open.Req);
+        pu->Open.Req.CreateParms.CreateFlags = SHFL_CF_DIRECTORY   | SHFL_CF_ACT_FAIL_IF_NEW  | SHFL_CF_ACT_OPEN_IF_EXISTS
+                                             | SHFL_CF_ACCESS_READ | SHFL_CF_ACCESS_ATTR_READ | SHFL_CF_ACCESS_DENYNONE;
+        pu->Open.Req.StrPath.u16Size   = 3 * sizeof(RTUTF16);
+        pu->Open.Req.StrPath.u16Length = 2 * sizeof(RTUTF16);
+        pu->Open.Req.StrPath.String.utf16[0] = '\\';
+        pu->Open.Req.StrPath.String.utf16[1] = '.';
+        pu->Open.Req.StrPath.String.utf16[2] = '\0';
+
+        int vrc = vboxSfOs2HostReqCreate(pFolder, &pu->Open.Req);
+        LogFlow(("FS32_FSINFO: vboxSfOs2HostReqCreate -> %Rrc Result=%d Handle=%#RX64\n",
+                 vrc, pu->Open.Req.CreateParms.Result, pu->Open.Req.CreateParms.Handle));
         if (   RT_SUCCESS(vrc)
-            && pu->Open.Params.Handle != SHFL_HANDLE_NIL)
-        {
-            SHFLHANDLE hHandle = pu->Open.Params.Handle;
-
-            RT_ZERO(pu->Info.VolInfo);
-            uint32_t cbBuf = sizeof(pu->Info.VolInfo);
-            vrc = VbglR0SfFsInfo(&g_SfClient, &pFolder->hHostFolder, hHandle, SHFL_INFO_VOLUME | SHFL_INFO_GET,
-                                 &cbBuf, (PSHFLDIRINFO)&pu->Info.VolInfo);
+            && pu->Open.Req.CreateParms.Handle != SHFL_HANDLE_NIL)
+        {
+            SHFLHANDLE hHandle = pu->Open.Req.CreateParms.Handle;
+
+            RT_ZERO(pu->Info.Req);
+            vrc = vboxSfOs2HostReqQueryVolInfo(pFolder, &pu->Info.Req, hHandle);
             if (RT_SUCCESS(vrc))
             {
@@ -1366,8 +1362,9 @@
                 {
                     pu->Info.Alloc.idFileSystem = 0; /* unknown */
-                    pu->Info.Alloc.cSectorUnit  = pu->Info.VolInfo.ulBytesPerAllocationUnit / RT_MAX(pu->Info.VolInfo.ulBytesPerSector, 1);
-                    pu->Info.Alloc.cUnit        = (uint32_t)(pu->Info.VolInfo.ullTotalAllocationBytes  / RT_MAX(pu->Info.VolInfo.ulBytesPerAllocationUnit, 1));
-                    pu->Info.Alloc.cUnitAvail   = (uint32_t)(pu->Info.VolInfo.ullAvailableAllocationBytes  / RT_MAX(pu->Info.VolInfo.ulBytesPerAllocationUnit, 1));
-                    pu->Info.Alloc.cbSector     = (uint16_t)(pu->Info.VolInfo.ulBytesPerSector);
+                    uint32_t const cbSector = RT_MAX(pu->Info.Req.VolInfo.ulBytesPerSector, 1);
+                    pu->Info.Alloc.cSectorUnit  = pu->Info.Req.VolInfo.ulBytesPerAllocationUnit               / cbSector;
+                    pu->Info.Alloc.cUnit        = (uint32_t)(pu->Info.Req.VolInfo.ullTotalAllocationBytes     / cbSector);
+                    pu->Info.Alloc.cUnitAvail   = (uint32_t)(pu->Info.Req.VolInfo.ullAvailableAllocationBytes / cbSector);
+                    pu->Info.Alloc.cbSector     = (uint16_t)pu->Info.Req.VolInfo.ulBytesPerSector;
                     rc = KernCopyOut(pbData, &pu->Info.Alloc, sizeof(pu->Info.Alloc));
                 }
@@ -1377,5 +1374,5 @@
                     pu->Info.FsInfo.vol.cch = (uint8_t)RT_MIN(pFolder->cchName, sizeof(pu->Info.FsInfo.vol.szVolLabel) - 1);
                     memcpy(pu->Info.FsInfo.vol.szVolLabel, pFolder->szName, pu->Info.FsInfo.vol.cch);
-                    *(uint32_t *)&pu->Info.FsInfo.fdateCreation = pu->Info.VolInfo.ulSerial;
+                    *(uint32_t *)&pu->Info.FsInfo.fdateCreation = pu->Info.Req.VolInfo.ulSerial;
                     rc = KernCopyOut(pbData, &pu->Info.FsInfo, sizeof(pu->Info.FsInfo));
                 }
@@ -1387,5 +1384,5 @@
             }
 
-            vrc = VbglR0SfClose(&g_SfClient, &pFolder->hHostFolder, hHandle);
+            vrc = vboxSfOs2HostReqClose(pFolder, &pu->Close, hHandle);
             AssertRC(vrc);
         }
Index: trunk/src/VBox/Additions/os2/VBoxSF/VBoxSFInternal.h
===================================================================
--- trunk/src/VBox/Additions/os2/VBoxSF/VBoxSFInternal.h	(revision 76109)
+++ trunk/src/VBox/Additions/os2/VBoxSF/VBoxSFInternal.h	(revision 76118)
@@ -286,4 +286,74 @@
 
 
+/** Request structure for vboxSfOs2HostReqCreate.  */
+typedef struct VBOXSFCLOSEREQ
+{
+    VBGLIOCIDCHGCMFASTCALL  Hdr;
+    VMMDevHGCMCall          Call;
+    VBoxSFParmClose         Parms;
+} VBOXSFCLOSEREQ;
+
+/**
+ * SHFL_FN_CLOSE request.
+ */
+DECLINLINE(int) vboxSfOs2HostReqClose(PVBOXSFFOLDER pFolder, VBOXSFCLOSEREQ *pReq, uint64_t uHandle)
+{
+    VBGLIOCIDCHGCMFASTCALL_INIT(&pReq->Hdr, VbglR0PhysHeapGetPhysAddr(pReq), &pReq->Call, g_SfClient.idClient,
+                                SHFL_FN_CLOSE, SHFL_CPARMS_CLOSE, sizeof(*pReq));
+
+    pReq->Parms.id32Root.type                   = VMMDevHGCMParmType_32bit;
+    pReq->Parms.id32Root.u.value32              = pFolder->hHostFolder.root;
+
+    pReq->Parms.u64Handle.type                  = VMMDevHGCMParmType_64bit;
+    pReq->Parms.u64Handle.u.value64             = uHandle;
+
+    int vrc = VbglR0HGCMFastCall(g_SfClient.handle, &pReq->Hdr, sizeof(*pReq));
+    if (RT_SUCCESS(vrc))
+        vrc = pReq->Call.header.result;
+    return vrc;
+}
+
+
+/** Request structure for vboxSfOs2HostReqQueryVolInfo.  */
+typedef struct VBOXSFVOLINFOREQ
+{
+    VBGLIOCIDCHGCMFASTCALL  Hdr;
+    VMMDevHGCMCall          Call;
+    VBoxSFParmInformation   Parms;
+    SHFLVOLINFO             VolInfo;
+} VBOXSFVOLINFOREQ;
+
+/**
+ * SHFL_FN_INFORMATION[SHFL_INFO_VOLUME | SHFL_INFO_GET] request.
+ */
+DECLINLINE(int) vboxSfOs2HostReqQueryVolInfo(PVBOXSFFOLDER pFolder, VBOXSFVOLINFOREQ *pReq, uint64_t uHandle)
+{
+    VBGLIOCIDCHGCMFASTCALL_INIT(&pReq->Hdr, VbglR0PhysHeapGetPhysAddr(pReq), &pReq->Call, g_SfClient.idClient,
+                                SHFL_FN_INFORMATION, SHFL_CPARMS_INFORMATION, sizeof(*pReq));
+
+    pReq->Parms.id32Root.type                   = VMMDevHGCMParmType_32bit;
+    pReq->Parms.id32Root.u.value32              = pFolder->hHostFolder.root;
+
+    pReq->Parms.u64Handle.type                  = VMMDevHGCMParmType_64bit;
+    pReq->Parms.u64Handle.u.value64             = uHandle;
+
+    pReq->Parms.f32Flags.type                   = VMMDevHGCMParmType_32bit;
+    pReq->Parms.f32Flags.u.value32              = SHFL_INFO_VOLUME | SHFL_INFO_GET;
+
+    pReq->Parms.cb32.type                       = VMMDevHGCMParmType_32bit;
+    pReq->Parms.cb32.u.value32                  = sizeof(pReq->VolInfo);
+
+    pReq->Parms.pInfo.type                      = VMMDevHGCMParmType_Embedded;
+    pReq->Parms.pInfo.u.Embedded.cbData         = sizeof(pReq->VolInfo);
+    pReq->Parms.pInfo.u.Embedded.offData        = RT_UOFFSETOF(VBOXSFVOLINFOREQ, VolInfo) - sizeof(VBGLIOCIDCHGCMFASTCALL);
+    pReq->Parms.pInfo.u.Embedded.fFlags         = VBOX_HGCM_F_PARM_DIRECTION_FROM_HOST;
+
+    int vrc = VbglR0HGCMFastCall(g_SfClient.handle, &pReq->Hdr, sizeof(*pReq));
+    if (RT_SUCCESS(vrc))
+        vrc = pReq->Call.header.result;
+    return vrc;
+}
+
+
 #endif
 
