Index: /trunk/src/VBox/Devices/Storage/VBoxHDD-new.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/VBoxHDD-new.cpp	(revision 12342)
+++ /trunk/src/VBox/Devices/Storage/VBoxHDD-new.cpp	(revision 12343)
@@ -181,5 +181,5 @@
         char *pszPluginName;
 
-        rc = RTPathSharedLibs(szSharedLibPath, sizeof(szSharedLibPath));
+        rc = RTPathAppPrivateArch(szSharedLibPath, sizeof(szSharedLibPath));
         if (RT_FAILURE(rc))
             return rc;
@@ -667,5 +667,5 @@
         /* Then enumerate plugin backends. */
         char szPath[RTPATH_MAX];
-        rc = RTPathSharedLibs(szPath, sizeof(szPath));
+        rc = RTPathAppPrivateArch(szPath, sizeof(szPath));
         if (RT_FAILURE(rc))
             break;
@@ -686,7 +686,7 @@
             break;
 
-        PRTDIRENTRY pPluginDirEntry = NULL;
+        PRTDIRENTRYEX pPluginDirEntry = NULL;
         unsigned cbPluginDirEntry = sizeof(RTDIRENTRY);
-        pPluginDirEntry = (PRTDIRENTRY)RTMemAllocZ(sizeof(RTDIRENTRY));
+        pPluginDirEntry = (PRTDIRENTRYEX)RTMemAllocZ(sizeof(RTDIRENTRY));
         if (!pPluginDirEntry)
         {
@@ -695,5 +695,5 @@
         }
 
-        while ((rc = RTDirRead(pPluginDir, pPluginDirEntry, &cbPluginDirEntry)) != VERR_NO_MORE_FILES)
+        while ((rc = RTDirReadEx(pPluginDir, pPluginDirEntry, &cbPluginDirEntry, RTFSOBJATTRADD_NOTHING)) != VERR_NO_MORE_FILES)
         {
             RTLDRMOD hPlugin = NIL_RTLDRMOD;
@@ -706,7 +706,7 @@
                 /* allocate new buffer. */
                 RTMemFree(pPluginDirEntry);
-                pPluginDirEntry = (PRTDIRENTRY)RTMemAllocZ(cbPluginDirEntry);
+                pPluginDirEntry = (PRTDIRENTRYEX)RTMemAllocZ(cbPluginDirEntry);
                 /* Retry. */
-                rc = RTDirRead(pPluginDir, pPluginDirEntry, &cbPluginDirEntry);
+                rc = RTDirReadEx(pPluginDir, pPluginDirEntry, &cbPluginDirEntry, RTFSOBJATTRADD_NOTHING);
                 if (RT_FAILURE(rc))
                     break;
@@ -716,5 +716,5 @@
 
             /* We got the new entry. */
-            if (pPluginDirEntry->enmType != RTDIRENTRYTYPE_FILE)
+            if (!RTFS_IS_FILE(pPluginDirEntry->Info.Attr.fMode))
                 continue;
 
@@ -952,5 +952,5 @@
         /* Then check if plugin backends support this file format. */
         char szPath[RTPATH_MAX];
-        rc = RTPathSharedLibs(szPath, sizeof(szPath));
+        rc = RTPathAppPrivateArch(szPath, sizeof(szPath));
         if (RT_FAILURE(rc))
             break;
@@ -971,7 +971,7 @@
             break;
 
-        PRTDIRENTRY pPluginDirEntry = NULL;
+        PRTDIRENTRYEX pPluginDirEntry = NULL;
         unsigned cbPluginDirEntry = sizeof(RTDIRENTRY);
-        pPluginDirEntry = (PRTDIRENTRY)RTMemAllocZ(sizeof(RTDIRENTRY));
+        pPluginDirEntry = (PRTDIRENTRYEX)RTMemAllocZ(sizeof(RTDIRENTRY));
         if (!pPluginDirEntry)
         {
@@ -980,5 +980,5 @@
         }
 
-        while ((rc = RTDirRead(pPluginDir, pPluginDirEntry, &cbPluginDirEntry)) != VERR_NO_MORE_FILES)
+        while ((rc = RTDirReadEx(pPluginDir, pPluginDirEntry, &cbPluginDirEntry, RTFSOBJATTRADD_NOTHING)) != VERR_NO_MORE_FILES)
         {
             RTLDRMOD hPlugin = NIL_RTLDRMOD;
@@ -991,7 +991,7 @@
                 /* allocate new buffer. */
                 RTMemFree(pPluginDirEntry);
-                pPluginDirEntry = (PRTDIRENTRY)RTMemAllocZ(cbPluginDirEntry);
+                pPluginDirEntry = (PRTDIRENTRYEX)RTMemAllocZ(cbPluginDirEntry);
                 /* Retry. */
-                rc = RTDirRead(pPluginDir, pPluginDirEntry, &cbPluginDirEntry);
+                rc = RTDirReadEx(pPluginDir, pPluginDirEntry, &cbPluginDirEntry, RTFSOBJATTRADD_NOTHING);
                 if (RT_FAILURE(rc))
                     break;
@@ -1001,5 +1001,5 @@
 
             /* We got the new entry. */
-            if (pPluginDirEntry->enmType != RTDIRENTRYTYPE_FILE)
+            if (!RTFS_IS_FILE(pPluginDirEntry->Info.Attr.fMode))
                 continue;
 
