Index: /trunk/include/VBox/com/defs.h
===================================================================
--- /trunk/include/VBox/com/defs.h	(revision 468)
+++ /trunk/include/VBox/com/defs.h	(revision 469)
@@ -89,16 +89,19 @@
 #define IUnknown nsISupports
 
-#define LONG int32_t
-#define ULONG uint32_t
-#define LONG64 int64_t
-#define ULONG64 uint64_t
-#define USHORT uint16_t
-#define SHORT int16_t
-#define BOOL PRBool
+#define BOOL    PRBool
+#define BYTE    PRUint8
+#define SHORT   PRInt16
+#define USHORT  PRUint16
+#define LONG    PRInt32
+#define ULONG   PRUint32
+#define LONG64  PRInt64
+#define ULONG64 PRUint64
+
+#define BSTR    PRUnichar *
+#define LPBSTR  BSTR *
+#define OLECHAR wchar_t
+
 #define FALSE PR_FALSE
 #define TRUE PR_TRUE
-#define BSTR PRUnichar*
-#define LPBSTR BSTR*
-#define OLECHAR wchar_t
 
 // makes the name of the getter interface function (n must be capitalized)
Index: /trunk/src/VBox/Frontends/VirtualBox/include/COMDefs.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/include/COMDefs.h	(revision 468)
+++ /trunk/src/VBox/Frontends/VirtualBox/include/COMDefs.h	(revision 469)
@@ -96,11 +96,13 @@
     #define IUnknown    nsISupports
 
-    #define LONG        int32_t
-    #define ULONG       uint32_t
-    #define LONG64      int64_t
-    #define ULONG64     uint64_t
-    #define USHORT      uint16_t
-    #define SHORT       int16_t
     #define BOOL        PRBool
+    #define BYTE        PRUint8
+    #define SHORT       PRInt16
+    #define USHORT      PRUint16
+    #define LONG        PRInt32
+    #define ULONG       PRUint32
+    #define LONG64      PRInt64
+    #define ULONG64     PRUint64
+
     #define BSTR        PRUnichar*
     #define LPBSTR      BSTR*
Index: /trunk/src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl	(revision 468)
+++ /trunk/src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl	(revision 469)
@@ -1032,55 +1032,106 @@
         </xsl:message>
     </xsl:if>
+
     <xsl:choose>
-        <!-- standard types -->
-        <xsl:when test=".='result'">HRESULT</xsl:when>
-        <xsl:when test=".='boolean'">BOOL</xsl:when>
-        <xsl:when test=".='octet'">BYTE</xsl:when>
-        <xsl:when test=".='short'">SHORT</xsl:when>
-        <xsl:when test=".='unsigned short'">USHORT</xsl:when>
-        <xsl:when test=".='long'">LONG</xsl:when>
-        <xsl:when test=".='long long'">LONG64</xsl:when>
-        <xsl:when test=".='unsigned long'">ULONG</xsl:when>
-        <xsl:when test=".='unsigned long long'">ULONG64</xsl:when>
-        <xsl:when test=".='char'">CHAR</xsl:when>
-        <xsl:when test=".='string'">CHAR *</xsl:when>
-        <xsl:when test=".='wchar'">OLECHAR</xsl:when>
-        <xsl:when test=".='wstring'">QString</xsl:when>
-        <!-- UUID type -->
-        <xsl:when test=".='uuid'">QUuid</xsl:when>
-        <!-- system interface types -->
-        <xsl:when test=".='$unknown'">CUnknown</xsl:when>
-        <xsl:otherwise>
-            <xsl:choose>
-                <!-- enum types -->
-                <xsl:when test="
-                    (ancestor::module/enum[@name=current()]) or
-                    (ancestor::module/if[@target=$self_target]/enum[@name=current()])
-                ">
-                    <xsl:value-of select="concat('CEnums::',string(.))"/>
-                </xsl:when>
-                <!-- custom interface types -->
-                <xsl:when test="
-                    (name(current())='enumerator' and
-                     ((ancestor::module/enumerator[@name=current()]) or
-                      (ancestor::module/if[@target=$self_target]/enumerator[@name=current()]))
-                    ) or
-                    ((ancestor::module/interface[@name=current()]) or
-                     (ancestor::module/if[@target=$self_target]/interface[@name=current()])
-                    ) or
-                    ((ancestor::module/collection[@name=current()]) or
-                     (ancestor::module/if[@target=$self_target]/collection[@name=current()])
-                    )
-                ">
-                    <xsl:value-of select="concat('C',substring(.,2))"/>
-                </xsl:when>
-                <!-- other types -->
+        <!-- modifiers (ignored for 'enumeration' attributes)-->
+        <xsl:when test="name(current())='type' and ../@mod">
+            <xsl:if test="../@array">
+                <xsl:message terminate="yes">
+                        <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
+                    <xsl:text>either 'array' or 'mod' attribute is allowed, but not both!</xsl:text>
+                </xsl:message>
+            </xsl:if>
+            <xsl:choose>
+                <xsl:when test="../@mod='ptr'">
+                    <xsl:choose>
+                        <!-- standard types -->
+                        <!--xsl:when test=".='result'">??</xsl:when-->
+                        <xsl:when test=".='boolean'">BOOL *</xsl:when>
+                        <xsl:when test=".='octet'">BYTE *</xsl:when>
+                        <xsl:when test=".='short'">SHORT *</xsl:when>
+                        <xsl:when test=".='unsigned short'">USHORT *</xsl:when>
+                        <xsl:when test=".='long'">LONG *</xsl:when>
+                        <xsl:when test=".='long long'">LONG64 *</xsl:when>
+                        <xsl:when test=".='unsigned long'">ULONG *</xsl:when>
+                        <xsl:when test=".='unsigned long long'">ULONG64 *</xsl:when>
+                        <xsl:when test=".='char'">CHAR *</xsl:when>
+                        <!--<xsl:when test=".='string'">??</xsl:when-->
+                        <xsl:when test=".='wchar'">OLECHAR *</xsl:when>
+                        <!--<xsl:when test=".='wstring'">??</xsl:when-->
+                        <xsl:otherwise>
+                            <xsl:message terminate="yes">
+                                <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
+                                <xsl:text>attribute 'mod=</xsl:text>
+                                <xsl:value-of select="concat('&quot;',../@mod,'&quot;')"/>
+                                <xsl:text>' cannot be used with type </xsl:text>
+                                <xsl:value-of select="concat('&quot;',current(),'&quot;!')"/>
+                            </xsl:message>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:when>
                 <xsl:otherwise>
                     <xsl:message terminate="yes">
