Index: trunk/src/VBox/Runtime/r3/dir.cpp
===================================================================
--- trunk/src/VBox/Runtime/r3/dir.cpp	(revision 69720)
+++ trunk/src/VBox/Runtime/r3/dir.cpp	(revision 69753)
@@ -47,6 +47,6 @@
 
 
-static DECLCALLBACK(bool) rtDirFilterWinNtMatch(PRTDIR pDir, const char *pszName);
-static DECLCALLBACK(bool) rtDirFilterWinNtMatchNoWildcards(PRTDIR pDir, const char *pszName);
+static DECLCALLBACK(bool) rtDirFilterWinNtMatch(PRTDIRINTERNAL pDir, const char *pszName);
+static DECLCALLBACK(bool) rtDirFilterWinNtMatchNoWildcards(PRTDIRINTERNAL pDir, const char *pszName);
 DECLINLINE(bool) rtDirFilterWinNtMatchEon(PCRTUNICP puszFilter);
 static bool rtDirFilterWinNtMatchDosStar(unsigned iDepth, RTUNICP uc, const char *pszNext, PCRTUNICP puszFilter);
@@ -117,5 +117,5 @@
  * @param   pszName     The path to match to the filter.
  */
-static DECLCALLBACK(bool) rtDirFilterWinNtMatchNoWildcards(PRTDIR pDir, const char *pszName)
+static DECLCALLBACK(bool) rtDirFilterWinNtMatchNoWildcards(PRTDIRINTERNAL pDir, const char *pszName)
 {
     /*
@@ -447,5 +447,5 @@
  * @param   pszName     The path to match to the filter.
  */
-static DECLCALLBACK(bool) rtDirFilterWinNtMatch(PRTDIR pDir, const char *pszName)
+static DECLCALLBACK(bool) rtDirFilterWinNtMatch(PRTDIRINTERNAL pDir, const char *pszName)
 {
     return rtDirFilterWinNtMatchBase(0, pszName, pDir->puszFilter);
@@ -460,5 +460,5 @@
  * @param   pDir        The directory handle (not yet opened).
  */
-static PFNRTDIRFILTER rtDirFilterWinNtInit(PRTDIR pDir)
+static PFNRTDIRFILTER rtDirFilterWinNtInit(PRTDIRINTERNAL pDir)
 {
     /*
@@ -506,5 +506,5 @@
  *
  * @returns IPRT status code.
- * @param   ppDir               Where to store the directory handle.
+ * @param   phDir               Where to store the directory handle.
  * @param   pszPath             The specified path.
  * @param   pszFilter           Pointer to where the filter start in the path.
@@ -517,6 +517,6 @@
  *                              we're to use (consume) hRelativeDir.
  */
-static int rtDirOpenCommon(PRTDIR *ppDir, const char *pszPath, const char *pszFilter, RTDIRFILTER enmFilter, uint32_t fFlags,
-                           uintptr_t hRelativeDir, void *pvNativeRelative)
+static int rtDirOpenCommon(RTDIR *phDir, const char *pszPath, const char *pszFilter, RTDIRFILTER enmFilter,
+                           uint32_t fFlags, uintptr_t hRelativeDir, void *pvNativeRelative)
 {
     /*
@@ -576,5 +576,5 @@
                              + cbFilter
                              + cchRealPath + 1 + 4;
-    PRTDIR pDir = (PRTDIR)RTMemAllocZ(cbAllocated);
+    PRTDIRINTERNAL pDir = (PRTDIRINTERNAL)RTMemAllocZ(cbAllocated);
     if (!pDir)
         return VERR_NO_MEMORY;
@@ -631,5 +631,5 @@
     rc = rtDirNativeOpen(pDir, szRealPath, hRelativeDir, pvNativeRelative);
     if (RT_SUCCESS(rc))
-        *ppDir = pDir;
+        *phDir = pDir;
     else
         RTMemFree(pDir);
@@ -639,10 +639,10 @@
 
 
-RTDECL(int) RTDirOpen(PRTDIR *ppDir, const char *pszPath)
+RTDECL(int) RTDirOpen(RTDIR *phDir, const char *pszPath)
 {
     /*
      * Validate input.
      */
-    AssertMsgReturn(VALID_PTR(ppDir), ("%p\n", ppDir), VERR_INVALID_POINTER);
+    AssertMsgReturn(VALID_PTR(phDir), ("%p\n", phDir), VERR_INVALID_POINTER);
     AssertMsgReturn(VALID_PTR(pszPath), ("%p\n", pszPath), VERR_INVALID_POINTER);
 
@@ -650,11 +650,11 @@
      * Take common cause with RTDirOpenFiltered().
      */
-    int rc = rtDirOpenCommon(ppDir, pszPath, NULL, RTDIRFILTER_NONE, 0 /*fFlags*/, ~(uintptr_t)0, NULL);
-    LogFlow(("RTDirOpen(%p:{%p}, %p:{%s}): return %Rrc\n", ppDir, *ppDir, pszPath, pszPath, rc));
+    int rc = rtDirOpenCommon(phDir, pszPath, NULL, RTDIRFILTER_NONE, 0 /*fFlags*/, ~(uintptr_t)0, NULL);
+    LogFlow(("RTDirOpen(%p:{%p}, %p:{%s}): return %Rrc\n", phDir, *phDir, pszPath, pszPath, rc));
     return rc;
 }
 
 
-DECLHIDDEN(int) rtDirOpenRelativeOrHandle(PRTDIR *ppDir, const char *pszPath, RTDIRFILTER enmFilter, uint32_t fFlags,
+DECLHIDDEN(int) rtDirOpenRelativeOrHandle(RTDIR *phDir, const char *pszPath, RTDIRFILTER enmFilter, uint32_t fFlags,
                                           uintptr_t hRelativeDir, void *pvNativeRelative)
 {
@@ -662,5 +662,5 @@
      * Validate input.
      */
-    AssertMsgReturn(VALID_PTR(ppDir), ("%p\n", ppDir), VERR_INVALID_POINTER);
+    AssertMsgReturn(VALID_PTR(phDir), ("%p\n", phDir), VERR_INVALID_POINTER);
     AssertMsgReturn(VALID_PTR(pszPath), ("%p\n", pszPath), VERR_INVALID_POINTER);
     AssertReturn(!(fFlags & ~RTDIR_F_VALID_MASK), VERR_INVALID_FLAGS);
@@ -695,19 +695,19 @@
      * and initialize the handle, and finally call the backend.
      */
-    int rc = rtDirOpenCommon(ppDir, pszPath, pszFilter, enmFilter, fFlags, hRelativeDir, pvNativeRelative);
+    int rc = rtDirOpenCommon(phDir, pszPath, pszFilter, enmFilter, fFlags, hRelativeDir, pvNativeRelative);
 
     LogFlow(("RTDirOpenFiltered(%p:{%p}, %p:{%s}, %d, %#x, %p, %p): return %Rrc\n",
-             ppDir,*ppDir, pszPath, pszPath, enmFilter, fFlags, hRelativeDir, pvNativeRelative, rc));
+             phDir,*phDir, pszPath, pszPath, enmFilter, fFlags, hRelativeDir, pvNativeRelative, rc));
     return rc;
 }
 
 
-RTDECL(int) RTDirOpenFiltered(PRTDIR *ppDir, const char *pszPath, RTDIRFILTER enmFilter, uint32_t fFlags)
-{
-    return rtDirOpenRelativeOrHandle(ppDir, pszPath, enmFilter, fFlags, ~(uintptr_t)0, NULL);
-}
-
-
-RTDECL(bool) RTDirIsValid(PRTDIR hDir)
+RTDECL(int) RTDirOpenFiltered(RTDIR *phDir, const char *pszPath, RTDIRFILTER enmFilter, uint32_t fFlags)
+{
+    return rtDirOpenRelativeOrHandle(phDir, pszPath, enmFilter, fFlags, ~(uintptr_t)0, NULL);
+}
+
+
+RTDECL(bool) RTDirIsValid(RTDIR hDir)
 {
     return RT_VALID_PTR(hDir)
Index: trunk/src/VBox/Runtime/r3/dir2.cpp
===================================================================
--- trunk/src/VBox/Runtime/r3/dir2.cpp	(revision 69720)
+++ trunk/src/VBox/Runtime/r3/dir2.cpp	(revision 69753)
@@ -62,15 +62,11 @@
      * Enumerate the directory content and dispose of it.
      */
-    PRTDIR pDir;
-    int rc = RTDirOpen(&pDir, pszBuf);
+    RTDIR hDir;
+    int rc = RTDirOpen(&hDir, pszBuf);
     if (RT_FAILURE(rc))
         return rc;
-    while (RT_SUCCESS(rc = RTDirRead(pDir, pDirEntry, NULL)))
+    while (RT_SUCCESS(rc = RTDirRead(hDir, pDirEntry, NULL)))
     {
-        if (   pDirEntry->szName[0] != '.'
-            || pDirEntry->cbName > 2
-            || (   pDirEntry->cbName == 2
-                && pDirEntry->szName[1] != '.')
-           )
+        if (!RTDirEntryIsStdDotLink(pDirEntry))
         {
             /* Construct the full name of the entry. */
@@ -130,5 +126,5 @@
     if (rc == VERR_NO_MORE_FILES)
         rc = VINF_SUCCESS;
-    RTDirClose(pDir);
+    RTDirClose(hDir);
     return rc;
 }
Index: trunk/src/VBox/Runtime/r3/generic/dirrel-r3-generic.cpp
===================================================================
--- trunk/src/VBox/Runtime/r3/generic/dirrel-r3-generic.cpp	(revision 69720)
+++ trunk/src/VBox/Runtime/r3/generic/dirrel-r3-generic.cpp	(revision 69753)
@@ -53,5 +53,5 @@
  * @param   pszRelPath          The relative path.
  */
-static int rtDirRelBuildFullPath(PRTDIR pThis, char *pszPathDst, size_t cbPathDst, const char *pszRelPath)
+static int rtDirRelBuildFullPath(PRTDIRINTERNAL pThis, char *pszPathDst, size_t cbPathDst, const char *pszRelPath)
 {
     AssertMsgReturn(!RTPathStartsWithRoot(pszRelPath), ("pszRelPath='%s'\n", pszRelPath), VERR_PATH_IS_NOT_RELATIVE);
@@ -121,7 +121,7 @@
  * @sa      RTFileOpen
  */
-RTDECL(int)  RTDirRelFileOpen(PRTDIR hDir, const char *pszRelFilename, uint64_t fOpen, PRTFILE phFile)
-{
-    PRTDIR pThis = hDir;
+RTDECL(int)  RTDirRelFileOpen(RTDIR hDir, const char *pszRelFilename, uint64_t fOpen, PRTFILE phFile)
+{
+    PRTDIRINTERNAL pThis = hDir;
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
@@ -158,7 +158,7 @@
  * @sa      RTDirOpen
  */
-RTDECL(int) RTDirRelDirOpen(PRTDIR hDir, const char *pszDir, PRTDIR *phDir)
-{
-    PRTDIR pThis = hDir;
+RTDECL(int) RTDirRelDirOpen(RTDIR hDir, const char *pszDir, RTDIR *phDir)
+{
+    PRTDIRINTERNAL pThis = hDir;
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
@@ -188,8 +188,8 @@
  * @sa      RTDirOpenFiltered
  */
-RTDECL(int) RTDirRelDirOpenFiltered(PRTDIR hDir, const char *pszDirAndFilter, RTDIRFILTER enmFilter,
-                                    uint32_t fFlags, PRTDIR *phDir)
-{
-    PRTDIR pThis = hDir;
+RTDECL(int) RTDirRelDirOpenFiltered(RTDIR hDir, const char *pszDirAndFilter, RTDIRFILTER enmFilter,
+                                    uint32_t fFlags, RTDIR *phDir)
+{
+    PRTDIRINTERNAL pThis = hDir;
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
@@ -216,7 +216,7 @@
  * @sa      RTDirCreate
  */
-RTDECL(int) RTDirRelDirCreate(PRTDIR hDir, const char *pszRelPath, RTFMODE fMode, uint32_t fCreate, PRTDIR *phSubDir)
-{
-    PRTDIR pThis = hDir;
+RTDECL(int) RTDirRelDirCreate(RTDIR hDir, const char *pszRelPath, RTFMODE fMode, uint32_t fCreate, RTDIR *phSubDir)
+{
+    PRTDIRINTERNAL pThis = hDir;
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
@@ -243,7 +243,7 @@
  * @sa      RTDirRemove
  */
-RTDECL(int) RTDirRelDirRemove(PRTDIR hDir, const char *pszRelPath)
-{
-    PRTDIR pThis = hDir;
+RTDECL(int) RTDirRelDirRemove(RTDIR hDir, const char *pszRelPath)
+{
+    PRTDIRINTERNAL pThis = hDir;
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
@@ -287,8 +287,8 @@
  * @sa      RTPathQueryInfoEx
  */
-RTDECL(int) RTDirRelPathQueryInfo(PRTDIR hDir, const char *pszRelPath, PRTFSOBJINFO pObjInfo,
+RTDECL(int) RTDirRelPathQueryInfo(RTDIR hDir, const char *pszRelPath, PRTFSOBJINFO pObjInfo,
                                   RTFSOBJATTRADD enmAddAttr, uint32_t fFlags)
 {
-    PRTDIR pThis = hDir;
+    PRTDIRINTERNAL pThis = hDir;
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
@@ -316,7 +316,7 @@
  * @sa      RTPathSetMode
  */
-RTDECL(int) RTDirRelPathSetMode(PRTDIR hDir, const char *pszRelPath, RTFMODE fMode, uint32_t fFlags)
-{
-    PRTDIR pThis = hDir;
+RTDECL(int) RTDirRelPathSetMode(RTDIR hDir, const char *pszRelPath, RTFMODE fMode, uint32_t fFlags)
+{
+    PRTDIRINTERNAL pThis = hDir;
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
@@ -364,8 +364,8 @@
  * @sa      RTPathSetTimesEx
  */
-RTDECL(int) RTDirRelPathSetTimes(PRTDIR hDir, const char *pszRelPath, PCRTTIMESPEC pAccessTime, PCRTTIMESPEC pModificationTime,
+RTDECL(int) RTDirRelPathSetTimes(RTDIR hDir, const char *pszRelPath, PCRTTIMESPEC pAccessTime, PCRTTIMESPEC pModificationTime,
                                  PCRTTIMESPEC pChangeTime, PCRTTIMESPEC pBirthTime, uint32_t fFlags)
 {
-    PRTDIR pThis = hDir;
+    PRTDIRINTERNAL pThis = hDir;
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
@@ -393,7 +393,7 @@
  * @sa      RTPathSetOwnerEx
  */
-RTDECL(int) RTDirRelPathSetOwner(PRTDIR hDir, const char *pszRelPath, uint32_t uid, uint32_t gid, uint32_t fFlags)
-{
-    PRTDIR pThis = hDir;
+RTDECL(int) RTDirRelPathSetOwner(RTDIR hDir, const char *pszRelPath, uint32_t uid, uint32_t gid, uint32_t fFlags)
+{
+    PRTDIRINTERNAL pThis = hDir;
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
@@ -429,11 +429,11 @@
  * @sa      RTPathRename
  */
-RTDECL(int) RTDirRelPathRename(PRTDIR hDirSrc, const char *pszSrc, PRTDIR hDirDst, const char *pszDst, unsigned fRename)
-{
-    PRTDIR pThis = hDirSrc;
-    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
-    AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
-
-    PRTDIR pThat = hDirDst;
+RTDECL(int) RTDirRelPathRename(RTDIR hDirSrc, const char *pszSrc, RTDIR hDirDst, const char *pszDst, unsigned fRename)
+{
+    PRTDIRINTERNAL pThis = hDirSrc;
+    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
+    AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
+
+    PRTDIRINTERNAL pThat = hDirDst;
     if (pThat != pThis)
     {
@@ -465,7 +465,7 @@
  * @sa      RTPathUnlink
  */
-RTDECL(int) RTDirRelPathUnlink(PRTDIR hDir, const char *pszRelPath, uint32_t fUnlink)
-{
-    PRTDIR pThis = hDir;
+RTDECL(int) RTDirRelPathUnlink(RTDIR hDir, const char *pszRelPath, uint32_t fUnlink)
+{
+    PRTDIRINTERNAL pThis = hDir;
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
@@ -507,8 +507,8 @@
  * @sa      RTSymlinkCreate
  */
-RTDECL(int) RTDirRelSymlinkCreate(PRTDIR hDir, const char *pszSymlink, const char *pszTarget,
+RTDECL(int) RTDirRelSymlinkCreate(RTDIR hDir, const char *pszSymlink, const char *pszTarget,
                                   RTSYMLINKTYPE enmType, uint32_t fCreate)
 {
-    PRTDIR pThis = hDir;
+    PRTDIRINTERNAL pThis = hDir;
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
@@ -540,7 +540,7 @@
  * @sa      RTSymlinkRead
  */
-RTDECL(int) RTDirRelSymlinkRead(PRTDIR hDir, const char *pszSymlink, char *pszTarget, size_t cbTarget, uint32_t fRead)
-{
-    PRTDIR pThis = hDir;
+RTDECL(int) RTDirRelSymlinkRead(RTDIR hDir, const char *pszSymlink, char *pszTarget, size_t cbTarget, uint32_t fRead)
+{
+    PRTDIRINTERNAL pThis = hDir;
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
Index: trunk/src/VBox/Runtime/r3/linux/RTProcIsRunningByName-linux.cpp
===================================================================
--- trunk/src/VBox/Runtime/r3/linux/RTProcIsRunningByName-linux.cpp	(revision 69720)
+++ trunk/src/VBox/Runtime/r3/linux/RTProcIsRunningByName-linux.cpp	(revision 69753)
@@ -54,11 +54,11 @@
      * Enumerate /proc.
      */
-    PRTDIR pDir;
-    int rc = RTDirOpen(&pDir, "/proc");
+    RTDIR hDir;
+    int rc = RTDirOpen(&hDir, "/proc");
     AssertMsgRCReturn(rc, ("RTDirOpen on /proc failed: rc=%Rrc\n", rc), false);
     if (RT_SUCCESS(rc))
     {
         RTDIRENTRY DirEntry;
-        while (RT_SUCCESS(RTDirRead(pDir, &DirEntry, NULL)))
+        while (RT_SUCCESS(RTDirRead(hDir, &DirEntry, NULL)))
         {
             /*
@@ -104,5 +104,5 @@
                     {
                         /* Found it! */
-                        RTDirClose(pDir);
+                        RTDirClose(hDir);
                         return true;
                     }
Index: trunk/src/VBox/Runtime/r3/linux/krnlmod-linux.cpp
===================================================================
--- trunk/src/VBox/Runtime/r3/linux/krnlmod-linux.cpp	(revision 69720)
+++ trunk/src/VBox/Runtime/r3/linux/krnlmod-linux.cpp	(revision 69753)
@@ -172,19 +172,18 @@
     uint32_t cKmodsLoaded = 0;
 
-    PRTDIR pDir = NULL;
-    int rc = RTDirOpen(&pDir, "/sys/module");
+    RTDIR hDir = NULL;
+    int rc = RTDirOpen(&hDir, "/sys/module");
     if (RT_SUCCESS(rc))
     {
         RTDIRENTRY DirEnt;
-        rc = RTDirRead(pDir, &DirEnt, NULL);
+        rc = RTDirRead(hDir, &DirEnt, NULL);
         while (RT_SUCCESS(rc))
         {
-            if (   RTStrCmp(DirEnt.szName, ".")
-                && RTStrCmp(DirEnt.szName, ".."))
+            if (!RTDirEntryIsStdDotLink(&DirEntry))
                 cKmodsLoaded++;
-            rc = RTDirRead(pDir, &DirEnt, NULL);
+            rc = RTDirRead(hDir, &DirEnt, NULL);
         }
 
-        RTDirClose(pDir);
+        RTDirClose(hDir);
     }
 
@@ -207,5 +206,5 @@
     }
 
-    PRTDIR pDir = NULL;
+    RTDIR hDir = NULL;
     int rc = RTDirOpen(&pDir, "/sys/module");
     if (RT_SUCCESS(rc))
@@ -214,9 +213,8 @@
         RTDIRENTRY DirEnt;
 
-        rc = RTDirRead(pDir, &DirEnt, NULL);
+        rc = RTDirRead(hDir, &DirEnt, NULL);
         while (RT_SUCCESS(rc))
         {
-            if (   RTStrCmp(DirEnt.szName, ".")
-                && RTStrCmp(DirEnt.szName, ".."))
+            if (!RTDirEntryIsStdDotLink(&DirEnt))
             {
                 rc = rtKrnlModLinuxInfoCreate(DirEnt.szName, &pahKrnlModInfo[idxKrnlModInfo]);
@@ -226,5 +224,5 @@
 
             if (RT_SUCCESS(rc))
-                rc = RTDirRead(pDir, &DirEnt, NULL);
+                rc = RTDirRead(hDir, &DirEnt, NULL);
         }
 
@@ -241,5 +239,5 @@
             *pcEntries = cKmodsLoaded;
 
-        RTDirClose(pDir);
+        RTDirClose(hDir);
     }
 
Index: trunk/src/VBox/Runtime/r3/nt/direnum-r3-nt.cpp
===================================================================
--- trunk/src/VBox/Runtime/r3/nt/direnum-r3-nt.cpp	(revision 69720)
+++ trunk/src/VBox/Runtime/r3/nt/direnum-r3-nt.cpp	(revision 69753)
@@ -48,5 +48,5 @@
 *   Defined Constants And Macros                                                                                                 *
 *********************************************************************************************************************************/
-/** Whether to return a single record (TRUE) or multiple (FALSE)o. */
+/** Whether to return a single record (TRUE) or multiple (FALSE). */
 #define RTDIR_NT_SINGLE_RECORD  FALSE
 
@@ -77,9 +77,9 @@
 {
     NOREF(pszPath);
-    return sizeof(RTDIR);
-}
-
-
-int rtDirNativeOpen(PRTDIR pDir, char *pszPathBuf, uintptr_t hRelativeDir, void *pvNativeRelative)
+    return sizeof(RTDIRINTERNAL);
+}
+
+
+int rtDirNativeOpen(PRTDIRINTERNAL pDir, char *pszPathBuf, uintptr_t hRelativeDir, void *pvNativeRelative)
 {
     /*
@@ -155,6 +155,8 @@
 
 
-RTDECL(int) RTDirClose(PRTDIR pDir)
-{
+RTDECL(int) RTDirClose(RTDIR hDir)
+{
+    PRTDIRINTERNAL pDir = hDir;
+
     /*
      * Validate input.
@@ -196,5 +198,5 @@
  * @param   pThis       The directory instance data.
  */
-static int rtDirNtCheckRecord(PRTDIR pThis)
+static int rtDirNtCheckRecord(PRTDIRINTERNAL pThis)
 {
 #ifdef RTDIR_NT_STRICT
@@ -232,5 +234,5 @@
  * @param   pThis       The directory instance data.
  */
-static int rtDirNtAdvanceBuffer(PRTDIR pThis)
+static int rtDirNtAdvanceBuffer(PRTDIRINTERNAL pThis)
 {
     int rc;
@@ -275,5 +277,5 @@
  * @param   pThis       The directory instance data.
  */
-static int rtDirNtFetchMore(PRTDIR pThis)
+static int rtDirNtFetchMore(PRTDIRINTERNAL pThis)
 {
     Assert(!pThis->fDataUnread);
@@ -496,5 +498,5 @@
  * @param   pwsName     The file name, not terminated.
  */
-static int rtDirNtConvertName(PRTDIR pThis, uint32_t cbName, PCRTUTF16 pwsName)
+static int rtDirNtConvertName(PRTDIRINTERNAL pThis, uint32_t cbName, PCRTUTF16 pwsName)
 {
     int rc = RTUtf16ToUtf8Ex(pwsName, cbName / 2, &pThis->pszName, pThis->cbNameAlloc, &pThis->cchName);
@@ -525,5 +527,5 @@
  * @param   pThis       The directory instance data.
  */
-static int rtDirNtConvertCurName(PRTDIR pThis)
+static int rtDirNtConvertCurName(PRTDIRINTERNAL pThis)
 {
     switch (pThis->enmInfoClass)
@@ -544,6 +546,7 @@
 
 
-RTDECL(int) RTDirRead(PRTDIR pDir, PRTDIRENTRY pDirEntry, size_t *pcbDirEntry)
-{
+RTDECL(int) RTDirRead(RTDIR hDir, PRTDIRENTRY pDirEntry, size_t *pcbDirEntry)
+{
+    PRTDIRINTERNAL pDir = hDir;
     int rc;
 
@@ -642,7 +645,8 @@
 
 
-RTDECL(int) RTDirReadEx(PRTDIR pDir, PRTDIRENTRYEX pDirEntry, size_t *pcbDirEntry,
+RTDECL(int) RTDirReadEx(RTDIR hDir, PRTDIRENTRYEX pDirEntry, size_t *pcbDirEntry,
                         RTFSOBJATTRADD enmAdditionalAttribs, uint32_t fFlags)
 {
+    PRTDIRINTERNAL pDir = hDir;
     int rc;
 
@@ -823,6 +827,7 @@
 
 
-RTR3DECL(int) RTDirQueryInfo(PRTDIR pDir, PRTFSOBJINFO pObjInfo, RTFSOBJATTRADD enmAdditionalAttribs)
-{
+RTR3DECL(int) RTDirQueryInfo(RTDIR hDir, PRTFSOBJINFO pObjInfo, RTFSOBJATTRADD enmAdditionalAttribs)
+{
+    PRTDIRINTERNAL pDir = hDir;
     AssertPtrReturn(pDir, VERR_INVALID_POINTER);
     AssertReturn(pDir->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
Index: trunk/src/VBox/Runtime/r3/nt/dirrel-r3-nt.cpp
===================================================================
--- trunk/src/VBox/Runtime/r3/nt/dirrel-r3-nt.cpp	(revision 69720)
+++ trunk/src/VBox/Runtime/r3/nt/dirrel-r3-nt.cpp	(revision 69753)
@@ -63,5 +63,5 @@
  * @param   pszRelPath          The relative path.
  */
-static int rtDirRelBuildFullPath(PRTDIR pThis, char *pszPathDst, size_t cbPathDst, const char *pszRelPath)
+static int rtDirRelBuildFullPath(PRTDIRINTERNAL pThis, char *pszPathDst, size_t cbPathDst, const char *pszRelPath)
 {
     AssertMsgReturn(!RTPathStartsWithRoot(pszRelPath), ("pszRelPath='%s'\n", pszRelPath), VERR_PATH_IS_NOT_RELATIVE);
@@ -116,7 +116,7 @@
 
 
-RTDECL(int)  RTDirRelFileOpen(PRTDIR hDir, const char *pszRelFilename, uint64_t fOpen, PRTFILE phFile)
-{
-    PRTDIR pThis = hDir;
+RTDECL(int)  RTDirRelFileOpen(RTDIR hDir, const char *pszRelFilename, uint64_t fOpen, PRTFILE phFile)
+{
+    PRTDIRINTERNAL pThis = hDir;
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
@@ -188,5 +188,5 @@
 
 
-RTDECL(int) RTDirRelDirOpen(PRTDIR hDir, const char *pszDir, PRTDIR *phDir)
+RTDECL(int) RTDirRelDirOpen(RTDIR hDir, const char *pszDir, RTDIR *phDir)
 {
     return RTDirRelDirOpenFiltered(hDir, pszDir, RTDIRFILTER_NONE, 0 /*fFlags*/, phDir);
@@ -194,8 +194,8 @@
 
 
-RTDECL(int) RTDirRelDirOpenFiltered(PRTDIR hDir, const char *pszDirAndFilter, RTDIRFILTER enmFilter,
-                                    uint32_t fFlags, PRTDIR *phDir)
-{
-    PRTDIR pThis = hDir;
+RTDECL(int) RTDirRelDirOpenFiltered(RTDIR hDir, const char *pszDirAndFilter, RTDIRFILTER enmFilter,
+                                    uint32_t fFlags, RTDIR *phDir)
+{
+    PRTDIRINTERNAL pThis = hDir;
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
@@ -217,7 +217,7 @@
 
 
-RTDECL(int) RTDirRelDirCreate(PRTDIR hDir, const char *pszRelPath, RTFMODE fMode, uint32_t fCreate, PRTDIR *phSubDir)
-{
-    PRTDIR pThis = hDir;
+RTDECL(int) RTDirRelDirCreate(RTDIR hDir, const char *pszRelPath, RTFMODE fMode, uint32_t fCreate, RTDIR *phSubDir)
+{
+    PRTDIRINTERNAL pThis = hDir;
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
@@ -308,7 +308,7 @@
 
 
-RTDECL(int) RTDirRelDirRemove(PRTDIR hDir, const char *pszRelPath)
-{
-    PRTDIR pThis = hDir;
+RTDECL(int) RTDirRelDirRemove(RTDIR hDir, const char *pszRelPath)
+{
+    PRTDIRINTERNAL pThis = hDir;
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
@@ -372,8 +372,8 @@
 
 
-RTDECL(int) RTDirRelPathQueryInfo(PRTDIR hDir, const char *pszRelPath, PRTFSOBJINFO pObjInfo,
+RTDECL(int) RTDirRelPathQueryInfo(RTDIR hDir, const char *pszRelPath, PRTFSOBJINFO pObjInfo,
                                   RTFSOBJATTRADD enmAddAttr, uint32_t fFlags)
 {
-    PRTDIR pThis = hDir;
+    PRTDIRINTERNAL pThis = hDir;
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
@@ -409,7 +409,7 @@
  * @sa      RTPathSetMode
  */
-RTDECL(int) RTDirRelPathSetMode(PRTDIR hDir, const char *pszRelPath, RTFMODE fMode, uint32_t fFlags)
-{
-    PRTDIR pThis = hDir;
+RTDECL(int) RTDirRelPathSetMode(RTDIR hDir, const char *pszRelPath, RTFMODE fMode, uint32_t fFlags)
+{
+    PRTDIRINTERNAL pThis = hDir;
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
@@ -458,8 +458,8 @@
  * @sa      RTPathSetTimesEx
  */
-RTDECL(int) RTDirRelPathSetTimes(PRTDIR hDir, const char *pszRelPath, PCRTTIMESPEC pAccessTime, PCRTTIMESPEC pModificationTime,
+RTDECL(int) RTDirRelPathSetTimes(RTDIR hDir, const char *pszRelPath, PCRTTIMESPEC pAccessTime, PCRTTIMESPEC pModificationTime,
                                  PCRTTIMESPEC pChangeTime, PCRTTIMESPEC pBirthTime, uint32_t fFlags)
 {
-    PRTDIR pThis = hDir;
+    PRTDIRINTERNAL pThis = hDir;
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
@@ -490,7 +490,7 @@
  * @sa      RTPathSetOwnerEx
  */
-RTDECL(int) RTDirRelPathSetOwner(PRTDIR hDir, const char *pszRelPath, uint32_t uid, uint32_t gid, uint32_t fFlags)
-{
-    PRTDIR pThis = hDir;
+RTDECL(int) RTDirRelPathSetOwner(RTDIR hDir, const char *pszRelPath, uint32_t uid, uint32_t gid, uint32_t fFlags)
+{
+    PRTDIRINTERNAL pThis = hDir;
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
@@ -527,11 +527,11 @@
  * @sa      RTPathRename
  */
-RTDECL(int) RTDirRelPathRename(PRTDIR hDirSrc, const char *pszSrc, PRTDIR hDirDst, const char *pszDst, unsigned fRename)
-{
-    PRTDIR pThis = hDirSrc;
-    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
-    AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
-
-    PRTDIR pThat = hDirDst;
+RTDECL(int) RTDirRelPathRename(RTDIR hDirSrc, const char *pszSrc, RTDIR hDirDst, const char *pszDst, unsigned fRename)
+{
+    PRTDIRINTERNAL pThis = hDirSrc;
+    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
+    AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
+
+    PRTDIRINTERNAL pThat = hDirDst;
     if (pThat != pThis)
     {
@@ -566,7 +566,7 @@
  * @sa      RTPathUnlink
  */
-RTDECL(int) RTDirRelPathUnlink(PRTDIR hDir, const char *pszRelPath, uint32_t fUnlink)
-{
-    PRTDIR pThis = hDir;
+RTDECL(int) RTDirRelPathUnlink(RTDIR hDir, const char *pszRelPath, uint32_t fUnlink)
+{
+    PRTDIRINTERNAL pThis = hDir;
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
@@ -611,8 +611,8 @@
  * @sa      RTSymlinkCreate
  */
-RTDECL(int) RTDirRelSymlinkCreate(PRTDIR hDir, const char *pszSymlink, const char *pszTarget,
+RTDECL(int) RTDirRelSymlinkCreate(RTDIR hDir, const char *pszSymlink, const char *pszTarget,
                                   RTSYMLINKTYPE enmType, uint32_t fCreate)
 {
-    PRTDIR pThis = hDir;
+    PRTDIRINTERNAL pThis = hDir;
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
@@ -647,7 +647,7 @@
  * @sa      RTSymlinkRead
  */
-RTDECL(int) RTDirRelSymlinkRead(PRTDIR hDir, const char *pszSymlink, char *pszTarget, size_t cbTarget, uint32_t fRead)
-{
-    PRTDIR pThis = hDir;
+RTDECL(int) RTDirRelSymlinkRead(RTDIR hDir, const char *pszSymlink, char *pszTarget, size_t cbTarget, uint32_t fRead)
+{
+    PRTDIRINTERNAL pThis = hDir;
     AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     AssertReturn(pThis->u32Magic == RTDIR_MAGIC, VERR_INVALID_HANDLE);
Index: trunk/src/VBox/Runtime/r3/posix/dir-posix.cpp
===================================================================
--- trunk/src/VBox/Runtime/r3/posix/dir-posix.cpp	(revision 69720)
+++ trunk/src/VBox/Runtime/r3/posix/dir-posix.cpp	(revision 69753)
@@ -215,7 +215,7 @@
         cbNameMax = _XOPEN_NAME_MAX;
 # endif
-    size_t cbDir = RT_OFFSETOF(RTDIR, Data.d_name[cbNameMax + 1]);
-    if (cbDir < sizeof(RTDIR))          /* Ditto. */
-        cbDir = sizeof(RTDIR);
+    size_t cbDir = RT_OFFSETOF(RTDIRINTERNAL, Data.d_name[cbNameMax + 1]);
+    if (cbDir < sizeof(RTDIRINTERNAL))  /* Ditto. */
+        cbDir = sizeof(RTDIRINTERNAL);
     cbDir = RT_ALIGN_Z(cbDir, 8);
 
@@ -224,5 +224,5 @@
 
 
-int rtDirNativeOpen(PRTDIR pDir, char *pszPathBuf, uintptr_t hRelativeDir, void *pvNativeRelative)
+int rtDirNativeOpen(PRTDIRINTERNAL pDir, char *pszPathBuf, uintptr_t hRelativeDir, void *pvNativeRelative)
 {
     NOREF(pszPathBuf); /* only used on windows */
@@ -255,6 +255,8 @@
 
 
-RTDECL(int) RTDirClose(PRTDIR pDir)
-{
+RTDECL(int) RTDirClose(RTDIR hDir)
+{
+    PRTDIRINTERNAL pDir = hDir;
+
     /*
      * Validate input.
@@ -291,5 +293,5 @@
  * @param   pDir        the open directory. Fully validated.
  */
-static int rtDirReadMore(PRTDIR pDir)
+static int rtDirReadMore(PRTDIRINTERNAL pDir)
 {
     /** @todo try avoid the rematching on buffer overflow errors. */
@@ -377,6 +379,8 @@
 
 
-RTDECL(int) RTDirRead(PRTDIR pDir, PRTDIRENTRY pDirEntry, size_t *pcbDirEntry)
-{
+RTDECL(int) RTDirRead(RTDIR hDir, PRTDIRENTRY pDirEntry, size_t *pcbDirEntry)
+{
+    PRTDIRINTERNAL pDir = hDir;
+
     /*
      * Validate and digest input.
@@ -474,6 +478,9 @@
 
 
-RTDECL(int) RTDirReadEx(PRTDIR pDir, PRTDIRENTRYEX pDirEntry, size_t *pcbDirEntry, RTFSOBJATTRADD enmAdditionalAttribs, uint32_t fFlags)
-{
+RTDECL(int) RTDirReadEx(RTDIR hDir, PRTDIRENTRYEX pDirEntry, size_t *pcbDirEntry,
+                        RTFSOBJATTRADD enmAdditionalAttribs, uint32_t fFlags)
+{
+    PRTDIRINTERNAL pDir = hDir;
+
     /*
      * Validate and digest input.
Index: trunk/src/VBox/Runtime/r3/win/direnum-win.cpp
===================================================================
--- trunk/src/VBox/Runtime/r3/win/direnum-win.cpp	(revision 69720)
+++ trunk/src/VBox/Runtime/r3/win/direnum-win.cpp	(revision 69753)
@@ -47,9 +47,9 @@
 {
     NOREF(pszPath);
-    return sizeof(RTDIR);
-}
-
-
-int rtDirNativeOpen(PRTDIR pDir, char *pszPathBuf, uintptr_t hRelativeDir, void *pvNativeRelative))
+    return sizeof(RTDIRINTERNAL);
+}
+
+
+int rtDirNativeOpen(PRTDIRINTERNAL pDir, char *pszPathBuf, uintptr_t hRelativeDir, void *pvNativeRelative))
 {
     RT_NOREF(hRelativeDir, pvNativeRelative);
@@ -107,5 +107,5 @@
 
 
-RTDECL(int) RTDirClose(PRTDIR pDir)
+RTDECL(int) RTDirClose(PRTDIRINTERNAL pDir)
 {
     /*
@@ -138,6 +138,8 @@
 
 
-RTDECL(int) RTDirRead(PRTDIR pDir, PRTDIRENTRY pDirEntry, size_t *pcbDirEntry)
-{
+RTDECL(int) RTDirRead(RTDIR hDir, PRTDIRENTRY pDirEntry, size_t *pcbDirEntry)
+{
+    PPRTDIRINTERNAL pDir = hDir;
+
     /*
      * Validate input.
@@ -222,6 +224,7 @@
 
 
-RTDECL(int) RTDirReadEx(PRTDIR pDir, PRTDIRENTRYEX pDirEntry, size_t *pcbDirEntry, RTFSOBJATTRADD enmAdditionalAttribs, uint32_t fFlags)
-{
+RTDECL(int) RTDirReadEx(RTDIR hDir, PRTDIRENTRYEX pDirEntry, size_t *pcbDirEntry, RTFSOBJATTRADD enmAdditionalAttribs, uint32_t fFlags)
+{
+    PPRTDIRINTERNAL pDir = hDir;
     /** @todo Symlinks: Find[First|Next]FileW will return info about
         the link, so RTPATH_F_FOLLOW_LINK is not handled correctly. */
