Index: trunk/src/VBox/Devices/Storage/DrvDiskIntegrity.cpp
===================================================================
--- trunk/src/VBox/Devices/Storage/DrvDiskIntegrity.cpp	(revision 91868)
+++ trunk/src/VBox/Devices/Storage/DrvDiskIntegrity.cpp	(revision 91869)
@@ -1807,52 +1807,53 @@
 static DECLCALLBACK(int) drvdiskintConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
 {
-    int rc = VINF_SUCCESS;
-    PDRVDISKINTEGRITY pThis = PDMINS_2_DATA(pDrvIns, PDRVDISKINTEGRITY);
+    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
+    PDRVDISKINTEGRITY   pThis = PDMINS_2_DATA(pDrvIns, PDRVDISKINTEGRITY);
+    PCPDMDRVHLPR3       pHlp  = pDrvIns->pHlpR3;
+
     LogFlow(("drvdiskintConstruct: iInstance=%d\n", pDrvIns->iInstance));
-    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
 
     /*
      * Validate configuration.
      */
-    if (!CFGMR3AreValuesValid(pCfg, "CheckConsistency\0"
-                                    "TraceRequests\0"
-                                    "CheckIntervalMs\0"
-                                    "ExpireIntervalMs\0"
-                                    "CheckDoubleCompletions\0"
-                                    "HistorySize\0"
-                                    "IoLogType\0"
-                                    "IoLogFile\0"
-                                    "IoLogAddress\0"
-                                    "IoLogPort\0"
-                                    "IoLogData\0"
-                                    "PrepopulateRamDisk\0"
-                                    "ReadAfterWrite\0"
-                                    "RecordWriteBeforeCompletion\0"
-                                    "ValidateMemoryBuffers\0"))
-        return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES;
-
-    rc = CFGMR3QueryBoolDef(pCfg, "CheckConsistency", &pThis->fCheckConsistency, false);
+    PDMDRV_VALIDATE_CONFIG_RETURN(pDrvIns,  "CheckConsistency"
+                                            "|TraceRequests"
+                                            "|CheckIntervalMs"
+                                            "|ExpireIntervalMs"
+                                            "|CheckDoubleCompletions"
+                                            "|HistorySize"
+                                            "|IoLogType"
+                                            "|IoLogFile"
+                                            "|IoLogAddress"
+                                            "|IoLogPort"
+                                            "|IoLogData"
+                                            "|PrepopulateRamDisk"
+                                            "|ReadAfterWrite"
+                                            "|RecordWriteBeforeCompletion"
+                                            "|ValidateMemoryBuffers",
+                                            "");
+
+    int rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "CheckConsistency", &pThis->fCheckConsistency, false);
     AssertRC(rc);
-    rc = CFGMR3QueryBoolDef(pCfg, "TraceRequests", &pThis->fTraceRequests, false);
+    rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "TraceRequests", &pThis->fTraceRequests, false);
     AssertRC(rc);
-    rc = CFGMR3QueryU32Def(pCfg, "CheckIntervalMs", &pThis->uCheckIntervalMs, 5000); /* 5 seconds */
+    rc = pHlp->pfnCFGMQueryU32Def(pCfg, "CheckIntervalMs", &pThis->uCheckIntervalMs, 5000); /* 5 seconds */
     AssertRC(rc);
-    rc = CFGMR3QueryU32Def(pCfg, "ExpireIntervalMs", &pThis->uExpireIntervalMs, 20000); /* 20 seconds */
+    rc = pHlp->pfnCFGMQueryU32Def(pCfg, "ExpireIntervalMs", &pThis->uExpireIntervalMs, 20000); /* 20 seconds */
     AssertRC(rc);
-    rc = CFGMR3QueryBoolDef(pCfg, "CheckDoubleCompletions", &pThis->fCheckDoubleCompletion, false);
+    rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "CheckDoubleCompletions", &pThis->fCheckDoubleCompletion, false);
     AssertRC(rc);
-    rc = CFGMR3QueryU32Def(pCfg, "HistorySize", &pThis->cEntries, 512);
+    rc = pHlp->pfnCFGMQueryU32Def(pCfg, "HistorySize", &pThis->cEntries, 512);
     AssertRC(rc);
-    rc = CFGMR3QueryBoolDef(pCfg, "PrepopulateRamDisk", &pThis->fPrepopulateRamDisk, false);
+    rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "PrepopulateRamDisk", &pThis->fPrepopulateRamDisk, false);
     AssertRC(rc);
-    rc = CFGMR3QueryBoolDef(pCfg, "ReadAfterWrite", &pThis->fReadAfterWrite, false);
+    rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "ReadAfterWrite", &pThis->fReadAfterWrite, false);
     AssertRC(rc);