-                        <xsl:text>Unknown parameter type: </xsl:text>
-                        <xsl:value-of select="."/>
+                        <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
+                        <xsl:value-of select="concat('value &quot;',../@mod,'&quot; ')"/>
+                        <xsl:text>of attibute 'mod' is invalid!</xsl:text>
                     </xsl:message>
                 </xsl:otherwise>
             </xsl:choose>
+        </xsl:when>
+        <!-- no modifiers -->
+        <xsl:otherwise>
+            <xsl:choose>
+                <!-- standard types -->
+                <xsl:when test=".='result'">HRESULT</xsl:when>
+                <xsl:when test=".='boolean'">BOOL</xsl:when>
+                <xsl:when test=".='octet'">BYTE</xsl:when>
+                <xsl:when test=".='short'">SHORT</xsl:when>
+                <xsl:when test=".='unsigned short'">USHORT</xsl:when>
+                <xsl:when test=".='long'">LONG</xsl:when>
+                <xsl:when test=".='long long'">LONG64</xsl:when>
+                <xsl:when test=".='unsigned long'">ULONG</xsl:when>
+                <xsl:when test=".='unsigned long long'">ULONG64</xsl:when>
+                <xsl:when test=".='char'">CHAR</xsl:when>
+                <xsl:when test=".='string'">CHAR *</xsl:when>
+                <xsl:when test=".='wchar'">OLECHAR</xsl:when>
+                <xsl:when test=".='wstring'">QString</xsl:when>
+                <!-- UUID type -->
+                <xsl:when test=".='uuid'">QUuid</xsl:when>
+                <!-- system interface types -->
+                <xsl:when test=".='$unknown'">CUnknown</xsl:when>
+                <xsl:otherwise>
+                    <xsl:choose>
+                        <!-- enum types -->
+                        <xsl:when test="
+                            (ancestor::module/enum[@name=current()]) or
+                            (ancestor::module/if[@target=$self_target]/enum[@name=current()])
+                        ">
+                            <xsl:value-of select="concat('CEnums::',string(.))"/>
+                        </xsl:when>
+                        <!-- custom interface types -->
+                        <xsl:when test="
+                            (name(current())='enumerator' and
+                             ((ancestor::module/enumerator[@name=current()]) or
+                              (ancestor::module/if[@target=$self_target]/enumerator[@name=current()]))
+                            ) or
+                            ((ancestor::module/interface[@name=current()]) or
+                             (ancestor::module/if[@target=$self_target]/interface[@name=current()])
+                            ) or
+                            ((ancestor::module/collection[@name=current()]) or
+                             (ancestor::module/if[@target=$self_target]/collection[@name=current()])
+                            )
+                        ">
+                            <xsl:value-of select="concat('C',substring(.,2))"/>
+                        </xsl:when>
+                        <!-- other types -->
+                        <xsl:otherwise>
+                            <xsl:message terminate="yes">
+                                <xsl:text>Unknown parameter type: </xsl:text>
+                                <xsl:value-of select="."/>
+                            </xsl:message>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:otherwise>
+            </xsl:choose>
         </xsl:otherwise>
     </xsl:choose>
@@ -1089,5 +1140,5 @@
 
 <!--
- *  generates a null initializer for all fundamental types (such as bool or long)
+ *  generates a null initializer for all scalar types (such as bool or long)
  *  and enum types in the form of ' = <null_initializer>', or nothing for other
  *  types.
@@ -1101,26 +1152,76 @@
 
     <xsl:choose>
