summaryrefslogtreecommitdiffstats
path: root/doc/html/qaxfactory.html
blob: 82ffb5d7e2c8d964201df854da9f17690711eef0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/extensions/activeqt/control/qaxfactory.cpp:75 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>QAxFactory Class</title>
<style type="text/css"><!--
fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #ffffff; color: black; }
--></style>
</head>
<body>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="#E5E5E5">
<td valign=center>
 <a href="index.html">
<font color="#004faf">Home</font></a>
 | <a href="classes.html">
<font color="#004faf">All&nbsp;Classes</font></a>
 | <a href="mainclasses.html">
<font color="#004faf">Main&nbsp;Classes</font></a>
 | <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
 | <a href="groups.html">
<font color="#004faf">Grouped&nbsp;Classes</font></a>
 | <a href="functions.html">
<font color="#004faf">Functions</font></a>
</td>
<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>

<p>The QAxFactory class defines a factory for the creation of COM components.
<a href="#details">More...</a>
<p>This class is part of the <b>Qt ActiveQt Extension</b>.
<p><tt>#include &lt;<a href="qaxfactory-h.html">qaxfactory.h</a>&gt;</tt>
<p><a href="qaxfactory-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<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>
<li class=fn>virtual <a href="#~QAxFactory"><b>~QAxFactory</b></a> ()</li>
<li class=fn>virtual QStringList <a href="#featureList"><b>featureList</b></a> () const = 0</li>
<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>
<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>
<li class=fn>virtual QMetaObject * <a href="#metaObject"><b>metaObject</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key ) const</li>
<li class=fn>virtual bool <a href="#createObjectWrapper"><b>createObjectWrapper</b></a> ( QObject&nbsp;*&nbsp;object, IDispatch&nbsp;**&nbsp;wrapper )</li>
<li class=fn>virtual QUuid <a href="#classID"><b>classID</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key ) const</li>
<li class=fn>virtual QUuid <a href="#interfaceID"><b>interfaceID</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key ) const</li>
<li class=fn>virtual QUuid <a href="#eventsID"><b>eventsID</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key ) const</li>
<li class=fn>virtual QUuid <a href="#typeLibID"><b>typeLibID</b></a> () const</li>
<li class=fn>virtual QUuid <a href="#appID"><b>appID</b></a> () const</li>
<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>
<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>
<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>
<li class=fn>virtual QString <a href="#exposeToSuperClass"><b>exposeToSuperClass</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key ) const</li>
<li class=fn>virtual bool <a href="#stayTopLevel"><b>stayTopLevel</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key ) const</li>
<li class=fn>virtual bool <a href="#hasStockEvents"><b>hasStockEvents</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key ) const</li>
<li class=fn>virtual bool <a href="#isService"><b>isService</b></a> () const</li>
<li class=fn>enum <a href="#ServerType-enum"><b>ServerType</b></a> { SingleInstance, MultipleInstances }</li>
</ul>
<h2>Static Public Members</h2>
<ul>
<li class=fn>bool <a href="#isServer"><b>isServer</b></a> ()</li>
<li class=fn>QString <a href="#serverDirPath"><b>serverDirPath</b></a> ()</li>
<li class=fn>QString <a href="#serverFilePath"><b>serverFilePath</b></a> ()</li>
<li class=fn>bool <a href="#startServer"><b>startServer</b></a> ( ServerType&nbsp;type = MultipleInstances )</li>
<li class=fn>bool <a href="#stopServer"><b>stopServer</b></a> ()</li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>
<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.
<p>

The QAxFactory class defines a factory for the creation of COM components.

<p> 

<!-- 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>
<p> Implement this factory once in your ActiveX server to provide
information about the components the server can create. If your
server supports just a single ActiveX control, you can use the
default factory implementation instead of implementing the factory
yourself. Use the <a href="qaxfactory.html#QAXFACTORY_DEFAULT">QAXFACTORY_DEFAULT</a> macro in any
implementation file (e.g. main.cpp) to instantiate and export the
default factory:
<p> <pre>
    #include &lt;<a href="qapplication-h.html">qapplication.h</a>&gt;
    #include &lt;<a href="qaxfactory-h.html">qaxfactory.h</a>&gt;

    #include "theactivex.h"

    QAXFACTORY_DEFAULT(
        TheActiveX,                               // widget class
        "{01234567-89AB-CDEF-0123-456789ABCDEF}", // class ID
        "{01234567-89AB-CDEF-0123-456789ABCDEF}", // interface ID
        "{01234567-89AB-CDEF-0123-456789ABCDEF}", // event interface ID
        "{01234567-89AB-CDEF-0123-456789ABCDEF}", // type library ID
        "{01234567-89AB-CDEF-0123-456789ABCDEF}"  // application ID
        )
    </pre>
 
<p> If you implement your own factory reimplement the pure virtual
functions, provide the unique identifiers for the ActiveX
controls, and use the <a href="qaxfactory.html#QAXFACTORY_EXPORT">QAXFACTORY_EXPORT</a> macro to instantiate
and export it:
<p> <pre>
    QStringList ActiveQtFactory::featureList() const
    {
        <a href="qstringlist.html">QStringList</a> list;
        list &lt;&lt; "ActiveX1";
        list &lt;&lt; "ActiveX2";
        ...
        return list;
    }

    QWidget *ActiveQtFactory::create( const <a href="qstring.html">QString</a> &amp;key, QWidget *parent, const char *name )
    {
        if ( key == "ActiveX1" )
            return new ActiveX1( parent, name );
        if ( key == "ActiveX2" )
            return new ActiveX2( parent, name );
        ...
        return 0;
    }

    QUuid ActiveQtFactory::classID( const <a href="qstring.html">QString</a> &amp;key ) const
    {
        if ( key == "ActiveX1" )
            return "{01234567-89AB-CDEF-0123-456789ABCDEF}";
        ...
        return QUuid();
    }

    QUuid ActiveQtFactory::interfaceID( const <a href="qstring.html">QString</a> &amp;key ) const
    {
        if ( key == "ActiveX1" )
            return "{01234567-89AB-CDEF-0123-456789ABCDEF}";
        ...
        return QUuid();
    }

    QUuid ActiveQtFactory::eventsID( const <a href="qstring.html">QString</a> &amp;key ) const
    {
        if ( key == "ActiveX1" )
            return "{01234567-89AB-CDEF-0123-456789ABCDEF}";
        ...
        return QUuid();
    }

    QAXFACTORY_EXPORT(
        MyFactory,                                // factory class
        "{01234567-89AB-CDEF-0123-456789ABCDEF}", // type library ID
        "{01234567-89AB-CDEF-0123-456789ABCDEF}"  // application ID
        )
    </pre>
 
<p> If you use the <tt>Q_CLASSINFO</tt> macro to provide the unique identifiers
or other attributes for your class you can use the <a href="qaxfactory.html#QAXFACTORY_BEGIN">QAXFACTORY_BEGIN</a>,
<a href="qaxfactory.html#QAXCLASS">QAXCLASS</a> and <a href="qaxfactory.html#QAXFACTORY_END">QAXFACTORY_END</a> macros to expose one or more classes
as COM objects.
<p> <pre>
    QAXFACTORY_BEGIN(
        "{01234567-89AB-CDEF-0123-456789ABCDEF}", // type library ID
        "{01234567-89AB-CDEF-0123-456789ABCDEF}"  // application ID
    )
        QAXCLASS(Class1)
        QAXCLASS(Class2)
    QAXFACTORY_END()
    </pre>
 
<p> Only one QAxFactory implementation may be instantiated and
exported by an ActiveX server application. This instance is accessible
through the global qAxFactory() function.
<p> A factory can also reimplement the <a href="#registerClass">registerClass</a>() and
<a href="#unregisterClass">unregisterClass</a>() functions to set additional flags for an ActiveX
control in the registry. To limit the number of methods or
properties a widget class exposes from its parent classes
reimplement <a href="#exposeToSuperClass">exposeToSuperClass</a>().

<hr><h2>Member Type Documentation</h2>
<h3 class=fn><a name="ServerType-enum"></a>QAxFactory::ServerType</h3>

<p> This enum specifies the different types of servers that can be
started with startServer.
<ul>
<li><tt>QAxFactory::SingleInstance</tt> - The server can create only one instance of each 
supplied class.
<li><tt>QAxFactory::MultipleInstances</tt> - The server can create multiple instances of
each supplied class.
</ul>
<hr><h2>Member Function Documentation</h2>
<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 )
</h3>
Constructs a QAxFactory object that returns <em>libid</em> and <em>appid</em>
in the implementation of the respective interface functions.

<h3 class=fn><a name="~QAxFactory"></a>QAxFactory::~QAxFactory ()<tt> [virtual]</tt>
</h3>
Destroys the QAxFactory object.

<h3 class=fn><a href="quuid.html">QUuid</a> <a name="appID"></a>QAxFactory::appID () const<tt> [virtual]</tt>
</h3>

<p> Reimplement this function to return the ActiveX server's
application identifier.

<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>
</h3>
Reimplement this function to return the class identifier for each
<em>key</em> returned by the <a href="#featureList">featureList</a>() implementation, or an empty
<a href="quuid.html">QUuid</a> if this factory doesn't support the value of <em>key</em>.
<p> The default implementation interprets <em>key</em> as the class name,
and returns the value of the Q_CLASSINFO entry "ClassID".

<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>
</h3>
Reimplement this function to return a new widget for <em>key</em>.
Propagate <em>parent</em> and <em>name</em> to the <a href="qwidget.html">QWidget</a> constructor. Return 
0 if this factory doesn't support the value of <em>key</em>.
<p> The returned widget will be exposed as an ActiveX control, e.g.
a COM object that can be embedded as a control into applications.
<p> The default implementation returns 0.

<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>
</h3>
Reimplement this function to return a new object for <em>key</em>.
Propagate <em>parent</em> and <em>name</em> to the <a href="qwidget.html">QWidget</a> constructor. Return 
0 if this factory doesn't support the value of <em>key</em>.
<p> If the object returned is a QWidget it will be exposed as an ActiveX
control, otherwise the returned object will be exposed as a COM object.
<p> The default implementation returns the result <a href="#create">QAxFactory::create</a>() if 
<em>parent</em> is 0 or a widget, otherwise returns 0.

<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>
</h3>

<p> Reimplement this function to provide the COM object for <em>object</em>
in <em>wrapper</em>. Return TRUE if the function was successfull, otherwise
return FALSE.
<p> The default implementation creates a generic automation wrapper based 
on the <a href="metaobjects.html#meta-object">meta object</a> information of <em>object</em>.

<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>
</h3>
Reimplement this function to return the identifier of the event
interface for each <em>key</em> returned by the <a href="#featureList">featureList</a>()
implementation, or an empty <a href="quuid.html">QUuid</a> if this factory doesn't support
the value of <em>key</em>.
<p> The default implementation interprets <em>key</em> as the class name,
and returns the value of the Q_CLASSINFO entry "EventsID".

<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>
</h3>
Reimplement this function to return the name of the super class of
<em>key</em> up to which methods and properties should be exposed by the
ActiveX control.
<p> The default implementation interprets <em>key</em> as the class name,
and returns the value of the Q_CLASSINFO entry "ToSuperClass". If
no such value is set the null-string is returned, and the functions 
and properties of all the super classes including <a href="qwidget.html">QWidget</a> will be 
exposed.
<p> To only expose the functions and properties of the class itself,
reimplement this function to return <em>key</em>.

<h3 class=fn><a href="qstringlist.html">QStringList</a> <a name="featureList"></a>QAxFactory::featureList () const<tt> [pure virtual]</tt>
</h3>

<p> Reimplement this function to return a list of the widgets (class
names) supported by this factory.

<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>
</h3>
Reimplement this function to return TRUE if the ActiveX control
<em>key</em> should support the standard ActiveX events
<ul>
<li> Click
<li> DblClick
<li> KeyDown
<li> KeyPress
<li> KeyUp
<li> MouseDown
<li> MouseUp
<li> MouseMove
</ul>
<p> The default implementation interprets <em>key</em> as the class name,
and returns TRUE if the value of the Q_CLASSINFO entry "StockEvents"
is "yes". Otherwise this function returns FALSE.

<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>
</h3>
Reimplement this function to return the interface identifier for
each <em>key</em> returned by the <a href="#featureList">featureList</a>() implementation, or an
empty <a href="quuid.html">QUuid</a> if this factory doesn't support the value of <em>key</em>.
<p> The default implementation interprets <em>key</em> as the class name,
and returns the value of the Q_CLASSINFO entry "InterfaceID".

<h3 class=fn>bool <a name="isServer"></a>QAxFactory::isServer ()<tt> [static]</tt>
</h3>
Returns TRUE if the application has been started (by COM) as an ActiveX 
server, otherwise returns FALSE.
<p> <pre>
    int main( int argc, char**argv )
    {
        <a href="qapplication.html">QApplication</a> app( argc, argv );

        if ( !QAxFactory::isServer() ) {
            // initialize for stand-alone execution
        }

        return app.<a href="qapplication.html#exec">exec</a>() // standard event processing
    }
    </pre>
 

<h3 class=fn>bool <a name="isService"></a>QAxFactory::isService () const<tt> [virtual]</tt>
</h3>
Reimplement this function to return TRUE if the server is
running as a persistent service (e.g. an NT service) and should
not terminate even when all objects provided have been released.
<p> The default implementation returns FALSE.

<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>
</h3>
Reimplement this function to return the <a href="qmetaobject.html">QMetaObject</a> corresponding to
<em>key</em>, or 0 if this factory doesn't support the value of <em>key</em>.
<p> The default implementation returns the QMetaObject for the class
<em>key</em>.

<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>
</h3>
Registers additional values for the class <em>key</em> in the system
registry using the <em>settings</em> object. The standard values have
already been registed by the framework, but additional values,
e.g. implemented categories, can be added in an implementation of
this function.
<p> <pre>
    settings-&gt;writeEntry( "/CLSID/" + classID(key) + "/Implemented Categories/{00000000-0000-0000-000000000000}/.", QString::null );
    </pre>
 
<p> If you reimplement this function you must also reimplement
<a href="#unregisterClass">unregisterClass</a>() to remove the additional registry values.
<p> <p>See also <a href="qsettings.html">QSettings</a>.

<h3 class=fn><a href="qstring.html">QString</a> <a name="serverDirPath"></a>QAxFactory::serverDirPath ()<tt> [static]</tt>
</h3>
Returns the directory that contains the server binary.
<p> For out-of-process servers this is the same as 
<a href="qapplication.html#applicationDirPath">QApplication::applicationDirPath</a>(). For in-process servers
that function returns the directory that contains the hosting
application.

<h3 class=fn><a href="qstring.html">QString</a> <a name="serverFilePath"></a>QAxFactory::serverFilePath ()<tt> [static]</tt>
</h3>
Returns the file path of the server binary.
<p> For out-of-process servers this is the same as 
<a href="qapplication.html#applicationFilePath">QApplication::applicationFilePath</a>(). For in-process servers
that function returns the file path of the hosting application.

<h3 class=fn>bool <a name="startServer"></a>QAxFactory::startServer ( <a href="qaxfactory.html#ServerType-enum">ServerType</a>&nbsp;type = MultipleInstances )<tt> [static]</tt>
</h3>

<p> Starts the COM server with <em>type</em> and returns TRUE if successful, 
otherwise returns FALSE.
<p> Calling this function if the server is already running (or for an
in-process server) does nothing and returns TRUE.
<p> The server is started automatically with <em>type</em> set to MultipleUse 
if the server executable has been started with the <tt>-activex</tt> 
command line parameter.

<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>
</h3>
Reimplement this function to return TRUE if the ActiveX control <em>key</em>
should be a top level window, e.g. a dialog. The default implementation
returns FALSE.

<h3 class=fn>bool <a name="stopServer"></a>QAxFactory::stopServer ()<tt> [static]</tt>
</h3>

<p> Stops the COM server and returns TRUE if successful, otherwise 
returns FALSE.
<p> Calling this function if the server is not running (or for an
in-process server) does nothing and returns TRUE.
<p> Stopping the server will not invalidate existing objects, but no
new objects can be created from the existing server process. Usually
COM will start a new server process if additional objects are requested.
<p> The server is stopped automatically when the main() function returns.

<h3 class=fn><a href="quuid.html">QUuid</a> <a name="typeLibID"></a>QAxFactory::typeLibID () const<tt> [virtual]</tt>
</h3>

<p> Reimplement this function to return the ActiveX server's type
library identifier.

<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>
</h3>
Unregisters any additional values for the class <em>key</em> from the
system registry using the <em>settings</em> object.
<p> <pre>
    settings-&gt;removeEntry( "/CLSID/" + classID(key) + "/Implemented Categories/{00000000-0000-0000-000000000000}/." );
    </pre>
 
<p> <p>See also <a href="#registerClass">registerClass</a>() and <a href="qsettings.html">QSettings</a>.

<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>
</h3>
Reimplement this function to return TRUE if <em>licenseKey</em> is a valid
license for the class <em>key</em>, or if the current machine is licensed.
<p> The default implementation returns TRUE if the class <em>key</em> is not
licensed (ie. no Q_CLASSINFO attribute "LicenseKey"), or if 
<em>licenseKey</em> matches the value of the "LicenseKey" attribute, or
if the machine is licensed through a .LIC file with the same filename
as this COM server.

<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>.
Copyright &copy; 1995-2007
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
<table width=100% cellspacing=0 border=0><tr>
<td>Copyright &copy; 2007
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
<td align=right><div align=right>Qt 3.3.8</div>
</table></div></address></body>
</html>