Classes - Annotated - Tree - Functions - Home - Structure

QComponentServerInterface Class Reference

The QComponentServerInterface class provides a means of registering and unregistering components. More...

#include <qcom.h>

Inherits QUnknownInterface.

List of all member functions.

Public Members


Detailed Description

The QComponentServerInterface class provides a means of registering and unregistering components.

This class provides two functions, registerComponents() and unregisterComponents().

See also QComponentFactory.


Member Function Documentation

bool QComponentServerInterface::registerComponents ( const QString & filepath ) const [virtual]

Registers the components in this server in the system registry and returns TRUE when successful, otherwise returns FALSE. The filepath is the absolute path to the shared library file.

Example:

  QSettings register;
  bool ok;

  register.insertSearchPath( QSettings::Windows, "/Classes" );
  ok = register.writeEntry( "/CLSID/{DD19964B-A2C8-42AE-AAF9-8ADC509BCA03}/Default", "Test Component" );
  ok = register.writeEntry( "/CLSID/{DD19964B-A2C8-42AE-AAF9-8ADC509BCA03}/InprocServer32/Default", filepath ) && ok;

  return ok;
  

See QSettings.

bool QComponentServerInterface::unregisterComponents () const [virtual]

Removes the component in this server from the system registry and returns TRUE if successful, otherwise returns FALSE.

  QSettings settings;
  bool ok;

  settings.insertSearchPath( QSettings::Windows, "/Classes" );
  ok = settings.removeEntry( "/CLSID/{DD19964B-A2C8-42AE-AAF9-8ADC509BCA03}/InprocServer32/Default" );
  ok = settings.removeEntry( "/CLSID/{DD19964B-A2C8-42AE-AAF9-8ADC509BCA03}/Default" ) && ok;

  return ok;
  

See QSettings.


Search the documentation, FAQ, qt-interest archive and more (uses www.trolltech.com):


This file is part of the Qt toolkit, copyright © 1995-2000 Trolltech, all rights reserved.


Copyright © 2000 TrolltechTrademarks
Qt version main-beta1