-        <!-- standard types that need a zero initializer -->
-        <xsl:when test=".='result'"> = S_OK</xsl:when>
-        <xsl:when test=".='boolean'"> = FALSE</xsl:when>
-        <xsl:when test=".='octet'"> = 0</xsl:when>
-        <xsl:when test=".='short'"> = 0</xsl:when>
-        <xsl:when test=".='unsigned short'"> = 0</xsl:when>
-        <xsl:when test=".='long'"> = 0</xsl:when>
-        <xsl:when test=".='long long'"> = 0</xsl:when>
-        <xsl:when test=".='unsigned long'"> = 0</xsl:when>
-        <xsl:when test=".='unsigned long long'"> = 0</xsl:when>
-        <xsl:when test=".='char'"> = 0</xsl:when>
-        <xsl:when test=".='string'"> = NULL</xsl:when>
-        <xsl:when test=".='wchar'"> = 0</xsl:when>
+        <!-- modifiers (ignored for 'enumeration' attributes)-->
+        <xsl:when test="name(current())='type' and ../@mod">
+            <xsl:if test="../@array">
+                <xsl:message terminate="yes">
+                        <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
+                    <xsl:text>either 'array' or 'mod' attribute is allowed, but not both!</xsl:text>
+                </xsl:message>
+            </xsl:if>
+            <xsl:choose>
+                <xsl:when test="../@mod='ptr'">
+                    <xsl:choose>
+                        <!-- standard types -->
+                        <!--xsl:when test=".='result'">??</xsl:when-->
+                        <xsl:when test=".='boolean'"> = NULL</xsl:when>
+                        <xsl:when test=".='octet'"> = NULL</xsl:when>
+                        <xsl:when test=".='short'"> = NULL</xsl:when>
+                        <xsl:when test=".='unsigned short'"> = NULL</xsl:when>
+                        <xsl:when test=".='long'"> = NULL</xsl:when>
+                        <xsl:when test=".='long long'"> = NULL</xsl:when>
+                        <xsl:when test=".='unsigned long'"> = NULL</xsl:when>
+                        <xsl:when test=".='unsigned long long'"> = NULL</xsl:when>
+                        <xsl:when test=".='char'"> = NULL</xsl:when>
+                        <!--<xsl:when test=".='string'">??</xsl:when-->
+                        <xsl:when test=".='wchar'"> = NULL</xsl:when>
+                        <!--<xsl:when test=".='wstring'">??</xsl:when-->
+                        <xsl:otherwise>
+                            <xsl:message terminate="yes">
+                                <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
+                                <xsl:text>attribute 'mod=</xsl:text>
+                                <xsl:value-of select="concat('&quot;',../@mod,'&quot;')"/>
+                                <xsl:text>' cannot be used with type </xsl:text>
+                                <xsl:value-of select="concat('&quot;',current(),'&quot;!')"/>
+                            </xsl:message>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:message terminate="yes">
+                        <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
+                        <xsl:value-of select="concat('value &quot;',../@mod,'&quot; ')"/>
+                        <xsl:text>of attibute 'mod' is invalid!</xsl:text>
+                    </xsl:message>
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:when>
+        <!-- no modifiers -->
         <xsl:otherwise>
             <xsl:choose>
-                <!-- enum types initialized with 0 -->
-                <xsl:when test="
-                    (ancestor::module/enum[@name=current()]) or
-                    (ancestor::module/if[@target=$self_target]/enum[@name=current()])
-                ">
-                    <xsl:value-of select="concat(' = (CEnums::',string(.),') 0')"/>
-                </xsl:when>
+                <!-- standard types that need a zero initializer -->
+                <xsl:when test=".='result'"> = S_OK</xsl:when>
+                <xsl:when test=".='boolean'"> = FALSE</xsl:when>
+                <xsl:when test=".='octet'"> = 0</xsl:when>
+                <xsl:when test=".='short'"> = 0</xsl:when>
+                <xsl:when test=".='unsigned short'"> = 0</xsl:when>
+                <xsl:when test=".='long'"> = 0</xsl:when>
+                <xsl:when test=".='long long'"> = 0</xsl:when>
+                <xsl:when test=".='unsigned long'"> = 0</xsl:when>
+                <xsl:when test=".='unsigned long long'"> = 0</xsl:when>
+                <xsl:when test=".='char'"> = 0</xsl:when>
+                <xsl:when test=".='string'"> = NULL</xsl:when>
+                <xsl:when test=".='wchar'"> = 0</xsl:when>
+                <xsl:otherwise>
+                    <xsl:choose>
+                        <!-- enum types initialized with 0 -->
+                        <xsl:when test="
+                            (ancestor::module/enum[@name=current()]) or
+                            (ancestor::module/if[@target=$self_target]/enum[@name=current()])
+                        ">
+                            <xsl:value-of select="concat(' = (CEnums::',string(.),') 0')"/>
+                        </xsl:when>
+                    </xsl:choose>
+                </xsl:otherwise>
             </xsl:choose>
         </xsl:otherwise>
Index: /trunk/src/VBox/Main/idl/doxygen.xsl
===================================================================
--- /trunk/src/VBox/Main/idl/doxygen.xsl	(revision 468)
+++ /trunk/src/VBox/Main/idl/doxygen.xsl	(revision 469)
@@ -190,4 +190,12 @@
     <xsl:apply-templates select="text() | *[not(self::note or self::see)]"/>
     <xsl:apply-templates select="note"/>
+    <xsl:if test="../@mod='ptr'">
+        <xsl:text>
+
+@warning This attribute is non-scriptable. In particluar, this also means that an
+attempt to get or set it from a process other than the process that has created and
+owns the object will most likely fail or crash your application.
+</xsl:text>
+    </xsl:if>
     <xsl:apply-templates select="see"/>
     <xsl:text>&#x0A;*/&#x0A;</xsl:text>
@@ -205,4 +213,12 @@
     <xsl:apply-templates select="note"/>
     <xsl:apply-templates select="../param/desc/note"/>
