Index: /trunk/include/iprt/ldr.h
===================================================================
--- /trunk/include/iprt/ldr.h	(revision 64890)
+++ /trunk/include/iprt/ldr.h	(revision 64891)
@@ -1014,4 +1014,7 @@
     /** Import module by index (32-bit) stored in the buffer. */
     RTLDRPROP_IMPORT_MODULE,
+    /** The file offset of the main executable header.
+     * This is mainly for PE, NE and LX headers, but also Mach-O FAT. */
+    RTLDRPROP_FILE_OFF_HEADER,
 
     /** End of valid properties.  */
Index: /trunk/src/VBox/Runtime/common/ldr/ldrEx.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/ldr/ldrEx.cpp	(revision 64890)
+++ /trunk/src/VBox/Runtime/common/ldr/ldrEx.cpp	(revision 64891)
@@ -636,4 +636,8 @@
             AssertReturn(cbBuf >= sizeof(uint32_t), VERR_INVALID_PARAMETER);
             break;
+        case RTLDRPROP_FILE_OFF_HEADER:
+            *pcbRet = sizeof(uint64_t);
+            AssertReturn(cbBuf == sizeof(uint32_t) || cbBuf == sizeof(uint64_t), VERR_INVALID_PARAMETER);
+            break;
 
         default:
Index: /trunk/src/VBox/Runtime/common/ldr/ldrPE.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/ldr/ldrPE.cpp	(revision 64890)
+++ /trunk/src/VBox/Runtime/common/ldr/ldrPE.cpp	(revision 64891)
@@ -1960,8 +1960,15 @@
             break;
 
-
         case RTLDRPROP_IMPORT_MODULE:
             Assert(cbBuf >= sizeof(uint32_t));
             return rtLdrPE_QueryImportModule(pModPe, pvBits, *(uint32_t *)pvBuf, pvBuf, cbBuf, pcbRet);
+
+        case RTLDRPROP_FILE_OFF_HEADER:
+            Assert(cbBuf == sizeof(uint32_t) || cbBuf == sizeof(uint64_t));
+            if (cbBuf == sizeof(uint32_t))
+                *(uint32_t *)pvBuf = pModPe->offNtHdrs;
+            else
+                *(uint64_t *)pvBuf = pModPe->offNtHdrs;
+            return VINF_SUCCESS;
 
         default:
