source: trunk/doc/html/qaxfactory.html@ 208

Last change on this file since 208 was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 22.5 KB
Line 
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/qaxfactory.cpp:75 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>QAxFactory Class</title>
7<style type="text/css"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { 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&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;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&nbsp;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>QAxFactory Class Reference<br><small>[<a href="qaxserver.html">QAxServer module</a>]</small></h1>
33
34<p>The QAxFactory class defines a factory for the creation of COM components.
35<a href="#details">More...</a>
36<p>This class is part of the <b>Qt ActiveQt Extension</b>.
37<p><tt>#include &lt;<a href="qaxfactory-h.html">qaxfactory.h</a>&gt;</tt>
38<p><a href="qaxfactory-members.html">List of all member functions.</a>
39<h2>Public Members</h2>
40<ul>
41<li class=fn><a href="#QAxFactory"><b>QAxFactory</b></a> ( const&nbsp;QUuid&nbsp;&amp;&nbsp;libid, const&nbsp;QUuid&nbsp;&amp;&nbsp;appid )</li>
42<li class=fn>virtual <a href="#~QAxFactory"><b>~QAxFactory</b></a> ()</li>
43<li class=fn>virtual QStringList <a href="#featureList"><b>featureList</b></a> () const = 0</li>
44<li class=fn>virtual QWidget * <a href="#create"><b>create</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key, QWidget&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )</li>
45<li class=fn>virtual QObject * <a href="#createObject"><b>createObject</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key, QObject&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )</li>
46<li class=fn>virtual QMetaObject * <a href="#metaObject"><b>metaObject</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key ) const</li>
47<li class=fn>virtual bool <a href="#createObjectWrapper"><b>createObjectWrapper</b></a> ( QObject&nbsp;*&nbsp;object, IDispatch&nbsp;**&nbsp;wrapper )</li>
48<li class=fn>virtual QUuid <a href="#classID"><b>classID</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key ) const</li>
49<li class=fn>virtual QUuid <a href="#interfaceID"><b>interfaceID</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key ) const</li>
50<li class=fn>virtual QUuid <a href="#eventsID"><b>eventsID</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key ) const</li>
51<li class=fn>virtual QUuid <a href="#typeLibID"><b>typeLibID</b></a> () const</li>
52<li class=fn>virtual QUuid <a href="#appID"><b>appID</b></a> () const</li>
53<li class=fn>virtual void <a href="#registerClass"><b>registerClass</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key, QSettings&nbsp;*&nbsp;settings ) const</li>
54<li class=fn>virtual void <a href="#unregisterClass"><b>unregisterClass</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key, QSettings&nbsp;*&nbsp;settings ) const</li>
55<li class=fn>virtual bool <a href="#validateLicenseKey"><b>validateLicenseKey</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key, const&nbsp;QString&nbsp;&amp;&nbsp;licenseKey ) const</li>
56<li class=fn>virtual QString <a href="#exposeToSuperClass"><b>exposeToSuperClass</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key ) const</li>
57<li class=fn>virtual bool <a href="#stayTopLevel"><b>stayTopLevel</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key ) const</li>
58<li class=fn>virtual bool <a href="#hasStockEvents"><b>hasStockEvents</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key ) const</li>
59<li class=fn>virtual bool <a href="#isService"><b>isService</b></a> () const</li>
60<li class=fn>enum <a href="#ServerType-enum"><b>ServerType</b></a> { SingleInstance, MultipleInstances }</li>
61</ul>
62<h2>Static Public Members</h2>
63<ul>
64<li class=fn>bool <a href="#isServer"><b>isServer</b></a> ()</li>
65<li class=fn>QString <a href="#serverDirPath"><b>serverDirPath</b></a> ()</li>
66<li class=fn>QString <a href="#serverFilePath"><b>serverFilePath</b></a> ()</li>
67<li class=fn>bool <a href="#startServer"><b>startServer</b></a> ( ServerType&nbsp;type = MultipleInstances )</li>
68<li class=fn>bool <a href="#stopServer"><b>stopServer</b></a> ()</li>
69</ul>
70<hr><a name="details"></a><h2>Detailed Description</h2>
71<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.
72<p>
73
74The QAxFactory class defines a factory for the creation of COM components.
75
76<p>
77
78<!-- index QAXFACTORY_DEFAULT --><a name="QAXFACTORY_DEFAULT"></a><!-- index QAXFACTORY_EXPORT --><a name="QAXFACTORY_EXPORT"></a><!-- index QAXFACTORY_BEGIN --><a name="QAXFACTORY_BEGIN"></a><!-- index QAXFACTORY_END --><a name="QAXFACTORY_END"></a><!-- index QAXCLASS --><a name="QAXCLASS"></a>
79<p> Implement this factory once in your ActiveX server to provide
80information about the components the server can create. If your
81server supports just a single ActiveX control, you can use the
82default factory implementation instead of implementing the factory
83yourself. Use the <a href="qaxfactory.html#QAXFACTORY_DEFAULT">QAXFACTORY_DEFAULT</a> macro in any
84implementation file (e.g. main.cpp) to instantiate and export the
85default factory:
86<p> <pre>
87 #include &lt;<a href="qapplication-h.html">qapplication.h</a>&gt;
88 #include &lt;<a href="qaxfactory-h.html">qaxfactory.h</a>&gt;
89
90 #include "theactivex.h"
91
92 QAXFACTORY_DEFAULT(
93 TheActiveX, // widget class
94 "{01234567-89AB-CDEF-0123-456789ABCDEF}", // class ID
95 "{01234567-89AB-CDEF-0123-456789ABCDEF}", // interface ID
96 "{01234567-89AB-CDEF-0123-456789ABCDEF}", // event interface ID
97 "{01234567-89AB-CDEF-0123-456789ABCDEF}", // type library ID
98 "{01234567-89AB-CDEF-0123-456789ABCDEF}" // application ID
99 )
100 </pre>
101
102<p> If you implement your own factory reimplement the pure virtual
103functions, provide the unique identifiers for the ActiveX
104controls, and use the <a href="qaxfactory.html#QAXFACTORY_EXPORT">QAXFACTORY_EXPORT</a> macro to instantiate
105and export it:
106<p> <pre>
107 QStringList ActiveQtFactory::featureList() const
108 {
109 <a href="qstringlist.html">QStringList</a> list;
110 list &lt;&lt; "ActiveX1";
111 list &lt;&lt; "ActiveX2";
112 ...
113 return list;
114 }
115
116 QWidget *ActiveQtFactory::create( const <a href="qstring.html">QString</a> &amp;key, QWidget *parent, const char *name )
117 {
118 if ( key == "ActiveX1" )
119 return new ActiveX1( parent, name );
120 if ( key == "ActiveX2" )
121 return new ActiveX2( parent, name );
122 ...
123 return 0;
124 }
125
126 QUuid ActiveQtFactory::classID( const <a href="qstring.html">QString</a> &amp;key ) const
127 {
128 if ( key == "ActiveX1" )
129 return "{01234567-89AB-CDEF-0123-456789ABCDEF}";
130 ...
131 return QUuid();
132 }
133
134 QUuid ActiveQtFactory::interfaceID( const <a href="qstring.html">QString</a> &amp;key ) const
135 {
136 if ( key == "ActiveX1" )
137 return "{01234567-89AB-CDEF-0123-456789ABCDEF}";
138 ...
139 return QUuid();
140 }
141
142 QUuid ActiveQtFactory::eventsID( const <a href="qstring.html">QString</a> &amp;key ) const
143 {
144 if ( key == "ActiveX1" )
145 return "{01234567-89AB-CDEF-0123-456789ABCDEF}";
146 ...
147 return QUuid();
148 }
149
150 QAXFACTORY_EXPORT(
151 MyFactory, // factory class
152 "{01234567-89AB-CDEF-0123-456789ABCDEF}", // type library ID
153 "{01234567-89AB-CDEF-0123-456789ABCDEF}" // application ID
154 )
155 </pre>
156
157<p> If you use the <tt>Q_CLASSINFO</tt> macro to provide the unique identifiers
158or other attributes for your class you can use the <a href="qaxfactory.html#QAXFACTORY_BEGIN">QAXFACTORY_BEGIN</a>,
159<a href="qaxfactory.html#QAXCLASS">QAXCLASS</a> and <a href="qaxfactory.html#QAXFACTORY_END">QAXFACTORY_END</a> macros to expose one or more classes
160as COM objects.
161<p> <pre>
162 QAXFACTORY_BEGIN(
163 "{01234567-89AB-CDEF-0123-456789ABCDEF}", // type library ID
164 "{01234567-89AB-CDEF-0123-456789ABCDEF}" // application ID
165 )
166 QAXCLASS(Class1)
167 QAXCLASS(Class2)
168 QAXFACTORY_END()
169 </pre>
170
171<p> Only one QAxFactory implementation may be instantiated and
172exported by an ActiveX server application. This instance is accessible
173through the global qAxFactory() function.
174<p> A factory can also reimplement the <a href="#registerClass">registerClass</a>() and
175<a href="#unregisterClass">unregisterClass</a>() functions to set additional flags for an ActiveX
176control in the registry. To limit the number of methods or
177properties a widget class exposes from its parent classes
178reimplement <a href="#exposeToSuperClass">exposeToSuperClass</a>().
179
180<hr><h2>Member Type Documentation</h2>
181<h3 class=fn><a name="ServerType-enum"></a>QAxFactory::ServerType</h3>
182
183<p> This enum specifies the different types of servers that can be
184started with startServer.
185<ul>
186<li><tt>QAxFactory::SingleInstance</tt> - The server can create only one instance of each
187supplied class.
188<li><tt>QAxFactory::MultipleInstances</tt> - The server can create multiple instances of
189each supplied class.
190</ul>
191<hr><h2>Member Function Documentation</h2>
192<h3 class=fn><a name="QAxFactory"></a>QAxFactory::QAxFactory ( const&nbsp;<a href="quuid.html">QUuid</a>&nbsp;&amp;&nbsp;libid, const&nbsp;<a href="quuid.html">QUuid</a>&nbsp;&amp;&nbsp;appid )
193</h3>
194Constructs a QAxFactory object that returns <em>libid</em> and <em>appid</em>
195in the implementation of the respective interface functions.
196
197<h3 class=fn><a name="~QAxFactory"></a>QAxFactory::~QAxFactory ()<tt> [virtual]</tt>
198</h3>
199Destroys the QAxFactory object.
200
201<h3 class=fn><a href="quuid.html">QUuid</a> <a name="appID"></a>QAxFactory::appID () const<tt> [virtual]</tt>
202</h3>
203
204<p> Reimplement this function to return the ActiveX server's
205application identifier.
206
207<h3 class=fn><a href="quuid.html">QUuid</a> <a name="classID"></a>QAxFactory::classID ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;key ) const<tt> [virtual]</tt>
208</h3>
209Reimplement this function to return the class identifier for each
210<em>key</em> returned by the <a href="#featureList">featureList</a>() implementation, or an empty
211<a href="quuid.html">QUuid</a> if this factory doesn't support the value of <em>key</em>.
212<p> The default implementation interprets <em>key</em> as the class name,
213and returns the value of the Q_CLASSINFO entry "ClassID".
214
215<h3 class=fn><a href="qwidget.html">QWidget</a>&nbsp;* <a name="create"></a>QAxFactory::create ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;key, <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )<tt> [virtual]</tt>
216</h3>
217Reimplement this function to return a new widget for <em>key</em>.
218Propagate <em>parent</em> and <em>name</em> to the <a href="qwidget.html">QWidget</a> constructor. Return
2190 if this factory doesn't support the value of <em>key</em>.
220<p> The returned widget will be exposed as an ActiveX control, e.g.
221a COM object that can be embedded as a control into applications.
222<p> The default implementation returns 0.
223
224<h3 class=fn><a href="qobject.html">QObject</a>&nbsp;* <a name="createObject"></a>QAxFactory::createObject ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;key, <a href="qobject.html">QObject</a>&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )<tt> [virtual]</tt>
225</h3>
226Reimplement this function to return a new object for <em>key</em>.
227Propagate <em>parent</em> and <em>name</em> to the <a href="qwidget.html">QWidget</a> constructor. Return
2280 if this factory doesn't support the value of <em>key</em>.
229<p> If the object returned is a QWidget it will be exposed as an ActiveX
230control, otherwise the returned object will be exposed as a COM object.
231<p> The default implementation returns the result <a href="#create">QAxFactory::create</a>() if
232<em>parent</em> is 0 or a widget, otherwise returns 0.
233
234<h3 class=fn>bool <a name="createObjectWrapper"></a>QAxFactory::createObjectWrapper ( <a href="qobject.html">QObject</a>&nbsp;*&nbsp;object, IDispatch&nbsp;**&nbsp;wrapper )<tt> [virtual]</tt>
235</h3>
236
237<p> Reimplement this function to provide the COM object for <em>object</em>
238in <em>wrapper</em>. Return TRUE if the function was successfull, otherwise
239return FALSE.
240<p> The default implementation creates a generic automation wrapper based
241on the <a href="metaobjects.html#meta-object">meta object</a> information of <em>object</em>.
242
243<h3 class=fn><a href="quuid.html">QUuid</a> <a name="eventsID"></a>QAxFactory::eventsID ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;key ) const<tt> [virtual]</tt>
244</h3>
245Reimplement this function to return the identifier of the event
246interface for each <em>key</em> returned by the <a href="#featureList">featureList</a>()
247implementation, or an empty <a href="quuid.html">QUuid</a> if this factory doesn't support
248the value of <em>key</em>.
249<p> The default implementation interprets <em>key</em> as the class name,
250and returns the value of the Q_CLASSINFO entry "EventsID".
251
252<h3 class=fn><a href="qstring.html">QString</a> <a name="exposeToSuperClass"></a>QAxFactory::exposeToSuperClass ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;key ) const<tt> [virtual]</tt>
253</h3>
254Reimplement this function to return the name of the super class of
255<em>key</em> up to which methods and properties should be exposed by the
256ActiveX control.
257<p> The default implementation interprets <em>key</em> as the class name,
258and returns the value of the Q_CLASSINFO entry "ToSuperClass". If
259no such value is set the null-string is returned, and the functions
260and properties of all the super classes including <a href="qwidget.html">QWidget</a> will be
261exposed.
262<p> To only expose the functions and properties of the class itself,
263reimplement this function to return <em>key</em>.
264
265<h3 class=fn><a href="qstringlist.html">QStringList</a> <a name="featureList"></a>QAxFactory::featureList () const<tt> [pure virtual]</tt>
266</h3>
267
268<p> Reimplement this function to return a list of the widgets (class
269names) supported by this factory.
270
271<h3 class=fn>bool <a name="hasStockEvents"></a>QAxFactory::hasStockEvents ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;key ) const<tt> [virtual]</tt>
272</h3>
273Reimplement this function to return TRUE if the ActiveX control
274<em>key</em> should support the standard ActiveX events
275<ul>
276<li> Click
277<li> DblClick
278<li> KeyDown
279<li> KeyPress
280<li> KeyUp
281<li> MouseDown
282<li> MouseUp
283<li> MouseMove
284</ul>
285<p> The default implementation interprets <em>key</em> as the class name,
286and returns TRUE if the value of the Q_CLASSINFO entry "StockEvents"
287is "yes". Otherwise this function returns FALSE.
288
289<h3 class=fn><a href="quuid.html">QUuid</a> <a name="interfaceID"></a>QAxFactory::interfaceID ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;key ) const<tt> [virtual]</tt>
290</h3>
291Reimplement this function to return the interface identifier for
292each <em>key</em> returned by the <a href="#featureList">featureList</a>() implementation, or an
293empty <a href="quuid.html">QUuid</a> if this factory doesn't support the value of <em>key</em>.
294<p> The default implementation interprets <em>key</em> as the class name,
295and returns the value of the Q_CLASSINFO entry "InterfaceID".
296
297<h3 class=fn>bool <a name="isServer"></a>QAxFactory::isServer ()<tt> [static]</tt>
298</h3>
299Returns TRUE if the application has been started (by COM) as an ActiveX
300server, otherwise returns FALSE.
301<p> <pre>
302 int main( int argc, char**argv )
303 {
304 <a href="qapplication.html">QApplication</a> app( argc, argv );
305
306 if ( !QAxFactory::isServer() ) {
307 // initialize for stand-alone execution
308 }
309
310 return app.<a href="qapplication.html#exec">exec</a>() // standard event processing
311 }
312 </pre>
313
314
315<h3 class=fn>bool <a name="isService"></a>QAxFactory::isService () const<tt> [virtual]</tt>
316</h3>
317Reimplement this function to return TRUE if the server is
318running as a persistent service (e.g. an NT service) and should
319not terminate even when all objects provided have been released.
320<p> The default implementation returns FALSE.
321
322<h3 class=fn><a href="qmetaobject.html">QMetaObject</a>&nbsp;* <a name="metaObject"></a>QAxFactory::metaObject ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;key ) const<tt> [virtual]</tt>
323</h3>
324Reimplement this function to return the <a href="qmetaobject.html">QMetaObject</a> corresponding to
325<em>key</em>, or 0 if this factory doesn't support the value of <em>key</em>.
326<p> The default implementation returns the QMetaObject for the class
327<em>key</em>.
328
329<h3 class=fn>void <a name="registerClass"></a>QAxFactory::registerClass ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;key, <a href="qsettings.html">QSettings</a>&nbsp;*&nbsp;settings ) const<tt> [virtual]</tt>
330</h3>
331Registers additional values for the class <em>key</em> in the system
332registry using the <em>settings</em> object. The standard values have
333already been registed by the framework, but additional values,
334e.g. implemented categories, can be added in an implementation of
335this function.
336<p> <pre>
337 settings-&gt;writeEntry( "/CLSID/" + classID(key) + "/Implemented Categories/{00000000-0000-0000-000000000000}/.", QString::null );
338 </pre>
339
340<p> If you reimplement this function you must also reimplement
341<a href="#unregisterClass">unregisterClass</a>() to remove the additional registry values.
342<p> <p>See also <a href="qsettings.html">QSettings</a>.
343
344<h3 class=fn><a href="qstring.html">QString</a> <a name="serverDirPath"></a>QAxFactory::serverDirPath ()<tt> [static]</tt>
345</h3>
346Returns the directory that contains the server binary.
347<p> For out-of-process servers this is the same as
348<a href="qapplication.html#applicationDirPath">QApplication::applicationDirPath</a>(). For in-process servers
349that function returns the directory that contains the hosting
350application.
351
352<h3 class=fn><a href="qstring.html">QString</a> <a name="serverFilePath"></a>QAxFactory::serverFilePath ()<tt> [static]</tt>
353</h3>
354Returns the file path of the server binary.
355<p> For out-of-process servers this is the same as
356<a href="qapplication.html#applicationFilePath">QApplication::applicationFilePath</a>(). For in-process servers
357that function returns the file path of the hosting application.
358
359<h3 class=fn>bool <a name="startServer"></a>QAxFactory::startServer ( <a href="qaxfactory.html#ServerType-enum">ServerType</a>&nbsp;type = MultipleInstances )<tt> [static]</tt>
360</h3>
361
362<p> Starts the COM server with <em>type</em> and returns TRUE if successful,
363otherwise returns FALSE.
364<p> Calling this function if the server is already running (or for an
365in-process server) does nothing and returns TRUE.
366<p> The server is started automatically with <em>type</em> set to MultipleUse
367if the server executable has been started with the <tt>-activex</tt>
368command line parameter.
369
370<h3 class=fn>bool <a name="stayTopLevel"></a>QAxFactory::stayTopLevel ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;key ) const<tt> [virtual]</tt>
371</h3>
372Reimplement this function to return TRUE if the ActiveX control <em>key</em>
373should be a top level window, e.g. a dialog. The default implementation
374returns FALSE.
375
376<h3 class=fn>bool <a name="stopServer"></a>QAxFactory::stopServer ()<tt> [static]</tt>
377</h3>
378
379<p> Stops the COM server and returns TRUE if successful, otherwise
380returns FALSE.
381<p> Calling this function if the server is not running (or for an
382in-process server) does nothing and returns TRUE.
383<p> Stopping the server will not invalidate existing objects, but no
384new objects can be created from the existing server process. Usually
385COM will start a new server process if additional objects are requested.
386<p> The server is stopped automatically when the main() function returns.
387
388<h3 class=fn><a href="quuid.html">QUuid</a> <a name="typeLibID"></a>QAxFactory::typeLibID () const<tt> [virtual]</tt>
389</h3>
390
391<p> Reimplement this function to return the ActiveX server's type
392library identifier.
393
394<h3 class=fn>void <a name="unregisterClass"></a>QAxFactory::unregisterClass ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;key, <a href="qsettings.html">QSettings</a>&nbsp;*&nbsp;settings ) const<tt> [virtual]</tt>
395</h3>
396Unregisters any additional values for the class <em>key</em> from the
397system registry using the <em>settings</em> object.
398<p> <pre>
399 settings-&gt;removeEntry( "/CLSID/" + classID(key) + "/Implemented Categories/{00000000-0000-0000-000000000000}/." );
400 </pre>
401
402<p> <p>See also <a href="#registerClass">registerClass</a>() and <a href="qsettings.html">QSettings</a>.
403
404<h3 class=fn>bool <a name="validateLicenseKey"></a>QAxFactory::validateLicenseKey ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;key, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;licenseKey ) const<tt> [virtual]</tt>
405</h3>
406Reimplement this function to return TRUE if <em>licenseKey</em> is a valid
407license for the class <em>key</em>, or if the current machine is licensed.
408<p> The default implementation returns TRUE if the class <em>key</em> is not
409licensed (ie. no Q_CLASSINFO attribute "LicenseKey"), or if
410<em>licenseKey</em> matches the value of the "LicenseKey" attribute, or
411if the machine is licensed through a .LIC file with the same filename
412as this COM server.
413
414<!-- eof -->
415<hr><p>
416This file is part of the <a href="index.html">Qt toolkit</a>.
417Copyright &copy; 1995-2007
418<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
419<table width=100% cellspacing=0 border=0><tr>
420<td>Copyright &copy; 2007
421<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
422<td align=right><div align=right>Qt 3.3.8</div>
423</table></div></address></body>
424</html>
Note: See TracBrowser for help on using the repository browser.