1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
---|
2 | <!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/extensions/activeqt/control/qaxbindable.cpp:185 -->
|
---|
3 | <html>
|
---|
4 | <head>
|
---|
5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
---|
6 | <title>QAxAggregated Class</title>
|
---|
7 | <style type="text/css"><!--
|
---|
8 | fn { margin-left: 1cm; text-indent: -1cm; }
|
---|
9 | a:link { color: #004faf; text-decoration: none }
|
---|
10 | a:visited { color: #672967; text-decoration: none }
|
---|
11 | body { background: #ffffff; color: black; }
|
---|
12 | --></style>
|
---|
13 | </head>
|
---|
14 | <body>
|
---|
15 |
|
---|
16 | <table border="0" cellpadding="0" cellspacing="0" width="100%">
|
---|
17 | <tr bgcolor="#E5E5E5">
|
---|
18 | <td valign=center>
|
---|
19 | <a href="index.html">
|
---|
20 | <font color="#004faf">Home</font></a>
|
---|
21 | | <a href="classes.html">
|
---|
22 | <font color="#004faf">All Classes</font></a>
|
---|
23 | | <a href="mainclasses.html">
|
---|
24 | <font color="#004faf">Main Classes</font></a>
|
---|
25 | | <a href="annotated.html">
|
---|
26 | <font color="#004faf">Annotated</font></a>
|
---|
27 | | <a href="groups.html">
|
---|
28 | <font color="#004faf">Grouped Classes</font></a>
|
---|
29 | | <a href="functions.html">
|
---|
30 | <font color="#004faf">Functions</font></a>
|
---|
31 | </td>
|
---|
32 | <td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QAxAggregated Class Reference<br><small>[<a href="qaxserver.html">QAxServer module</a>]</small></h1>
|
---|
33 |
|
---|
34 | <p>The QAxAggregated class is an abstract base class for implementations of
|
---|
35 | additional COM interfaces.
|
---|
36 | <a href="#details">More...</a>
|
---|
37 | <p>This class is part of the <b>Qt ActiveQt Extension</b>.
|
---|
38 | <p><tt>#include <<a href="qaxbindable-h.html">qaxbindable.h</a>></tt>
|
---|
39 | <p><a href="qaxaggregated-members.html">List of all member functions.</a>
|
---|
40 | <h2>Public Members</h2>
|
---|
41 | <ul>
|
---|
42 | <li class=fn>virtual long <a href="#queryInterface"><b>queryInterface</b></a> ( const QUuid & iid, void ** iface ) = 0</li>
|
---|
43 | </ul>
|
---|
44 | <h2>Protected Members</h2>
|
---|
45 | <ul>
|
---|
46 | <li class=fn>IUnknown * <a href="#controllingUnknown"><b>controllingUnknown</b></a> () const</li>
|
---|
47 | <li class=fn>QWidget * <a href="#widget"><b>widget</b></a> () const</li>
|
---|
48 | <li class=fn>QObject * <a href="#object"><b>object</b></a> () const</li>
|
---|
49 | </ul>
|
---|
50 | <hr><a name="details"></a><h2>Detailed Description</h2>
|
---|
51 | <p> This class is defined in the <b>Qt <a href="activeqt.html#ActiveQt">ActiveQt</a> Extension</b>, which can be found in the <tt>qt/extensions</tt> directory. It is not included in the main Qt API.
|
---|
52 | <p>
|
---|
53 |
|
---|
54 | The QAxAggregated class is an abstract base class for implementations of
|
---|
55 | additional COM interfaces.
|
---|
56 |
|
---|
57 | <p>
|
---|
58 |
|
---|
59 | <p> Create a subclass of QAxAggregated and reimplement
|
---|
60 | <a href="#queryInterface">queryInterface</a>() to support additional COM interfaces. Use
|
---|
61 | multiple inheritance from those COM interfaces. Implement the
|
---|
62 | IUnknown interface of those COM interfaces by delegating the calls
|
---|
63 | to QueryInterface(), AddRef() and Release() to the interface
|
---|
64 | provided by <a href="#controllingUnknown">controllingUnknown</a>().
|
---|
65 | <p> Use the <a href="#widget">widget</a>() method if you need to make calls to the <a href="qwidget.html">QWidget</a>
|
---|
66 | implementing the ActiveX control. You must not store that pointer
|
---|
67 | in your subclass (unless you use <a href="qguardedptr.html">QGuardedPtr</a>), as the QWidget can
|
---|
68 | be destroyed by the ActiveQt framework at any time.
|
---|
69 |
|
---|
70 | <hr><h2>Member Function Documentation</h2>
|
---|
71 | <h3 class=fn>IUnknown * <a name="controllingUnknown"></a>QAxAggregated::controllingUnknown () const<tt> [protected]</tt>
|
---|
72 | </h3>
|
---|
73 |
|
---|
74 | <p> Returns the IUnknown interface of the ActiveX control. Implement
|
---|
75 | the IUnknown interface in your QAxAggregated subclass to delegate
|
---|
76 | calls to QueryInterface(), AddRef() and Release() to the interface
|
---|
77 | provided by this function.
|
---|
78 | <p> <pre>
|
---|
79 | HRESULT AxImpl::QueryInterface( REFIID iid, void **iface )
|
---|
80 | {
|
---|
81 | return controllingUnknown()->QueryInterface( iid, iface );
|
---|
82 | }
|
---|
83 |
|
---|
84 | unsigned long AxImpl::AddRef()
|
---|
85 | {
|
---|
86 | return controllingUnknown()->AddRef();
|
---|
87 | }
|
---|
88 |
|
---|
89 | unsigned long AxImpl::Release()
|
---|
90 | {
|
---|
91 | return controllingUnknown()->Release();
|
---|
92 | }
|
---|
93 | </pre>
|
---|
94 |
|
---|
95 | <p> The QAXAGG_IUNKNOWN macro expands to the code above, and you can
|
---|
96 | use it in the class declaration of your subclass.
|
---|
97 |
|
---|
98 | <h3 class=fn><a href="qobject.html">QObject</a> * <a name="object"></a>QAxAggregated::object () const<tt> [protected]</tt>
|
---|
99 | </h3>
|
---|
100 |
|
---|
101 | <p> Returns a pointer to the <a href="qobject.html">QObject</a> subclass implementing the COM object.
|
---|
102 | This function might return 0.
|
---|
103 | <p> <b>Warning:</b>
|
---|
104 | You must not store the returned pointer, unless you use a
|
---|
105 | <a href="qguardedptr.html">QGuardedPtr</a>, since the QObject can be destroyed by <a href="activeqt.html#ActiveQt">ActiveQt</a> at any
|
---|
106 | time.
|
---|
107 |
|
---|
108 | <h3 class=fn>long <a name="queryInterface"></a>QAxAggregated::queryInterface ( const <a href="quuid.html">QUuid</a> & iid, void ** iface )<tt> [pure virtual]</tt>
|
---|
109 | </h3>
|
---|
110 |
|
---|
111 | <p> Reimplement this pure virtual function to support additional COM
|
---|
112 | interfaces. Set the value of <em>iface</em> to point to this object to
|
---|
113 | support the interface <em>iid</em>. Note that you must cast the <tt>this</tt> pointer to the appropriate superclass.
|
---|
114 | <p> <pre>
|
---|
115 | long AxImpl::queryInterface( const <a href="quuid.html">QUuid</a> &iid, void **iface )
|
---|
116 | {
|
---|
117 | *iface = 0;
|
---|
118 | if ( iid == IID_ISomeCOMInterface )
|
---|
119 | *iface = (ISomeCOMInterface*)this;
|
---|
120 | else
|
---|
121 | return E_NOINTERFACE;
|
---|
122 |
|
---|
123 | AddRef();
|
---|
124 | return S_OK;
|
---|
125 | }
|
---|
126 | </pre>
|
---|
127 |
|
---|
128 | <p> Return the standard COM results S_OK (interface is supported) or
|
---|
129 | E_NOINTERFACE (requested interface is not supported).
|
---|
130 | <p> <b>Warning:</b>
|
---|
131 | Even though you must implement the IUnknown interface if you
|
---|
132 | implement any COM interface you must not support the IUnknown
|
---|
133 | interface in your <a href="#queryInterface">queryInterface</a>() implementation.
|
---|
134 |
|
---|
135 | <h3 class=fn><a href="qwidget.html">QWidget</a> * <a name="widget"></a>QAxAggregated::widget () const<tt> [protected]</tt>
|
---|
136 | </h3>
|
---|
137 |
|
---|
138 | <p> Returns a pointer to the <a href="qwidget.html">QWidget</a> subclass implementing the ActiveX control.
|
---|
139 | This function might return 0.
|
---|
140 | <p> <b>Warning:</b>
|
---|
141 | You must not store the returned pointer, unless you use a
|
---|
142 | <a href="qguardedptr.html">QGuardedPtr</a>, since the QWidget can be destroyed by <a href="activeqt.html#ActiveQt">ActiveQt</a> at any
|
---|
143 | time.
|
---|
144 |
|
---|
145 | <!-- eof -->
|
---|
146 | <hr><p>
|
---|
147 | This file is part of the <a href="index.html">Qt toolkit</a>.
|
---|
148 | Copyright © 1995-2007
|
---|
149 | <a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
---|
150 | <table width=100% cellspacing=0 border=0><tr>
|
---|
151 | <td>Copyright © 2007
|
---|
152 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
---|
153 | <td align=right><div align=right>Qt 3.3.8</div>
|
---|
154 | </table></div></address></body>
|
---|
155 | </html>
|
---|