+    <xsl:if test="../param/@mod='ptr'">
+        <xsl:text>
+        
+@warning This method is non-scriptable. In particluar, this also means that an
+attempt to call it from a process other than the process that has created and
+owns the object will most likely fail or crash your application.
+</xsl:text>
+    </xsl:if>
     <xsl:apply-templates select="see"/>
     <xsl:text>&#x0A;*/&#x0A;</xsl:text>
@@ -551,52 +567,102 @@
 
     <xsl:choose>
-        <!-- standard types -->
-        <xsl:when test=".='result'">result</xsl:when>
-        <xsl:when test=".='boolean'">boolean</xsl:when>
-        <xsl:when test=".='octet'">octet</xsl:when>
-        <xsl:when test=".='short'">short</xsl:when>
-        <xsl:when test=".='unsigned short'">unsigned short</xsl:when>
-        <xsl:when test=".='long'">long</xsl:when>
-        <xsl:when test=".='long long'">long long</xsl:when>
-        <xsl:when test=".='unsigned long'">unsigned long</xsl:when>
-        <xsl:when test=".='unsigned long long'">unsigned long long</xsl:when>
-        <xsl:when test=".='char'">char</xsl:when>
-        <xsl:when test=".='wchar'">wchar</xsl:when>
-        <xsl:when test=".='string'">string</xsl:when>
-        <xsl:when test=".='wstring'">wstring</xsl:when>
-        <!-- UUID type -->
-        <xsl:when test=".='uuid'">uuid</xsl:when>
-        <!-- system interface types -->
-        <xsl:when test=".='$unknown'">$unknown</xsl:when>
+        <!-- modifiers (ignored for 'enumeration' attributes)-->
+        <xsl:when test="name(current())='type' and ../@mod">
+            <xsl:if test="../@array">
+                <xsl:message terminate="yes">
+                        <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
+                    <xsl:text>either 'array' or 'mod' attribute is allowed, but not both!</xsl:text>
+                </xsl:message>
+            </xsl:if>
+            <xsl:choose>
+                <xsl:when test="../@mod='ptr'">
+                    <xsl:choose>
+                        <!-- standard types -->
+                        <!--xsl:when test=".='result'">??</xsl:when-->
+                        <xsl:when test=".='boolean'">booeanPtr</xsl:when>
+                        <xsl:when test=".='octet'">octetPtr</xsl:when>
+                        <xsl:when test=".='short'">shortPtr</xsl:when>
+                        <xsl:when test=".='unsigned short'">ushortPtr</xsl:when>
+                        <xsl:when test=".='long'">longPtr</xsl:when>
+                        <xsl:when test=".='long long'">llongPtr</xsl:when>
+                        <xsl:when test=".='unsigned long'">ulongPtr</xsl:when>
+                        <xsl:when test=".='unsigned long long'">ullongPtr</xsl:when>
+                        <xsl:when test=".='char'">charPtr</xsl:when>
+                        <!--xsl:when test=".='string'">??</xsl:when-->
+                        <xsl:when test=".='wchar'">wcharPtr</xsl:when>
+                        <!--xsl:when test=".='wstring'">??</xsl:when-->
+                        <xsl:otherwise>
+                            <xsl:message terminate="yes">
+                                <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
+                                <xsl:text>attribute 'mod=</xsl:text>
+                                <xsl:value-of select="concat('&quot;',../@mod,'&quot;')"/>
+                                <xsl:text>' cannot be used with type </xsl:text>
+                                <xsl:value-of select="concat('&quot;',current(),'&quot;!')"/>
+                            </xsl:message>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:message terminate="yes">
+                        <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
+                        <xsl:value-of select="concat('value &quot;',../@mod,'&quot; ')"/>
+                        <xsl:text>of attibute 'mod' is invalid!</xsl:text>
+                    </xsl:message>
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:when>
+        <!-- no modifiers -->
         <xsl:otherwise>
             <xsl:choose>
-                <!-- enum types -->
-                <xsl:when test="
-                    (ancestor::module/enum[@name=current()]) or
-                    (ancestor::module/if[@target=$self_target]/enum[@name=current()])
-                ">
-                    <xsl:value-of select="."/>
-                </xsl:when>
-                <!-- custom interface types -->
-                <xsl:when test="
-                    (name(current())='enumerator' and
-                     ((ancestor::module/enumerator[@name=current()]) or
-                      (ancestor::module/if[@target=$self_target]/enumerator[@name=current()]))
-                    ) or
-                    ((ancestor::module/interface[@name=current()]) or
-                     (ancestor::module/if[@target=$self_target]/interface[@name=current()])
-                    ) or
-                    ((ancestor::module/collection[@name=current()]) or
-                     (ancestor::module/if[@target=$self_target]/collection[@name=current()])
-                    )
-                ">
-                    <xsl:value-of select="."/>
-                </xsl:when>
-                <!-- other types -->
+                <!-- standard types -->
+                <xsl:when test=".='result'">result</xsl:when>
+                <xsl:when test=".='boolean'">boolean</xsl:when>
+                <xsl:when test=".='octet'">octet</xsl:when>
+                <xsl:when test=".='short'">short</xsl:when>
+                <xsl:when test=".='unsigned short'">unsigned short</xsl:when>
+                <xsl:when test=".='long'">long</xsl:when>
+                <xsl:when test=".='long long'">long long</xsl:when>
+                <xsl:when test=".='unsigned long'">unsigned long</xsl:when>
+                <xsl:when test=".='unsigned long long'">unsigned long long</xsl:when>
+                <xsl:when test=".='char'">char</xsl:when>
+                <xsl:when test=".='wchar'">wchar</xsl:when>
+                <xsl:when test=".='string'">string</xsl:when>
+                <xsl:when test=".='wstring'">wstring</xsl:when>
+                <!-- UUID type -->
+                <xsl:when test=".='uuid'">uuid</xsl:when>
+                <!-- system interface types -->
+                <xsl:when test=".='$unknown'">$unknown</xsl:when>
                 <xsl:otherwise>
