Index: /trunk/include/iprt/message.h
===================================================================
--- /trunk/include/iprt/message.h	(revision 26673)
+++ /trunk/include/iprt/message.h	(revision 26674)
@@ -70,4 +70,20 @@
 RTDECL(int)  RTMsgErrorV(const char *pszFormat, va_list va);
 
+/**
+ * Print an error message for a RTR3Init failure and suggest an exit code.
+ *
+ * @code
+ *
+ * int rc = RTR3Init();
+ * if (RT_FAILURE(rc))
+ *     return RTMsgInitFailure(rc);
+ *
+ * @endcode
+ *
+ * @returns Appropriate exit code.
+ * @param   rcRTR3Init      The status code returned by RTR3Init.
+ */
+RTDECL(int)  RTMsgInitFailure(int rcRTR3Init);
+
 /** @} */
 
Index: /trunk/src/VBox/Runtime/common/misc/message.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/misc/message.cpp	(revision 26673)
+++ /trunk/src/VBox/Runtime/common/misc/message.cpp	(revision 26674)
@@ -98,2 +98,16 @@
 RT_EXPORT_SYMBOL(RTMsgErrorV);
 
+
+RTDECL(int) RTMsgInitFailure(int rcRTR3Init)
+{
+    if (   g_offrtProcName
+        && g_offrtProcName < sizeof(g_szrtProcExePath)
+        && g_szrtProcExePath[0]
+        && g_szrtProcExePath[g_offrtProcName])
+        RTStrmPrintf(g_pStdErr, "%s: fatal error: RTR3Init: %Rrc\n", &g_szrtProcExePath[g_offrtProcName], rcRTR3Init);
+    else
+        RTStrmPrintf(g_pStdErr, "fatal error: RTR3Init: %Rrc\n", rcRTR3Init);
+    return 12;
+}
+RT_EXPORT_SYMBOL(RTMsgInitFailure);
+