-    rc = CFGMR3QueryBoolDef(pCfg, "RecordWriteBeforeCompletion", &pThis->fRecordWriteBeforeCompletion, false);
+    rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "RecordWriteBeforeCompletion", &pThis->fRecordWriteBeforeCompletion, false);
     AssertRC(rc);
-    rc = CFGMR3QueryBoolDef(pCfg, "ValidateMemoryBuffers", &pThis->fValidateMemBufs, false);
+    rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "ValidateMemoryBuffers", &pThis->fValidateMemBufs, false);
     AssertRC(rc);
 
     bool fIoLogData = false;
-    rc = CFGMR3QueryBoolDef(pCfg, "IoLogData", &fIoLogData, false);
+    rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "IoLogData", &fIoLogData, false);
     AssertRC(rc);
 
@@ -1861,24 +1862,24 @@
     char *pszAddress = NULL;
     uint32_t uPort = 0;
-    rc = CFGMR3QueryStringAlloc(pCfg, "IoLogType", &pszIoLogType);
+    rc = pHlp->pfnCFGMQueryStringAlloc(pCfg, "IoLogType", &pszIoLogType);
     if (RT_SUCCESS(rc))
     {
         if (!RTStrICmp(pszIoLogType, "File"))
         {
-            rc = CFGMR3QueryStringAlloc(pCfg, "IoLogFile", &pszIoLogFilename);
+            rc = pHlp->pfnCFGMQueryStringAlloc(pCfg, "IoLogFile", &pszIoLogFilename);
             AssertRC(rc);
         }
         else if (!RTStrICmp(pszIoLogType, "Server"))
         {
-            rc = CFGMR3QueryStringAllocDef(pCfg, "IoLogAddress", &pszAddress, NULL);
+            rc = pHlp->pfnCFGMQueryStringAllocDef(pCfg, "IoLogAddress", &pszAddress, NULL);
             AssertRC(rc);
-            rc = CFGMR3QueryU32Def(pCfg, "IoLogPort", &uPort, 4000);
+            rc = pHlp->pfnCFGMQueryU32Def(pCfg, "IoLogPort", &uPort, 4000);
             AssertRC(rc);
         }
         else if (!RTStrICmp(pszIoLogType, "Client"))
         {
-            rc = CFGMR3QueryStringAlloc(pCfg, "IoLogAddress", &pszAddress);
+            rc = pHlp->pfnCFGMQueryStringAlloc(pCfg, "IoLogAddress", &pszAddress);
             AssertRC(rc);
-            rc = CFGMR3QueryU32Def(pCfg, "IoLogPort", &uPort, 4000);
+            rc = pHlp->pfnCFGMQueryU32Def(pCfg, "IoLogPort", &uPort, 4000);
             AssertRC(rc);
         }
Index: trunk/src/VBox/Devices/Storage/DrvHostBase.cpp
===================================================================
--- trunk/src/VBox/Devices/Storage/DrvHostBase.cpp	(revision 91868)
+++ trunk/src/VBox/Devices/Storage/DrvHostBase.cpp	(revision 91869)
@@ -1267,5 +1267,7 @@
 {
     int src = VINF_SUCCESS;
-    PDRVHOSTBASE pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTBASE);
+    PDRVHOSTBASE    pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTBASE);
+    PCPDMDRVHLPR3   pHlp  = pDrvIns->pHlpR3;
+
     LogFlow(("%s-%d: DRVHostBaseInit: iInstance=%d\n", pDrvIns->pReg->szName, pDrvIns->iInstance, pDrvIns->iInstance));
 
@@ -1330,5 +1332,5 @@
     drvHostBaseInitOs(pThis);
 