-                    <xsl:message terminate="yes">
-                        <xsl:text>Unknown parameter type: </xsl:text>
-                        <xsl:value-of select="."/>
-                    </xsl:message>
+                    <xsl:choose>
+                        <!-- enum types -->
+                        <xsl:when test="
+                            (ancestor::module/enum[@name=current()]) or
+                            (ancestor::module/if[@target=$self_target]/enum[@name=current()])
+                        ">
+                            <xsl:value-of select="."/>
+                        </xsl:when>
+                        <!-- custom interface types -->
+                        <xsl:when test="
+                            (name(current())='enumerator' and
+                             ((ancestor::module/enumerator[@name=current()]) or
+                              (ancestor::module/if[@target=$self_target]/enumerator[@name=current()]))
+                            ) or
+                            ((ancestor::module/interface[@name=current()]) or
+                             (ancestor::module/if[@target=$self_target]/interface[@name=current()])
+                            ) or
+                            ((ancestor::module/collection[@name=current()]) or
+                             (ancestor::module/if[@target=$self_target]/collection[@name=current()])
+                            )
+                        ">
+                            <xsl:value-of select="."/>
+                        </xsl:when>
+                        <!-- other types -->
+                        <xsl:otherwise>
+                            <xsl:message terminate="yes">
+                                <xsl:text>Unknown parameter type: </xsl:text>
+                                <xsl:value-of select="."/>
+                            </xsl:message>
+                        </xsl:otherwise>
+                    </xsl:choose>
                 </xsl:otherwise>
             </xsl:choose>
Index: /trunk/src/VBox/Main/idl/midl.xsl
===================================================================
--- /trunk/src/VBox/Main/idl/midl.xsl	(revision 468)
+++ /trunk/src/VBox/Main/idl/midl.xsl	(revision 469)
@@ -459,52 +459,102 @@
 
     <xsl:choose>
-        <!-- standard types -->
-        <xsl:when test=".='result'">HRESULT</xsl:when>
-        <xsl:when test=".='boolean'">BOOL</xsl:when>
-        <xsl:when test=".='octet'">BYTE</xsl:when>
-        <xsl:when test=".='short'">SHORT</xsl:when>
-        <xsl:when test=".='unsigned short'">USHORT</xsl:when>
-        <xsl:when test=".='long'">LONG</xsl:when>
-        <xsl:when test=".='long long'">LONG64</xsl:when>
-        <xsl:when test=".='unsigned long'">ULONG</xsl:when>
-        <xsl:when test=".='unsigned long long'">ULONG64</xsl:when>
-        <xsl:when test=".='char'">CHAR</xsl:when>
-        <xsl:when test=".='string'">CHAR *</xsl:when>
-        <xsl:when test=".='wchar'">OLECHAR</xsl:when>
-        <xsl:when test=".='wstring'">BSTR</xsl:when>
-        <!-- UUID type -->
-        <xsl:when test=".='uuid'">GUID</xsl:when>
-        <!-- system interface types -->
-        <xsl:when test=".='$unknown'">IUnknown *</xsl:when>
+        <!-- modifiers (ignored for 'enumeration' attributes)-->
+        <xsl:when test="name(current())='type' and ../@mod">
+            <xsl:if test="../@array">
+                <xsl:message terminate="yes">
+                        <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
+                    <xsl:text>either 'array' or 'mod' attribute is allowed, but not both!</xsl:text>
+                </xsl:message>
+            </xsl:if>
+            <xsl:choose>
+                <xsl:when test="../@mod='ptr'">
+                    <xsl:choose>
+                        <!-- standard types -->
+                        <!--xsl:when test=".='result'">??</xsl:when-->
+                        <xsl:when test=".='boolean'">BOOL *</xsl:when>
+                        <xsl:when test=".='octet'">BYTE *</xsl:when>
+                        <xsl:when test=".='short'">SHORT *</xsl:when>
+                        <xsl:when test=".='unsigned short'">USHORT *</xsl:when>
+                        <xsl:when test=".='long'">LONG *</xsl:when>
+                        <xsl:when test=".='long long'">LONG64 *</xsl:when>
+                        <xsl:when test=".='unsigned long'">ULONG *</xsl:when>
+                        <xsl:when test=".='unsigned long long'">ULONG64 *</xsl:when>
+                        <xsl:when test=".='char'">CHAR *</xsl:when>
+                        <!--xsl:when test=".='string'">??</xsl:when-->
+                        <xsl:when test=".='wchar'">OLECHAR *</xsl:when>
+                        <!--xsl:when test=".='wstring'">??</xsl:when-->
+                        <xsl:otherwise>
+                            <xsl:message terminate="yes">
+                                <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
+                                <xsl:text>attribute 'mod=</xsl:text>
+                                <xsl:value-of select="concat('&quot;',../@mod,'&quot;')"/>
+                                <xsl:text>' cannot be used with type </xsl:text>
+                                <xsl:value-of select="concat('&quot;',current(),'&quot;!')"/>
+                            </xsl:message>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:message terminate="yes">
+                        <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
+                        <xsl:value-of select="concat('value &quot;',../@mod,'&quot; ')"/>
+                        <xsl:text>of attibute 'mod' is invalid!</xsl:text>
+                    </xsl:message>
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:when>
+        <!-- no modifiers -->
         <xsl:otherwise>
             <xsl:choose>
