Index: /trunk/src/VBox/Main/idl/VirtualBox.dtd
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.dtd	(revision 85309)
+++ /trunk/src/VBox/Main/idl/VirtualBox.dtd	(revision 85310)
@@ -67,4 +67,7 @@
                 <!-- autogen names the style of code auto-generation for this
                      interface (currently only VBoxEvent). -->
+    <!ATTLIST interface autogenflags CDATA #IMPLIED>
+                <!-- autogenflags contains autogen tweaks.
+                     For autoget=VBoxEvent: 'BSTR' - generate IN_BSTR variants of the functions. -->
     <!ATTLIST interface id CDATA #IMPLIED>
                 <!-- id is only relevant for event interfaces, and specifies
Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 85309)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 85310)
@@ -25841,5 +25841,5 @@
     name="IRuntimeErrorEvent" extends="IEvent"
     uuid="883DD18B-0721-4CDE-867C-1A82ABAF914C"
-    wsmap="managed" autogen="VBoxEvent" id="OnRuntimeError"
+    wsmap="managed" autogen="VBoxEvent" autogenflags="BSTR" id="OnRuntimeError"
     >
     <desc>
@@ -25937,5 +25937,5 @@
     name="IExtraDataChangedEvent" extends="IEvent"
     uuid="024F00CE-6E0B-492A-A8D0-968472A94DC7"
-    wsmap="managed" autogen="VBoxEvent" id="OnExtraDataChanged"
+    wsmap="managed" autogen="VBoxEvent" autogenflags="BSTR" id="OnExtraDataChanged"
     >
     <desc>
@@ -26178,5 +26178,5 @@
     waitable="yes"
     uuid="a0bad6df-d612-47d3-89d4-db3992533948"
-    wsmap="managed" autogen="VBoxEvent" id="OnHostPCIDevicePlug"
+    wsmap="managed" autogen="VBoxEvent" autogenflags="BSTR" id="OnHostPCIDevicePlug"
     >
     <desc>
@@ -26419,5 +26419,5 @@
   <interface name="INATNetworkCreationDeletionEvent" extends="INATNetworkAlterEvent"
              uuid="8d984a7e-b855-40b8-ab0c-44d3515b4528"
-             wsmap="managed" autogen="VBoxEvent" id="OnNATNetworkCreationDeletion">
+             wsmap="managed" autogen="VBoxEvent" autogenflags="BSTR" id="OnNATNetworkCreationDeletion">
     <attribute name="creationEvent" type="boolean" readonly="yes"/>
   </interface>
Index: /trunk/src/VBox/Main/idl/comimpl.xsl
===================================================================
--- /trunk/src/VBox/Main/idl/comimpl.xsl	(revision 85309)
+++ /trunk/src/VBox/Main/idl/comimpl.xsl	(revision 85310)
@@ -35,5 +35,5 @@
 <!-- $G_kind contains what kind of COM class implementation we generate -->
 <xsl:variable name="G_xsltFilename" select="'autogen.xsl'" />
-<xsl:variable name="G_generateBstrVariants" select="'yes'" />
+<xsl:variable name="G_generateBstrVariants" select="'no'" />
 
 
@@ -905,5 +905,5 @@
     </xsl:call-template>
 
-    <xsl:if test="($hasStringAttribs != '') and ($G_generateBstrVariants = 'yes')">
+    <xsl:if test="($hasStringAttribs != '') and (($G_generateBstrVariants = 'yes') or (contains(@autogenflags, 'BSTR')))">
       <xsl:call-template name="genReinitFunction">
         <xsl:with-param name="name" select="@name"/>
@@ -927,5 +927,5 @@
   </xsl:call-template>
 
-  <xsl:if test="($hasStringAttribs != '') and ($G_generateBstrVariants = 'yes')">
+  <xsl:if test="($hasStringAttribs != '') and (($G_generateBstrVariants = 'yes') or (contains(@autogenflags, 'BSTR')))">
     <xsl:call-template name="genCreateFunction">
       <xsl:with-param name="name" select="@name"/>
@@ -946,5 +946,5 @@
   </xsl:call-template>
 
-  <xsl:if test="($hasStringAttribs != '') and ($G_generateBstrVariants = 'yes')">
+  <xsl:if test="($hasStringAttribs != '') and (($G_generateBstrVariants = 'yes') or (contains(@autogenflags, 'BSTR')))">
     <xsl:call-template name="genFireFunction">
       <xsl:with-param name="evname" select="$evname"/>
@@ -1043,5 +1043,5 @@
     <xsl:text>);&#10;</xsl:text>
 
-    <xsl:if test="($hasStringAttribs != '') and ($G_generateBstrVariants = 'yes')">
+    <xsl:if test="($hasStringAttribs != '') and (($G_generateBstrVariants = 'yes') or (contains(@autogenflags, 'BSTR')))">
       <xsl:value-of select="concat('DECLHIDDEN(HRESULT) Fire', $evname, '(IEventSource *aSource')"/>
       <xsl:call-template name="genFormalParams">
@@ -1078,5 +1078,5 @@
     <xsl:text>);&#10;</xsl:text>
 
-    <xsl:if test="($hasStringAttribs != '') and ($G_generateBstrVariants = 'yes')">
+    <xsl:if test="($hasStringAttribs != '') and (($G_generateBstrVariants = 'yes') or (contains(@autogenflags, 'BSTR')))">
       <xsl:value-of select="concat('DECLHIDDEN(HRESULT) Create', $evname, '(IEvent **aEvent, IEventSource *aSource')"/>
       <xsl:call-template name="genFormalParams">
@@ -1115,5 +1115,5 @@
       <xsl:text>);&#10;</xsl:text>
 
-      <xsl:if test="($hasStringAttribs != '') and ($G_generateBstrVariants = 'yes')">
+      <xsl:if test="($hasStringAttribs != '') and (($G_generateBstrVariants = 'yes') or (contains(@autogenflags, 'BSTR')))">
         <xsl:value-of select="concat('DECLHIDDEN(HRESULT) Reinit', $evname, '(IEvent *aEvent')"/>
         <xsl:call-template name="genFormalParams">