-    if (!CFGMR3AreValuesValid(pCfg, pszCfgValid))
+    if (!pHlp->pfnCFGMAreValuesValid(pCfg, pszCfgValid))
     {
         pThis->fAttachFailError = true;
@@ -1352,5 +1354,5 @@
      */
     /* Device */
-    int rc = CFGMR3QueryStringAlloc(pCfg, "Path", &pThis->pszDevice);
+    int rc = pHlp->pfnCFGMQueryStringAlloc(pCfg, "Path", &pThis->pszDevice);
     if (RT_FAILURE(rc))
     {
@@ -1361,5 +1363,5 @@
     /* Mountable */
     uint32_t u32;
-    rc = CFGMR3QueryU32Def(pCfg, "Interval", &u32, 1000);
+    rc = pHlp->pfnCFGMQueryU32Def(pCfg, "Interval", &u32, 1000);
     if (RT_SUCCESS(rc))
         pThis->cMilliesPoller = u32;
@@ -1376,8 +1378,8 @@
     else
     {
-        rc = CFGMR3QueryBoolDef(pCfg, "ReadOnly", &pThis->fReadOnlyConfig,
-                                  enmType == PDMMEDIATYPE_DVD || enmType == PDMMEDIATYPE_CDROM
-                                ? true
-                                : false);
+        rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "ReadOnly", &pThis->fReadOnlyConfig,
+                                         enmType == PDMMEDIATYPE_DVD || enmType == PDMMEDIATYPE_CDROM
+                                       ? true
+                                       : false);
         if (RT_FAILURE(rc))
         {
@@ -1388,5 +1390,5 @@
 
     /* Locked */
-    rc = CFGMR3QueryBoolDef(pCfg, "Locked", &pThis->fLocked, false);
+    rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "Locked", &pThis->fLocked, false);
     if (RT_FAILURE(rc))
     {
@@ -1396,5 +1398,5 @@
 
     /* BIOS visible */
-    rc = CFGMR3QueryBoolDef(pCfg, "BIOSVisible", &pThis->fBiosVisible, true);
+    rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "BIOSVisible", &pThis->fBiosVisible, true);
     if (RT_FAILURE(rc))
     {
@@ -1405,5 +1407,5 @@
     /* Uuid */
     char *psz;
-    rc = CFGMR3QueryStringAlloc(pCfg, "Uuid", &psz);
+    rc = pHlp->pfnCFGMQueryStringAlloc(pCfg, "Uuid", &psz);
     if (rc == VERR_CFGM_VALUE_NOT_FOUND)
         RTUuidClear(&pThis->Uuid);
@@ -1427,5 +1429,5 @@
     /* Define whether attach failure is an error (default) or not. */
     bool fAttachFailError = true;
-    rc = CFGMR3QueryBoolDef(pCfg, "AttachFailError", &fAttachFailError, true);
+    rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "AttachFailError", &fAttachFailError, true);
     pThis->fAttachFailError = fAttachFailError;
 
Index: trunk/src/VBox/Devices/Storage/DrvHostDVD.cpp
===================================================================
--- trunk/src/VBox/Devices/Storage/DrvHostDVD.cpp	(revision 91868)
+++ trunk/src/VBox/Devices/Storage/DrvHostDVD.cpp	(revision 91869)
@@ -468,8 +468,10 @@
 {
     RT_NOREF(fFlags);
-    PDRVHOSTDVD pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTDVD);
+    PDRVHOSTDVD     pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTDVD);
+    PCPDMDRVHLPR3   pHlp  = pDrvIns->pHlpR3;
+
     LogFlow(("drvHostDvdConstruct: iInstance=%d\n", pDrvIns->iInstance));
 
-    int rc = CFGMR3QueryBoolDef(pCfg, "InquiryOverwrite", &pThis->fInquiryOverwrite, true);
+    int rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "InquiryOverwrite", &pThis->fInquiryOverwrite, true);
     if (RT_FAILURE(rc))
         return PDMDRV_SET_ERROR(pDrvIns, rc,
@@ -477,5 +479,5 @@
 
     bool fPassthrough;
-    rc = CFGMR3QueryBool(pCfg, "Passthrough", &fPassthrough);
+    rc = pHlp->pfnCFGMQueryBool(pCfg, "Passthrough", &fPassthrough);
     if (RT_SUCCESS(rc) && fPassthrough)
     {
Index: trunk/src/VBox/Devices/Storage/DrvRamDisk.cpp
===================================================================
--- trunk/src/VBox/Devices/Storage/DrvRamDisk.cpp	(revision 91868)
+++ trunk/src/VBox/Devices/Storage/DrvRamDisk.cpp	(revision 91869)
@@ -1656,38 +1656,9 @@
 {
     RT_NOREF1(fFlags);
-    int rc = VINF_SUCCESS;
-    uint32_t cbIoBufMax;
-    PDRVRAMDISK pThis = PDMINS_2_DATA(pDrvIns, PDRVRAMDISK);
+    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
+    PDRVRAMDISK     pThis = PDMINS_2_DATA(pDrvIns, PDRVRAMDISK);
+    PCPDMDRVHLPR3   pHlp  = pDrvIns->pHlpR3;
+
     LogFlow(("drvdiskintConstruct: iInstance=%d\n", pDrvIns->iInstance));
-    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
-
-    /*
-     * Validate configuration.
-     */
-    if (!CFGMR3AreValuesValid(pCfg, "Size\0"
-                                    "PreAlloc\0"
-                                    "IoBufMax\0"
-                                    "SectorSize\0"
-                                    "NonRotational\0"))
-        return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES;
-
-    rc = CFGMR3QueryU64(pCfg, "Size", &pThis->cbDisk);
-    if (RT_FAILURE(rc))
-        return PDMDRV_SET_ERROR(pDrvIns, rc,
-                                N_("RamDisk: Error querying the media size"));
-    rc = CFGMR3QueryBoolDef(pCfg, "PreAlloc", &pThis->fPreallocRamDisk, false);
-    if (RT_FAILURE(rc))
-        return PDMDRV_SET_ERROR(pDrvIns, rc,
-                                N_("RamDisk: Error querying \"PreAlloc\""));
-    rc = CFGMR3QueryBoolDef(pCfg, "NonRotational", &pThis->fNonRotational, true);
-    if (RT_FAILURE(rc))
-        return PDMDRV_SET_ERROR(pDrvIns, rc,
-                                N_("RamDisk: Error querying \"NonRotational\""));
-    rc = CFGMR3QueryU32Def(pCfg, "IoBufMax", &cbIoBufMax, 5 * _1M);
-    if (RT_FAILURE(rc))
-        return PDMDRV_SET_ERROR(pDrvIns, rc, N_("Failed to query \"IoBufMax\" from the config"));
-    rc = CFGMR3QueryU32Def(pCfg, "SectorSize", &pThis->cbSector, 512);
-    if (RT_FAILURE(rc))
-        return PDMDRV_SET_ERROR(pDrvIns, rc, N_("Failed to query \"SectorSize\" from the config"));
 
     /*
@@ -1737,4 +1708,35 @@
     pThis->IMediaEx.pfnIoReqSuspendedSave       = drvramdiskIoReqSuspendedSave;
     pThis->IMediaEx.pfnIoReqSuspendedLoad       = drvramdiskIoReqSuspendedLoad;
+
+    /*
+     * Validate configuration.
+     */
+    PDMDRV_VALIDATE_CONFIG_RETURN(pDrvIns,  "Size"
+                                            "|PreAlloc"
+                                            "|IoBufMax"
+                                            "|SectorSize"
+                                            "|NonRotational",
+                                            "");
+
+    int rc = pHlp->pfnCFGMQueryU64(pCfg, "Size", &pThis->cbDisk);
+    if (RT_FAILURE(rc))
+        return PDMDRV_SET_ERROR(pDrvIns, rc,
+                                N_("RamDisk: Error querying the media size"));
+    rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "PreAlloc", &pThis->fPreallocRamDisk, false);
+    if (RT_FAILURE(rc))
+        return PDMDRV_SET_ERROR(pDrvIns, rc,
+                                N_("RamDisk: Error querying \"PreAlloc\""));
+    rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "NonRotational", &pThis->fNonRotational, true);
+    if (RT_FAILURE(rc))
+        return PDMDRV_SET_ERROR(pDrvIns, rc,
+                                N_("RamDisk: Error querying \"NonRotational\""));
+
+    uint32_t cbIoBufMax;
+    rc = pHlp->pfnCFGMQueryU32Def(pCfg, "IoBufMax", &cbIoBufMax, 5 * _1M);
+    if (RT_FAILURE(rc))
+        return PDMDRV_SET_ERROR(pDrvIns, rc, N_("Failed to query \"IoBufMax\" from the config"));
+    rc = pHlp->pfnCFGMQueryU32Def(pCfg, "SectorSize", &pThis->cbSector, 512);
+    if (RT_FAILURE(rc))
+        return PDMDRV_SET_ERROR(pDrvIns, rc, N_("Failed to query \"SectorSize\" from the config"));
 
     /* Query the media port interface above us. */
Index: trunk/src/VBox/Devices/Storage/DrvSCSI.cpp
===================================================================
--- trunk/src/VBox/Devices/Storage/DrvSCSI.cpp	(revision 91868)
+++ trunk/src/VBox/Devices/Storage/DrvSCSI.cpp	(revision 91869)
@@ -1416,7 +1416,5 @@
      * Validate and read configuration.
      */
-    if (!CFGMR3AreValuesValid(pCfg, ""))
-        return PDMDRV_SET_ERROR(pDrvIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
-                                N_("SCSI configuration error: unknown option specified"));
+    PDMDRV_VALIDATE_CONFIG_RETURN(pDrvIns, "", "");
 
     /*
Index: trunk/src/VBox/Devices/Storage/DrvVD.cpp
===================================================================
--- trunk/src/VBox/Devices/Storage/DrvVD.cpp	(revision 91868)
+++ trunk/src/VBox/Devices/Storage/DrvVD.cpp	(revision 91869)
@@ -4478,8 +4478,10 @@
 {
     RT_NOREF(fFlags);
+    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
+    PVBOXDISK       pThis = PDMINS_2_DATA(pDrvIns, PVBOXDISK);
+    PCPDMDRVHLPR3   pHlp  = pDrvIns->pHlpR3;
+
     LogFlowFunc(("\n"));
-    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
-    PVBOXDISK pThis = PDMINS_2_DATA(pDrvIns, PVBOXDISK);
-    int rc = VINF_SUCCESS;
+
     char *pszName = NULL;        /* The path of the disk image file. */
     char *pszFormat = NULL;      /* The format backed to use for this image. */
@@ -4573,6 +4575,6 @@
     pThis->VDIfError.pfnError     = drvvdErrorCallback;
     pThis->VDIfError.pfnMessage   = NULL;
-    rc = VDInterfaceAdd(&pThis->VDIfError.Core, "DrvVD_VDIError", VDINTERFACETYPE_ERROR,
-                        pDrvIns, sizeof(VDINTERFACEERROR), &pThis->pVDIfsDisk);
+    int rc = VDInterfaceAdd(&pThis->VDIfError.Core, "DrvVD_VDIError", VDINTERFACETYPE_ERROR,
+                            pDrvIns, sizeof(VDINTERFACEERROR), &pThis->pVDIfsDisk);
     AssertRC(rc);
 
@@ -4643,15 +4645,15 @@
             /* Toplevel configuration additionally contains the global image
              * open flags. Some might be converted to per-image flags later. */
-            fValid = CFGMR3AreValuesValid(pCurNode,
-                                          "Format\0Path\0"
-                                          "ReadOnly\0MaybeReadOnly\0TempReadOnly\0Shareable\0HonorZeroWrites\0"
-                                          "HostIPStack\0UseNewIo\0BootAcceleration\0BootAccelerationBuffer\0"
-                                          "SetupMerge\0MergeSource\0MergeTarget\0BwGroup\0Type\0BlockCache\0"
-                                          "CachePath\0CacheFormat\0Discard\0InformAboutZeroBlocks\0"
-                                          "SkipConsistencyChecks\0"
-                                          "Locked\0BIOSVisible\0Cylinders\0Heads\0Sectors\0Mountable\0"
-                                          "EmptyDrive\0IoBufMax\0NonRotationalMedium\0"
+            fValid = pHlp->pfnCFGMAreValuesValid(pCurNode,
+                                                 "Format\0Path\0"
+                                                 "ReadOnly\0MaybeReadOnly\0TempReadOnly\0Shareable\0HonorZeroWrites\0"
+                                                 "HostIPStack\0UseNewIo\0BootAcceleration\0BootAccelerationBuffer\0"
+                                                 "SetupMerge\0MergeSource\0MergeTarget\0BwGroup\0Type\0BlockCache\0"
+                                                 "CachePath\0CacheFormat\0Discard\0InformAboutZeroBlocks\0"
+                                                 "SkipConsistencyChecks\0"
+                                                 "Locked\0BIOSVisible\0Cylinders\0Heads\0Sectors\0Mountable\0"
+                                                 "EmptyDrive\0IoBufMax\0NonRotationalMedium\0"
 #if defined(VBOX_PERIODIC_FLUSH) || defined(VBOX_IGNORE_FLUSH)
-                                          "FlushInterval\0IgnoreFlush\0IgnoreFlushAsync\0"
+                                                 "FlushInterval\0IgnoreFlush\0IgnoreFlushAsync\0"
 #endif /* !(VBOX_PERIODIC_FLUSH || VBOX_IGNORE_FLUSH) */
                                            );
@@ -4661,6 +4663,6 @@
             /* All other image configurations only contain image name and
              * the format information. */
-            fValid = CFGMR3AreValuesValid(pCurNode, "Format\0Path\0"
-                                                    "MergeSource\0MergeTarget\0");
+            fValid = pHlp->pfnCFGMAreValuesValid(pCurNode, "Format\0Path\0"
+                                                           "MergeSource\0MergeTarget\0");
         }
         if (!fValid)
@@ -4673,5 +4675,5 @@
         if (pCurNode == pCfg)
         {
-            rc = CFGMR3QueryBoolDef(pCurNode, "HostIPStack", &fHostIP, true);
+            rc = pHlp->pfnCFGMQueryBoolDef(pCurNode, "HostIPStack", &fHostIP, true);
             if (RT_FAILURE(rc))
             {
@@ -4681,5 +4683,5 @@
             }
 
-            rc = CFGMR3QueryBoolDef(pCurNode, "HonorZeroWrites", &fHonorZeroWrites, false);
+            rc = pHlp->pfnCFGMQueryBoolDef(pCurNode, "HonorZeroWrites", &fHonorZeroWrites, false);
             if (RT_FAILURE(rc))
             {
@@ -4689,5 +4691,5 @@
             }
 
-            rc = CFGMR3QueryBoolDef(pCurNode, "ReadOnly", &fReadOnly, false);
+            rc = pHlp->pfnCFGMQueryBoolDef(pCurNode, "ReadOnly", &fReadOnly, false);
             if (RT_FAILURE(rc))
             {
@@ -4697,5 +4699,5 @@
             }
 
-            rc = CFGMR3QueryBoolDef(pCurNode, "MaybeReadOnly", &fMaybeReadOnly, false);
+            rc = pHlp->pfnCFGMQueryBoolDef(pCurNode, "MaybeReadOnly", &fMaybeReadOnly, false);
             if (RT_FAILURE(rc))
             {
@@ -4705,5 +4707,5 @@
             }
 
-            rc = CFGMR3QueryBoolDef(pCurNode, "TempReadOnly", &pThis->fTempReadOnly, false);
+            rc = pHlp->pfnCFGMQueryBoolDef(pCurNode, "TempReadOnly", &pThis->fTempReadOnly, false);
             if (RT_FAILURE(rc))
             {
@@ -4719,5 +4721,5 @@
             }
 
-            rc = CFGMR3QueryBoolDef(pCurNode, "Shareable", &pThis->fShareable, false);
+            rc = pHlp->pfnCFGMQueryBoolDef(pCurNode, "Shareable", &pThis->fShareable, false);
             if (RT_FAILURE(rc))
             {
@@ -4727,5 +4729,5 @@
             }
 
-            rc = CFGMR3QueryBoolDef(pCurNode, "UseNewIo", &fUseNewIo, false);
+            rc = pHlp->pfnCFGMQueryBoolDef(pCurNode, "UseNewIo", &fUseNewIo, false);
             if (RT_FAILURE(rc))
             {
@@ -4734,5 +4736,5 @@
                 break;
             }
-            rc = CFGMR3QueryBoolDef(pCurNode, "SetupMerge", &pThis->fMergePending, false);
+            rc = pHlp->pfnCFGMQueryBoolDef(pCurNode, "SetupMerge", &pThis->fMergePending, false);
             if (RT_FAILURE(rc))
             {
@@ -4747,5 +4749,5 @@
                 break;
             }
-            rc = CFGMR3QueryBoolDef(pCurNode, "BootAcceleration", &pThis->fBootAccelEnabled, false);
+            rc = pHlp->pfnCFGMQueryBoolDef(pCurNode, "BootAcceleration", &pThis->fBootAccelEnabled, false);
             if (RT_FAILURE(rc))
             {
@@ -4754,5 +4756,5 @@
                 break;
             }
-            rc = CFGMR3QueryU32Def(pCurNode, "BootAccelerationBuffer", (uint32_t *)&pThis->cbBootAccelBuffer, 16 * _1K);
+            rc = pHlp->pfnCFGMQueryU32Def(pCurNode, "BootAccelerationBuffer", (uint32_t *)&pThis->cbBootAccelBuffer, 16 * _1K);
             if (RT_FAILURE(rc))
             {
@@ -4761,5 +4763,5 @@
                 break;
             }
-            rc = CFGMR3QueryBoolDef(pCurNode, "BlockCache", &fUseBlockCache, false);
+            rc = pHlp->pfnCFGMQueryBoolDef(pCurNode, "BlockCache", &fUseBlockCache, false);
             if (RT_FAILURE(rc))
             {
@@ -4768,5 +4770,5 @@
                 break;
             }
-            rc = CFGMR3QueryStringAlloc(pCurNode, "BwGroup", &pThis->pszBwGroup);
+            rc = pHlp->pfnCFGMQueryStringAlloc(pCurNode, "BwGroup", &pThis->pszBwGroup);
             if (RT_FAILURE(rc) && rc != VERR_CFGM_VALUE_NOT_FOUND)
             {
@@ -4777,5 +4779,5 @@
             else
                 rc = VINF_SUCCESS;
-            rc = CFGMR3QueryBoolDef(pCurNode, "Discard", &fDiscard, false);
+            rc = pHlp->pfnCFGMQueryBoolDef(pCurNode, "Discard", &fDiscard, false);
             if (RT_FAILURE(rc))
             {
@@ -4790,5 +4792,5 @@
                 break;
             }
-            rc = CFGMR3QueryBoolDef(pCurNode, "InformAboutZeroBlocks", &fInformAboutZeroBlocks, false);
+            rc = pHlp->pfnCFGMQueryBoolDef(pCurNode, "InformAboutZeroBlocks", &fInformAboutZeroBlocks, false);
             if (RT_FAILURE(rc))
             {
@@ -4797,5 +4799,5 @@
                 break;
             }
-            rc = CFGMR3QueryBoolDef(pCurNode, "SkipConsistencyChecks", &fSkipConsistencyChecks, true);
+            rc = pHlp->pfnCFGMQueryBoolDef(pCurNode, "SkipConsistencyChecks", &fSkipConsistencyChecks, true);
             if (RT_FAILURE(rc))
             {
@@ -4806,5 +4808,5 @@
 
             char *psz = NULL;
-           rc = CFGMR3QueryStringAlloc(pCfg, "Type", &psz);
+           rc = pHlp->pfnCFGMQueryStringAlloc(pCfg, "Type", &psz);
             if (RT_FAILURE(rc))
                 return PDMDRV_SET_ERROR(pDrvIns, VERR_PDM_BLOCK_NO_TYPE, N_("Failed to obtain the sub type"));
@@ -4819,5 +4821,5 @@
             MMR3HeapFree(psz); psz = NULL;
 
-            rc = CFGMR3QueryStringAlloc(pCurNode, "CachePath", &pszCachePath);
+            rc = pHlp->pfnCFGMQueryStringAlloc(pCurNode, "CachePath", &pszCachePath);
             if (RT_FAILURE(rc) && rc != VERR_CFGM_VALUE_NOT_FOUND)
             {
@@ -4831,5 +4833,5 @@
             if (pszCachePath)
             {
-                rc = CFGMR3QueryStringAlloc(pCurNode, "CacheFormat", &pszCacheFormat);
+                rc = pHlp->pfnCFGMQueryStringAlloc(pCurNode, "CacheFormat", &pszCacheFormat);
                 if (RT_FAILURE(rc))
                 {
@@ -4841,35 +4843,35 @@
 
             /* Mountable */
-            rc = CFGMR3QueryBoolDef(pCfg, "Mountable", &pThis->fMountable, false);
+            rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "Mountable", &pThis->fMountable, false);
             if (RT_FAILURE(rc))
                 return PDMDRV_SET_ERROR(pDrvIns, rc, N_("Failed to query \"Mountable\" from the config"));
 
             /* Locked */
-            rc = CFGMR3QueryBoolDef(pCfg, "Locked", &pThis->fLocked, false);
+            rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "Locked", &pThis->fLocked, false);
             if (RT_FAILURE(rc))
                 return PDMDRV_SET_ERROR(pDrvIns, rc, N_("Failed to query \"Locked\" from the config"));
 
             /* BIOS visible */
-            rc = CFGMR3QueryBoolDef(pCfg, "BIOSVisible", &pThis->fBiosVisible, true);
+            rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "BIOSVisible", &pThis->fBiosVisible, true);
             if (RT_FAILURE(rc))
                 return PDMDRV_SET_ERROR(pDrvIns, rc, N_("Failed to query \"BIOSVisible\" from the config"));
 
             /* Cylinders */
-            rc = CFGMR3QueryU32Def(pCfg, "Cylinders", &pThis->LCHSGeometry.cCylinders, 0);
+            rc = pHlp->pfnCFGMQueryU32Def(pCfg, "Cylinders", &pThis->LCHSGeometry.cCylinders, 0);
             if (RT_FAILURE(rc))
                 return PDMDRV_SET_ERROR(pDrvIns, rc, N_("Failed to query \"Cylinders\" from the config"));
 
             /* Heads */
-            rc = CFGMR3QueryU32Def(pCfg, "Heads", &pThis->LCHSGeometry.cHeads, 0);
+            rc = pHlp->pfnCFGMQueryU32Def(pCfg, "Heads", &pThis->LCHSGeometry.cHeads, 0);
             if (RT_FAILURE(rc))
                 return PDMDRV_SET_ERROR(pDrvIns, rc, N_("Failed to query \"Heads\" from the config"));
 
             /* Sectors */
-            rc = CFGMR3QueryU32Def(pCfg, "Sectors", &pThis->LCHSGeometry.cSectors, 0);
+            rc = pHlp->pfnCFGMQueryU32Def(pCfg, "Sectors", &pThis->LCHSGeometry.cSectors, 0);
             if (RT_FAILURE(rc))
                 return PDMDRV_SET_ERROR(pDrvIns, rc, N_("Failed to query \"Sectors\" from the config"));
 
             /* Uuid */
-            rc = CFGMR3QueryStringAlloc(pCfg, "Uuid", &psz);
+            rc = pHlp->pfnCFGMQueryStringAlloc(pCfg, "Uuid", &psz);
             if (rc == VERR_CFGM_VALUE_NOT_FOUND)
                 RTUuidClear(&pThis->Uuid);
@@ -4889,5 +4891,5 @@
 
 #ifdef VBOX_PERIODIC_FLUSH
-            rc = CFGMR3QueryU32Def(pCfg, "FlushInterval", &pThis->cbFlushInterval, 0);
+            rc = pHlp->pfnCFGMQueryU32Def(pCfg, "FlushInterval", &pThis->cbFlushInterval, 0);
             if (RT_FAILURE(rc))
                 return PDMDRV_SET_ERROR(pDrvIns, rc, N_("Failed to query \"FlushInterval\" from the config"));
@@ -4895,5 +4897,5 @@
 
 #ifdef VBOX_IGNORE_FLUSH
-            rc = CFGMR3QueryBoolDef(pCfg, "IgnoreFlush", &pThis->fIgnoreFlush, true);
+            rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "IgnoreFlush", &pThis->fIgnoreFlush, true);
             if (RT_FAILURE(rc))
                 return PDMDRV_SET_ERROR(pDrvIns, rc, N_("Failed to query \"IgnoreFlush\" from the config"));
@@ -4904,5 +4906,5 @@
                 LogRel(("DrvVD: Flushes will be passed to the disk\n"));
 
-            rc = CFGMR3QueryBoolDef(pCfg, "IgnoreFlushAsync", &pThis->fIgnoreFlushAsync, false);
+            rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "IgnoreFlushAsync", &pThis->fIgnoreFlushAsync, false);
             if (RT_FAILURE(rc))
                 return PDMDRV_SET_ERROR(pDrvIns, rc, N_("Failed to query \"IgnoreFlushAsync\" from the config"));
@@ -4914,5 +4916,5 @@
 #endif /* VBOX_IGNORE_FLUSH */
 
-            rc = CFGMR3QueryBoolDef(pCurNode, "EmptyDrive", &fEmptyDrive, false);
+            rc = pHlp->pfnCFGMQueryBoolDef(pCurNode, "EmptyDrive", &fEmptyDrive, false);
             if (RT_FAILURE(rc))
             {
@@ -4922,9 +4924,9 @@
             }
 
-            rc = CFGMR3QueryU32Def(pCfg, "IoBufMax", &cbIoBufMax, 5 * _1M);
+            rc = pHlp->pfnCFGMQueryU32Def(pCfg, "IoBufMax", &cbIoBufMax, 5 * _1M);
             if (RT_FAILURE(rc))
                 return PDMDRV_SET_ERROR(pDrvIns, rc, N_("Failed to query \"IoBufMax\" from the config"));
 
-            rc = CFGMR3QueryBoolDef(pCfg, "NonRotationalMedium", &pThis->fNonRotational, false);
+            rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "NonRotationalMedium", &pThis->fNonRotational, false);
             if (RT_FAILURE(rc))
                 return PDMDRV_SET_ERROR(pDrvIns, rc,
@@ -5014,5 +5016,5 @@
              * Read the image configuration.
              */
-            rc = CFGMR3QueryStringAlloc(pCurNode, "Path", &pszName);
+            rc = pHlp->pfnCFGMQueryStringAlloc(pCurNode, "Path", &pszName);
             if (RT_FAILURE(rc))
             {
@@ -5022,5 +5024,5 @@
             }
 
-            rc = CFGMR3QueryStringAlloc(pCurNode, "Format", &pszFormat);
+            rc = pHlp->pfnCFGMQueryStringAlloc(pCurNode, "Format", &pszFormat);
             if (RT_FAILURE(rc))
             {
@@ -5031,5 +5033,5 @@
 
             bool fMergeSource;
-            rc = CFGMR3QueryBoolDef(pCurNode, "MergeSource", &fMergeSource, false);
+            rc = pHlp->pfnCFGMQueryBoolDef(pCurNode, "MergeSource", &fMergeSource, false);
             if (RT_FAILURE(rc))
             {
@@ -5051,5 +5053,5 @@
 
             bool fMergeTarget;
-            rc = CFGMR3QueryBoolDef(pCurNode, "MergeTarget", &fMergeTarget, false);
+            rc = pHlp->pfnCFGMQueryBoolDef(pCurNode, "MergeTarget", &fMergeTarget, false);
             if (RT_FAILURE(rc))
             {
@@ -5070,5 +5072,5 @@
             }
 
-            PCFGMNODE pCfgVDConfig = CFGMR3GetChild(pCurNode, "VDConfig");
+            PCFGMNODE pCfgVDConfig = pHlp->pfnCFGMGetChild(pCurNode, "VDConfig");
             pImage->VDIfConfig.pfnAreKeysValid = drvvdCfgAreKeysValid;
             pImage->VDIfConfig.pfnQuerySize    = drvvdCfgQuerySize;
@@ -5090,5 +5092,5 @@
             {
                 if (pCfgVDConfig)
-                    pThis->pCfgCrypto = CFGMR3GetChild(pCfgVDConfig, "CRYPT");
+                    pThis->pCfgCrypto = pHlp->pfnCFGMGetChild(pCfgVDConfig, "CRYPT");
 
                 if (pThis->pCfgCrypto)
@@ -5248,5 +5250,5 @@
             iLevel--;
             iImageIdx++;
-            pCurNode = CFGMR3GetParent(pCurNode);
+            pCurNode = pHlp->pfnCFGMGetParent(pCurNode);
         }
 