-                <!-- enum types -->
-                <xsl:when test="
-                    (ancestor::module/enum[@name=current()]) or
-                    (ancestor::module/if[@target=$self_target]/enum[@name=current()])
-                ">
-                    <xsl:value-of select="."/>
-                </xsl:when>
-                <!-- custom interface types -->
-                <xsl:when test="
-                    (name(current())='enumerator' and
-                     ((ancestor::module/enumerator[@name=current()]) or
-                      (ancestor::module/if[@target=$self_target]/enumerator[@name=current()]))
-                    ) or
-                    ((ancestor::module/interface[@name=current()]) or
-                     (ancestor::module/if[@target=$self_target]/interface[@name=current()])
-                    ) or
-                    ((ancestor::module/collection[@name=current()]) or
-                     (ancestor::module/if[@target=$self_target]/collection[@name=current()])
-                    )
-                ">
-                    <xsl:value-of select="."/><xsl:text> *</xsl:text>
-                </xsl:when>
-                <!-- other types -->
+                <!-- standard types -->
+                <xsl:when test=".='result'">HRESULT</xsl:when>
+                <xsl:when test=".='boolean'">BOOL</xsl:when>
+                <xsl:when test=".='octet'">BYTE</xsl:when>
+                <xsl:when test=".='short'">SHORT</xsl:when>
+                <xsl:when test=".='unsigned short'">USHORT</xsl:when>
+                <xsl:when test=".='long'">LONG</xsl:when>
+                <xsl:when test=".='long long'">LONG64</xsl:when>
+                <xsl:when test=".='unsigned long'">ULONG</xsl:when>
+                <xsl:when test=".='unsigned long long'">ULONG64</xsl:when>
+                <xsl:when test=".='char'">CHAR</xsl:when>
+                <xsl:when test=".='string'">CHAR *</xsl:when>
+                <xsl:when test=".='wchar'">OLECHAR</xsl:when>
+                <xsl:when test=".='wstring'">BSTR</xsl:when>
+                <!-- UUID type -->
+                <xsl:when test=".='uuid'">GUID</xsl:when>
+                <!-- system interface types -->
+                <xsl:when test=".='$unknown'">IUnknown *</xsl:when>
                 <xsl:otherwise>
-                    <xsl:message terminate="yes">
-                        <xsl:text>Unknown parameter type: </xsl:text>
-                        <xsl:value-of select="."/>
-                    </xsl:message>
+                    <xsl:choose>
+                        <!-- enum types -->
+                        <xsl:when test="
+                            (ancestor::module/enum[@name=current()]) or
+                            (ancestor::module/if[@target=$self_target]/enum[@name=current()])
+                        ">
+                            <xsl:value-of select="."/>
+                        </xsl:when>
+                        <!-- custom interface types -->
+                        <xsl:when test="
+                            (name(current())='enumerator' and
+                             ((ancestor::module/enumerator[@name=current()]) or
+                              (ancestor::module/if[@target=$self_target]/enumerator[@name=current()]))
+                            ) or
+                            ((ancestor::module/interface[@name=current()]) or
+                             (ancestor::module/if[@target=$self_target]/interface[@name=current()])
+                            ) or
+                            ((ancestor::module/collection[@name=current()]) or
+                             (ancestor::module/if[@target=$self_target]/collection[@name=current()])
+                            )
+                        ">
+                            <xsl:value-of select="."/><xsl:text> *</xsl:text>
+                        </xsl:when>
+                        <!-- other types -->
+                        <xsl:otherwise>
+                            <xsl:message terminate="yes">
+                                <xsl:text>Unknown parameter type: </xsl:text>
+                                <xsl:value-of select="."/>
+                            </xsl:message>
+                        </xsl:otherwise>
+                    </xsl:choose>
                 </xsl:otherwise>
             </xsl:choose>
Index: /trunk/src/VBox/Main/idl/xpidl.xsl
===================================================================
--- /trunk/src/VBox/Main/idl/xpidl.xsl	(revision 468)
+++ /trunk/src/VBox/Main/idl/xpidl.xsl	(revision 469)
@@ -80,8 +80,25 @@
  *  using XPCOM IDL (XPIDL) syntax.
  */
-    </xsl:text>
-    <xsl:text>&#x0A;</xsl:text>
-    <xsl:text>#include "nsISupports.idl"&#x0A;&#x0A;</xsl:text>
-    <xsl:text>#include "nsIException.idl"&#x0A;&#x0A;</xsl:text>
+
+#include "nsISupports.idl"
+#include "nsIException.idl"
+</xsl:text>
+    <!-- native typedefs for the 'mod="ptr"' attribute -->
+    <xsl:text>
+[ptr] native booeanPtr  (PRBool);
+[ptr] native octetPtr   (PRUint8);
+[ptr] native shortPtr   (PRInt16);
+[ptr] native ushortPtr  (PRUint16);
+[ptr] native longPtr    (PRInt32);
+[ptr] native llongPtr   (PRInt64);
+[ptr] native ulongPtr   (PRUint32);
+[ptr] native ullongPtr  (PRUint64);
+<!-- charPtr is already defined in nsrootidl.idl -->
+<!-- [ptr] native charPtr    (char) -->
+[ptr] native stringPtr  (string);
+[ptr] native wcharPtr   (wchar);
+[ptr] native wstringPtr (wstring);
+
+</xsl:text>    
     <xsl:apply-templates/>
 </xsl:template>
@@ -199,4 +216,8 @@
 <xsl:template match="interface//attribute | collection//attribute">
     <xsl:apply-templates select="@if" mode="begin"/>
+    <xsl:if test="@mod='ptr'">
+        <!-- attributes using native types must be non-scriptable -->
+        <xsl:text>    [noscript]&#x0A;</xsl:text>
+    </xsl:if>
     <xsl:text>    </xsl:text>
     <xsl:if test="@readonly='yes'">
@@ -217,4 +238,8 @@
 <xsl:template match="interface//method | collection//method">
     <xsl:apply-templates select="@if" mode="begin"/>
+    <xsl:if test="param/@mod='ptr'">
+        <!-- methods using native types must be non-scriptable -->
+        <xsl:text>    [noscript]&#x0A;</xsl:text>
+    </xsl:if>
     <xsl:text>    void </xsl:text>
     <xsl:value-of select="@name"/>
@@ -439,78 +464,128 @@
 
     <xsl:choose>
-        <!-- standard types -->
-        <xsl:when test=".='result'">nsresult</xsl:when>
-        <xsl:when test=".='boolean'">boolean</xsl:when>
-        <xsl:when test=".='octet'">octet</xsl:when>
-        <xsl:when test=".='short'">short</xsl:when>
-        <xsl:when test=".='unsigned short'">unsigned short</xsl:when>
-        <xsl:when test=".='long'">long</xsl:when>
-        <xsl:when test=".='long long'">long long</xsl:when>
-        <xsl:when test=".='unsigned long'">unsigned long</xsl:when>
-        <xsl:when test=".='unsigned long long'">unsigned long long</xsl:when>
-        <xsl:when test=".='char'">char</xsl:when>
-        <xsl:when test=".='wchar'">wchar</xsl:when>
-        <xsl:when test=".='string'">string</xsl:when>
-        <xsl:when test=".='wstring'">wstring</xsl:when>
-        <!-- UUID type -->
-        <xsl:when test=".='uuid'">
+        <!-- modifiers (ignored for 'enumeration' attributes)-->
+        <xsl:when test="name(current())='type' and ../@mod">
+            <xsl:if test="../@array">
+                <xsl:message terminate="yes">
+                        <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
+                    <xsl:text>either 'array' or 'mod' attribute is allowed, but not both!</xsl:text>
+                </xsl:message>
+            </xsl:if>
             <xsl:choose>
-                <xsl:when test="name(..)='attribute'">
+                <xsl:when test="../@mod='ptr'">
                     <xsl:choose>
-                        <xsl:when test="../@readonly='yes'">
-                            <xsl:text>nsIDPtr</xsl:text>
-                        </xsl:when>
+                        <!-- standard types -->
+                        <!--xsl:when test=".='result'">??</xsl:when-->
+                        <xsl:when test=".='boolean'">booeanPtr</xsl:when>
+                        <xsl:when test=".='octet'">octetPtr</xsl:when>
+                        <xsl:when test=".='short'">shortPtr</xsl:when>
+                        <xsl:when test=".='unsigned short'">ushortPtr</xsl:when>
+                        <xsl:when test=".='long'">longPtr</xsl:when>
+                        <xsl:when test=".='long long'">llongPtr</xsl:when>
+                        <xsl:when test=".='unsigned long'">ulongPtr</xsl:when>
+                        <xsl:when test=".='unsigned long long'">ullongPtr</xsl:when>
+                        <xsl:when test=".='char'">charPtr</xsl:when>
+                        <!--xsl:when test=".='string'">??</xsl:when-->
+                        <xsl:when test=".='wchar'">wcharPtr</xsl:when>
+                        <!--xsl:when test=".='wstring'">??</xsl:when-->
                         <xsl:otherwise>
                             <xsl:message terminate="yes">
-                                <xsl:value-of select="../@name"/>
-                                <xsl:text>: Non-readonly uuid attributes are not supported!</xsl:text>
+                                <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
+                                <xsl:text>attribute 'mod=</xsl:text>
+                                <xsl:value-of select="concat('&quot;',../@mod,'&quot;')"/>
+                                <xsl:text>' cannot be used with type </xsl:text>
+                                <xsl:value-of select="concat('&quot;',current(),'&quot;!')"/>
                             </xsl:message>
                         </xsl:otherwise>
                     </xsl:choose>
                 </xsl:when>
-                <xsl:when test="name(..)='param'">
+                <xsl:otherwise>
+                    <xsl:message terminate="yes">
+                        <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
+                        <xsl:value-of select="concat('value &quot;',../@mod,'&quot; ')"/>
+                        <xsl:text>of attibute 'mod' is invalid!</xsl:text>
+                    </xsl:message>
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:when>
+        <!-- no modifiers -->
+        <xsl:otherwise>
+            <xsl:choose>
+                <!-- standard types -->
+                <xsl:when test=".='result'">nsresult</xsl:when>
+                <xsl:when test=".='boolean'">boolean</xsl:when>
+                <xsl:when test=".='octet'">octet</xsl:when>
+                <xsl:when test=".='short'">short</xsl:when>
+                <xsl:when test=".='unsigned short'">unsigned short</xsl:when>
+                <xsl:when test=".='long'">long</xsl:when>
+                <xsl:when test=".='long long'">long long</xsl:when>
+                <xsl:when test=".='unsigned long'">unsigned long</xsl:when>
+                <xsl:when test=".='unsigned long long'">unsigned long long</xsl:when>
+                <xsl:when test=".='char'">char</xsl:when>
+                <xsl:when test=".='wchar'">wchar</xsl:when>
+                <xsl:when test=".='string'">string</xsl:when>
+                <xsl:when test=".='wstring'">wstring</xsl:when>
+                <!-- UUID type -->
+                <xsl:when test=".='uuid'">
                     <xsl:choose>
-                        <xsl:when test="../@dir='in'">
-                            <xsl:text>nsIDRef</xsl:text>
+                        <xsl:when test="name(..)='attribute'">
+                            <xsl:choose>
+                                <xsl:when test="../@readonly='yes'">
+                                    <xsl:text>nsIDPtr</xsl:text>
+                                </xsl:when>
+                                <xsl:otherwise>
+                                    <xsl:message terminate="yes">
+                                        <xsl:value-of select="../@name"/>
+                                        <xsl:text>: Non-readonly uuid attributes are not supported!</xsl:text>
+                                    </xsl:message>
+                                </xsl:otherwise>
+                            </xsl:choose>
                         </xsl:when>
+                        <xsl:when test="name(..)='param'">
+                            <xsl:choose>
+                                <xsl:when test="../@dir='in'">
+                                    <xsl:text>nsIDRef</xsl:text>
+                                </xsl:when>
+                                <xsl:otherwise>
+                                    <xsl:text>nsIDPtr</xsl:text>
+                                </xsl:otherwise>
+                            </xsl:choose>
+                        </xsl:when>
+                    </xsl:choose>
+                </xsl:when>
+                <!-- system interface types -->
+                <xsl:when test=".='$unknown'">nsISupports</xsl:when>
+                <xsl:otherwise>
+                    <xsl:choose>
+                        <!-- enum types -->
+                        <xsl:when test="
+                            (ancestor::module/enum[@name=current()]) or
+                            (ancestor::module/if[@target=$self_target]/enum[@name=current()])
+                        ">
+                            <xsl:text>PRUint32</xsl:text>
+                        </xsl:when>
+                        <!-- custom interface types -->
+                        <xsl:when test="
+                            (name(current())='enumerator' and
+                             ((ancestor::module/enumerator[@name=current()]) or
+                              (ancestor::module/if[@target=$self_target]/enumerator[@name=current()]))
+                            ) or
+                            ((ancestor::module/interface[@name=current()]) or
+                             (ancestor::module/if[@target=$self_target]/interface[@name=current()])
+                            ) or
+                            ((ancestor::module/collection[@name=current()]) or
+                             (ancestor::module/if[@target=$self_target]/collection[@name=current()])
+                            )
+                        ">
+                            <xsl:value-of select="."/>
+                        </xsl:when>
+                        <!-- other types -->
                         <xsl:otherwise>
-                            <xsl:text>nsIDPtr</xsl:text>
+                            <xsl:message terminate="yes">
+                                <xsl:text>Unknown parameter type: </xsl:text>
+                                <xsl:value-of select="."/>
+                            </xsl:message>
                         </xsl:otherwise>
                     </xsl:choose>
-                </xsl:when>
-            </xsl:choose>
-        </xsl:when>
-        <!-- system interface types -->
-        <xsl:when test=".='$unknown'">nsISupports</xsl:when>
-        <xsl:otherwise>
-            <xsl:choose>
-                <!-- enum types -->
-                <xsl:when test="
-                    (ancestor::module/enum[@name=current()]) or
-                    (ancestor::module/if[@target=$self_target]/enum[@name=current()])
-                ">
-                    <xsl:text>PRUint32</xsl:text>
-                </xsl:when>
-                <!-- custom interface types -->
-                <xsl:when test="
-                    (name(current())='enumerator' and
-                     ((ancestor::module/enumerator[@name=current()]) or
-                      (ancestor::module/if[@target=$self_target]/enumerator[@name=current()]))
-                    ) or
-                    ((ancestor::module/interface[@name=current()]) or
-                     (ancestor::module/if[@target=$self_target]/interface[@name=current()])
-                    ) or
-                    ((ancestor::module/collection[@name=current()]) or
-                     (ancestor::module/if[@target=$self_target]/collection[@name=current()])
-                    )
-                ">
-                    <xsl:value-of select="."/>
-                </xsl:when>
-                <!-- other types -->
-                <xsl:otherwise>
-                    <xsl:message terminate="yes">
-                        <xsl:text>Unknown parameter type: </xsl:text>
-                        <xsl:value-of select="."/>
-                    </xsl:message>
                 </xsl:otherwise>
             </xsl:choose>
