Windows Utilities: Main Page

Windows Utilities Documentation

0.1.0 (development)

The Windows Utilities Library contains several functions and classes that encapsulate aspects of the Microsoft 32-bit Windows Application Programming Interface (Win32 API).

This manual contains the following sections:

  • Application Log
  • Exceptions
  • Registry
  • Semaphore
  • Shutdown and Reboot
  • Version information
  • Parallel Port Base Addresses
  • Support Classes

WindowsUtils is based on [CREGISTRYKEY], [INTERRUPTHOOK], [FONTFILE], [SHUTDOWN], and [WIN32SEMAPHORE]

WindowsUtils License

Copyright © 2003, by Leiden University.

WindowsUtils is written by Martin J. Moene <m.j.moene@eld.LeidenUniv.nl>

Permission to use, copy, modify, and distribute this software and its documentation under the terms of the GNU General Public License is hereby granted. No representations are made about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. See the GNU General Public License for more details.

Generated on Tue Sep 30 11:40:30 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: File Index

Windows Utilities File List

Here is a list of all documented files with brief descriptions:
version.h [code]
wapplog.h [code]
wexception.h [code]
winutils.h [code]
wpportaddr.h [code]
wrefcount.h [code]
wregistry-crk.h [code]
wregistry-ddk.h [code]
wregistry-rki.h [code]
wregistry.h [code]
wsemaphore.h [code]
wshutdown.h [code]
wversion.h [code]
Generated on Tue Sep 30 11:40:31 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Annotated Index

Windows Utilities Class List

Here are the classes, structs, unions and interfaces with brief descriptions:
WindowsUtils::_CM_FULL_RESOURCE_DESCRIPTOR | Registry full resource descriptor
WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR | Registry partial resource descriptor
WindowsUtils::_CM_PARTIAL_RESOURCE_LIST | Registry partial resource list
WindowsUtils::_CM_RESOURCE_LIST | Registry resource list
WindowsUtils::AddPportAddress2000 | Windows 2000 function object to add parallel port addresses to a collection
WindowsUtils::AddPportAddress95 | Windows 95 platform function object to add parallel port addresses to a collection
WindowsUtils::AddPportAddressNT4 | Windows NT 4 function object to add parallel port addresses to a collection
WindowsUtils::AddPportAddressNtPlatform | Abstract base class for Windows NT/2000/XP function objects to add parallel port addresses a collection
WindowsUtils::CCountedRegKey | Reference counted registry key type used for the representation in RegistryKey
WindowsUtils::CRegKeyIterator | Base class for subkey and value iterators
WindowsUtils::PportAddresses | Determine the parallel port base addresses
WindowsUtils::PportAddresses::BodyInterface | Interface for the representation
WindowsUtils::PportAddresses::CountedBody | Implementation for 'generic' operating system
WindowsUtils::PportAddresses::Win2000Body | Determine valid parallel port base addresses for Windows 2000
WindowsUtils::PportAddresses::Win95Body | Determine valid parallel port base addresses for Windows 95
WindowsUtils::PportAddresses::Win98Body | Determine valid parallel port base addresses for Windows 98
WindowsUtils::PportAddresses::WinMeBody | Determine valid parallel port base addresses for Windows ME
WindowsUtils::PportAddresses::WinNtBody | Determine valid parallel port base addresses for Windows NT 4
WindowsUtils::PportAddresses::WinXpBody | Determine valid parallel port base addresses for Windows XP
WindowsUtils::RegistryKey | Provide access to registry subkeys and values
WindowsUtils::RegistryKey::BinaryValue | Binary values (ByteBuffer)
WindowsUtils::RegistryKey::CountedValue | Reference counted value type used for the representation in Value
WindowsUtils::RegistryKey::CountedValue::Exception | Exception type used to convert Win32 API call error return values to exceptions ultimately derived from std::exception
WindowsUtils::RegistryKey::Exception | Exception type used to convert Win32 API call error return values to exceptions ultimately derived from std::exception
WindowsUtils::RegistryKey::InsertIteratorImpl | Insert iterator implementation class
WindowsUtils::RegistryKey::IntegralValue | Integral values (DWORD)
WindowsUtils::RegistryKey::StringValue | String values (std::string)
WindowsUtils::RegistryKey::Subkey | Class to encapsulate a Subkey
WindowsUtils::RegistryKey::SubkeyIteratorImpl | Subkey iterator implementation class
WindowsUtils::RegistryKey::Value | Class to encapsulate various registry value types, like REG_DWORD etc
WindowsUtils::RegistryKey::ValueBuffer | Construct a ByteBuffer from a Value
WindowsUtils::RegistryKey::ValueInterface | Interface for Values
WindowsUtils::RegistryKey::ValueIteratorImpl | Value iterator implementation class
WindowsUtils::Semaphore | Encapsulate Win32 semaphore
WindowsUtils::TReferenceCounted< B > | Template mix-in class for reference counting
WindowsUtils::TReferenceCountedResource< B, T > | Template mix-in class for reference counting a resource
WindowsUtils::TRegKeyIterator< B > | Template class for subkey and value iterator
WindowsUtils::Win32Exception | Exceptions for Windows errors; based on std::exception
Generated on Tue Sep 30 11:40:35 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::_CM_FULL_RESOURCE_DESCRIPTOR struct Reference

WindowsUtils::_CM_FULL_RESOURCE_DESCRIPTOR Struct Reference
[Driver Development Kit]

#include <wregistry-ddk.h>

Collaboration diagram for WindowsUtils::_CM_FULL_RESOURCE_DESCRIPTOR:

[legend]
List of all members.

Public Attributes

INTERFACE_TYPE | InterfaceType
ULONG | BusNumber
CM_PARTIAL_RESOURCE_LIST | PartialResourceList
The documentation for this struct was generated from the following file:
  • wregistry-ddk.h
Generated on Tue Sep 30 11:40:50 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR struct Reference

WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR Struct Reference
[Driver Development Kit]

#include <wregistry-ddk.h>

List of all members.

Public Attributes

UCHAR | Type
UCHAR | ShareDisposition
USHORT | Flags
union {
struct {
PHYSICAL_ADDRESS Start
ULONG Length
} Generic
struct {
PHYSICAL_ADDRESS Start
ULONG Length
} Port
struct {
ULONG Level
ULONG Vector
ULONG Affinity
} Interrupt
struct {
PHYSICAL_ADDRESS Start
ULONG Length
} Memory
struct {
ULONG Channel
ULONG Port
ULONG Reserved1
} Dma
struct {
ULONG Data [3]
} DevicePrivate
struct {
ULONG Start
ULONG Length
ULONG Reserved
} BusNumber
struct {
ULONG DataSize
ULONG Reserved1
ULONG Reserved2
} DeviceSpecificData
} u

The documentation for this struct was generated from the following file:
  • wregistry-ddk.h
Generated on Tue Sep 30 11:40:51 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::_CM_PARTIAL_RESOURCE_LIST struct Reference

WindowsUtils::_CM_PARTIAL_RESOURCE_LIST Struct Reference
[Driver Development Kit]

#include <wregistry-ddk.h>

Collaboration diagram for WindowsUtils::_CM_PARTIAL_RESOURCE_LIST:

[legend]
List of all members.

Public Attributes

USHORT | Version
USHORT | Revision
ULONG | Count
CM_PARTIAL_RESOURCE_DESCRIPTOR | PartialDescriptors [1]
The documentation for this struct was generated from the following file:
  • wregistry-ddk.h
Generated on Tue Sep 30 11:40:55 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::_CM_RESOURCE_LIST struct Reference

WindowsUtils::_CM_RESOURCE_LIST Struct Reference
[Driver Development Kit]

#include <wregistry-ddk.h>

Collaboration diagram for WindowsUtils::_CM_RESOURCE_LIST:

[legend]
List of all members.

Public Attributes

ULONG | Count
CM_FULL_RESOURCE_DESCRIPTOR | List [1]
The documentation for this struct was generated from the following file:
  • wregistry-ddk.h
Generated on Tue Sep 30 11:41:03 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::AddPportAddress2000 class Reference

WindowsUtils::AddPportAddress2000 Class Reference

Inheritance diagram for WindowsUtils::AddPportAddress2000:

[legend]
Collaboration diagram for WindowsUtils::AddPportAddress2000:

[legend]
List of all members.

Detailed Description

AddPportAddress2000::operator() receives values that may have a numeric name like "0". The values with a numeric name specify a partial key that can be used to obtain further information of the device.

"0"="Root\\*PNP0400\\1_0_20_0_0_0"

These partial keys are used as follows to get at the "LogConf" key for that port:

"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\" + {partial key} + "\LogConf"

The "BootConfig" value of the "LogConf" key provides the resource list with the parallel port address.

"BootConfig"=hex(8):01,00,00,00,05,00,00,00,01,00,00,00,01,00,01,00,04,00,00,\
  00,03,00,04,00,00,00,00,d8,00,00,00,00,00,00,00,02,03,00,00,00,00,00,00,d4,\
  00,00,00,00,00,40,00,00,03,00,00,00,00,00,00,d5,00,00,00,00,00,00,80,00,02,\
  03,00,00,09,00,00,00,09,00,00,00,ff,ff,ff,ff

Public Member Functions

AddPportAddress2000 (PportAddressBuffer &aPportAddressBuffer)
constructor.

void operator() (RegistryKey::Value v) const
determine parallel port addresses from partial registry keys with numeric names.

The documentation for this class was generated from the following file:
  • wpportaddr.cpp
Generated on Tue Sep 30 11:41:11 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::AddPportAddress95 class Reference

WindowsUtils::AddPportAddress95 Class Reference

List of all members.

Detailed Description

AddPportAddress95::operator() receives values that directly represent a parallel port address (DWORD), for example 0x378. Unless they are zero, operator() inserts these values in the PportAddressBuffer address collection specified with the contructor.

Public Member Functions

AddPportAddress95 (PportAddressBuffer &aPportAddressBuffer)
constructor.

void | operator() (PportAddressBuffer::value_type v) const
add given parallel port address to collection, unless it is zero.

Protected Attributes

PportAddressBuffer & | iPportAddresses
collection with parallel port addresses

The documentation for this class was generated from the following file:
  • wpportaddr.cpp
Generated on Tue Sep 30 11:41:12 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::AddPportAddressNT4 class Reference

WindowsUtils::AddPportAddressNT4 Class Reference

Inheritance diagram for WindowsUtils::AddPportAddressNT4:

[legend]
Collaboration diagram for WindowsUtils::AddPportAddressNT4:

[legend]
List of all members.

Detailed Description

AddPportAddressNT4 receives values with a name and a resource list. The example below shows that there are two values for parallel port zero.

                               name   resource list

"\\Device\\ParallelPort0.Translated" {01,00,00,00,01,00,00,00,00,00,00,00,
                                      00,00,00,00,01,00,00,00,01,01,01,00,
                                      78,03,00,00,00,00,00,00,03,00,00,00}
       "\\Device\\ParallelPort0.Raw" {01,00,00,00,01,00,00,00,00,00,00,00,
                                      00,00,00,00,01,00,00,00,01,01,01,00,
                                      78,03,00,00,00,00,00,00,03,00,00,00}

We use both values and remove duplicate parallel port addresses lateron in the destructor (This is not necesary when a set<> is used as the container.).

Public Member Functions

~AddPportAddressNT4 ()
destructor; remove duplicates from address list.

AddPportAddressNT4 (PportAddressBuffer &aPportAddressBuffer)
constructor.

void operator() (RegistryKey::Value v) const
for Windows NT 4, determine parallel port addresses from registry.

The documentation for this class was generated from the following file:
  • wpportaddr.cpp
Generated on Tue Sep 30 11:41:20 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::AddPportAddressNtPlatform class Reference

WindowsUtils::AddPportAddressNtPlatform Class Reference

Inheritance diagram for WindowsUtils::AddPportAddressNtPlatform:

[legend]
List of all members.

Detailed Description

class AddPportAddressNtPlatform provides function handleResourceList() that is used for Windows NT, 2000 and XP to extract the parallel port addresses from a registry resource list.

Public Member Functions

virtual | ~AddPportAddressNtPlatform ()
destructor.

AddPportAddressNtPlatform (PportAddressBuffer &aPportAddressBuffer)
constructor.

virtual void | operator() (RegistryKey::Value v) const =0
determine parallel port address from value and insert it in collection.

void | handleResourceList (RegistryKey::ByteBuffer b) const
extract parallel port (CmResourceTypePort) addresses from a resource list.

Protected Attributes

PportAddressBuffer & | iPportAddresses
collection with parallel port addresses

The documentation for this class was generated from the following file:
  • wpportaddr.cpp
Generated on Tue Sep 30 11:41:24 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::CCountedRegKey class Reference

WindowsUtils::CCountedRegKey Class Reference
[Registry]

#include <wregistry-crk.h>

Inheritance diagram for WindowsUtils::CCountedRegKey:

[legend]
Collaboration diagram for WindowsUtils::CCountedRegKey:

[legend]
List of all members.

Detailed Description

Class CCountedRegKey provides a reference counted representation of the registry key resource that is used by class RegistryKey.

Public Member Functions

CCountedRegKey (const HKEY hKey)
constructor.

Protected Member Functions

~CCountedRegKey ()
destructor.

virtual void | preRelease ()
release resource: close registry key.

Private Member Functions

CCountedRegKey (const CCountedRegKey &rhs)
prevent copying

CCountedRegKey & | operator= (const CCountedRegKey &rhs)
prevent copying

The documentation for this class was generated from the following file:
  • wregistry-crk.h
Generated on Tue Sep 30 11:41:36 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::CRegKeyIterator class Reference

WindowsUtils::CRegKeyIterator Class Reference
[Registry]

#include <wregistry-rki.h>

Inheritance diagram for WindowsUtils::CRegKeyIterator:

[legend]
Collaboration diagram for WindowsUtils::CRegKeyIterator:

[legend]
List of all members.

Public Member Functions

virtual | ~CRegKeyIterator ()
destructor.

Protected Member Functions

CRegKeyIterator (CCountedRegKey *apKey)
constructor.

CRegKeyIterator (const CRegKeyIterator &rhs)
copy constructor.

CRegKeyIterator & | operator= (const CRegKeyIterator &rhs)
copy assignment.

bool | operator== (const CRegKeyIterator &rhs) const
test for iterator equality.

Protected Attributes

CCountedRegKey * ipKey
its counted key

DWORD | iIndex
its current index for use with the Win32 API functions

The documentation for this class was generated from the following file:
  • wregistry-rki.h
Generated on Tue Sep 30 11:41:49 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::PportAddresses class Reference

WindowsUtils::PportAddresses Class Reference
[Parallel Port Base Addresses]

#include <wpportaddr.h>

Collaboration diagram for WindowsUtils::PportAddresses:

[legend]
List of all members.

Detailed Description

Class PportAddresses determines the base addresses of the available parallel ports. These base addresses may be obtained from the BIOS data area (Windows 95 type operating systems), or from the registry (Windows NT type operating systems).

Class PportAddresses provides an iterator interface to loop through all parallel port base addresses:

 PportAddresses thePportAddresses;

 for ( PportAddresses::iterator pos = thePportAddresses.begin();
                                pos != thePportAddresses.end(); ++pos )
 {
    std::cout << *pos << ' ';
 }

Class PportAddresses uses the handle--body idiom to provide a 'virtual' constructor: the type of body it constructs, depends on the type of operating system and rep can be a Win95Body, Win98Body, WinMeBody, WinNtBody, Win2000Body, WinXpBody or a generic Body.

Class PportAddresses is a helper class for class EppRulbusInterface of the Rulbus Device Library and of the setrulbus program to set the rulbus environment variable.

Examples:

printpportaddr.out.

Public Types

typedef long | value_type
parallel port address type

typedef std::vector< value_type > | PportAddressBuffer
parallel port address buffer type

typedef PportAddressBuffer::iterator | iterator
iterator type

typedef PportAddressBuffer::const_iterator | const_iterator
const iterator type

Public Member Functions

~PportAddresses ()
destructor.

PportAddresses ()
'virtual' constructor. construct the appropriate representation for rep.

PportAddresses (const PportAddresses &rhs)
copy constructor.

PportAddresses & | operator= (const PportAddresses &rhs)
assignment.

bool | isValid (value_type base) const
true if if the specified parallel port base address is valid.

const char * | platform () const
return a string describing the Windows version.

iterator begin ()
iterator for the first element.

iterator end ()
iterator past the last element.

const_iterator | begin () const
iterator for the first element.

const_iterator | end () const
iterator past the last element.

long | operator[] (int index) const
random access.

Static Public Attributes

const value_type | basePCIMin = 0x0D00
lowest acceptable base address for PCI EPP cards

const value_type | basePCIMax = 0xFFF8
highest acceptable base address for PCI EPP cards

const value_type | basePCIStp = 8
base address delta for PCI EPP cards

Private Attributes

CountedBody * rep
representation

The documentation for this class was generated from the following files:
  • wpportaddr.h
  • wpportaddr.cpp
Generated on Tue Sep 30 11:41:55 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::PportAddresses::BodyInterface class Reference

WindowsUtils::PportAddresses::BodyInterface Class Reference

#include <wpportaddr.h>

Inheritance diagram for WindowsUtils::PportAddresses::BodyInterface:

[legend]
List of all members.

Detailed Description

Class BodyInterface specifies the interface for classes CountedBody, Win95Body, WinNtBody, Win2000Body and WinXpBody.

Public Member Functions

virtual bool | isValid (value_type base) const =0
true if specified address is valid

virtual bool | empty () const =0
true if address collection is empty

virtual long | size () const =0
number of addresses in collection

virtual iterator | begin ()=0
iterator for the first element

virtual iterator | end ()=0
iterator past the last element

virtual const_iterator | begin () const =0
iterator for the first element

virtual const_iterator | end () const =0
iterator past the last element

virtual long | operator[] (int index) const =0
return element at index

virtual const char * | platform () const =0
return string describing Windows version

The documentation for this class was generated from the following file:
  • wpportaddr.h
Generated on Tue Sep 30 11:43:44 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::PportAddresses::CountedBody class Reference

WindowsUtils::PportAddresses::CountedBody Class Reference
[Parallel Port Base Addresses]

#include <wpportaddr.h>

Inheritance diagram for WindowsUtils::PportAddresses::CountedBody:

[legend]
Collaboration diagram for WindowsUtils::PportAddresses::CountedBody:

[legend]
List of all members.

Detailed Description

Class CountedBody and its derivates build a list of valid parallel port base addresses. It provides method isValid() to verify if an address is a valid parallel port base address and it provides an iterator type and methods begin() and end() to iterate through the list.

CountedBody provides the following default valid parallel port addresses.

In addition to the standard parallel port addresses from kPportAddresses, the following address range used by PCI EPP cards is valid: multiples of 8 in the range 0x0D00-0xFFF8.

Public Member Functions

CountedBody ()
constructor.

bool | isValid (value_type base) const
true if specified address is valid

bool | empty () const
true if collection is empty.

long | size () const
number of elements.

iterator begin ()
iterator to the first element.

iterator end ()
iterator past the last element.

const_iterator | begin () const
iterator to the first element.

const_iterator | end () const
iterator past the last element.

long | operator[] (int index) const
random access to collection.

const char * | platform () const
return "Unknown" Windows version.

Protected Attributes

PportAddressBuffer iPportAddresses
the parallel port base address list

Static Protected Attributes

value_type kPportAddresses []
(default) list of valid base addresses.

Member Data Documentation

long WindowsUtils::PportAddresses::CountedBody::kPportAddresses [static, protected]

Initial value:

{
   0x3BC, 0x378, 0x278
}

The documentation for this class was generated from the following files:
  • wpportaddr.h
  • wpportaddr.cpp
Generated on Tue Sep 30 11:43:56 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::PportAddresses::Win2000Body class Reference

WindowsUtils::PportAddresses::Win2000Body Class Reference
[Parallel Port Base Addresses]

#include <wpportaddr.h>

Inheritance diagram for WindowsUtils::PportAddresses::Win2000Body:

[legend]
Collaboration diagram for WindowsUtils::PportAddresses::Win2000Body:

[legend]
List of all members.

Detailed Description

Class Win2000Body determines the parallel port addresses from the following registry key:

"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Parport\Enum"

The values of the Enum key look like:

"0"="Root\\*PNP0400\\1_0_20_0_0_0"
"Count"=dword:00000004
"NextInstance"=dword:00000004
"1"="Root\\*PNP0400\\1_0_20_2_0_0"
"2"="Root\\*PNP0400\\PnPBIOS_14"
"3"="PCI\\VEN_1407&DEV_8000&SUBSYS_00000000&REV_00\\2&ebb567f&0&78"

The values with a numeric name yield partial keys. These partial keys are used as follows to get at the "LogConf" key for that port:

"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\" + {partial key} + "\LogConf"

The "BootConfig" value of the "LogConf" key provides the resource list with the parallel port address.

Win2000Body uses class AddPportAddress2000 to obtain the "BootConfig" resource lists, extract the addresses from these lists and insert the addresses in the CountedBody::iPportAddresses collection.

Public Member Functions

Win2000Body ()
determine parallel port addresses from registry for Windows XP; see also AddPportAddress2000.

bool | isValid (value_type base) const
true if specified address is valid

const char * | platform () const
return "Windows 2000"

The documentation for this class was generated from the following files:
  • wpportaddr.h
  • wpportaddr.cpp
Generated on Tue Sep 30 11:44:09 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::PportAddresses::Win95Body class Reference

WindowsUtils::PportAddresses::Win95Body Class Reference
[Parallel Port Base Addresses]

#include <wpportaddr.h>

Inheritance diagram for WindowsUtils::PportAddresses::Win95Body:

[legend]
Collaboration diagram for WindowsUtils::PportAddresses::Win95Body:

[legend]
List of all members.

Detailed Description

At constuction time, class Win95Body reads the addresses of three parallel ports (printer adapters) from the process' BIOS data area starting at address 0x00000408. Win95Body uses class AddPportAddress95 to insert them in the CountedBody::iPportAddresses collection.

The code looks like:

WORD  biosbases[3];
DWORD dwRead;

if ( !ReadProcessMemory(
        GetCurrentProcess(), reinterpret_cast<void *>(0x00000408), biosbases, sizeof(biosbases), &dwRead ) )
   return;  // failed

iPportAddresses.clear();
std::for_each( biosbases, biosbases + dim(biosbases), AddPportAddress95( iPportAddresses ) );

Public Member Functions

Win95Body ()
Win95: read the parallel port base addresses from the BIOS data area; see also AddPportAddress95.

bool | isValid (value_type base) const
true if specified address is valid

const char * | platform () const
return "Windows 95"

The documentation for this class was generated from the following files:
  • wpportaddr.h
  • wpportaddr.cpp
Generated on Tue Sep 30 11:44:21 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::PportAddresses::Win98Body class Reference

WindowsUtils::PportAddresses::Win98Body Class Reference
[Parallel Port Base Addresses]

#include <wpportaddr.h>

Inheritance diagram for WindowsUtils::PportAddresses::Win98Body:

[legend]
Collaboration diagram for WindowsUtils::PportAddresses::Win98Body:

[legend]
List of all members.

Detailed Description

Class Win98Body uses Win95Body to determine the parallel port addresses.

Public Member Functions

const char * platform () const
return "Windows 95"

The documentation for this class was generated from the following file:
  • wpportaddr.h
Generated on Tue Sep 30 11:44:33 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::PportAddresses::WinMeBody class Reference

WindowsUtils::PportAddresses::WinMeBody Class Reference
[Parallel Port Base Addresses]

#include <wpportaddr.h>

Inheritance diagram for WindowsUtils::PportAddresses::WinMeBody:

[legend]
Collaboration diagram for WindowsUtils::PportAddresses::WinMeBody:

[legend]
List of all members.

Detailed Description

Class WinMeBody uses Win95Body to determine the parallel port addresses.

Public Member Functions

const char * platform () const
return "Windows ME"

The documentation for this class was generated from the following file:
  • wpportaddr.h
Generated on Tue Sep 30 11:44:45 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::PportAddresses::WinNtBody class Reference

WindowsUtils::PportAddresses::WinNtBody Class Reference
[Parallel Port Base Addresses]

#include <wpportaddr.h>

Inheritance diagram for WindowsUtils::PportAddresses::WinNtBody:

[legend]
Collaboration diagram for WindowsUtils::PportAddresses::WinNtBody:

[legend]
List of all members.

Detailed Description

Class WinNtBody determines the parallel port addresses from the following registry key:

"HKEY_LOCAL_MACHINE\HARDWARE\RESOURCEMAP\LOADED PARALLEL DRIVER RESOURCES\Parport"

The values for this key are like:

"\\Device\\ParallelPort0.Translated" {01,00,00,00,01,00,00,00,00,00,00,00,
                                      00,00,00,00,01,00,00,00,01,01,01,00,
                                      78,03,00,00,00,00,00,00,03,00,00,00}
       "\\Device\\ParallelPort0.Raw" {01,00,00,00,01,00,00,00,00,00,00,00,
                                      00,00,00,00,01,00,00,00,01,01,01,00,
                                      78,03,00,00,00,00,00,00,03,00,00,00}

Note that the same port is recorded twice: as "\Device\ParallelPort0.Translated" and as "\Device\ParallelPort0.Raw".

WinNtBody uses class AddPportAddressNT4 to extract the addresses from the resource list and insert them in the CountedBody::iPportAddresses collection.

Public Member Functions

WinNtBody ()
determine parallel port addresses from registry for Windows NT 4; see also AddPportAddressNT4.

bool | isValid (value_type base) const
true if specified address is valid

const char * | platform () const
return "Windows NT"

The documentation for this class was generated from the following files:
  • wpportaddr.h
  • wpportaddr.cpp
Generated on Tue Sep 30 11:44:56 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::PportAddresses::WinXpBody class Reference

WindowsUtils::PportAddresses::WinXpBody Class Reference
[Parallel Port Base Addresses]

#include <wpportaddr.h>

Inheritance diagram for WindowsUtils::PportAddresses::WinXpBody:

[legend]
Collaboration diagram for WindowsUtils::PportAddresses::WinXpBody:

[legend]
List of all members.

Detailed Description

Class WinXpBody uses Win2000Body to determine the parallel port addresses.

Public Member Functions

const char * platform () const
return "Windows XP"

The documentation for this class was generated from the following file:
  • wpportaddr.h
Generated on Tue Sep 30 11:45:08 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::RegistryKey class Reference

WindowsUtils::RegistryKey Class Reference
[Registry]

#include <wregistry.h>

Collaboration diagram for WindowsUtils::RegistryKey:

[legend]
List of all members.

Detailed Description

The original Registry API wrapper was obtained from [CREGISTRYKEY] project at [CODEPROJECT] with this license.

These are the most important changes with respect to that version:

  • various Standard Template Library (STL) type are used: string, vector
  • using vector<> instead of TExpandableBuffer
  • using string instead of char *, LPCTSTR
  • doing all data access via reference counted class Value
  • subclassed class Value: IntegralValue, BinaryValue, StringValue
  • added class Subkey
  • split class TReferenceCounted into TReferenceCounted<B> and --Resource<B,T>
  • swapped class TReferenceCountedResource template arguments <T,B> to <B,T>,
  • renamed GetName(), GetClass() to name() and klass()
  • added method type() to class ValueIterator
  • derived Subkey and Value Iterators from std::iterator<> to support use of STL alorithms
  • added InsertIterator
  • added (shallow/deep) copy algorithm
  • added (shallow/deep) for_each algorithm
  • added (shallow/deep) find_subkey algorithm
  • added (shallow/deep) find_value algorithm
  • added stream output methods and operators for Subkeys and Values
  • added Doxygen documentation

Here is an overview of the arcitecture of the RegistryKey, RegistryKey::SubkeyIterator, RegistryKey::ValueIterator and RegistryKey::Value classes.

The following diagram shows the collaboration between the various classes that form the registry wrapper.

The following diagram shows the architecture of the subkey and value iterators.

The last diagram shows the the architecture of the value class.

Examples:

algorithm.out, algorithm2.out, printsubkeys.out, and printvalues.out.

Public Types

typedef std::vector< BYTE > | ByteBuffer
type to hold the registry data (Win32 API).

typedef TRegKeyIterator< SubkeyIteratorImpl > | SubkeyIterator
subkey iterator type.

typedef TRegKeyIterator< ValueIteratorImpl > | ValueIterator
value iterator type

typedef InsertIteratorImpl | InsertIterator
insert iterator type

Public Member Functions

RegistryKey (HKEY hKey)
construct from a HKEY.

RegistryKey (const std::string &aComputerName, HKEY ahKey)
construct from a computername and a HKEY; may throw Exception.

RegistryKey (HKEY ahKey, const std::string &aSubkey, REGSAM aSamDesired=KEY_READ, const std::string &aComputerName="")
construct from a HKEY, a subkey string and optionally security and machine name (not implemented); may throw Exception.

RegistryKey (const RegistryKey &rhs)
copy constructor.

~RegistryKey ()
destructor.

RegistryKey & | operator= (const RegistryKey &rhs)
copy assignment.

RegistryKey & | operator= (HKEY ahKey)
assignment, HKEY.

RegistryKey & | operator= (const Subkey &rhs)
add a subkey to this key.

RegistryKey & | operator= (const Value &rhs)
add a value to this key.

RegistryKey & | assign (const RegistryKey &rhs)
copy assignment.

RegistryKey & | assign (HKEY ahKey)
assignment, HKEY.

RegistryKey & | insert (const Subkey &rhs)
add a subkey in this key.

RegistryKey & | insert (const Value &rhs)
add a value to or change a value of this key.

template<typename OutputIterator> OutputIterator | copy (OutputIterator result, bool deep=false) const
generic (recursive) copy algorithm.

template<> InsertIterator | copy (InsertIterator result, bool deep) const
copy algorithm specialized for InsertIterator.

InsertIterator | copy (RegistryKey &tokey, bool deep=false) const
(recursively) copy to another key.

template<typename UnaryOp> UnaryOp | for_each (UnaryOp op, bool deep=false) const
(recursively) visit this key's values and subkeys.

RegistryKey | connectRegistry (std::string aComputerName) const
connect to registry on specified computer.

RegistryKey | openKey (const std::string &aSubkey, REGSAM aSamDesired=KEY_READ) const
open the specified subkey, default with KEY_READ access.

RegistryKey | createKey (const std::string &aSubkey, const std::string &aClass="", DWORD aOptions=REG_OPTION_NON_VOLATILE, REGSAM aSamDesired=KEY_ALL_ACCESS, LPSECURITY_ATTRIBUTES apSecurityAttributes=NULL) const
create the specified subkey, default with KEY_ALL_ACCESS access.

RegistryKey | createOrOpenKey (const std::string &aSubkey, DWORD *apDisposition=NULL, const std::string &aClass="", DWORD aOptions=REG_OPTION_NON_VOLATILE, REGSAM aSamDesired=KEY_ALL_ACCESS, LPSECURITY_ATTRIBUTES apSecurityAttributes=NULL) const
create or open the specified subkey, default with KEY_ALL_ACCESS access.

void | deleteKey (const std::string &aSubkey) const
delete the specified key. The behaviour of RegDeleteKey() on Windows 95 differs from Windows NT. -Win95: subkeys are also deleted -WinNT: subkeys are not deleted To improve consistency, deleteKey() will always fail to delete a key with subkeys, whereas DeleteKeyAndSubkey will always work.

void | deleteKeyAndSubkeys (const std::string &aSubkey) const
delete the specified key with its subkeys.

bool | hasSubkey (const std::string &aSubkey, REGSAM aSamDesired=KEY_READ) const
true if specified subkey exists.

void | loadKey (std::string aSubkeyName, std::string aFilename) const
load specified subkey from file into registry.

void | unloadKey (std::string aSubkeyName) const
unload specified key and subkeys from the registry.

void | saveKey (std::string aFilename, LPSECURITY_ATTRIBUTES aSecurityAttributes=NULL) const
save this key and all of its subkeys and values to a new file.

void | restoreKey (std::string aFilename, DWORD aFlags=0) const
copy the registry information from the specified file over this key.

void | replaceKey (std::string aNewFilename, std::string aBupFilename, std::string aSubkeyName="") const
replace the file containing a key and all its subkeys with another file; a restart activates the new values.

ByteBuffer | getKeySecurity (SECURITY_INFORMATION aSecurityInformation) const
return a copy of the security descriptor of this registry key.

void | setKeySecurity (SECURITY_INFORMATION aSecurityInformation, const ByteBuffer &aSecurityDescriptor) const
set the security of this registry key.

void | notifyChangeKeyValue (HANDLE ahEvent, bool aAndSubkeys=false, DWORD aNotifyFilter=REG_NOTIFY_CHANGE_LAST_SET) const
asynchronously notify the caller about changes to the attributes or contents of this key.

void | notifyChangeKeyValue (bool aAndSubkeys=false, DWORD aNotifyFilter=REG_NOTIFY_CHANGE_LAST_SET) const
synchronously notify the caller (wait) about changes to the attributes or contents of this key.

void | flushKey () const
writes all the attributes of this key into the registry.

operator HKEY () const
get its HKEY.

template<typename UnaryPredicate> SubkeyIterator | find_subkey (UnaryPredicate op, bool deep=false) const
(recursively) look for subkey matching criterion; return SubkeyIterator.

SubkeyIterator | find_subkey (std::string aSubkeyName, bool deep=false) const
recursively look for the specified subkey; return SubkeyIterator if found, otherwise return endSubkeyIteration().

SubkeyIterator | beginSubkeyIteration () const
return SubkeyIterator for first subkey.

SubkeyIterator | endSubkeyIteration () const
return SubkeyIterator after last subkey.

void | deleteValue (const std::string &aValueName) const
delete specified value.

void | setValue (const Value &aValue) const
set value.

Value | queryValue (const std::string &aValueName) const
return the Value for the specified value name; may throw Exception.

template<typename UnaryPredicate> std::pair< RegistryKey, ValueIterator > | find_value (UnaryPredicate op, bool deep=false) const
(recursively) look for value that matches criterion; return RegistryKey,ValueIterator pair.

std::pair< RegistryKey, ValueIterator > | find_value (std::string aValueName, bool deep=false) const
(recursively) look for a value by its name; return RegistryKey,ValueIterator pair.

ValueIterator | beginValueIteration () const
return ValueIterator for first value.

ValueIterator | endValueIteration () const
return ValueIterator after last value.

InsertIterator beginInsertIteration ()
return InsertIterator for first value.

Static Private Member Functions

CCountedRegKey * | NewCountedKey (HKEY ahKey, bool abCloseKeyOnFailure=false)
create a counted key for the representation.

Private Attributes

CCountedRegKey * ipKey
its counted key representation

Member Function Documentation

RegistryKey::InsertIterator WindowsUtils::RegistryKey::copy | ( | InsertIterator | result,
 |  | bool | deep
 | ) | const

#include <algorithm>

Copy this key's contents into the destination result

This copy algorithm is a version specialized for InsertIterators.

Parameters:
result | destination
deep | if true, also traverse subtrees [false]
Returns:
position after the last copied element in the destination range

template<typename OutputIterator>
OutputIterator WindowsUtils::RegistryKey::copy | ( | OutputIterator | result,
 |  | bool | deep = false
 | ) | const

#include <algorithm>

Copy this key's contents into the destination result

You must ensure that the destination range is big enough, or that an insert iterator is used.

Parameters:
result | destination
deep | if true, also traverse subtrees [false]
Returns:
position after the last copied element in the destination range

template<typename UnaryPredicate>
RegistryKey::SubkeyIterator WindowsUtils::RegistryKey::find_subkey | ( | UnaryPredicate | op,
 |  | bool | deep = false
 | ) | const

#include <algorithm>

Find subkey that matches criterion op and return its position.

Parameters:
op | unary operation: bool operator()() required
deep | if true, also traverse subtrees [false]
Returns:
position or endSubkeyIteration()

template<typename UnaryPredicate>
std::pair< RegistryKey, RegistryKey::ValueIterator > WindowsUtils::RegistryKey::find_value | ( | UnaryPredicate | op,
 |  | bool | deep = false
 | ) | const

#include <algorithm>

Find value that matches criterion op and return the key containing the value and the value's position.

The result is returned as:
std::pair<RegistryKey, RegistryKey::ValueIterator>

Parameters:
op | unary operation: bool operator()() required
deep | if true, also traverse subtrees [false]
Returns:
{key,position} or {key,endValueIteration()}

template<typename UnaryOp>
UnaryOp WindowsUtils::RegistryKey::for_each | ( | UnaryOp | op,
 |  | bool | deep = false
 | ) | const

#include <algorithm>

Apply unary operation op to each Subkey and Value.

Besides defining operator()(T), UnaryOp must also define operator++() and operator--() to keep track of the subkey level.

Parameters:
op | unary operation: operator()(), operator++() and operator--() required
deep | if true, also traverse subtrees [false]
Returns:
op

The documentation for this class was generated from the following files:
  • wregistry.h
  • wregistry-file.cpp
  • wregistry-sec.cpp
  • wregistry-siter.cpp
  • wregistry-subkey.cpp
  • wregistry-value.cpp
  • wregistry-viter.cpp
  • wregistry.cpp
Generated on Tue Sep 30 11:45:22 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::RegistryKey::BinaryValue class Reference

WindowsUtils::RegistryKey::BinaryValue Class Reference
[Registry]

#include <wregistry.h>

Inheritance diagram for WindowsUtils::RegistryKey::BinaryValue:

[legend]
Collaboration diagram for WindowsUtils::RegistryKey::BinaryValue:

[legend]
List of all members.

Public Member Functions

BinaryValue (DWORD adwType, const std::string &aName, const ByteBuffer &aBuffer)
construct from type, name and data; see Value::Value(DWORD,const std::string&,ByteBuffer).

operator ByteBuffer () const
convert to ByteBuffer.

BYTE | operator[] (int index) const
random access into ByteBuffer; may throw std::range_error exception.

std::string | toString () const
return string representation of value, for example "00 e5 ff".

Private Attributes

ByteBuffer iBuffer
its data

std::string | iCache
its cached string representation

The documentation for this class was generated from the following files:
  • wregistry.h
  • wregistry-value.cpp
Generated on Tue Sep 30 11:47:22 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::RegistryKey::CountedValue class Reference

WindowsUtils::RegistryKey::CountedValue Class Reference
[Registry]

#include <wregistry.h>

Inheritance diagram for WindowsUtils::RegistryKey::CountedValue:

[legend]
Collaboration diagram for WindowsUtils::RegistryKey::CountedValue:

[legend]
List of all members.

Public Member Functions

CountedValue (DWORD adwType, const std::string &aName)
construct from type and name.

operator DWORD () const
default implementation: throw Exception.

operator ByteBuffer () const
default implementation: throw Exception.

operator std::string () const
default implementation: throw Exception.

BYTE | operator[] (int index) const
default implementation: throw Exception.

std::string | toString () const =0
return string representation of value

std::string | name () const
return counted value's name.

DWORD | type () const
return counted value's type; see Value::Value(DWORD,const std::string&,ByteBuffer).

Private Attributes

DWORD | idwType
its type

std::string | iName
its name

The documentation for this class was generated from the following files:
  • wregistry.h
  • wregistry-value.cpp
Generated on Tue Sep 30 11:47:34 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::RegistryKey::CountedValue::Exception class Reference

WindowsUtils::RegistryKey::CountedValue::Exception Class Reference
[Registry]

#include <wregistry.h>

List of all members.

Public Member Functions

Exception (const std::string &s)
constructor.

The documentation for this class was generated from the following file:
  • wregistry.h
Generated on Tue Sep 30 11:47:34 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::RegistryKey::Exception class Reference

WindowsUtils::RegistryKey::Exception Class Reference
[Registry]

#include <wregistry.h>

Inheritance diagram for WindowsUtils::RegistryKey::Exception:

[legend]
Collaboration diagram for WindowsUtils::RegistryKey::Exception:

[legend]
List of all members.

Public Member Functions

Exception (const std::string &aWhere, LONG aError)
constructor.

The documentation for this class was generated from the following file:
  • wregistry.h
Generated on Tue Sep 30 11:47:42 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::RegistryKey::InsertIteratorImpl class Reference

WindowsUtils::RegistryKey::InsertIteratorImpl Class Reference
[Registry]

#include <wregistry.h>

Collaboration diagram for WindowsUtils::RegistryKey::InsertIteratorImpl:

[legend]
List of all members.

Detailed Description

A Note About the InsertIterator Implementation

The InsertIterator supports descending the subkey tree being created with openKey().

Another idea was to automatically open a subkey when it is assigned to the insert iterator and revert to its parent when operator++() is called on the insert iterator.

However, I found it more clear to explicitly use openKey().

Public Member Functions

InsertIteratorImpl & operator * ()
object access (no-op).

InsertIteratorImpl & operator++ ()
prefix increment (no-op).

InsertIteratorImpl | operator++ (int)
postfix increment (no-op).

InsertIteratorImpl & | operator= (const Value &rhs)
insert Value.

InsertIteratorImpl & | operator= (const Subkey &rhs)
insert Subkey.

RegistryKey | openKey () const
open subkey last inserted.

Protected Member Functions

InsertIteratorImpl (RegistryKey &aKey)
construct from counted key in RegistryKey.

Private Attributes

RegistryKey iKey
its registry key

Subkey iSubkey
its last assigned subkey

Friends

class | RegistryKey

The documentation for this class was generated from the following files:
  • wregistry.h
  • wregistry-iiter.cpp
Generated on Tue Sep 30 11:47:49 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::RegistryKey::IntegralValue class Reference

WindowsUtils::RegistryKey::IntegralValue Class Reference
[Registry]

#include <wregistry.h>

Inheritance diagram for WindowsUtils::RegistryKey::IntegralValue:

[legend]
Collaboration diagram for WindowsUtils::RegistryKey::IntegralValue:

[legend]
List of all members.

Public Member Functions

IntegralValue (DWORD adwType, const std::string &aName, DWORD aWord)
construct from type, name and data; see Value::Value(DWORD,const std::string&,ByteBuffer).

IntegralValue (DWORD adwType, const std::string &aName, const ByteBuffer &aBuffer)
construct from type, name and data; see Value::Value(DWORD,const std::string&,ByteBuffer).

operator DWORD () const
convert value to DWORD.

std::string | toString () const
return string representation of value, for example "0x123".

Private Attributes

DWORD | idwValue
its value

The documentation for this class was generated from the following files:
  • wregistry.h
  • wregistry-value.cpp
Generated on Tue Sep 30 11:48:02 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::RegistryKey::StringValue class Reference

WindowsUtils::RegistryKey::StringValue Class Reference
[Registry]

#include <wregistry.h>

Inheritance diagram for WindowsUtils::RegistryKey::StringValue:

[legend]
Collaboration diagram for WindowsUtils::RegistryKey::StringValue:

[legend]
List of all members.

Public Member Functions

StringValue (DWORD adwType, const std::string &aName, const std::string &aString)
construct from type, name and string.

StringValue (DWORD adwType, const std::string &aName, const ByteBuffer &aBuffer)
construct from type, name and data; see Value::Value(DWORD,const std::string&,ByteBuffer).

std::string | toString () const
return string representation of value, for example "hello world.".

Private Attributes

std::string | iString
its string

The documentation for this class was generated from the following files:
  • wregistry.h
  • wregistry-value.cpp
Generated on Tue Sep 30 11:48:12 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::RegistryKey::Subkey class Reference

WindowsUtils::RegistryKey::Subkey Class Reference
[Registry]

#include <wregistry.h>

List of all members.

Public Member Functions

Subkey (const std::string &aName="", const std::string &aClass="")
(default) constructor.

Subkey (const Subkey &rhs)
copy constructor.

Subkey & | operator= (const Subkey &rhs)
copy assignment.

std::string | name () const
return subkey's name.

std::string | klass () const
return subkey's class name.

std::string | operator * () const
return subkey's name.

std::ostream & | printOn (std::ostream &strm) const
print the subkey's string representation on the specified stream.

Private Attributes

std::string | iName
subkey name

std::string | iClass
subkey class name

Friends

class | SubkeyIteratorImpl

The documentation for this class was generated from the following file:
  • wregistry.h
Generated on Tue Sep 30 11:48:13 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::RegistryKey::SubkeyIteratorImpl class Reference

WindowsUtils::RegistryKey::SubkeyIteratorImpl Class Reference
[Registry]

#include <wregistry.h>

Inheritance diagram for WindowsUtils::RegistryKey::SubkeyIteratorImpl:

[legend]
Collaboration diagram for WindowsUtils::RegistryKey::SubkeyIteratorImpl:

[legend]
List of all members.

Public Member Functions

RegistryKey | openKey (REGSAM aSamDesired=KEY_READ) const
open current subkey, default with read access.

std::string | name () const
return current subkey's name.

std::string | klass () const
return subkey's class name.

reference | operator * ()
return current subkey.

pointer | operator-> ()
return pointer to current subkey.

Protected Member Functions

SubkeyIteratorImpl (CCountedRegKey *apKey)
construct from counted key in RegistryKey.

bool | getItem ()
read current subkey information from registry; may throw Exception.

bool | operator== (const SubkeyIteratorImpl &rhs) const
test if subkey iterators are equal.

Private Attributes

Subkey subkey
current subkey

The documentation for this class was generated from the following files:
  • wregistry.h
  • wregistry-siter.cpp
Generated on Tue Sep 30 11:48:23 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::RegistryKey::Value class Reference

WindowsUtils::RegistryKey::Value Class Reference
[Registry]

#include <wregistry.h>

Inheritance diagram for WindowsUtils::RegistryKey::Value:

[legend]
Collaboration diagram for WindowsUtils::RegistryKey::Value:

[legend]
List of all members.

Public Member Functions

~Value ()
destructor.

Value (const std::string &aName, DWORD aWord)
construct Value from name and number.

Value (const std::string &aName, const std::string &aString)
construct Value from name and string.

Value (const std::string &aName, const ByteBuffer &aBuffer)
construct Value from name and data.

Value (DWORD adwType, const std::string &aName, const ByteBuffer &aBuffer)
construct Value from type, name and data.

Value (const Value &rhs)
copy constructor.

Value & | operator= (const Value &rhs)
copy assignment.

operator DWORD () const
convert value to DWORD; may throw Exception.

operator ByteBuffer () const
convert value to ByteBuffer; may throw Exception.

operator std::string () const
convert value to std::string; may throw Exception.

BYTE | operator[] (int index) const
random access into ByteBuffer; may throw Exception.

std::string | toString () const
return string representation of value's data.

std::string | name () const
return value's name.

DWORD | type () const
return value's type; see Value::Value(DWORD,const std::string&,ByteBuffer).

std::ostream & | printOn (std::ostream &strm) const
print the value's string representation on the specified stream.

Private Attributes

CountedValue * iValue
its counted value representation

The documentation for this class was generated from the following files:
  • wregistry.h
  • wregistry-value.cpp
Generated on Tue Sep 30 11:48:32 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::RegistryKey::ValueBuffer class Reference

WindowsUtils::RegistryKey::ValueBuffer Class Reference
[Registry]

#include <wregistry.h>

List of all members.

Public Member Functions

ValueBuffer (const Value &rhs)
constructor.

Public Attributes

ByteBuffer buffer

The documentation for this class was generated from the following files:
  • wregistry.h
  • wregistry-value.cpp
Generated on Tue Sep 30 11:48:32 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::RegistryKey::ValueInterface class Reference

WindowsUtils::RegistryKey::ValueInterface Class Reference
[Registry]

#include <wregistry.h>

Inheritance diagram for WindowsUtils::RegistryKey::ValueInterface:

[legend]
List of all members.

Public Member Functions

virtual | operator DWORD () const =0
convert value to DWORD

virtual | operator ByteBuffer () const =0
convert value to ByteBuffer

virtual | operator std::string () const =0
convert value to std::string

virtual BYTE | operator[] (int index) const =0
random access into ByteBuffer

virtual std::string | toString () const =0
return string representation of value

virtual std::string | name () const =0
return value's name

virtual DWORD | type () const =0
return value's type

The documentation for this class was generated from the following file:
  • wregistry.h
Generated on Tue Sep 30 11:48:40 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::RegistryKey::ValueIteratorImpl class Reference

WindowsUtils::RegistryKey::ValueIteratorImpl Class Reference
[Registry]

#include <wregistry.h>

Inheritance diagram for WindowsUtils::RegistryKey::ValueIteratorImpl:

[legend]
Collaboration diagram for WindowsUtils::RegistryKey::ValueIteratorImpl:

[legend]
List of all members.

Public Member Functions

std::string | name () const
return iterator's current value's name.

DWORD | type () const
return iterator's current value's type.

std::string | toString () const
return a string representation for iterator's current value.

operator value_type () const
value_type | operator * () const
return iterator's current value.

Protected Member Functions

ValueIteratorImpl (CCountedRegKey *apKey)
construct from counted key in RegistryKey.

bool | getItem ()
read current value information from registry; may throw Exception.

bool | operator== (const ValueIteratorImpl &rhs) const
test if value iterators are equal.

Private Attributes

std::string | iName
current value name

ByteBuffer iBuffer
current value data

DWORD | idwType
current value type

The documentation for this class was generated from the following files:
  • wregistry.h
  • wregistry-viter.cpp
Generated on Tue Sep 30 11:48:50 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::Semaphore class Reference

WindowsUtils::Semaphore Class Reference
[Semaphore]

#include <wsemaphore.h>

List of all members.

Detailed Description

Class Sempahore is obtained from [WIN32SEMAPHORE] at [BBDSOFT] with this license.

Public Member Functions

Semaphore (const char *const inName=0, const unsigned long inInitialCount=0, const unsigned long inMaximumCount=0)
constructor.

~Semaphore ()
destructor.

Semaphore & | post (const unsigned long inPostCount=1)
release semaphore.

Semaphore & | wait (const unsigned long inTimeout=0)
acquire semaphore.

unsigned long | maxCount () const
return theMaxCount.

Private Member Functions

Semaphore (const Semaphore &)
disable copy constructor and assignment operator.

Semaphore & | operator= (const Semaphore &)

Private Attributes

unsigned | theSemaphoreHandle
semaphore handle.

unsigned long | theMaxCount
maximum count.

Constructor & Destructor Documentation

WindowsUtils::Semaphore::Semaphore | ( | const char *const | inName = 0,
 |  | const unsigned long | inInitialCount = 0,
 |  | const unsigned long | inMaximumCount = 0
 | ) |

Create the semaphore named inName with initial count inInitialCount and maximum count inMaximumCount. If the named semaphore already exists, that semaphore is used. If the semaphore could not be created or opened the following runtime error is generated: "Semaphore: failed to create.".

Exceptions:
Semaphore: failed to create. if the semaphore could not be created or opened this runtime error message is generated.
Parameters:
inName a null-terminated string specifying the name of the semaphore object. The name is limited to MAX_PATH characters, and can contain any character except the backslash path-separator character (\). Name comparison is case sensitive. If lpName matches the name of an existing named semaphore object, this function requests SEMAPHORE_ALL_ACCESS access to the existing object. In this case, the lInitialCount and lMaximumCount parameters are ignored because they have already been set by the creating process. If the lpSemaphoreAttributes parameter is not NULL, it determines whether the handle can be inherited, but its security-descriptor member is ignored.
If lpName is NULL, the semaphore object is created without a name. If lpName matches the name of an existing event, mutex, or file- mapping object, the function fails and the GetLastError function returns ERROR_INVALID_HANDLE. This occurs because event, mutex, semaphore, and file-mapping objects share the same name space.
inInitialCount | specifies an initial count for the semaphore object. This value must be greater than or equal to zero and less than or equal to lMaximumCount. The state of a semaphore is signaled when its count is greater than zero and nonsignaled when it is zero. The count is decreased by one whenever a wait function releases a thread that was waiting for the semaphore. The count is increased by a specified amount by calling the ReleaseSemaphore function.
inMaximumCount | specifies the maximum count for the semaphore object. This value must be greater than zero.

WindowsUtils::Semaphore::~Semaphore ( )

The destructor closes the semaphore.

Exceptions:
Semaphore: failed to close. if the semaphore could not be closed this runtime error message is generated.

Member Function Documentation

Semaphore & WindowsUtils::Semaphore::post ( const unsigned long inPostCount = 1 )

post() increments semaphore counter by inPostCount. inPostCount must not be 0.

Parameters:
inPostCount [1]
Returns:

Semaphore & WindowsUtils::Semaphore::wait ( const unsigned long inTimeout = 0 )

wait() waits while semaphore counter is greater than 0 and decrements semaphore counter by 1.

Parameters:
inTimeout [0]
Returns:

The documentation for this class was generated from the following files:
  • wsemaphore.h
  • wsemaphore.cpp
Generated on Tue Sep 30 11:48:51 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: TemplateWindowsUtils::TReferenceCounted< B > class Reference

WindowsUtils::TReferenceCounted< B > Class Template Reference
[Support Classes]

#include <wrefcount.h>

Inheritance diagram for WindowsUtils::TReferenceCounted< B >:

[legend]
List of all members.

Detailed Description

template<typename B>
class WindowsUtils::TReferenceCounted< B >

Class TReferenceCounted is a template mix-in class to give a derived class reference counted behavior. Using addRef() and release(), a handle class for a reference counted implementation object adjusts the object's reference count when copying or destructing the handle. If no more references to the implementation object exist, release() deletes this object.
Examples:

refcount.out.

Public Member Functions

TReferenceCounted ()
default constructor.

virtual B * | addRef ()
add a reference.

virtual B * | release ()
release a reference; delete this object if no more references exist.

long | numrefs ()
return reference count.

Static Public Member Functions

B * | copy (B *pRefCounted)
copy: add reference to specified object, unless it is null.

Protected Member Functions

virtual | ~TReferenceCounted ()
we destruct in release()

Protected Attributes

long | iCount
its count

The documentation for this class was generated from the following file:
  • wrefcount.h
Generated on Tue Sep 30 11:48:57 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: TemplateWindowsUtils::TReferenceCountedResource< B, T > class Reference

WindowsUtils::TReferenceCountedResource< B, T > Class Template Reference
[Support Classes]

#include <wrefcount.h>

Inheritance diagram for WindowsUtils::TReferenceCountedResource< B, T >:

[legend]
Collaboration diagram for WindowsUtils::TReferenceCountedResource< B, T >:

[legend]
List of all members.

Detailed Description

template<typename B, typename T>
class WindowsUtils::TReferenceCountedResource< B, T >

Class TReferenceCountedResource is a template mix-in class to:
  • give a derived class reference counted behavior: addRef() and release()
  • take care of a resource: preRelease()

A handle class for a reference counted implementation object adjusts the object's reference count when copying or destructing the handle. If no more references to the implementation object exist, release() first calls preRelease() to free the resource and then deletes this object.

Template class TReferenceCountedResource provides the mechanism for reference counting that is used by class CCountedRegKey.

Public Member Functions

TReferenceCountedResource (T counted)
constructor.

const T & | getCounted () const
return reference to resource.

operator T & () const
return reference to resource.

operator T * () const
return pointer to resource.

B * | release ()
remove a reference to the resource, call preRelease() before destruction when no more references exist.

Protected Member Functions

virtual | ~TReferenceCountedResource ()
destructor.

virtual void | preRelease ()=0
release resource

Protected Attributes

T | iCounted
its resource

Private Member Functions

TReferenceCountedResource (const TReferenceCountedResource &rhs)
prevent copying

TReferenceCountedResource & | operator= (const TReferenceCountedResource &rhs)
prevent copying

The documentation for this class was generated from the following file:
  • wrefcount.h
Generated on Tue Sep 30 11:49:09 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: TemplateWindowsUtils::TRegKeyIterator< B > class Reference

WindowsUtils::TRegKeyIterator< B > Class Template Reference
[Registry]

#include <wregistry-rki.h>

List of all members.

Detailed Description

template<typename B>
class WindowsUtils::TRegKeyIterator< B >

Template class TRegKeyIterator provides the mechanism to create the SubkeyIterator and ValueIterator classes from the SubkeyIteratorImpl and ValueIteratorImpl with common base class CRegKeyIterator.

Public Member Functions

TRegKeyIterator< B > & | operator++ ()
preincrement.

TRegKeyIterator< B > | operator++ (int)
postincrement.

bool | operator!= (const TRegKeyIterator< B > &rhs) const
test for iterator inequality.

bool | operator== (const TRegKeyIterator< B > &rhs) const
test for iterator inequality.

Protected Member Functions

TRegKeyIterator (CCountedRegKey *apKey)
constructor.

void | advance ()
acquire next element; release key if at end of iteration.

Friends

class | RegistryKey

The documentation for this class was generated from the following file:
  • wregistry-rki.h
Generated on Tue Sep 30 11:49:09 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::Win32Exception class Reference

WindowsUtils::Win32Exception Class Reference
[Exceptions]

#include <wexception.h>

Inheritance diagram for WindowsUtils::Win32Exception:

[legend]
List of all members.

Public Member Functions

Win32Exception (const char *apWhere, DWORD aError)
constructor.

Win32Exception (const std::string &aWhere, DWORD aError)
constructor.

const char * | what () const throw ()
return the error message as "where: what"; the character string is owned by Win32Exception.

const char * | where () const
return the "where" character string.

DWORD | error () const
return exception's error number.

virtual const char * | message () const
return the Windows message for the error number.

void | messageBox (HWND hWnd=NULL) const
display messagebox with message describing the exception using what().

Private Attributes

std::string | iWhere
the location of the error

DWORD | iError
the Windows error number

The documentation for this class was generated from the following files:
  • wexception.h
  • wexception.cpp
Generated on Tue Sep 30 11:49:14 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Hierarchical Index

Windows Utilities Class Hierarchy

Go to the graphical class hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically:

  • WindowsUtils::_CM_FULL_RESOURCE_DESCRIPTOR
  • WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR
  • WindowsUtils::_CM_PARTIAL_RESOURCE_LIST
  • WindowsUtils::_CM_RESOURCE_LIST
  • WindowsUtils::AddPportAddress95
  • WindowsUtils::AddPportAddressNtPlatform
    • WindowsUtils::AddPportAddress2000
    • WindowsUtils::AddPportAddressNT4
  • WindowsUtils::CRegKeyIterator
    • WindowsUtils::RegistryKey::SubkeyIteratorImpl
    • WindowsUtils::RegistryKey::ValueIteratorImpl
  • WindowsUtils::MatchName< T >
  • WindowsUtils::PportAddresses
  • WindowsUtils::PportAddresses::BodyInterface
    • WindowsUtils::PportAddresses::CountedBody
      • WindowsUtils::PportAddresses::Win2000Body
        • WindowsUtils::PportAddresses::WinXpBody
      • WindowsUtils::PportAddresses::Win95Body
        • WindowsUtils::PportAddresses::Win98Body
        • WindowsUtils::PportAddresses::WinMeBody
      • WindowsUtils::PportAddresses::WinNtBody
  • WindowsUtils::RegistryKey
  • WindowsUtils::RegistryKey::CountedValue::Exception
  • WindowsUtils::RegistryKey::InsertIteratorImpl
  • WindowsUtils::RegistryKey::Subkey
  • WindowsUtils::RegistryKey::ValueBuffer
  • WindowsUtils::RegistryKey::ValueInterface
    • WindowsUtils::RegistryKey::CountedValue
      • WindowsUtils::RegistryKey::BinaryValue
      • WindowsUtils::RegistryKey::IntegralValue
      • WindowsUtils::RegistryKey::StringValue
    • WindowsUtils::RegistryKey::Value
  • WindowsUtils::Semaphore
  • WindowsUtils::TReferenceCounted< B >
    • WindowsUtils::RegistryKey::CountedValue
    • WindowsUtils::TReferenceCountedResource< B, T >
  • WindowsUtils::TReferenceCounted< CCountedRegKey >
    • WindowsUtils::TReferenceCountedResource< CCountedRegKey, HKEY >
      • WindowsUtils::CCountedRegKey
  • WindowsUtils::TReferenceCounted< CountedBody >
    • WindowsUtils::PportAddresses::CountedBody
  • WindowsUtils::TReferenceCounted< RegistryKey::CountedValue >
  • WindowsUtils::TRegKeyIterator< B >
  • WindowsUtils::Win32Exception
    • WindowsUtils::RegistryKey::Exception
Generated on Tue Sep 30 11:40:35 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Compound Member Index

Here is a list of all documented class members with links to the class documentation for each member:

- a -

  • AddPportAddress2000() : WindowsUtils::AddPportAddress2000
  • AddPportAddress95() : WindowsUtils::AddPportAddress95
  • AddPportAddressNT4() : WindowsUtils::AddPportAddressNT4
  • AddPportAddressNtPlatform() : WindowsUtils::AddPportAddressNtPlatform
  • addRef() : WindowsUtils::TReferenceCounted< B >
  • advance() : WindowsUtils::TRegKeyIterator< B >
  • assign() : WindowsUtils::RegistryKey

- b -

  • basePCIMax : WindowsUtils::PportAddresses
  • basePCIMin : WindowsUtils::PportAddresses
  • basePCIStp : WindowsUtils::PportAddresses
  • begin() : WindowsUtils::PportAddresses::CountedBody, WindowsUtils::PportAddresses, WindowsUtils::PportAddresses::BodyInterface
  • beginInsertIteration() : WindowsUtils::RegistryKey
  • beginSubkeyIteration() : WindowsUtils::RegistryKey
  • beginValueIteration() : WindowsUtils::RegistryKey
  • BinaryValue() : WindowsUtils::RegistryKey::BinaryValue
  • ByteBuffer : WindowsUtils::RegistryKey

- c -

  • CCountedRegKey() : WindowsUtils::CCountedRegKey
  • connectRegistry() : WindowsUtils::RegistryKey
  • const_iterator : WindowsUtils::PportAddresses
  • copy() : WindowsUtils::RegistryKey, WindowsUtils::TReferenceCounted< B >
  • CountedBody() : WindowsUtils::PportAddresses::CountedBody
  • CountedValue() : WindowsUtils::RegistryKey::CountedValue
  • createKey() : WindowsUtils::RegistryKey
  • createOrOpenKey() : WindowsUtils::RegistryKey
  • CRegKeyIterator() : WindowsUtils::CRegKeyIterator

- d -

  • deleteKey() : WindowsUtils::RegistryKey
  • deleteKeyAndSubkeys() : WindowsUtils::RegistryKey
  • deleteValue() : WindowsUtils::RegistryKey

- e -

  • empty() : WindowsUtils::PportAddresses::CountedBody, WindowsUtils::PportAddresses::BodyInterface
  • end() : WindowsUtils::PportAddresses::CountedBody, WindowsUtils::PportAddresses, WindowsUtils::PportAddresses::BodyInterface
  • endSubkeyIteration() : WindowsUtils::RegistryKey
  • endValueIteration() : WindowsUtils::RegistryKey
  • error() : WindowsUtils::Win32Exception
  • Exception() : WindowsUtils::RegistryKey::CountedValue::Exception, WindowsUtils::RegistryKey::Exception

- f -

  • find_subkey() : WindowsUtils::RegistryKey
  • find_value() : WindowsUtils::RegistryKey
  • flushKey() : WindowsUtils::RegistryKey
  • for_each() : WindowsUtils::RegistryKey

- g -

  • getCounted() : WindowsUtils::TReferenceCountedResource< B, T >
  • getItem() : WindowsUtils::RegistryKey::ValueIteratorImpl, WindowsUtils::RegistryKey::SubkeyIteratorImpl
  • getKeySecurity() : WindowsUtils::RegistryKey

- h -

  • handleResourceList() : WindowsUtils::AddPportAddressNtPlatform
  • hasSubkey() : WindowsUtils::RegistryKey

- i -

  • iBuffer : WindowsUtils::RegistryKey::ValueIteratorImpl, WindowsUtils::RegistryKey::BinaryValue
  • iCache : WindowsUtils::RegistryKey::BinaryValue
  • iClass : WindowsUtils::RegistryKey::Subkey
  • iCount : WindowsUtils::TReferenceCounted< B >
  • iCounted : WindowsUtils::TReferenceCountedResource< B, T >
  • idwType : WindowsUtils::RegistryKey::ValueIteratorImpl, WindowsUtils::RegistryKey::CountedValue
  • idwValue : WindowsUtils::RegistryKey::IntegralValue
  • iError : WindowsUtils::Win32Exception
  • iIndex : WindowsUtils::CRegKeyIterator
  • iKey : WindowsUtils::RegistryKey::InsertIteratorImpl
  • iName : WindowsUtils::RegistryKey::ValueIteratorImpl, WindowsUtils::RegistryKey::CountedValue, WindowsUtils::RegistryKey::Subkey
  • insert() : WindowsUtils::RegistryKey
  • InsertIterator : WindowsUtils::RegistryKey
  • InsertIteratorImpl() : WindowsUtils::RegistryKey::InsertIteratorImpl
  • IntegralValue() : WindowsUtils::RegistryKey::IntegralValue
  • ipKey : WindowsUtils::RegistryKey, WindowsUtils::CRegKeyIterator
  • iPportAddresses : WindowsUtils::PportAddresses::CountedBody, WindowsUtils::AddPportAddressNtPlatform, WindowsUtils::AddPportAddress95
  • iString : WindowsUtils::RegistryKey::StringValue
  • iSubkey : WindowsUtils::RegistryKey::InsertIteratorImpl
  • isValid() : WindowsUtils::PportAddresses::Win2000Body, WindowsUtils::PportAddresses::WinNtBody, WindowsUtils::PportAddresses::Win95Body, WindowsUtils::PportAddresses::CountedBody, WindowsUtils::PportAddresses, WindowsUtils::PportAddresses::BodyInterface
  • iterator : WindowsUtils::PportAddresses
  • iValue : WindowsUtils::RegistryKey::Value
  • iWhere : WindowsUtils::Win32Exception

- k -

  • klass() : WindowsUtils::RegistryKey::SubkeyIteratorImpl, WindowsUtils::RegistryKey::Subkey
  • kPportAddresses : WindowsUtils::PportAddresses::CountedBody

- l -

  • loadKey() : WindowsUtils::RegistryKey

- m -

  • maxCount() : WindowsUtils::Semaphore
  • message() : WindowsUtils::Win32Exception
  • messageBox() : WindowsUtils::Win32Exception

- n -

  • name() : WindowsUtils::RegistryKey::ValueIteratorImpl, WindowsUtils::RegistryKey::SubkeyIteratorImpl, WindowsUtils::RegistryKey::CountedValue, WindowsUtils::RegistryKey::Value, WindowsUtils::RegistryKey::ValueInterface, WindowsUtils::RegistryKey::Subkey
  • NewCountedKey() : WindowsUtils::RegistryKey
  • notifyChangeKeyValue() : WindowsUtils::RegistryKey
  • numrefs() : WindowsUtils::TReferenceCounted< B >

- o -

  • openKey() : WindowsUtils::RegistryKey::InsertIteratorImpl, WindowsUtils::RegistryKey::SubkeyIteratorImpl, WindowsUtils::RegistryKey
  • operator *() : WindowsUtils::RegistryKey::InsertIteratorImpl, WindowsUtils::RegistryKey::ValueIteratorImpl, WindowsUtils::RegistryKey::SubkeyIteratorImpl, WindowsUtils::RegistryKey::Subkey
  • operator ByteBuffer() : WindowsUtils::RegistryKey::BinaryValue, WindowsUtils::RegistryKey::CountedValue, WindowsUtils::RegistryKey::Value, WindowsUtils::RegistryKey::ValueInterface
  • operator DWORD() : WindowsUtils::RegistryKey::IntegralValue, WindowsUtils::RegistryKey::CountedValue, WindowsUtils::RegistryKey::Value, WindowsUtils::RegistryKey::ValueInterface
  • operator HKEY() : WindowsUtils::RegistryKey
  • operator std::string() : WindowsUtils::RegistryKey::CountedValue, WindowsUtils::RegistryKey::Value, WindowsUtils::RegistryKey::ValueInterface
  • operator T &() : WindowsUtils::TReferenceCountedResource< B, T >
  • operator T *() : WindowsUtils::TReferenceCountedResource< B, T >
  • operator!=() : WindowsUtils::TRegKeyIterator< B >
  • operator()() : WindowsUtils::AddPportAddress2000, WindowsUtils::AddPportAddressNT4, WindowsUtils::AddPportAddressNtPlatform, WindowsUtils::AddPportAddress95
  • operator++() : WindowsUtils::RegistryKey::InsertIteratorImpl, WindowsUtils::TRegKeyIterator< B >
  • operator->() : WindowsUtils::RegistryKey::SubkeyIteratorImpl
  • operator=() : WindowsUtils::RegistryKey::InsertIteratorImpl, WindowsUtils::RegistryKey::Value, WindowsUtils::RegistryKey::Subkey, WindowsUtils::RegistryKey, WindowsUtils::CRegKeyIterator, WindowsUtils::CCountedRegKey, WindowsUtils::TReferenceCountedResource< B, T >, WindowsUtils::PportAddresses
  • operator==() : WindowsUtils::RegistryKey::ValueIteratorImpl, WindowsUtils::RegistryKey::SubkeyIteratorImpl, WindowsUtils::TRegKeyIterator< B >, WindowsUtils::CRegKeyIterator
  • operator[]() : WindowsUtils::RegistryKey::BinaryValue, WindowsUtils::RegistryKey::CountedValue, WindowsUtils::RegistryKey::Value, WindowsUtils::RegistryKey::ValueInterface, WindowsUtils::PportAddresses::CountedBody, WindowsUtils::PportAddresses, WindowsUtils::PportAddresses::BodyInterface

- p -

  • platform() : WindowsUtils::PportAddresses::WinXpBody, WindowsUtils::PportAddresses::Win2000Body, WindowsUtils::PportAddresses::WinNtBody, WindowsUtils::PportAddresses::WinMeBody, WindowsUtils::PportAddresses::Win98Body, WindowsUtils::PportAddresses::Win95Body, WindowsUtils::PportAddresses::CountedBody, WindowsUtils::PportAddresses, WindowsUtils::PportAddresses::BodyInterface
  • post() : WindowsUtils::Semaphore
  • PportAddressBuffer : WindowsUtils::PportAddresses
  • PportAddresses() : WindowsUtils::PportAddresses
  • preRelease() : WindowsUtils::CCountedRegKey, WindowsUtils::TReferenceCountedResource< B, T >
  • printOn() : WindowsUtils::RegistryKey::Value, WindowsUtils::RegistryKey::Subkey

- q -

  • queryValue() : WindowsUtils::RegistryKey

- r -

  • RegistryKey() : WindowsUtils::RegistryKey
  • release() : WindowsUtils::TReferenceCountedResource< B, T >, WindowsUtils::TReferenceCounted< B >
  • rep : WindowsUtils::PportAddresses
  • replaceKey() : WindowsUtils::RegistryKey
  • restoreKey() : WindowsUtils::RegistryKey

- s -

  • saveKey() : WindowsUtils::RegistryKey
  • Semaphore() : WindowsUtils::Semaphore
  • setKeySecurity() : WindowsUtils::RegistryKey
  • setValue() : WindowsUtils::RegistryKey
  • size() : WindowsUtils::PportAddresses::CountedBody, WindowsUtils::PportAddresses::BodyInterface
  • StringValue() : WindowsUtils::RegistryKey::StringValue
  • Subkey() : WindowsUtils::RegistryKey::Subkey
  • subkey : WindowsUtils::RegistryKey::SubkeyIteratorImpl
  • SubkeyIterator : WindowsUtils::RegistryKey
  • SubkeyIteratorImpl() : WindowsUtils::RegistryKey::SubkeyIteratorImpl

- t -

  • theMaxCount : WindowsUtils::Semaphore
  • theSemaphoreHandle : WindowsUtils::Semaphore
  • toString() : WindowsUtils::RegistryKey::ValueIteratorImpl, WindowsUtils::RegistryKey::StringValue, WindowsUtils::RegistryKey::BinaryValue, WindowsUtils::RegistryKey::IntegralValue, WindowsUtils::RegistryKey::CountedValue, WindowsUtils::RegistryKey::Value, WindowsUtils::RegistryKey::ValueInterface
  • TReferenceCounted() : WindowsUtils::TReferenceCounted< B >
  • TReferenceCountedResource() : WindowsUtils::TReferenceCountedResource< B, T >
  • TRegKeyIterator() : WindowsUtils::TRegKeyIterator< B >
  • type() : WindowsUtils::RegistryKey::ValueIteratorImpl, WindowsUtils::RegistryKey::CountedValue, WindowsUtils::RegistryKey::Value, WindowsUtils::RegistryKey::ValueInterface

- u -

  • unloadKey() : WindowsUtils::RegistryKey

- v -

  • Value() : WindowsUtils::RegistryKey::Value
  • value_type : WindowsUtils::PportAddresses
  • ValueBuffer() : WindowsUtils::RegistryKey::ValueBuffer
  • ValueIterator : WindowsUtils::RegistryKey
  • ValueIteratorImpl() : WindowsUtils::RegistryKey::ValueIteratorImpl

- w -

  • wait() : WindowsUtils::Semaphore
  • what() : WindowsUtils::Win32Exception
  • where() : WindowsUtils::Win32Exception
  • Win2000Body() : WindowsUtils::PportAddresses::Win2000Body
  • Win32Exception() : WindowsUtils::Win32Exception
  • Win95Body() : WindowsUtils::PportAddresses::Win95Body
  • WinNtBody() : WindowsUtils::PportAddresses::WinNtBody

- ~ -

  • ~AddPportAddressNT4() : WindowsUtils::AddPportAddressNT4
  • ~AddPportAddressNtPlatform() : WindowsUtils::AddPportAddressNtPlatform
  • ~CCountedRegKey() : WindowsUtils::CCountedRegKey
  • ~CRegKeyIterator() : WindowsUtils::CRegKeyIterator
  • ~PportAddresses() : WindowsUtils::PportAddresses
  • ~RegistryKey() : WindowsUtils::RegistryKey
  • ~Semaphore() : WindowsUtils::Semaphore
  • ~TReferenceCounted() : WindowsUtils::TReferenceCounted< B >
  • ~TReferenceCountedResource() : WindowsUtils::TReferenceCountedResource< B, T >
  • ~Value() : WindowsUtils::RegistryKey::Value
Generated on Tue Sep 30 11:40:35 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Namespace Index

Windows Utilities Namespace List

Here is a list of all documented namespaces with brief descriptions:
WindowsUtils::applog Local variables
Generated on Tue Sep 30 11:40:38 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: WindowsUtils::applog Namespace Reference

WindowsUtils::applog Namespace Reference

Variables

char * | progname = 0
progname (not set)

int | dbglevel = 0
current debug level

int | msglevel = 0
current messaeg level

std::string | errmsg
copy of last error message

Generated on Tue Sep 30 11:49:14 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Module Index

Windows Utilities Modules

Here is a list of all modules:
  • Application Log
  • Exceptions
  • Registry
    • Driver Development Kit
  • Semaphore
  • Shutdown and Reboot
  • Version information
  • Parallel Port Base Addresses
  • Support Classes
Generated on Tue Sep 30 11:49:15 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Application Log

Application Log

Detailed Description

This module provides functions to write messages to the Windows Application Log. The following message categories are distinguished :
  • error messages
  • general messages
  • debug messages

Error messages -- error messages can be formatted and logged to the Windows Application Log with error(). The programname as set with setprogname() precedes the message.

General messages -- function message() is meant to format and log normal messages, for example to trace the program's normal processing. A message also specifies a level and the message is only added to the Windows Application Log, if its level is equal or lower than the current message verbosity level as set with setmsglevel().

Debug messages -- function debug() is meant to format and log debug messages, for example to trace the program's data handling. A debug message also specifies a level and the message is only added to the Windows Application Log, if its level is equal or lower than the current debug message verbosity level as set with setdbglevel().

Here is a small example.

#include <except>
#include "wapplog.h"

int main( int argc, char *argv[] )
{
   WindowsUtils::setprogname( argv[0] );

   try
   {
      // ... operation that may throw exception
   }
   catch( std::exception& e )
   {
      return WindowsUtils::error( 1, "main(): %s", e.what() );
   }
}

The code for this module is inspired by two books by Kernighan & Pike [1984,1999]

Namespaces

namespace | WindowsUtils

Defines

#define | D(line)

Enumerations

enum | WindowsUtils::DebugLevel { WindowsUtils::DBG_L0, WindowsUtils::DBG_L1, WindowsUtils::DBG_L2, WindowsUtils::DBG_L3, WindowsUtils::DBG_L4 }
debug message levels. More...

Functions

const char * | WindowsUtils::getprogname ()
return the program's name as set with setprogname(), or "(undefined)".

void | WindowsUtils::setprogname (const char *name)
set the program's name as used with error(), message() and debug().

int | WindowsUtils::getdbglevel ()
get the current debug message verbosity level.

void | WindowsUtils::setdbglevel (int level)
set the debug message verbosity level (default it is 0).

int | WindowsUtils::getmsglevel ()
get the current message verbosity level.

void | WindowsUtils::setmsglevel (int level)
set the message verbosity level (default it is 0).

const char * | WindowsUtils::error_message ()
return last error message as C-string.

int | WindowsUtils::error (int status, const char *format...)
format and log error message, return status.

int | WindowsUtils::debug (int level, const char *format...)
format and log debug message, if level permits; return specified debug level.

int | WindowsUtils::message (int level, const char *format...)
format and log message, if level permits; return specified level.

Enumeration Type Documentation

enum WindowsUtils::DebugLevel

DebugLevel defines the possible debug messsage levels.

Enumeration values:
DBG_L0 | level 0
DBG_L1 | level 1
DBG_L2 | level 2
DBG_L3 | level 3
DBG_L4 | level 4

Function Documentation

int WindowsUtils::debug | ( | int | level,
 |  | const char * | format...
 | ) |

debug() formats and logs the error message to the Windows Application Log if the specified level is equal or less than the current debug level. format is a printf() format string, optionally followed by arguments.

The message has the following format:

[progname: ]message[: system-message]\n

progname is included when a colon starts the format and it has been set via setprogname(); system-message is included when the format string ends with a colon (:).

debug() returns the specified level.

Parameters:
level | this message's level
format | a printf format string, optionally followed by arguments
Returns:
level
See also:
setprogname(), getdbglevel(), setdbglevel()

int WindowsUtils::error | ( | int | status,
 |  | const char * | format...
 | ) |

error() formats and logs the error message to the Windows Application Log. format is a printf() format string, optionally followed by arguments.

The error message has the following format:

[progname: ]message[: system-message]\n

progname is included when a colon starts the format and it has been set via setprogname(); system-message is included when the format string ends with a colon (:).

error() returns the specified status.

Parameters:
status | the error status to return
format | a printf format string, optionally followed by arguments
Returns:
status
See also:
setprogname(), error_message()

int WindowsUtils::message | ( | int | level,
 |  | const char * | format...
 | ) |

message() formats and logs the specified message to the Windows Application Log if its level is equal or less than the current verbosity level as set with setmsglevel(). format is a printf() format string, optionally followed by arguments.

The message has the following format:

[progname: ]message[: system-message]\n

progname is included when a colon starts the format and it has been set via setprogname(); system-message is included when the format string ends with a colon (:).

message() returns the specified level.

Parameters:
level | this message's level
format | a printf format string, optionally followed by arguments
Returns:
level
See also:
setprogname(), getmsglevel(), setmsglevel()

Generated on Tue Sep 30 11:40:36 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Exceptions

Exceptions

Detailed Description

With class Win32Exception you can create standard C++ exceptions for error return values of Win32 API functions. For example:

#include "wexception.h"

HKEY openkey( HKEY ahKey, std::string aSubkey, REGSAM aSamDesired )
{
   using WindowsUtils::Win32Exception;

   HKEY newKey;
   LONG result = RegOpenKeyEx( ahKey, aSubkey.c_str(), 0, aSamDesired, &newKey );

   if ( ERROR_SUCCESS != result )
   {
      throw Win32Exception( "openkey", result );
   }

   return newkey;
}

This is used in a program as follows.

int main()
{
   try
   {
      HKEY hkey = openkey( HKEY_LOCAL_MACHINE, "SYSTEM\\subkey", KEY_READ );
   }
   catch ( const std::exception& e )
   {
      std::cout << e.what() << std::endl;
   }
}

Classes

class | Win32Exception
Exceptions for Windows errors; based on std::exception.

Functions

void | WindowsUtils::noGPErrorBox ()
disable display of the general-protection-fault message box. This flag should only be set by debugging applications that handle general protection (GP) faults themselves via an appropriate exception handler.

const char * | WindowsUtils::GetLastErrorMessage (DWORD aError)
return an error message character string for the specified error. The string is owned by this function.

Generated on Tue Sep 30 11:40:37 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Registry

Registry

Detailed Description

Class RegistryKey provides easy access to keys and values of the Windows registry. It has the following characteristics:
  • uniform access to values of various types, like REG_DWORD, REG_BINARY, REG_SZ
  • iterator interface to subkeys and values

The original Registry API wrapper was obtained from [CREGISTRYKEY] project at [CODEPROJECT] with this license.

Before

In the discussion below, the following include directives and namespace using declaration are assumed:

#include <iostream>          // for std::cout
#include "wregistry.h"       // for RegistryKey

using WindowsUtils::RegistryKey;

Keys and Values

To work with the registry, you first open a key, for example:

RegistryKey key( HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0" );

This opens the specified subkey of the standard open HKEY_LOCAL_MACHINE.

Other ways to open a key are via methods connectRegistry(), openKey(), createKey(), createOrOpenKey() or one of the other constructors.

Note that you don't have to close the key. That is done automatically when key goes out of scope. However, you can close it by assigning one of the standard open keys to it, for example:

key = HKEY_LOCAL_MACHINE;

If you want to obtain the contents of a key's value, you may write for example:

RegistryKey::Value v = key.queryValue( "~MHz" );

This obtains the main processor's clock frequency from value ~MHz.

Now you have the value's type, name and contents available as v.type(), v.name() and static_cast<DWORD>(v). The latter means that if v is assigned to a DWORD variable, or used as an argument in a function that takes a DWORD parameter (or a parameter of a type that DWORD can be converted to), v will be converted to the value's contents.

Thus, if you only need the value's contents, you may also write:

DWORD dw = key.queryValue( "~MHz" );

The value's contents may also be obtained as a string with v.toString().

These are the three kinds of Values available:

  • integral Value (DWORD for REG_DWORD etc.)
  • binary Value (std::vector<Byte> for REG_NONE etc.)
  • string Value (std::string for REG_SZ, REG_MULTI_SZ)

The following conversions are valid:

  • an integral Value may be converted to DWORD
  • a binary Value may be converted to RegistryKey::ByteBuffer (std::vector<Byte>)
  • any Value may be converted to std::string

Other conversions throw a RegistryKey::Exception.

DWORD dw = key.queryValue( "SystemBiosVersion" );    // ERROR: string -> DWORD

Values and Subkeys may be put on an output stream as follows:

std::cout << key.queryValue( "SystemBiosDate" ) << std::endl;

Which may give:

SystemBiosDate = '02/04/98'

Iterators

To iterate over the values of a subkey, you can use a RegistryKey::ValueIterator, for example:

for ( RegistryKey::ValueIterator pos = key.beginValueIteration();
                                 pos != key.endValueIteration(); ++pos )
{
   std::cout << pos.name() << " = " << pos.toString() << std::endl;
}

Instead of pos.name() << " = " << pos.toString(), you may also write *pos to output the value.

To iterate over the subkeys of a key, you can use a RegistryKey::SubkeyIterator as follows:

for ( RegistryKey::SubkeyIterator pos = key.beginSubkeyIteration();
                                  pos != key.endSubkeyIteration(); ++pos )
{
   std::cout << *pos << std::endl;
}

Or, using the std::copy() algorithm:

#include <algorithm>         // for std::copy()
#include <iterator>          // for std::ostream_iterator<>

std::copy( key.beginSubkeyIteration(),
             key.endSubkeyIteration(),
               std::ostream_iterator<RegistryKey::Subkey>(std::cout, " ") );

Besides the Subkey and Value iterators an InsertIterator exists. It lets you add values and subkeys to the key it represents. It can open the subkey that was last assigned to it with openKey(). This makes it possible to descend a subkey tree while it is being copied. InsertIterator is used by the copy() algorithm.

Algorithms and Function Objects

The C++ Standard Template Library defines many algorithms and function-like objects. Other names for function-like object are function object, functor.

Please read Stroustrup [2000] and Josuttis [1999] for good explanations on this matter.

Class RegistryKey offers a few algorithms to traverse a key's subkeys and values: copy(), for_each(), find_subkey() and find_value().

The following code fragment to sum the numbers of an array, gives an impression of algorithms and function objects.

#include <algorithm>         // for std::for_each()
#include <functional>        // for std::unary_function

template <typename T>
class Sum : public std::unary_function<T,void>
{
private:
   T sum;

public:
   Sum( T initial = 0 ) : sum( initial ) { ; }

   void operator()(const T& x) { sum += x; }

   operator T(){ return sum; }
};

void sum()
{
    int a[] = { 3, 9, 27, };

    int sum = std::for_each( a, a + 3, Sum<int>() );
}

The same effect may be obtained with the algorithm std::accumulate(begin, end, initval):

    int sum = std::accumulate( a, a + 3, 0 );

The for_each() algorithm takes three parameters and returns the last parameter:

operation for_each( begin, end, operation);

for_each() may have been implemented as follows:

namspace std {

   template <typename Iterator, typename UnaryOp>
   UnaryOp for_each( Iterator begin, Iterator end, UnaryOp op)
    {
       for ( ; begin != end; ++begin )
       {
          op( *begin );
       }

       return op;
   }
}

begin and end specify the range [begin,end) of the array that must be taken into account for the operation. begin and end are iterators.

for_each() returns (a copy of) the operation, the Sum<int>() function object in our example. By assigning the returned Sum object to an int, its operation int() conversion is used to yield the sum.

File-related methods

Several methods exist to save a registry key tree to a file and to load it from a file:

  • loadKey() -- load specified subkey from file into registry.
  • unloadKey() -- unload specified key and subkeys from the registry.
  • saveKey() -- save this key and all of its subkeys and values to a new file.
  • restoreKey() -- copy the registry information from the specified file over this key.
  • replaceKey() -- replace the file containing a key and all its subkeys with another file; a restart activates the new values.

Security-related methods

The following methods let you get and set security information of a key:

  • getKeySecurity() -- return a copy of the security descriptor of this registry key.
  • setKeySecurity() -- set the security of this registry key.

Event-related methods

Method notifyChangeKeyValue() lets you act -- synchronously or asymchronously -- on a key-changed notification.

Examples

The Examples section contains four complete programs that use a SubkeyIterator, a ValueIterator, the copy() and for_each() algorithms and the find_value() algorithm respectively.

  • print subkeys
  • print values
  • copy, for_each algorithm
  • find_value algorithm

Modules

Driver Development Kit
windows driver development kit.

Classes

class | CCountedRegKey
reference counted registry key type used for the representation in RegistryKey. More...

class | CRegKeyIterator
base class for subkey and value iterators.

class | RegistryKey
provide access to registry subkeys and values. More...

class | RegistryKey::BinaryValue
binary values (ByteBuffer).

class | RegistryKey::CountedValue
reference counted value type used for the representation in Value.

class | RegistryKey::CountedValue::Exception
exception type used to convert Win32 API call error return values to exceptions ultimately derived from std::exception.

class | RegistryKey::Exception
exception type used to convert Win32 API call error return values to exceptions ultimately derived from std::exception.

class | RegistryKey::InsertIteratorImpl
insert iterator implementation class. More...

class | RegistryKey::IntegralValue
integral values (DWORD).

class | RegistryKey::StringValue
string values (std::string).

class | RegistryKey::Subkey
class to encapsulate a Subkey.

class | RegistryKey::SubkeyIteratorImpl
subkey iterator implementation class.

class | RegistryKey::Value
class to encapsulate various registry value types, like REG_DWORD etc.

class | RegistryKey::ValueBuffer
construct a ByteBuffer from a Value.

class | RegistryKey::ValueInterface
interface for Values.

class | RegistryKey::ValueIteratorImpl
value iterator implementation class.

class | TRegKeyIterator
template class for subkey and value iterator. More...

Generated on Tue Sep 30 11:40:37 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Driver Development Kit

Driver Development Kit
[Registry]

Detailed Description

This section describes the information needed from the Windows Driver Development Kit to interpret the resource list obtained from the registry.

The information is obtained from project [INTERRUPTHOOK] at [CODEPROJECT].

Classes

struct | _CM_FULL_RESOURCE_DESCRIPTOR
registry full resource descriptor.

struct | _CM_PARTIAL_RESOURCE_DESCRIPTOR
registry partial resource descriptor.

struct | _CM_PARTIAL_RESOURCE_LIST
registry partial resource list.

struct | _CM_RESOURCE_LIST
registry resource list.

Defines

#define | CmResourceTypeNull 0
ResType_All or ResType_None (0x0000).

#define | CmResourceTypePort 1
ResType_IO (0x0002).

#define | CmResourceTypeInterrupt 2
ResType_IRQ (0x0004).

#define | CmResourceTypeMemory 3
ResType_Mem (0x0001).

#define | CmResourceTypeDma 4
ResType_DMA (0x0003).

#define | CmResourceTypeDeviceSpecific 5
ResType_ClassSpecific (0xFFFF).

#define | CmResourceTypeBusNumber 6
ResType_BusNumber (0x0006).

#define | CmResourceTypeMaximum 7
??

#define | CmResourceTypeAssignedResource 8
BUGBUG--remove.

#define | CmResourceTypeSubAllocateFrom 9
BUGBUG--remove.

#define | CmResourceTypeNonArbitrated 128
Not arbitrated if 0x80 bit set.

#define | CmResourceTypeConfigData 128
ResType_Reserved (0x8000).

#define | CmResourceTypeDevicePrivate 129
ResType_DevicePrivate (0x8001).

#define | CmResourceTypePcCardConfig 130
ResType_PcCardConfig (0x8002).

#define | CmResourceTypeMfCardConfig 131
ResType_MfCardConfig (0x8003).

Typedefs

typedef enum WindowsUtils::_INTERFACE_TYPE | WindowsUtils::INTERFACE_TYPE
registry interface type.

typedef enum WindowsUtils::_INTERFACE_TYPE * | WindowsUtils::PINTERFACE_TYPE
registry interface type.

typedef LARGE_INTEGER | WindowsUtils::PHYSICAL_ADDRESS
registry physical address.

typedef LARGE_INTEGER * | WindowsUtils::PPHYSICAL_ADDRESS
registry physical address.

typedef WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR | WindowsUtils::CM_PARTIAL_RESOURCE_DESCRIPTOR
registry partial resource descriptor.

typedef WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR * | WindowsUtils::PCM_PARTIAL_RESOURCE_DESCRIPTOR
registry partial resource descriptor.

typedef WindowsUtils::_CM_PARTIAL_RESOURCE_LIST | WindowsUtils::CM_PARTIAL_RESOURCE_LIST
registry partial resource list.

typedef WindowsUtils::_CM_PARTIAL_RESOURCE_LIST * | WindowsUtils::PCM_PARTIAL_RESOURCE_LIST
registry partial resource list.

typedef WindowsUtils::_CM_FULL_RESOURCE_DESCRIPTOR | WindowsUtils::CM_FULL_RESOURCE_DESCRIPTOR
registry full resource descriptor.

typedef WindowsUtils::_CM_FULL_RESOURCE_DESCRIPTOR * | WindowsUtils::PCM_FULL_RESOURCE_DESCRIPTOR
registry full resource descriptor.

typedef WindowsUtils::_CM_RESOURCE_LIST | WindowsUtils::CM_RESOURCE_LIST
registry resource list.

typedef WindowsUtils::_CM_RESOURCE_LIST * | WindowsUtils::PCM_RESOURCE_LIST
registry resource list.

Enumerations

enum WindowsUtils::_INTERFACE_TYPE {
InterfaceTypeUndefined = -1, Internal, Isa, Eisa, MicroChannel,
TurboChannel, PCIBus, VMEBus, NuBus, PCMCIABus,
CBus, MPIBus, MPSABus, ProcessorInternal, InternalPowerBus,
PNPISABus, PNPBus, MaximumInterfaceType
}
registry interface type.

Generated on Tue Sep 30 11:40:38 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Semaphore

Semaphore

Detailed Description

Class Semaphore encapsulates the Win32 semaphore.

A semaphore can be used to guard critical sections from simultanuous access from different threads. For example:

#include "wsemaphore.h"

WindowsUtils::Semaphore s;

int shared_count;

void increment()
{
   s.wait();
   ++shared_count;      // critical section
   s.post();
}

void decrement()
{
   s.wait();
   --shared_count;      // critical section
   s.post();
}

Class Sempahore is obtained from [WIN32SEMAPHORE] at [BBDSOFT] with this license.

Classes

class Semaphore
encapsulate Win32 semaphore. More...

Generated on Tue Sep 30 11:40:37 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Shutdown and Reboot

Shutdown and Reboot

Detailed Description

The functions in this module enable you to:

  • logoff the current user, logoff()
  • shutdown the computer, shutdown()
  • shutdow and power off the computer, poweroff()
  • shutdown and reboot this computer or another computer, remoteShutdown()
  • cancel a remote shutdown in progress, abortShutdown()

Here is a small example program that aborts a reboot after 10s.

#include "wshutdown.h"
#include "wexception.h"

int main()
{
   try
   {
      WindowsUtils::remoteShutdown(
         TRUE,  // reboot
         NULL,  // this computer
         "reboot will be aborted in 10s",
         60 );  // timeout

      Sleep( 10 * 1000 );

      WindowsUtils::abortShutdown( NULL );
   }
   catch( WindowsUtils::Win32Exception e )
   {
      e.messageBox();
   }
}

Functions

void | WindowsUtils::GetPrivilegesNT ()
if this is a Windows NT platform, obtain the privileges required for shutdown, otherwise do nothing.

void | WindowsUtils::remoteShutdown (bool inReboot, const char *inMachine, const char *inMessage, int inTimeout)
shutdown and optionally reboot a (remote) computer.

void | WindowsUtils::abortShutdown (const char *inMachine)
cancel a shutdown initiated by remoteShutdown().

void | WindowsUtils::setWorkingSetSize (int inMinPages, int inMaxPages)
set the process' resident available memory pages to use without triggering a page fault.

void | WindowsUtils::localShutdown (UINT inShutdownMode)
shutdown the local computer as specified by inShutdownMode.

void | WindowsUtils::reboot ()
reboot the local computer

void | WindowsUtils::shutdown ()
shutdown the local computer

void | WindowsUtils::logoff ()
logg off current user

void | WindowsUtils::poweroff ()
shutdown and power off the local computer

Function Documentation

void WindowsUtils::localShutdown ( UINT inShutdownMode )

localShutdown shuts down the local computer in the way specified by inShutdownMode. This parameter must be some combination of the following values:

  • EWX_FORCE Forces processes to terminate. When this flag is set, Windows does not send the messages WM_QUERYENDSESSION and WM_ENDSESSION to the applications currently running in the system. This can cause the applications to lose data. Therefore, you should only use this flag in an emergency.

  • EWX_LOGOFF Shuts down all processes running in the security context of the process that called the ExitWindowsEx function. Then it logs the user off.

  • EWX_POWEROFF Shuts down the system and turns off the power. The system must support the power-off feature.Windows NT: The calling process must have the SE_SHUTDOWN_NAME privilege. For more information, see the following Remarks section. Windows 95: Security privileges are not supported or required.

  • EWX_REBOOT Shuts down the system and then restarts the system. Windows NT: The calling process must have the SE_SHUTDOWN_NAME privilege. For more information, see the following Remarks section. Windows 95: Security privileges are not supported or required.

  • EWX_SHUTDOWN Shuts down the system to a point at which it is safe to turn off the power. All file buffers have been flushed to disk, and all running processes have stopped. Windows NT: The calling process must have the SE_SHUTDOWN_NAME privilege. For more information, see the following Remarks section. Windows 95: Security privileges are not supported or required.

void WindowsUtils::remoteShutdown | ( | bool | inReboot,
 |  | const char * | inMachine,
 |  | const char * | inMessage,
 |  | int | inTimeout
 | ) |

shutdown() shuts down the computer specified by inMachine and optionally reboots it. During the timeout specified by inTimeout, a dialog box is shown with the message inMessage. While this dialog box is displayed, the shutdown can be stopped with abortShutdown().

Parameters:
inReboot | true: reboot after shutdown
inMachine | remote or local computer if NULL or ""
inMessage | the message for the dialog box, or NULL
inTimeout | the time in seconds that the dialog box should be displayed

void WindowsUtils::setWorkingSetSize | ( | int | inMinPages,
 |  | int | inMaxPages
 | ) |

The working set of a process is the set of memory pages currently visible to the process in physical RAM memory. These pages are resident and available for an application to use without triggering a page fault. The size of the working set of a process is specified in bytes. The minimum and maximum working set sizes affect the virtual memory paging behavior of a process.

Generated on Tue Sep 30 11:40:37 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Version information

Version information

Detailed Description

There are several functions to test for the various flavours of the Windows operating system:

  • test for operating system type: isWin95Platform(), isWinNtPlatform()
  • test for specific operating system: isWin95() etc.
  • obtain an enumeration value for the operating system: OSver

The following table is used to determine the operating system versions.

          dwPlatFormID  dwMajorVersion  dwMinorVersion  dwBuildNumber
95             1              4               0             950
95 SP1         1              4               0        >950 && <=1080
95 OSR2        1              4             <10           >1080
98             1              4              10            1998
98 SP1         1              4              10       >1998 && <2183
98 SE          1              4              10          >=2183
ME             1              4              90            3000

NT 3.51        2              3              51
NT 4           2              4               0            1381
2000           2              5               0            2195
XP             2              5               1

CE             3

This table was obtained from the file WinVer.cpp from the [FONTFILE] project at [CODEPROJECT].

Here is a small example program.

#include "wversion.h"

int main()
{
   if ( WindowsUtils::isWin95Platform() )
   {
      // do things one way
   }
   else if ( WindowsUtils::isWinNtPlatform() )
   {
      // do things another way
   }
   else
   {
      // do other things
   }
}

Enumerations

enum WindowsUtils::OSver {
None, Win95, Win98, WinME, WinNT3,
WinNT4, Win2000, WinXP, WinCE
}
Windows version return values for getWindowsVersion().

Functions

bool | WindowsUtils::isWinNtPlatform ()
true if running on Windows NT type OS (Windows NT/2000/XP).

bool | WindowsUtils::isWin95Platform ()
true if running on Windows 95 type OS (Windows 95/98/Me).

OSver WindowsUtils::getWindowsVersion ()
get Windows version as W95, W98, WNT4 etc; see OSver.

void | WindowsUtils::getWindowsVersionInfo (DWORD *pdwPlatformId, DWORD *pdwMajorVersion, DWORD *pdwMinorVersion, DWORD *pdwBuildNumber)
obtain Windows version information; arguments may be NULL.

bool | WindowsUtils::isWin95 ()
true if Windows 95

bool | WindowsUtils::isWin98 ()
true if Windows 98

bool | WindowsUtils::isWinME ()
true if Windows ME

bool | WindowsUtils::isWinNT3 ()
true if Windows NT3

bool | WindowsUtils::isWinNT4 ()
true if Windows NT4

bool | WindowsUtils::isWin2000 ()
true if Windows 2000

bool | WindowsUtils::isWinXP ()
true if Windows XP

Generated on Tue Sep 30 11:40:38 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Parallel Port Base Addresses

Parallel Port Base Addresses

Detailed Description

Class PportAddresses determines the base addresses of the parallel ports that are available on a computer. These base addresses may be obtained from the BIOS data area (Windows 95 type operating systems), or from the registry (Windows NT type operating systems). The locations for the parallel port base addresses on the various versions of Windows where provided by Arno van Amersfoort, known for his firewall script [IPTABLES_FS].

Class PportAddresses provides an iterator interface to loop through the parallel port base addresses:

#include "wpportaddr.h"

using WindowsUtils::PportAddresses;

PportAddresses thePportAddresses;

for ( PportAddresses::iterator pos = thePportAddresses.begin();
                               pos != thePportAddresses.end(); ++pos )
{
   std::cout << *pos << ' ';
}

Program printpportaddr shows how class PportAddresses may be used to print the base addresses of the parallel ports available on a computer.

Classes

class | PportAddresses
determine the parallel port base addresses. More...

class | PportAddresses::CountedBody
implementation for 'generic' operating system. More...

class | PportAddresses::Win2000Body
determine valid parallel port base addresses for Windows 2000. More...

class | PportAddresses::Win95Body
determine valid parallel port base addresses for Windows 95. More...

class | PportAddresses::Win98Body
determine valid parallel port base addresses for Windows 98. More...

class | PportAddresses::WinMeBody
determine valid parallel port base addresses for Windows ME. More...

class | PportAddresses::WinNtBody
determine valid parallel port base addresses for Windows NT 4. More...

class | PportAddresses::WinXpBody
determine valid parallel port base addresses for Windows XP. More...

Generated on Tue Sep 30 11:40:38 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Support Classes

Support Classes

Detailed Description

Reference Counting

There are two template mix-in classes to provide other classes with reference counting behaviour:

  • TReferenceCounted<typename Base> -- free the reference counted object when no more references remain to it.
  • TReferenceCountedResource<typename Base, typename Resource> -- as above and release the resource when no more references remain to the reference counted object.

These mix-in classes are usually used for reference-counted body objects in the handle-body idiom.

See program refcount for an example that uses the handle-body idiom in which the body is the reference-counted implementation.

Classes

class | TReferenceCounted
template mix-in class for reference counting. More...

class | TReferenceCountedResource
template mix-in class for reference counting a resource. More...

Generated on Tue Sep 30 11:40:38 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Example Index

Windows Utilities Examples

Here is a list of all examples:
  • algorithm.out
  • algorithm2.out
  • printpportaddr.out
  • printsubkeys.out
  • printvalues.out
  • refcount.out
Generated on Tue Sep 30 11:49:15 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Example Documentation

algorithm.out

The following program shows the use of the copy() and for_each() algorithms to copy and print a key subtree.

It also shows the use of a function object, or visitor [Gamma et al., 1995] to print the subkeys and values. This function object is not derived from std::unary_function, because it accepts two different types for its function call operator: Values and Subkeys.

Note that the function objects used with for_each() must define the pre-increment and pre-decrement operators (operator++(), operator--()). These operators are used to keep track of the subkey level.

/*
 * algorithm.cpp - copy, for_each.
 *
 * compile: prompt>bcc32 algorithm.cpp winutils.lib
 */

#include <algorithm>    // for std::copy, for_each
#include <iostream>     // for std::cout, cerr
#include "wregistry.h"  // for WindowsUtils::RegistryKey

using WindowsUtils::RegistryKey;

/*
 * function object to print an indented subkey or value.
 */

class Printer
{
public:
   explicit Printer( std::ostream& astrm = std::cout );

   std::string indent();        // indentation string

   void operator++ ();          // pre-increment
   void operator-- ();          // pre-decrement

   void operator ()( const RegistryKey::Subkey& s );
   void operator ()( const RegistryKey::Value&  v );

private:
   int level;                   // current subkey level
   std::ostream& strm;          // stream to write to
};

/*
 * the program
 */

int main()
{
   try
   {
      bool deep    = true;         // deep copy, visit
      bool shallow = false;        // shallow copy, visit

      RegistryKey fromkey(
         HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\System\\CentralProcessor" );

      RegistryKey swkey(
         HKEY_CURRENT_USER, "Software" );

      RegistryKey tokey = swkey.createOrOpenKey( "MyAlgorithmTest" );

      std::cout << "\nFrom:\n"; fromkey.for_each( Printer(), deep );

      std::cout << "\nTo:\n";     tokey.for_each( Printer(), deep );

      std::cout << "\nCopy:\n"; fromkey.copy    (   tokey  , deep );

      std::cout << "\nTo:\n";     tokey.for_each( Printer(), deep );

      swkey.deleteKeyAndSubkeys( "MyAlgorithmTest" );   // clean-up
   }
   catch ( const std::exception& e )
   {
      std::cerr << "Error: " << e.what() << std::endl;
   }
   catch ( ... )
   {
      std::cerr << "Error: unknown exception" << std::endl;
   }
}

/*
 * class Printer implementation:
 */

Printer::Printer( std::ostream& astrm ) :
  level(), strm(astrm)
{
}

std::string Printer::indent()
{
   return std::string( level * 2, ' ' );
}

void Printer::operator++ ()
{
   ++level;
}

void Printer::operator-- ()
{
   --level;
}

void Printer::operator ()( const RegistryKey::Subkey& s )
{
   strm << indent() << s << std::endl;
}

void Printer::operator ()( const RegistryKey::Value& v )
{
   strm << indent() << v << std::endl;
}

The program may produce the following output.

From:
0 (Processor)
  Component Information = '00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00'
  Identifier = 'x86 Family 6 Model 3 Stepping 4'
  Configuration Data = 'ff ff ff ff ff ff ff ff 00 00 00 00 00 00 00 00'
  VendorIdentifier = 'GenuineIntel'
  FeatureSet = '0x1ff'
  ~MHz = '0xe9'
  Update Signature = '00 00 00 00 37 00 00 00'
  Update Status = '0x0'
  Previous Update Signature = '00 00 00 00 33 00 00 00'

To:

Copy:

To:
0 (Processor)
  Component Information = '00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00'
  Identifier = 'x86 Family 6 Model 3 Stepping 4'
  Configuration Data = 'ff ff ff ff ff ff ff ff 00 00 00 00 00 00 00 00'
  VendorIdentifier = 'GenuineIntel'
  FeatureSet = '0x1ff'
  ~MHz = '0xe9'
  Update Signature = '00 00 00 00 37 00 00 00'
  Update Status = '0x0'
  Previous Update Signature = '00 00 00 00 33 00 00 00'
Generated on Tue Sep 30 11:40:31 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Example Documentation

algorithm2.out

The following program shows the use of the find_value(std::string) and find_value(UnaryPredicate) algorithms to find a value.

/*
 * algorithm2.cpp - find a value.
 *
 * compile: prompt>bcc32 algorithm2.cpp winutils.lib
 */

#include <algorithm>    // for std::find, copy, for_each
#include <functional>   // for std::unary_function
#include <iostream>     // for std::cout, cerr
#include "wregistry.h"  // for WindowsUtils::RegistryKey

using WindowsUtils::RegistryKey;

/*
 * match Subkey or Value name template:
 */

template <typename T>
class MatchName : public std::unary_function<T, bool>
{
public:
   MatchName( const std::string& aName ) :
      iName( aName ) { ; }

   bool operator()( const T& v )
   {
      return v.name() == iName;
   }

private:
   std::string iName;
};

typedef MatchName<RegistryKey::Value> MatchValueName;

/*
 * the program
 */

int main()
{
   try
   {
      bool deep    = true;         // deep visit
      bool shallow = false;        // shallow visit

      std::string valueName = "~MHz";

      RegistryKey key(
         HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\System" );

      std::pair<RegistryKey,RegistryKey::ValueIterator> pair  =
         key.find_value( valueName, deep );

      std::pair<RegistryKey,RegistryKey::ValueIterator> pair2 =
         key.find_value( MatchValueName( valueName ), deep );

      if ( pair.second != key.endValueIteration() )
         std::cout << "find by string: " << valueName << ": " << *pair.second << std::endl;
      else
         std::cout << "find by string: " << valueName << ": not found" << std::endl;

      if ( pair2.second != key.endValueIteration() )
         std::cout << "find by predicate: " << valueName << ": " << *pair2.second << std::endl;
      else
         std::cout << "find by predicate: " << valueName << ": not found" << std::endl;
   }
   catch ( const std::exception& e )
   {
      std::cerr << "Error: " << e.what() << std::endl;
   }
   catch ( ... )
   {
      std::cerr << "Error: unknown exception" << std::endl;
   }
}

The program may produce the following output.

find by string: ~MHz: ~MHz = '0xe9'
find by predicate: ~MHz: ~MHz = '0xe9'
Generated on Tue Sep 30 11:40:31 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Example Documentation

printpportaddr.out

The following program shows how class PportAddresses may be used to print the base addresses of the parallel ports available on a computer.

/*
 * printpportaddr.cpp - print the parallel port addresses found.
 *
 * compile: prompt>bcc32 printpportaddr.cpp winutils.lib
 */

#include <except>       // for std::exception
#include <iostream>     // for std::cout, cerr
#include <algorithm>    // for std::copy()
#include <iterator>     // for std::ostream_iterator<>
#include "wpportaddr.h" // for WindowsUtils::PportAddresses

int main()
{
   try
   {
      using WindowsUtils::PportAddresses;       // shorthand for PportAddresses

      typedef PportAddresses::value_type vt;    // shorthand for value_type

      PportAddresses thePportAddresses;         // determine the parallel port addresses

      std::cout.setf( std::ios::showbase );     // print hexadecimal with leading '0x'
      std::cout.setf( std::ios::hex, std::ios::basefield );

      std::cout << "\nParallel port addresses found: ";
      std::copy( thePportAddresses.begin(), thePportAddresses.end(),
                                              std::ostream_iterator<vt>(std::cout, " ") );
      std::cout << std::endl;
   }
   catch ( const std::exception& e )            // handle exceptions
   {
      std::cerr << e.what() << std::endl;
   }
   catch ( ... )                                // handle exceptions
   {
         std::cerr << "Error: unknown exception" << std::endl;
   }
}

The program may give the following result.

Parallel port addresses found: 0x378 0xd068
Generated on Tue Sep 30 11:40:31 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Example Documentation

printsubkeys.out

The following program show the use of a SubkeyIterator: It opens the key "HKEY_LOCAL_MACHINE\\HARDWARE\\DESCRIPTION\\System" and recursively iterates over its subkeys.

/*
 * printsubkeys.cpp - print the subkeys of a registry key.
 *
 * compile: prompt>bcc32 printsubkeys.cpp winutils.lib
 */

#include <except>       // for std::exception
#include <string>       // for std::string
#include <iostream>     // for std::cout, cerr
#include "wregistry.h"  // for WindowsUtils::RegistryKey

using WindowsUtils::RegistryKey;

void printSubkeys( RegistryKey key );

#pragma argsused
int main( int argc, char *argv[] )
{
   try
   {
      std::string computername = argv[1] ? argv[1] : "";

      RegistryKey key( computername, HKEY_LOCAL_MACHINE );

      key = key.openKey( "HARDWARE\\DESCRIPTION\\System" );

      printSubkeys( key );
   }
   catch ( const std::exception& e )
   {
      std::cerr << "Error: " << e.what() << std::endl;
   }
   catch ( ... )
   {
      std::cerr << "Error: unknown exception" << std::endl;
   }
}

void printSubkeys( RegistryKey key )
{
   static int level = 0;

   for ( RegistryKey::SubkeyIterator pos = key.beginSubkeyIteration();
                                     pos != key.endSubkeyIteration(); ++pos )
   {
      std::cout << std::string( level*2, ' ' ) << *pos << std::endl;

      ++level;
      printSubkeys( pos.openKey() );
      --level;
   }
}

The program may produce the following output.

CentralProcessor (Processor)
  0 (Processor)
FloatingPointProcessor (Processor)
  0 (Processor)
MultifunctionAdapter (Adapter)
  0 (Adapter)
  1 (Adapter)
  2 (Adapter)
  3 (Adapter)
    DiskController (Controller)
      0 (Controller)
        DiskPeripheral (Peripheral)
          0 (Peripheral)
        FloppyDiskPeripheral (Peripheral)
          0 (Peripheral)
    KeyboardController (Controller)
      0 (Controller)
        KeyboardPeripheral (Peripheral)
          0 (Peripheral)
    ParallelController (Controller)
      0 (Controller)
    PointerController (Controller)
      0 (Controller)
        PointerPeripheral (Peripheral)
          0 (Peripheral)
    SerialController (Controller)
      0 (Controller)
      1 (Controller)
Generated on Tue Sep 30 11:40:31 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Example Documentation

printvalues.out

The following program show the use of a ValueIterator: It opens the key "HARDWARE\\DESCRIPTION\\System" and iterates over its values, printing their name and contents.

/*
 * printvalues.cpp - print the value contents of a registry key.
 *
 * compile: prompt>bcc32 printvalues.cpp winutils.lib
 */

#include <except>       // for std::exception
#include <string>       // for std::string
#include <iostream>     // for std::cout, cerr
#include "wregistry.h"  // for WindowsUtils::RegistryKey

std::string typestring( DWORD tp );

#pragma argsused
int main( int argc, char *argv[] )
{
   try
   {
      using WindowsUtils::RegistryKey;

      std::string computername = argv[1] ? argv[1] : "";

      RegistryKey key( computername, HKEY_LOCAL_MACHINE );

      key = key.openKey( "HARDWARE\\DESCRIPTION\\System" );

      for ( RegistryKey::ValueIterator pos = key.beginValueIteration();
                                       pos != key.endValueIteration(); ++pos )
      {
         std::cout << typestring( pos.type() ) << " " << *pos << std::endl;
      }
   }
   catch ( const std::exception& e )
   {
      std::cerr << "Error: " << e.what() << std::endl;
   }
   catch ( ... )
   {
      std::cerr << "Error: unknown exception" << std::endl;
   }
}

#define   e(x) { x, #x }
#define dim(a) ( sizeof(a) / sizeof((a)[0]) )

std::string typestring( DWORD tp )
{
   struct Table
   {
      DWORD tp; const char *ts;
   }
   table[] =
   {
      e( REG_NONE  ),
      e( REG_DWORD ),
      e( REG_DWORD_BIG_ENDIAN ),
      e( REG_DWORD_LITTLE_ENDIAN ),
      e( REG_BINARY ),
      e( REG_RESOURCE_LIST ),
      e( REG_FULL_RESOURCE_DESCRIPTOR ),
      e( REG_LINK ),
      e( REG_SZ ),
      e( REG_MULTI_SZ ),
      e( REG_EXPAND_SZ ),
   };

   for ( Table *p = table; p < table + dim(table); ++p )
      if ( tp == p->tp )
         return p->ts;

   return "[unknown]";
}

The program may produce the following output.

Note that there are embedded '\0's in the REG_MULTI_SZ values that you must handle yourself.

REG_BINARY Component Information = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
REG_SZ Identifier = AT/AT COMPATIBLE
REG_FULL_RESOURCE_DESCRIPTOR Configuration Data = ff ff ff ff ff ff ff ff 00 00 00 ...
REG_SZ SystemBiosDate = 02/04/98
REG_MULTI_SZ SystemBiosVersion = Award Modular BIOS v4.51PG
REG_SZ VideoBiosDate = 03/24/98
REG_MULTI_SZ VideoBiosVersion = Stealth 3D 4000 Vers. 1.04 (c) Diamond Multimedia Systems, Inc. Ver. 1.00
Generated on Tue Sep 30 11:40:32 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Example Documentation

refcount.out

The following program shows how class TReferenceCounted<> may be used to create a reference-counted implementation (body) in a handle-body idiom.

/*
 * refcount.cpp - handle with reference counted body.
 *
 * compile: prompt>bcc32 refcount.cpp winutils.lib
 */

#include <iostream>     // for std::cout, cerr
#include "wrefcount.h"  // for TReferenceCounted<>

using WindowsUtils::TReferenceCounted;

/*
 * the handle:
 */

class Handle
{
public:
   class Body;

   ~Handle();
   Handle( int aValue = int() );
   Handle( const Handle& rhs );
   Handle& operator= ( const Handle& rhs );

   int     numrefs() const;
   operator    int() const;

private:
   Body *rep;           // its representation
};

/*
 * the reference-counted implementation:
 */

class Handle::Body : public TReferenceCounted<Handle::Body>
{
private:
   int itsValue;

protected:
   ~Body();

public:
   Body( int aValue = 0 );

   operator int() const;
};

/*
 * print: name: value, N references
 */

void print( const char *name, const Handle& h )
{
   std::cout << name << ": " << h << ", " << h.numrefs() << " reference(s)" << std::endl;
}

/*
 * the program:
 */

int main()
{
   Handle a(456);       // constructor
   Handle b = a;        // copy constructor

   {                    // scope c
      Handle c;

      print( "a", a );
      print( "b", b );
      print( "c", c );

      c = b;            // copy assignment

      print( "\na", a );
      print(   "b", b );
      print(   "c", c );
   }

   b = 987;             // copy assignment

   print( "\na", a );
   print(   "b", b );
//   print( "c", c );   // c is out of scope
}

/*
 * the handle implementation:
 */

Handle::~Handle()
{
   rep->release();
}

Handle::Handle( int aValue /* = 0 */ ) :
   rep( new Body( aValue ) )
{
}

Handle::Handle( const Handle& rhs ) :
   rep( rhs.rep->addRef() )
{
}

Handle& Handle::operator= ( const Handle& rhs )
{
   if ( this != &rhs )
   {
      Body *newRep = rhs.rep->addRef();
      rep->release();
      rep = newRep;
   }

   return *this;
}

int Handle::numrefs() const
{
   return rep->numrefs();
}

Handle::operator int() const
{
   return rep->operator int();
}

/*
 * the body implementation:
 */

Handle::Body::~Body()
{
}

Handle::Body::Body( int aValue /* = 0 */ ) :
   itsValue( aValue )
{
}

Handle::Body::operator int() const
{
   return itsValue;
}

The program gives the following result.

a: 456, 2 reference(s)
b: 456, 2 reference(s)
c: 0, 1 reference(s)

a: 456, 3 reference(s)
b: 456, 3 reference(s)
c: 456, 3 reference(s)

a: 456, 1 reference(s)
b: 987, 1 reference(s)
Generated on Tue Sep 30 11:40:32 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Namespace Member Index

Here is a list of all documented namespace members with links to the namespaces they belong to:

  • dbglevel : WindowsUtils::applog
  • errmsg : WindowsUtils::applog
  • msglevel : WindowsUtils::applog
  • progname : WindowsUtils::applog
Generated on Tue Sep 30 11:49:15 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Page Index

Windows Utilities Related Pages

Here is a list of all related documentation pages:
  • Some Ideas for Further Development
  • References
  • License of CRegistryKey
  • License of Semaphore
Generated on Tue Sep 30 11:49:15 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Some Ideas for Further Development

Some Ideas for Further Development

Application Log

The application logging functions error(), debug() and message() do not check for Win32 API errors. Should these functions throw a Win32Exception on failure to open/write/close the event log?

RegistryKey

I implemented several algorithms that work on all an entire key: Is it worthwhile to supply algorithms that take a range as input?

Problems are:

  1. there are two different kind of items to iterate over: Values and Subkeys
  2. subkeys may be descended into, or not

You can of course, create an iterator that traverses the subkey tree (using a stack to track the parents), but for an output or insert iterator it is not clear when to return to a parent.

Generated on Tue Sep 30 11:40:36 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: References

References

URL catalog

[BBDSOFT]
Software design, development, installation, test and support services for industrial automation.
http://www.bbdsoft.com/

[CODEPROJECT]
The Code Project. Your place for free C++, C# and .NET articles, code snippets, discussions, news and the best bunch of developers on the net.
http://www.codeproject.com/

[CREGISTRYKEY]
Len Holgate's Registry API wrapper classes.
http://www.codeproject.com/system/cregistrykey.asp and http://www.jetbyte.com/portfolio-showarticle.asp?articleId=21&catId=1&subcatId=2

[FONTFILE]
Hans Dietrich's Finding a Font file from a Font name.
http://www.codeproject.com/gdi/fontfile.asp

[INTERRUPTHOOK]
Alexander M.'s Interrupt Hooking and retrieving device information on Windows NT/2000/XP.
http://www.codeproject.com/useritems/interrupthook.asp

[IPTABLES_FS]
Arno's IPTABLES Firewall Script.
http://freshmeat.net/projects/iptables-firewall/

[SHUTDOWN]
Functions to loggoff current user, shutdown computer.
http://www.bbdsoft.com/downloads/msvc/reboot101.zip

[WIN32SEMAPHORE]
Class for thread synchronization using Semaphores.
http://www.bbdsoft.com/downloads/win32/semap.zip

Book references

[Gamma et al., 1995]
Erick Gamma, Richard Helm, Ralph Johnson, and John Vlissides. 1995. Design Patterns; Elements of Reusable Object-Oriented Software. Reading, Massachusetts: Addison-Wesley. ISBN 0-201-63361-2.

[Josuttis, 1999]
Nicolai M. Josuttis. 1999. The C++ Standard Library: A Tutorial and Reference. Reading, Massachusetts: Addison-Wesley. ISBN 0-201-37926-0.

[Kernighan & Pike, 1984]
Brian W. Kernighan and Rob Pike. 1984. The Unix Programming Environment.. Prentice Hall, Inc.. ISBN 0-13-937681-X (paperback), 0-13-937699-2 (hardback).

[Kernighan & Pike, 1999]
Brian W. Kernighan and Rob Pike. 1999. The Practice of Programming. Reading, Massachusetts: Addison-Wesley. ISBN 0-201-61586-X.

[Stroustrup, 2000]
Bjarne Stroustrup. 2000. The C++ Programming Language: Special Edition, 3/E. Boston: Addison Wesley Professional. ISBN 0-201-70073-5.

Generated on Tue Sep 30 11:40:36 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: License of CRegistryKey

License of CRegistryKey

Copyright 1998 JetByte Limited.

JetByte Limited grants you ("Licensee") a non-exclusive, royalty free, licence to use, modify and redistribute this software in source and binary code form, provided that i) this copyright notice and licence appear on all copies of the software; and ii) Licensee does not utilize the software in a manner which is disparaging to JetByte Limited.

This software is provided "AS IS," without a warranty of any kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. JETBYTE LIMITED AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL JETBYTE LIMITED BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF JETBYTE LIMITED HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

This software is not designed or intended for use in on-line control of aircraft, air traffic, aircraft navigation or aircraft communications; or in the design, construction, operation or maintenance of any nuclear facility. Licensee represents and warrants that it will not use or redistribute the Software for such purposes.

Generated on Tue Sep 30 11:40:36 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: License of Semaphore

License of Semaphore

General component library for WIN32 Copyright (C) 2000, UAB BBDSoft (http://www.bbdsoft.com/)

This material is provided "as is", with absolutely no warranty expressed or implied. Any use is at your own risk.

Permission to use or copy this software for any purpose is hereby granted without fee, provided the above notices are retained on all copies. Permission to modify the code and to distribute modified code is granted, provided the above notices are retained, and a notice that the code was modified is included with the above copyright notice.

The author of this program may be contacted at developers@bbdsoft.com

Generated on Tue Sep 30 11:40:36 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Graphical Class Hierarchy

Go to the textual class hierarchy

Generated on Tue Sep 30 11:49:39 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::AddPportAddress95 Member List

This is the complete list of members for WindowsUtils::AddPportAddress95, including all inherited members.
AddPportAddress95(PportAddressBuffer &aPportAddressBuffer) | WindowsUtils::AddPportAddress95 |
iPportAddresses | WindowsUtils::AddPportAddress95 | [protected]
operator()(PportAddressBuffer::value_type v) const | WindowsUtils::AddPportAddress95 |
Generated on Tue Sep 30 11:41:12 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::AddPportAddress2000 Member List

This is the complete list of members for WindowsUtils::AddPportAddress2000, including all inherited members.
AddPportAddress2000(PportAddressBuffer &aPportAddressBuffer) | WindowsUtils::AddPportAddress2000 |
AddPportAddressNtPlatform(PportAddressBuffer &aPportAddressBuffer) | WindowsUtils::AddPportAddressNtPlatform |
handleResourceList(RegistryKey::ByteBuffer b) const | WindowsUtils::AddPportAddressNtPlatform |
iPportAddresses | WindowsUtils::AddPportAddressNtPlatform | [protected]
operator()(RegistryKey::Value v) const | WindowsUtils::AddPportAddress2000 | [virtual]
~AddPportAddressNtPlatform() | WindowsUtils::AddPportAddressNtPlatform | [virtual]
Generated on Tue Sep 30 11:41:11 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::AddPportAddressNT4 Member List

This is the complete list of members for WindowsUtils::AddPportAddressNT4, including all inherited members.
AddPportAddressNT4(PportAddressBuffer &aPportAddressBuffer) | WindowsUtils::AddPportAddressNT4 |
AddPportAddressNtPlatform(PportAddressBuffer &aPportAddressBuffer) | WindowsUtils::AddPportAddressNtPlatform |
handleResourceList(RegistryKey::ByteBuffer b) const | WindowsUtils::AddPportAddressNtPlatform |
iPportAddresses | WindowsUtils::AddPportAddressNtPlatform | [protected]
operator()(RegistryKey::Value v) const | WindowsUtils::AddPportAddressNT4 | [virtual]
~AddPportAddressNT4() | WindowsUtils::AddPportAddressNT4 |
~AddPportAddressNtPlatform() | WindowsUtils::AddPportAddressNtPlatform | [virtual]
Generated on Tue Sep 30 11:41:20 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::AddPportAddressNtPlatform Member List

This is the complete list of members for WindowsUtils::AddPportAddressNtPlatform, including all inherited members.
AddPportAddressNtPlatform(PportAddressBuffer &aPportAddressBuffer) | WindowsUtils::AddPportAddressNtPlatform |
handleResourceList(RegistryKey::ByteBuffer b) const | WindowsUtils::AddPportAddressNtPlatform |
iPportAddresses | WindowsUtils::AddPportAddressNtPlatform | [protected]
operator()(RegistryKey::Value v) const =0 | WindowsUtils::AddPportAddressNtPlatform | [pure virtual]
~AddPportAddressNtPlatform() | WindowsUtils::AddPportAddressNtPlatform | [virtual]
Generated on Tue Sep 30 11:41:24 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::CCountedRegKey Member List

This is the complete list of members for WindowsUtils::CCountedRegKey, including all inherited members.
addRef() | WindowsUtils::TReferenceCounted< CCountedRegKey > | [virtual]
CCountedRegKey(const HKEY hKey) | WindowsUtils::CCountedRegKey | [inline, explicit]
CCountedRegKey(const CCountedRegKey &rhs) | WindowsUtils::CCountedRegKey | [private]
copy(CCountedRegKey *pRefCounted) | WindowsUtils::TReferenceCounted< CCountedRegKey > | [static]
getCounted() const | WindowsUtils::TReferenceCountedResource< CCountedRegKey, HKEY > |
iCount | WindowsUtils::TReferenceCounted< CCountedRegKey > | [protected]
iCounted | WindowsUtils::TReferenceCountedResource< CCountedRegKey, HKEY > | [protected]
numrefs() | WindowsUtils::TReferenceCounted< CCountedRegKey > |
operator T &() const | WindowsUtils::TReferenceCountedResource< CCountedRegKey, HKEY > |
operator T *() const | WindowsUtils::TReferenceCountedResource< CCountedRegKey, HKEY > |
operator=(const CCountedRegKey &rhs) | WindowsUtils::CCountedRegKey | [private]
preRelease() | WindowsUtils::CCountedRegKey | [inline, protected, virtual]
release() | WindowsUtils::TReferenceCountedResource< CCountedRegKey, HKEY > | [virtual]
TReferenceCounted() | WindowsUtils::TReferenceCounted< CCountedRegKey > |
TReferenceCountedResource(HKEYcounted) | WindowsUtils::TReferenceCountedResource< CCountedRegKey, HKEY > | [explicit]
~CCountedRegKey() | WindowsUtils::CCountedRegKey | [inline, protected]
~TReferenceCounted() | WindowsUtils::TReferenceCounted< CCountedRegKey > | [inline, protected, virtual]
~TReferenceCountedResource() | WindowsUtils::TReferenceCountedResource< CCountedRegKey, HKEY > | [protected, virtual]
Generated on Tue Sep 30 11:41:36 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::CRegKeyIterator Member List

This is the complete list of members for WindowsUtils::CRegKeyIterator, including all inherited members.
CRegKeyIterator(CCountedRegKey *apKey) | WindowsUtils::CRegKeyIterator | [inline, protected]
CRegKeyIterator(const CRegKeyIterator &rhs) | WindowsUtils::CRegKeyIterator | [inline, protected]
iIndex | WindowsUtils::CRegKeyIterator | [protected]
ipKey | WindowsUtils::CRegKeyIterator | [protected]
operator=(const CRegKeyIterator &rhs) | WindowsUtils::CRegKeyIterator | [inline, protected]
operator==(const CRegKeyIterator &rhs) const | WindowsUtils::CRegKeyIterator | [inline, protected]
~CRegKeyIterator() | WindowsUtils::CRegKeyIterator | [inline, virtual]
Generated on Tue Sep 30 11:41:49 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::PportAddresses Member List

This is the complete list of members for WindowsUtils::PportAddresses, including all inherited members.
basePCIMax | WindowsUtils::PportAddresses | [static]
basePCIMin | WindowsUtils::PportAddresses | [static]
basePCIStp | WindowsUtils::PportAddresses | [static]
begin() | WindowsUtils::PportAddresses | [inline]
begin() const | WindowsUtils::PportAddresses | [inline]
const_iterator typedef | WindowsUtils::PportAddresses |
end() | WindowsUtils::PportAddresses | [inline]
end() const | WindowsUtils::PportAddresses | [inline]
isValid(value_type base) const | WindowsUtils::PportAddresses | [inline]
iterator typedef | WindowsUtils::PportAddresses |
operator=(const PportAddresses &rhs) | WindowsUtils::PportAddresses | [inline]
operator[](int index) const | WindowsUtils::PportAddresses | [inline]
platform() const | WindowsUtils::PportAddresses | [inline]
PportAddressBuffer typedef | WindowsUtils::PportAddresses |
PportAddresses() | WindowsUtils::PportAddresses |
PportAddresses(const PportAddresses &rhs) | WindowsUtils::PportAddresses | [inline]
rep | WindowsUtils::PportAddresses | [private]
value_type typedef | WindowsUtils::PportAddresses |
~PportAddresses() | WindowsUtils::PportAddresses | [inline]
Generated on Tue Sep 30 11:41:55 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::PportAddresses::BodyInterface Member List

This is the complete list of members for WindowsUtils::PportAddresses::BodyInterface, including all inherited members.
begin()=0 | WindowsUtils::PportAddresses::BodyInterface | [pure virtual]
begin() const =0 | WindowsUtils::PportAddresses::BodyInterface | [pure virtual]
empty() const =0 | WindowsUtils::PportAddresses::BodyInterface | [pure virtual]
end()=0 | WindowsUtils::PportAddresses::BodyInterface | [pure virtual]
end() const =0 | WindowsUtils::PportAddresses::BodyInterface | [pure virtual]
isValid(value_type base) const =0 | WindowsUtils::PportAddresses::BodyInterface | [pure virtual]
operator[](int index) const =0 | WindowsUtils::PportAddresses::BodyInterface | [pure virtual]
platform() const =0 | WindowsUtils::PportAddresses::BodyInterface | [pure virtual]
size() const =0 | WindowsUtils::PportAddresses::BodyInterface | [pure virtual]
Generated on Tue Sep 30 11:43:44 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::PportAddresses::CountedBody Member List

This is the complete list of members for WindowsUtils::PportAddresses::CountedBody, including all inherited members.
addRef() | WindowsUtils::TReferenceCounted< CountedBody > | [virtual]
begin() | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
begin() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
copy(CountedBody *pRefCounted) | WindowsUtils::TReferenceCounted< CountedBody > | [static]
CountedBody() | WindowsUtils::PportAddresses::CountedBody |
empty() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
end() | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
end() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
iCount | WindowsUtils::TReferenceCounted< CountedBody > | [protected]
iPportAddresses | WindowsUtils::PportAddresses::CountedBody | [protected]
isValid(value_type base) const | WindowsUtils::PportAddresses::CountedBody | [virtual]
kPportAddresses | WindowsUtils::PportAddresses::CountedBody | [protected, static]
numrefs() | WindowsUtils::TReferenceCounted< CountedBody > |
operator[](int index) const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
platform() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
release() | WindowsUtils::TReferenceCounted< CountedBody > | [virtual]
size() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
TReferenceCounted() | WindowsUtils::TReferenceCounted< CountedBody > |
~CountedBody() (defined in WindowsUtils::PportAddresses::CountedBody) | WindowsUtils::PportAddresses::CountedBody | [inline, protected]
~TReferenceCounted() | WindowsUtils::TReferenceCounted< CountedBody > | [inline, protected, virtual]
Generated on Tue Sep 30 11:43:56 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::PportAddresses::Win95Body Member List

This is the complete list of members for WindowsUtils::PportAddresses::Win95Body, including all inherited members.
addRef() | WindowsUtils::TReferenceCounted< CountedBody > | [virtual]
begin() | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
begin() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
copy(CountedBody *pRefCounted) | WindowsUtils::TReferenceCounted< CountedBody > | [static]
CountedBody() | WindowsUtils::PportAddresses::CountedBody |
empty() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
end() | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
end() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
iCount | WindowsUtils::TReferenceCounted< CountedBody > | [protected]
iPportAddresses | WindowsUtils::PportAddresses::CountedBody | [protected]
isValid(value_type base) const | WindowsUtils::PportAddresses::Win95Body | [virtual]
kPportAddresses | WindowsUtils::PportAddresses::CountedBody | [protected, static]
numrefs() | WindowsUtils::TReferenceCounted< CountedBody > |
operator[](int index) const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
platform() const | WindowsUtils::PportAddresses::Win95Body | [inline, virtual]
release() | WindowsUtils::TReferenceCounted< CountedBody > | [virtual]
size() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
TReferenceCounted() | WindowsUtils::TReferenceCounted< CountedBody > |
Win95Body() | WindowsUtils::PportAddresses::Win95Body |
~CountedBody() (defined in WindowsUtils::PportAddresses::CountedBody) | WindowsUtils::PportAddresses::CountedBody | [inline, protected]
~TReferenceCounted() | WindowsUtils::TReferenceCounted< CountedBody > | [inline, protected, virtual]
Generated on Tue Sep 30 11:44:21 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::PportAddresses::Win98Body Member List

This is the complete list of members for WindowsUtils::PportAddresses::Win98Body, including all inherited members.
addRef() | WindowsUtils::TReferenceCounted< CountedBody > | [virtual]
begin() | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
begin() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
copy(CountedBody *pRefCounted) | WindowsUtils::TReferenceCounted< CountedBody > | [static]
CountedBody() | WindowsUtils::PportAddresses::CountedBody |
empty() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
end() | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
end() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
iCount | WindowsUtils::TReferenceCounted< CountedBody > | [protected]
iPportAddresses | WindowsUtils::PportAddresses::CountedBody | [protected]
isValid(value_type base) const | WindowsUtils::PportAddresses::Win95Body | [virtual]
kPportAddresses | WindowsUtils::PportAddresses::CountedBody | [protected, static]
numrefs() | WindowsUtils::TReferenceCounted< CountedBody > |
operator[](int index) const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
platform() const | WindowsUtils::PportAddresses::Win98Body | [inline, virtual]
release() | WindowsUtils::TReferenceCounted< CountedBody > | [virtual]
size() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
TReferenceCounted() | WindowsUtils::TReferenceCounted< CountedBody > |
Win95Body() | WindowsUtils::PportAddresses::Win95Body |
Win98Body() (defined in WindowsUtils::PportAddresses::Win98Body) | WindowsUtils::PportAddresses::Win98Body | [inline]
~CountedBody() (defined in WindowsUtils::PportAddresses::CountedBody) | WindowsUtils::PportAddresses::CountedBody | [inline, protected]
~TReferenceCounted() | WindowsUtils::TReferenceCounted< CountedBody > | [inline, protected, virtual]
Generated on Tue Sep 30 11:44:33 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::PportAddresses::Win2000Body Member List

This is the complete list of members for WindowsUtils::PportAddresses::Win2000Body, including all inherited members.
addRef() | WindowsUtils::TReferenceCounted< CountedBody > | [virtual]
begin() | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
begin() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
copy(CountedBody *pRefCounted) | WindowsUtils::TReferenceCounted< CountedBody > | [static]
CountedBody() | WindowsUtils::PportAddresses::CountedBody |
empty() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
end() | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
end() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
iCount | WindowsUtils::TReferenceCounted< CountedBody > | [protected]
iPportAddresses | WindowsUtils::PportAddresses::CountedBody | [protected]
isValid(value_type base) const | WindowsUtils::PportAddresses::Win2000Body | [virtual]
kPportAddresses | WindowsUtils::PportAddresses::CountedBody | [protected, static]
numrefs() | WindowsUtils::TReferenceCounted< CountedBody > |
operator[](int index) const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
platform() const | WindowsUtils::PportAddresses::Win2000Body | [inline, virtual]
release() | WindowsUtils::TReferenceCounted< CountedBody > | [virtual]
size() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
TReferenceCounted() | WindowsUtils::TReferenceCounted< CountedBody > |
Win2000Body() | WindowsUtils::PportAddresses::Win2000Body |
~CountedBody() (defined in WindowsUtils::PportAddresses::CountedBody) | WindowsUtils::PportAddresses::CountedBody | [inline, protected]
~TReferenceCounted() | WindowsUtils::TReferenceCounted< CountedBody > | [inline, protected, virtual]
Generated on Tue Sep 30 11:44:10 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::PportAddresses::WinMeBody Member List

This is the complete list of members for WindowsUtils::PportAddresses::WinMeBody, including all inherited members.
addRef() | WindowsUtils::TReferenceCounted< CountedBody > | [virtual]
begin() | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
begin() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
copy(CountedBody *pRefCounted) | WindowsUtils::TReferenceCounted< CountedBody > | [static]
CountedBody() | WindowsUtils::PportAddresses::CountedBody |
empty() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
end() | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
end() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
iCount | WindowsUtils::TReferenceCounted< CountedBody > | [protected]
iPportAddresses | WindowsUtils::PportAddresses::CountedBody | [protected]
isValid(value_type base) const | WindowsUtils::PportAddresses::Win95Body | [virtual]
kPportAddresses | WindowsUtils::PportAddresses::CountedBody | [protected, static]
numrefs() | WindowsUtils::TReferenceCounted< CountedBody > |
operator[](int index) const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
platform() const | WindowsUtils::PportAddresses::WinMeBody | [inline, virtual]
release() | WindowsUtils::TReferenceCounted< CountedBody > | [virtual]
size() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
TReferenceCounted() | WindowsUtils::TReferenceCounted< CountedBody > |
Win95Body() | WindowsUtils::PportAddresses::Win95Body |
WinMeBody() (defined in WindowsUtils::PportAddresses::WinMeBody) | WindowsUtils::PportAddresses::WinMeBody | [inline]
~CountedBody() (defined in WindowsUtils::PportAddresses::CountedBody) | WindowsUtils::PportAddresses::CountedBody | [inline, protected]
~TReferenceCounted() | WindowsUtils::TReferenceCounted< CountedBody > | [inline, protected, virtual]
Generated on Tue Sep 30 11:44:46 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::PportAddresses::WinNtBody Member List

This is the complete list of members for WindowsUtils::PportAddresses::WinNtBody, including all inherited members.
addRef() | WindowsUtils::TReferenceCounted< CountedBody > | [virtual]
begin() | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
begin() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
copy(CountedBody *pRefCounted) | WindowsUtils::TReferenceCounted< CountedBody > | [static]
CountedBody() | WindowsUtils::PportAddresses::CountedBody |
empty() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
end() | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
end() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
iCount | WindowsUtils::TReferenceCounted< CountedBody > | [protected]
iPportAddresses | WindowsUtils::PportAddresses::CountedBody | [protected]
isValid(value_type base) const | WindowsUtils::PportAddresses::WinNtBody | [virtual]
kPportAddresses | WindowsUtils::PportAddresses::CountedBody | [protected, static]
numrefs() | WindowsUtils::TReferenceCounted< CountedBody > |
operator[](int index) const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
platform() const | WindowsUtils::PportAddresses::WinNtBody | [inline, virtual]
release() | WindowsUtils::TReferenceCounted< CountedBody > | [virtual]
size() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
TReferenceCounted() | WindowsUtils::TReferenceCounted< CountedBody > |
WinNtBody() | WindowsUtils::PportAddresses::WinNtBody |
~CountedBody() (defined in WindowsUtils::PportAddresses::CountedBody) | WindowsUtils::PportAddresses::CountedBody | [inline, protected]
~TReferenceCounted() | WindowsUtils::TReferenceCounted< CountedBody > | [inline, protected, virtual]
Generated on Tue Sep 30 11:44:56 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::PportAddresses::WinXpBody Member List

This is the complete list of members for WindowsUtils::PportAddresses::WinXpBody, including all inherited members.
addRef() | WindowsUtils::TReferenceCounted< CountedBody > | [virtual]
begin() | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
begin() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
copy(CountedBody *pRefCounted) | WindowsUtils::TReferenceCounted< CountedBody > | [static]
CountedBody() | WindowsUtils::PportAddresses::CountedBody |
empty() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
end() | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
end() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
iCount | WindowsUtils::TReferenceCounted< CountedBody > | [protected]
iPportAddresses | WindowsUtils::PportAddresses::CountedBody | [protected]
isValid(value_type base) const | WindowsUtils::PportAddresses::Win2000Body | [virtual]
kPportAddresses | WindowsUtils::PportAddresses::CountedBody | [protected, static]
numrefs() | WindowsUtils::TReferenceCounted< CountedBody > |
operator[](int index) const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
platform() const | WindowsUtils::PportAddresses::WinXpBody | [inline, virtual]
release() | WindowsUtils::TReferenceCounted< CountedBody > | [virtual]
size() const | WindowsUtils::PportAddresses::CountedBody | [inline, virtual]
TReferenceCounted() | WindowsUtils::TReferenceCounted< CountedBody > |
Win2000Body() | WindowsUtils::PportAddresses::Win2000Body |
WinXpBody() (defined in WindowsUtils::PportAddresses::WinXpBody) | WindowsUtils::PportAddresses::WinXpBody | [inline]
~CountedBody() (defined in WindowsUtils::PportAddresses::CountedBody) | WindowsUtils::PportAddresses::CountedBody | [inline, protected]
~TReferenceCounted() | WindowsUtils::TReferenceCounted< CountedBody > | [inline, protected, virtual]
Generated on Tue Sep 30 11:45:08 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::RegistryKey Member List

This is the complete list of members for WindowsUtils::RegistryKey, including all inherited members.
assign(const RegistryKey &rhs) | WindowsUtils::RegistryKey |
assign(HKEY ahKey) | WindowsUtils::RegistryKey |
beginInsertIteration() | WindowsUtils::RegistryKey | [inline]
beginSubkeyIteration() const | WindowsUtils::RegistryKey | [inline]
beginValueIteration() const | WindowsUtils::RegistryKey | [inline]
ByteBuffer typedef | WindowsUtils::RegistryKey |
connectRegistry(std::string aComputerName) const | WindowsUtils::RegistryKey |
copy(OutputIterator result, bool deep=false) const | WindowsUtils::RegistryKey |
copy(InsertIterator result, bool deep) const | WindowsUtils::RegistryKey |
copy(RegistryKey &tokey, bool deep=false) const | WindowsUtils::RegistryKey | [inline]
createKey(const std::string &aSubkey, const std::string &aClass="", DWORD aOptions=REG_OPTION_NON_VOLATILE, REGSAM aSamDesired=KEY_ALL_ACCESS, LPSECURITY_ATTRIBUTES apSecurityAttributes=NULL) const | WindowsUtils::RegistryKey |
createOrOpenKey(const std::string &aSubkey, DWORD *apDisposition=NULL, const std::string &aClass="", DWORD aOptions=REG_OPTION_NON_VOLATILE, REGSAM aSamDesired=KEY_ALL_ACCESS, LPSECURITY_ATTRIBUTES apSecurityAttributes=NULL) const | WindowsUtils::RegistryKey |
deleteKey(const std::string &aSubkey) const | WindowsUtils::RegistryKey |
deleteKeyAndSubkeys(const std::string &aSubkey) const | WindowsUtils::RegistryKey |
deleteValue(const std::string &aValueName) const | WindowsUtils::RegistryKey |
endSubkeyIteration() const | WindowsUtils::RegistryKey | [inline]
endValueIteration() const | WindowsUtils::RegistryKey | [inline]
find_subkey(UnaryPredicate op, bool deep=false) const | WindowsUtils::RegistryKey |
find_subkey(std::string aSubkeyName, bool deep=false) const | WindowsUtils::RegistryKey |
find_value(UnaryPredicate op, bool deep=false) const | WindowsUtils::RegistryKey |
find_value(std::string aValueName, bool deep=false) const | WindowsUtils::RegistryKey |
flushKey() const | WindowsUtils::RegistryKey |
for_each(UnaryOp op, bool deep=false) const | WindowsUtils::RegistryKey |
getKeySecurity(SECURITY_INFORMATION aSecurityInformation) const | WindowsUtils::RegistryKey |
hasSubkey(const std::string &aSubkey, REGSAM aSamDesired=KEY_READ) const | WindowsUtils::RegistryKey |
insert(const Subkey &rhs) | WindowsUtils::RegistryKey |
insert(const Value &rhs) | WindowsUtils::RegistryKey |
InsertIterator typedef | WindowsUtils::RegistryKey |
ipKey | WindowsUtils::RegistryKey | [private]
loadKey(std::string aSubkeyName, std::string aFilename) const | WindowsUtils::RegistryKey |
NewCountedKey(HKEY ahKey, bool abCloseKeyOnFailure=false) | WindowsUtils::RegistryKey | [private, static]
notifyChangeKeyValue(HANDLE ahEvent, bool aAndSubkeys=false, DWORD aNotifyFilter=REG_NOTIFY_CHANGE_LAST_SET) const | WindowsUtils::RegistryKey |
notifyChangeKeyValue(bool aAndSubkeys=false, DWORD aNotifyFilter=REG_NOTIFY_CHANGE_LAST_SET) const | WindowsUtils::RegistryKey |
openKey(const std::string &aSubkey, REGSAM aSamDesired=KEY_READ) const | WindowsUtils::RegistryKey |
operator HKEY() const | WindowsUtils::RegistryKey |
operator=(const RegistryKey &rhs) | WindowsUtils::RegistryKey | [inline]
operator=(HKEY ahKey) | WindowsUtils::RegistryKey | [inline]
operator=(const Subkey &rhs) | WindowsUtils::RegistryKey | [inline]
operator=(const Value &rhs) | WindowsUtils::RegistryKey | [inline]
queryValue(const std::string &aValueName) const | WindowsUtils::RegistryKey |
RegistryKey(HKEY hKey) | WindowsUtils::RegistryKey | [explicit]
RegistryKey(const std::string &aComputerName, HKEY ahKey) | WindowsUtils::RegistryKey |
RegistryKey(HKEY ahKey, const std::string &aSubkey, REGSAM aSamDesired=KEY_READ, const std::string &aComputerName="") | WindowsUtils::RegistryKey |
RegistryKey(const RegistryKey &rhs) | WindowsUtils::RegistryKey |
replaceKey(std::string aNewFilename, std::string aBupFilename, std::string aSubkeyName="") const | WindowsUtils::RegistryKey |
restoreKey(std::string aFilename, DWORD aFlags=0) const | WindowsUtils::RegistryKey |
saveKey(std::string aFilename, LPSECURITY_ATTRIBUTES aSecurityAttributes=NULL) const | WindowsUtils::RegistryKey |
setKeySecurity(SECURITY_INFORMATION aSecurityInformation, const ByteBuffer &aSecurityDescriptor) const | WindowsUtils::RegistryKey |
setValue(const Value &aValue) const | WindowsUtils::RegistryKey |
SubkeyIterator typedef | WindowsUtils::RegistryKey |
unloadKey(std::string aSubkeyName) const | WindowsUtils::RegistryKey |
ValueIterator typedef | WindowsUtils::RegistryKey |
~RegistryKey() | WindowsUtils::RegistryKey |
Generated on Tue Sep 30 11:45:22 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::RegistryKey::BinaryValue Member List

This is the complete list of members for WindowsUtils::RegistryKey::BinaryValue, including all inherited members.
addRef() | WindowsUtils::TReferenceCounted< B > | [inline, virtual]
BinaryValue(DWORD adwType, const std::string &aName, const ByteBuffer &aBuffer) | WindowsUtils::RegistryKey::BinaryValue |
copy(B *pRefCounted) | WindowsUtils::TReferenceCounted< B > | [inline, static]
CountedValue(DWORD adwType, const std::string &aName) | WindowsUtils::RegistryKey::CountedValue |
iBuffer | WindowsUtils::RegistryKey::BinaryValue | [private]
iCache | WindowsUtils::RegistryKey::BinaryValue | [mutable, private]
iCount | WindowsUtils::TReferenceCounted< B > | [protected]
name() const | WindowsUtils::RegistryKey::CountedValue | [virtual]
numrefs() | WindowsUtils::TReferenceCounted< B > | [inline]
operator ByteBuffer() const | WindowsUtils::RegistryKey::BinaryValue | [virtual]
operator DWORD() const | WindowsUtils::RegistryKey::CountedValue | [virtual]
operator std::string() const | WindowsUtils::RegistryKey::CountedValue | [virtual]
operator[](int index) const | WindowsUtils::RegistryKey::BinaryValue | [virtual]
release() | WindowsUtils::TReferenceCounted< B > | [inline, virtual]
toString() const | WindowsUtils::RegistryKey::BinaryValue | [virtual]
TReferenceCounted() | WindowsUtils::TReferenceCounted< B > |
type() const | WindowsUtils::RegistryKey::CountedValue | [virtual]
~CountedValue() (defined in WindowsUtils::RegistryKey::CountedValue) | WindowsUtils::RegistryKey::CountedValue | [inline, protected]
~TReferenceCounted() | WindowsUtils::TReferenceCounted< B > | [inline, protected, virtual]
Generated on Tue Sep 30 11:47:22 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::RegistryKey::CountedValue Member List

This is the complete list of members for WindowsUtils::RegistryKey::CountedValue, including all inherited members.
addRef() | WindowsUtils::TReferenceCounted< B > | [inline, virtual]
copy(B *pRefCounted) | WindowsUtils::TReferenceCounted< B > | [inline, static]
CountedValue(DWORD adwType, const std::string &aName) | WindowsUtils::RegistryKey::CountedValue |
iCount | WindowsUtils::TReferenceCounted< B > | [protected]
idwType | WindowsUtils::RegistryKey::CountedValue | [private]
iName | WindowsUtils::RegistryKey::CountedValue | [private]
name() const | WindowsUtils::RegistryKey::CountedValue | [virtual]
numrefs() | WindowsUtils::TReferenceCounted< B > | [inline]
operator ByteBuffer() const | WindowsUtils::RegistryKey::CountedValue | [virtual]
operator DWORD() const | WindowsUtils::RegistryKey::CountedValue | [virtual]
operator std::string() const | WindowsUtils::RegistryKey::CountedValue | [virtual]
operator[](int index) const | WindowsUtils::RegistryKey::CountedValue | [virtual]
release() | WindowsUtils::TReferenceCounted< B > | [inline, virtual]
toString() const =0 | WindowsUtils::RegistryKey::CountedValue | [pure virtual]
TReferenceCounted() | WindowsUtils::TReferenceCounted< B > |
type() const | WindowsUtils::RegistryKey::CountedValue | [virtual]
~CountedValue() (defined in WindowsUtils::RegistryKey::CountedValue) | WindowsUtils::RegistryKey::CountedValue | [inline, protected]
~TReferenceCounted() | WindowsUtils::TReferenceCounted< B > | [inline, protected, virtual]
Generated on Tue Sep 30 11:47:34 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::RegistryKey::CountedValue::Exception Member List

This is the complete list of members for WindowsUtils::RegistryKey::CountedValue::Exception, including all inherited members.
Exception(const std::string &s) WindowsUtils::RegistryKey::CountedValue::Exception [inline]
Generated on Tue Sep 30 11:47:35 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::RegistryKey::Exception Member List

This is the complete list of members for WindowsUtils::RegistryKey::Exception, including all inherited members.
error() const | WindowsUtils::Win32Exception |
Exception(const std::string &aWhere, LONG aError) | WindowsUtils::RegistryKey::Exception | [inline]
message() const | WindowsUtils::Win32Exception | [virtual]
messageBox(HWND hWnd=NULL) const | WindowsUtils::Win32Exception |
what() const | WindowsUtils::Win32Exception |
where() const | WindowsUtils::Win32Exception |
Win32Exception(const char *apWhere, DWORD aError) | WindowsUtils::Win32Exception |
Win32Exception(const std::string &aWhere, DWORD aError) | WindowsUtils::Win32Exception |
Generated on Tue Sep 30 11:47:42 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::RegistryKey::InsertIteratorImpl Member List

This is the complete list of members for WindowsUtils::RegistryKey::InsertIteratorImpl, including all inherited members.
iKey | WindowsUtils::RegistryKey::InsertIteratorImpl | [private]
InsertIteratorImpl(RegistryKey &aKey) | WindowsUtils::RegistryKey::InsertIteratorImpl | [protected]
iSubkey | WindowsUtils::RegistryKey::InsertIteratorImpl | [private]
openKey() const | WindowsUtils::RegistryKey::InsertIteratorImpl |
operator *() | WindowsUtils::RegistryKey::InsertIteratorImpl |
operator++() | WindowsUtils::RegistryKey::InsertIteratorImpl |
operator++(int) | WindowsUtils::RegistryKey::InsertIteratorImpl |
operator=(const Value &rhs) | WindowsUtils::RegistryKey::InsertIteratorImpl |
operator=(const Subkey &rhs) | WindowsUtils::RegistryKey::InsertIteratorImpl |
RegistryKey (defined in WindowsUtils::RegistryKey::InsertIteratorImpl) | WindowsUtils::RegistryKey::InsertIteratorImpl | [friend]
Generated on Tue Sep 30 11:47:49 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::RegistryKey::IntegralValue Member List

This is the complete list of members for WindowsUtils::RegistryKey::IntegralValue, including all inherited members.
addRef() | WindowsUtils::TReferenceCounted< B > | [inline, virtual]
copy(B *pRefCounted) | WindowsUtils::TReferenceCounted< B > | [inline, static]
CountedValue(DWORD adwType, const std::string &aName) | WindowsUtils::RegistryKey::CountedValue |
iCount | WindowsUtils::TReferenceCounted< B > | [protected]
idwValue | WindowsUtils::RegistryKey::IntegralValue | [private]
IntegralValue(DWORD adwType, const std::string &aName, DWORD aWord) | WindowsUtils::RegistryKey::IntegralValue |
IntegralValue(DWORD adwType, const std::string &aName, const ByteBuffer &aBuffer) | WindowsUtils::RegistryKey::IntegralValue |
name() const | WindowsUtils::RegistryKey::CountedValue | [virtual]
numrefs() | WindowsUtils::TReferenceCounted< B > | [inline]
operator ByteBuffer() const | WindowsUtils::RegistryKey::CountedValue | [virtual]
operator DWORD() const | WindowsUtils::RegistryKey::IntegralValue | [virtual]
operator std::string() const | WindowsUtils::RegistryKey::CountedValue | [virtual]
operator[](int index) const | WindowsUtils::RegistryKey::CountedValue | [virtual]
release() | WindowsUtils::TReferenceCounted< B > | [inline, virtual]
toString() const | WindowsUtils::RegistryKey::IntegralValue | [virtual]
TReferenceCounted() | WindowsUtils::TReferenceCounted< B > |
type() const | WindowsUtils::RegistryKey::CountedValue | [virtual]
~CountedValue() (defined in WindowsUtils::RegistryKey::CountedValue) | WindowsUtils::RegistryKey::CountedValue | [inline, protected]
~TReferenceCounted() | WindowsUtils::TReferenceCounted< B > | [inline, protected, virtual]
Generated on Tue Sep 30 11:48:02 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::RegistryKey::StringValue Member List

This is the complete list of members for WindowsUtils::RegistryKey::StringValue, including all inherited members.
addRef() | WindowsUtils::TReferenceCounted< B > | [inline, virtual]
copy(B *pRefCounted) | WindowsUtils::TReferenceCounted< B > | [inline, static]
CountedValue(DWORD adwType, const std::string &aName) | WindowsUtils::RegistryKey::CountedValue |
iCount | WindowsUtils::TReferenceCounted< B > | [protected]
iString | WindowsUtils::RegistryKey::StringValue | [private]
name() const | WindowsUtils::RegistryKey::CountedValue | [virtual]
numrefs() | WindowsUtils::TReferenceCounted< B > | [inline]
operator ByteBuffer() const | WindowsUtils::RegistryKey::CountedValue | [virtual]
operator DWORD() const | WindowsUtils::RegistryKey::CountedValue | [virtual]
operator std::string() const | WindowsUtils::RegistryKey::CountedValue | [virtual]
operator[](int index) const | WindowsUtils::RegistryKey::CountedValue | [virtual]
release() | WindowsUtils::TReferenceCounted< B > | [inline, virtual]
StringValue(DWORD adwType, const std::string &aName, const std::string &aString) | WindowsUtils::RegistryKey::StringValue |
StringValue(DWORD adwType, const std::string &aName, const ByteBuffer &aBuffer) | WindowsUtils::RegistryKey::StringValue |
toString() const | WindowsUtils::RegistryKey::StringValue | [virtual]
TReferenceCounted() | WindowsUtils::TReferenceCounted< B > |
type() const | WindowsUtils::RegistryKey::CountedValue | [virtual]
~CountedValue() (defined in WindowsUtils::RegistryKey::CountedValue) | WindowsUtils::RegistryKey::CountedValue | [inline, protected]
~TReferenceCounted() | WindowsUtils::TReferenceCounted< B > | [inline, protected, virtual]
Generated on Tue Sep 30 11:48:13 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::RegistryKey::Subkey Member List

This is the complete list of members for WindowsUtils::RegistryKey::Subkey, including all inherited members.
iClass | WindowsUtils::RegistryKey::Subkey | [private]
iName | WindowsUtils::RegistryKey::Subkey | [private]
klass() const | WindowsUtils::RegistryKey::Subkey | [inline]
name() const | WindowsUtils::RegistryKey::Subkey | [inline]
operator *() const | WindowsUtils::RegistryKey::Subkey | [inline]
operator=(const Subkey &rhs) | WindowsUtils::RegistryKey::Subkey | [inline]
printOn(std::ostream &strm) const | WindowsUtils::RegistryKey::Subkey | [inline]
Subkey(const std::string &aName="", const std::string &aClass="") | WindowsUtils::RegistryKey::Subkey | [inline]
Subkey(const Subkey &rhs) | WindowsUtils::RegistryKey::Subkey | [inline]
SubkeyIteratorImpl (defined in WindowsUtils::RegistryKey::Subkey) | WindowsUtils::RegistryKey::Subkey | [friend]
Generated on Tue Sep 30 11:48:13 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::RegistryKey::SubkeyIteratorImpl Member List

This is the complete list of members for WindowsUtils::RegistryKey::SubkeyIteratorImpl, including all inherited members.
CRegKeyIterator(CCountedRegKey *apKey) | WindowsUtils::CRegKeyIterator | [inline, protected]
CRegKeyIterator(const CRegKeyIterator &rhs) | WindowsUtils::CRegKeyIterator | [inline, protected]
getItem() | WindowsUtils::RegistryKey::SubkeyIteratorImpl | [protected]
iIndex | WindowsUtils::CRegKeyIterator | [protected]
ipKey | WindowsUtils::CRegKeyIterator | [protected]
klass() const | WindowsUtils::RegistryKey::SubkeyIteratorImpl | [inline]
name() const | WindowsUtils::RegistryKey::SubkeyIteratorImpl | [inline]
openKey(REGSAM aSamDesired=KEY_READ) const | WindowsUtils::RegistryKey::SubkeyIteratorImpl |
operator *() | WindowsUtils::RegistryKey::SubkeyIteratorImpl | [inline]
operator->() | WindowsUtils::RegistryKey::SubkeyIteratorImpl | [inline]
operator=(const CRegKeyIterator &rhs) | WindowsUtils::CRegKeyIterator | [inline, protected]
operator==(const SubkeyIteratorImpl &rhs) const | WindowsUtils::RegistryKey::SubkeyIteratorImpl | [inline, protected]
WindowsUtils::CRegKeyIterator::operator==(const CRegKeyIterator &rhs) const | WindowsUtils::CRegKeyIterator | [inline, protected]
subkey | WindowsUtils::RegistryKey::SubkeyIteratorImpl | [private]
SubkeyIteratorImpl(CCountedRegKey *apKey) | WindowsUtils::RegistryKey::SubkeyIteratorImpl | [protected]
~CRegKeyIterator() | WindowsUtils::CRegKeyIterator | [inline, virtual]
Generated on Tue Sep 30 11:48:23 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::RegistryKey::Value Member List

This is the complete list of members for WindowsUtils::RegistryKey::Value, including all inherited members.
iValue | WindowsUtils::RegistryKey::Value | [private]
name() const | WindowsUtils::RegistryKey::Value | [virtual]
operator ByteBuffer() const | WindowsUtils::RegistryKey::Value | [virtual]
operator DWORD() const | WindowsUtils::RegistryKey::Value | [virtual]
operator std::string() const | WindowsUtils::RegistryKey::Value | [virtual]
operator=(const Value &rhs) | WindowsUtils::RegistryKey::Value |
operator[](int index) const | WindowsUtils::RegistryKey::Value | [virtual]
printOn(std::ostream &strm) const | WindowsUtils::RegistryKey::Value | [inline]
toString() const | WindowsUtils::RegistryKey::Value | [virtual]
type() const | WindowsUtils::RegistryKey::Value | [virtual]
Value(const std::string &aName, DWORD aWord) | WindowsUtils::RegistryKey::Value |
Value(const std::string &aName, const std::string &aString) | WindowsUtils::RegistryKey::Value |
Value(const std::string &aName, const ByteBuffer &aBuffer) | WindowsUtils::RegistryKey::Value |
Value(DWORD adwType, const std::string &aName, const ByteBuffer &aBuffer) | WindowsUtils::RegistryKey::Value |
Value(const Value &rhs) | WindowsUtils::RegistryKey::Value | [inline]
~Value() | WindowsUtils::RegistryKey::Value | [inline]
Generated on Tue Sep 30 11:48:32 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::RegistryKey::ValueBuffer Member List

This is the complete list of members for WindowsUtils::RegistryKey::ValueBuffer, including all inherited members.
buffer (defined in WindowsUtils::RegistryKey::ValueBuffer) | WindowsUtils::RegistryKey::ValueBuffer
ValueBuffer(const Value &rhs) | WindowsUtils::RegistryKey::ValueBuffer
Generated on Tue Sep 30 11:48:32 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::RegistryKey::ValueInterface Member List

This is the complete list of members for WindowsUtils::RegistryKey::ValueInterface, including all inherited members.
name() const =0 | WindowsUtils::RegistryKey::ValueInterface | [pure virtual]
operator ByteBuffer() const =0 | WindowsUtils::RegistryKey::ValueInterface | [pure virtual]
operator DWORD() const =0 | WindowsUtils::RegistryKey::ValueInterface | [pure virtual]
operator std::string() const =0 | WindowsUtils::RegistryKey::ValueInterface | [pure virtual]
operator[](int index) const =0 | WindowsUtils::RegistryKey::ValueInterface | [pure virtual]
toString() const =0 | WindowsUtils::RegistryKey::ValueInterface | [pure virtual]
type() const =0 | WindowsUtils::RegistryKey::ValueInterface | [pure virtual]
Generated on Tue Sep 30 11:48:40 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::RegistryKey::ValueIteratorImpl Member List

This is the complete list of members for WindowsUtils::RegistryKey::ValueIteratorImpl, including all inherited members.
CRegKeyIterator(CCountedRegKey *apKey) | WindowsUtils::CRegKeyIterator | [inline, protected]
CRegKeyIterator(const CRegKeyIterator &rhs) | WindowsUtils::CRegKeyIterator | [inline, protected]
getItem() | WindowsUtils::RegistryKey::ValueIteratorImpl | [protected]
iBuffer | WindowsUtils::RegistryKey::ValueIteratorImpl | [private]
idwType | WindowsUtils::RegistryKey::ValueIteratorImpl | [private]
iIndex | WindowsUtils::CRegKeyIterator | [protected]
iName | WindowsUtils::RegistryKey::ValueIteratorImpl | [private]
ipKey | WindowsUtils::CRegKeyIterator | [protected]
name() const | WindowsUtils::RegistryKey::ValueIteratorImpl | [inline]
operator *() const | WindowsUtils::RegistryKey::ValueIteratorImpl | [inline]
operator value_type() const (defined in WindowsUtils::RegistryKey::ValueIteratorImpl) | WindowsUtils::RegistryKey::ValueIteratorImpl |
operator=(const CRegKeyIterator &rhs) | WindowsUtils::CRegKeyIterator | [inline, protected]
operator==(const ValueIteratorImpl &rhs) const | WindowsUtils::RegistryKey::ValueIteratorImpl | [inline, protected]
WindowsUtils::CRegKeyIterator::operator==(const CRegKeyIterator &rhs) const | WindowsUtils::CRegKeyIterator | [inline, protected]
toString() const | WindowsUtils::RegistryKey::ValueIteratorImpl |
type() const | WindowsUtils::RegistryKey::ValueIteratorImpl | [inline]
ValueIteratorImpl(CCountedRegKey *apKey) | WindowsUtils::RegistryKey::ValueIteratorImpl | [protected]
~CRegKeyIterator() | WindowsUtils::CRegKeyIterator | [inline, virtual]
Generated on Tue Sep 30 11:48:50 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::Semaphore Member List

This is the complete list of members for WindowsUtils::Semaphore, including all inherited members.
maxCount() const | WindowsUtils::Semaphore | [inline]
operator=(const Semaphore &) (defined in WindowsUtils::Semaphore) | WindowsUtils::Semaphore | [private]
post(const unsigned long inPostCount=1) | WindowsUtils::Semaphore |
Semaphore(const char *const inName=0, const unsigned long inInitialCount=0, const unsigned long inMaximumCount=0) | WindowsUtils::Semaphore |
Semaphore(const Semaphore &) | WindowsUtils::Semaphore | [private]
theMaxCount | WindowsUtils::Semaphore | [private]
theSemaphoreHandle | WindowsUtils::Semaphore | [private]
wait(const unsigned long inTimeout=0) | WindowsUtils::Semaphore |
~Semaphore() | WindowsUtils::Semaphore |
Generated on Tue Sep 30 11:48:51 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::TReferenceCounted< B > Member List

This is the complete list of members for WindowsUtils::TReferenceCounted< B >, including all inherited members.
addRef() | WindowsUtils::TReferenceCounted< B > | [inline, virtual]
copy(B *pRefCounted) | WindowsUtils::TReferenceCounted< B > | [inline, static]
iCount | WindowsUtils::TReferenceCounted< B > | [protected]
numrefs() | WindowsUtils::TReferenceCounted< B > | [inline]
release() | WindowsUtils::TReferenceCounted< B > | [inline, virtual]
TReferenceCounted() | WindowsUtils::TReferenceCounted< B > |
~TReferenceCounted() | WindowsUtils::TReferenceCounted< B > | [inline, protected, virtual]
Generated on Tue Sep 30 11:48:58 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::TReferenceCountedResource< B, T > Member List

This is the complete list of members for WindowsUtils::TReferenceCountedResource< B, T >, including all inherited members.
addRef() | WindowsUtils::TReferenceCounted< B > | [inline, virtual]
copy(B *pRefCounted) | WindowsUtils::TReferenceCounted< B > | [inline, static]
getCounted() const | WindowsUtils::TReferenceCountedResource< B, T > | [inline]
iCount | WindowsUtils::TReferenceCounted< B > | [protected]
iCounted | WindowsUtils::TReferenceCountedResource< B, T > | [protected]
numrefs() | WindowsUtils::TReferenceCounted< B > | [inline]
operator T &() const | WindowsUtils::TReferenceCountedResource< B, T > | [inline]
operator T *() const | WindowsUtils::TReferenceCountedResource< B, T > | [inline]
operator=(const TReferenceCountedResource &rhs) | WindowsUtils::TReferenceCountedResource< B, T > | [private]
preRelease()=0 | WindowsUtils::TReferenceCountedResource< B, T > | [protected, pure virtual]
release() | WindowsUtils::TReferenceCountedResource< B, T > | [virtual]
TReferenceCounted() | WindowsUtils::TReferenceCounted< B > |
TReferenceCountedResource(T counted) | WindowsUtils::TReferenceCountedResource< B, T > | [inline, explicit]
TReferenceCountedResource(const TReferenceCountedResource &rhs) | WindowsUtils::TReferenceCountedResource< B, T > | [private]
~TReferenceCounted() | WindowsUtils::TReferenceCounted< B > | [inline, protected, virtual]
~TReferenceCountedResource() | WindowsUtils::TReferenceCountedResource< B, T > | [inline, protected, virtual]
Generated on Tue Sep 30 11:49:09 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::TRegKeyIterator< B > Member List

This is the complete list of members for WindowsUtils::TRegKeyIterator< B >, including all inherited members.
advance() | WindowsUtils::TRegKeyIterator< B > | [protected]
operator!=(const TRegKeyIterator< B > &rhs) const | WindowsUtils::TRegKeyIterator< B > | [inline]
operator++() | WindowsUtils::TRegKeyIterator< B > | [inline]
operator++(int) | WindowsUtils::TRegKeyIterator< B > | [inline]
operator==(const TRegKeyIterator< B > &rhs) const | WindowsUtils::TRegKeyIterator< B > | [inline]
RegistryKey (defined in WindowsUtils::TRegKeyIterator< B >) | WindowsUtils::TRegKeyIterator< B > | [friend]
TRegKeyIterator(CCountedRegKey *apKey) | WindowsUtils::TRegKeyIterator< B > | [inline, protected]
Generated on Tue Sep 30 11:49:09 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::Win32Exception Member List

This is the complete list of members for WindowsUtils::Win32Exception, including all inherited members.
error() const | WindowsUtils::Win32Exception |
iError | WindowsUtils::Win32Exception | [private]
iWhere | WindowsUtils::Win32Exception | [private]
message() const | WindowsUtils::Win32Exception | [virtual]
messageBox(HWND hWnd=NULL) const | WindowsUtils::Win32Exception |
what() const | WindowsUtils::Win32Exception |
where() const | WindowsUtils::Win32Exception |
Win32Exception(const char *apWhere, DWORD aError) | WindowsUtils::Win32Exception |
Win32Exception(const std::string &aWhere, DWORD aError) | WindowsUtils::Win32Exception |
Generated on Tue Sep 30 11:49:14 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Compound Member Index

- a -

  • AddPportAddress2000() : WindowsUtils::AddPportAddress2000
  • AddPportAddress95() : WindowsUtils::AddPportAddress95
  • AddPportAddressNT4() : WindowsUtils::AddPportAddressNT4
  • AddPportAddressNtPlatform() : WindowsUtils::AddPportAddressNtPlatform
  • addRef() : WindowsUtils::TReferenceCounted< B >
  • advance() : WindowsUtils::TRegKeyIterator< B >
  • assign() : WindowsUtils::RegistryKey

- b -

  • begin() : WindowsUtils::PportAddresses::CountedBody, WindowsUtils::PportAddresses, WindowsUtils::PportAddresses::BodyInterface
  • beginInsertIteration() : WindowsUtils::RegistryKey
  • beginSubkeyIteration() : WindowsUtils::RegistryKey
  • beginValueIteration() : WindowsUtils::RegistryKey
  • BinaryValue() : WindowsUtils::RegistryKey::BinaryValue

- c -

  • CCountedRegKey() : WindowsUtils::CCountedRegKey
  • connectRegistry() : WindowsUtils::RegistryKey
  • copy() : WindowsUtils::RegistryKey, WindowsUtils::TReferenceCounted< B >
  • CountedBody() : WindowsUtils::PportAddresses::CountedBody
  • CountedValue() : WindowsUtils::RegistryKey::CountedValue
  • createKey() : WindowsUtils::RegistryKey
  • createOrOpenKey() : WindowsUtils::RegistryKey
  • CRegKeyIterator() : WindowsUtils::CRegKeyIterator

- d -

  • deleteKey() : WindowsUtils::RegistryKey
  • deleteKeyAndSubkeys() : WindowsUtils::RegistryKey
  • deleteValue() : WindowsUtils::RegistryKey

- e -

  • empty() : WindowsUtils::PportAddresses::CountedBody, WindowsUtils::PportAddresses::BodyInterface
  • end() : WindowsUtils::PportAddresses::CountedBody, WindowsUtils::PportAddresses, WindowsUtils::PportAddresses::BodyInterface
  • endSubkeyIteration() : WindowsUtils::RegistryKey
  • endValueIteration() : WindowsUtils::RegistryKey
  • error() : WindowsUtils::Win32Exception
  • Exception() : WindowsUtils::RegistryKey::CountedValue::Exception, WindowsUtils::RegistryKey::Exception

- f -

  • find_subkey() : WindowsUtils::RegistryKey
  • find_value() : WindowsUtils::RegistryKey
  • flushKey() : WindowsUtils::RegistryKey
  • for_each() : WindowsUtils::RegistryKey

- g -

  • getCounted() : WindowsUtils::TReferenceCountedResource< B, T >
  • getItem() : WindowsUtils::RegistryKey::ValueIteratorImpl, WindowsUtils::RegistryKey::SubkeyIteratorImpl
  • getKeySecurity() : WindowsUtils::RegistryKey

- h -

  • handleResourceList() : WindowsUtils::AddPportAddressNtPlatform
  • hasSubkey() : WindowsUtils::RegistryKey

- i -

  • insert() : WindowsUtils::RegistryKey
  • InsertIteratorImpl() : WindowsUtils::RegistryKey::InsertIteratorImpl
  • IntegralValue() : WindowsUtils::RegistryKey::IntegralValue
  • isValid() : WindowsUtils::PportAddresses::Win2000Body, WindowsUtils::PportAddresses::WinNtBody, WindowsUtils::PportAddresses::Win95Body, WindowsUtils::PportAddresses::CountedBody, WindowsUtils::PportAddresses, WindowsUtils::PportAddresses::BodyInterface

- k -

  • klass() : WindowsUtils::RegistryKey::SubkeyIteratorImpl, WindowsUtils::RegistryKey::Subkey

- l -

  • loadKey() : WindowsUtils::RegistryKey

- m -

  • maxCount() : WindowsUtils::Semaphore
  • message() : WindowsUtils::Win32Exception
  • messageBox() : WindowsUtils::Win32Exception

- n -

  • name() : WindowsUtils::RegistryKey::ValueIteratorImpl, WindowsUtils::RegistryKey::SubkeyIteratorImpl, WindowsUtils::RegistryKey::CountedValue, WindowsUtils::RegistryKey::Value, WindowsUtils::RegistryKey::ValueInterface, WindowsUtils::RegistryKey::Subkey
  • NewCountedKey() : WindowsUtils::RegistryKey
  • notifyChangeKeyValue() : WindowsUtils::RegistryKey
  • numrefs() : WindowsUtils::TReferenceCounted< B >

- o -

  • openKey() : WindowsUtils::RegistryKey::InsertIteratorImpl, WindowsUtils::RegistryKey::SubkeyIteratorImpl, WindowsUtils::RegistryKey
  • operator *() : WindowsUtils::RegistryKey::InsertIteratorImpl, WindowsUtils::RegistryKey::ValueIteratorImpl, WindowsUtils::RegistryKey::SubkeyIteratorImpl, WindowsUtils::RegistryKey::Subkey
  • operator ByteBuffer() : WindowsUtils::RegistryKey::BinaryValue, WindowsUtils::RegistryKey::CountedValue, WindowsUtils::RegistryKey::Value, WindowsUtils::RegistryKey::ValueInterface
  • operator DWORD() : WindowsUtils::RegistryKey::IntegralValue, WindowsUtils::RegistryKey::CountedValue, WindowsUtils::RegistryKey::Value, WindowsUtils::RegistryKey::ValueInterface
  • operator HKEY() : WindowsUtils::RegistryKey
  • operator std::string() : WindowsUtils::RegistryKey::CountedValue, WindowsUtils::RegistryKey::Value, WindowsUtils::RegistryKey::ValueInterface
  • operator T &() : WindowsUtils::TReferenceCountedResource< B, T >
  • operator T *() : WindowsUtils::TReferenceCountedResource< B, T >
  • operator!=() : WindowsUtils::TRegKeyIterator< B >
  • operator()() : WindowsUtils::AddPportAddress2000, WindowsUtils::AddPportAddressNT4, WindowsUtils::AddPportAddressNtPlatform, WindowsUtils::AddPportAddress95
  • operator++() : WindowsUtils::RegistryKey::InsertIteratorImpl, WindowsUtils::TRegKeyIterator< B >
  • operator->() : WindowsUtils::RegistryKey::SubkeyIteratorImpl
  • operator=() : WindowsUtils::RegistryKey::InsertIteratorImpl, WindowsUtils::RegistryKey::Value, WindowsUtils::RegistryKey::Subkey, WindowsUtils::RegistryKey, WindowsUtils::CRegKeyIterator, WindowsUtils::CCountedRegKey, WindowsUtils::TReferenceCountedResource< B, T >, WindowsUtils::PportAddresses
  • operator==() : WindowsUtils::RegistryKey::ValueIteratorImpl, WindowsUtils::RegistryKey::SubkeyIteratorImpl, WindowsUtils::TRegKeyIterator< B >, WindowsUtils::CRegKeyIterator
  • operator[]() : WindowsUtils::RegistryKey::BinaryValue, WindowsUtils::RegistryKey::CountedValue, WindowsUtils::RegistryKey::Value, WindowsUtils::RegistryKey::ValueInterface, WindowsUtils::PportAddresses::CountedBody, WindowsUtils::PportAddresses, WindowsUtils::PportAddresses::BodyInterface

- p -

  • platform() : WindowsUtils::PportAddresses::WinXpBody, WindowsUtils::PportAddresses::Win2000Body, WindowsUtils::PportAddresses::WinNtBody, WindowsUtils::PportAddresses::WinMeBody, WindowsUtils::PportAddresses::Win98Body, WindowsUtils::PportAddresses::Win95Body, WindowsUtils::PportAddresses::CountedBody, WindowsUtils::PportAddresses, WindowsUtils::PportAddresses::BodyInterface
  • post() : WindowsUtils::Semaphore
  • PportAddresses() : WindowsUtils::PportAddresses
  • preRelease() : WindowsUtils::CCountedRegKey, WindowsUtils::TReferenceCountedResource< B, T >
  • printOn() : WindowsUtils::RegistryKey::Value, WindowsUtils::RegistryKey::Subkey

- q -

  • queryValue() : WindowsUtils::RegistryKey

- r -

  • RegistryKey() : WindowsUtils::RegistryKey
  • release() : WindowsUtils::TReferenceCountedResource< B, T >, WindowsUtils::TReferenceCounted< B >
  • replaceKey() : WindowsUtils::RegistryKey
  • restoreKey() : WindowsUtils::RegistryKey

- s -

  • saveKey() : WindowsUtils::RegistryKey
  • Semaphore() : WindowsUtils::Semaphore
  • setKeySecurity() : WindowsUtils::RegistryKey
  • setValue() : WindowsUtils::RegistryKey
  • size() : WindowsUtils::PportAddresses::CountedBody, WindowsUtils::PportAddresses::BodyInterface
  • StringValue() : WindowsUtils::RegistryKey::StringValue
  • Subkey() : WindowsUtils::RegistryKey::Subkey
  • SubkeyIteratorImpl() : WindowsUtils::RegistryKey::SubkeyIteratorImpl

- t -

  • toString() : WindowsUtils::RegistryKey::ValueIteratorImpl, WindowsUtils::RegistryKey::StringValue, WindowsUtils::RegistryKey::BinaryValue, WindowsUtils::RegistryKey::IntegralValue, WindowsUtils::RegistryKey::CountedValue, WindowsUtils::RegistryKey::Value, WindowsUtils::RegistryKey::ValueInterface
  • TReferenceCounted() : WindowsUtils::TReferenceCounted< B >
  • TReferenceCountedResource() : WindowsUtils::TReferenceCountedResource< B, T >
  • TRegKeyIterator() : WindowsUtils::TRegKeyIterator< B >
  • type() : WindowsUtils::RegistryKey::ValueIteratorImpl, WindowsUtils::RegistryKey::CountedValue, WindowsUtils::RegistryKey::Value, WindowsUtils::RegistryKey::ValueInterface

- u -

  • unloadKey() : WindowsUtils::RegistryKey

- v -

  • Value() : WindowsUtils::RegistryKey::Value
  • ValueBuffer() : WindowsUtils::RegistryKey::ValueBuffer
  • ValueIteratorImpl() : WindowsUtils::RegistryKey::ValueIteratorImpl

- w -

  • wait() : WindowsUtils::Semaphore
  • what() : WindowsUtils::Win32Exception
  • where() : WindowsUtils::Win32Exception
  • Win2000Body() : WindowsUtils::PportAddresses::Win2000Body
  • Win32Exception() : WindowsUtils::Win32Exception
  • Win95Body() : WindowsUtils::PportAddresses::Win95Body
  • WinNtBody() : WindowsUtils::PportAddresses::WinNtBody

- ~ -

  • ~AddPportAddressNT4() : WindowsUtils::AddPportAddressNT4
  • ~AddPportAddressNtPlatform() : WindowsUtils::AddPportAddressNtPlatform
  • ~CCountedRegKey() : WindowsUtils::CCountedRegKey
  • ~CRegKeyIterator() : WindowsUtils::CRegKeyIterator
  • ~PportAddresses() : WindowsUtils::PportAddresses
  • ~RegistryKey() : WindowsUtils::RegistryKey
  • ~Semaphore() : WindowsUtils::Semaphore
  • ~TReferenceCounted() : WindowsUtils::TReferenceCounted< B >
  • ~TReferenceCountedResource() : WindowsUtils::TReferenceCountedResource< B, T >
  • ~Value() : WindowsUtils::RegistryKey::Value
Generated on Tue Sep 30 11:40:36 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Compound Member Index

  • ByteBuffer : WindowsUtils::RegistryKey
  • const_iterator : WindowsUtils::PportAddresses
  • InsertIterator : WindowsUtils::RegistryKey
  • iterator : WindowsUtils::PportAddresses
  • PportAddressBuffer : WindowsUtils::PportAddresses
  • SubkeyIterator : WindowsUtils::RegistryKey
  • value_type : WindowsUtils::PportAddresses
  • ValueIterator : WindowsUtils::RegistryKey
Generated on Tue Sep 30 11:40:36 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Compound Member Index

  • basePCIMax : WindowsUtils::PportAddresses
  • basePCIMin : WindowsUtils::PportAddresses
  • basePCIStp : WindowsUtils::PportAddresses
  • iBuffer : WindowsUtils::RegistryKey::ValueIteratorImpl, WindowsUtils::RegistryKey::BinaryValue
  • iCache : WindowsUtils::RegistryKey::BinaryValue
  • iClass : WindowsUtils::RegistryKey::Subkey
  • iCount : WindowsUtils::TReferenceCounted< B >
  • iCounted : WindowsUtils::TReferenceCountedResource< B, T >
  • idwType : WindowsUtils::RegistryKey::ValueIteratorImpl, WindowsUtils::RegistryKey::CountedValue
  • idwValue : WindowsUtils::RegistryKey::IntegralValue
  • iError : WindowsUtils::Win32Exception
  • iIndex : WindowsUtils::CRegKeyIterator
  • iKey : WindowsUtils::RegistryKey::InsertIteratorImpl
  • iName : WindowsUtils::RegistryKey::ValueIteratorImpl, WindowsUtils::RegistryKey::CountedValue, WindowsUtils::RegistryKey::Subkey
  • ipKey : WindowsUtils::RegistryKey, WindowsUtils::CRegKeyIterator
  • iPportAddresses : WindowsUtils::PportAddresses::CountedBody, WindowsUtils::AddPportAddressNtPlatform, WindowsUtils::AddPportAddress95
  • iString : WindowsUtils::RegistryKey::StringValue
  • iSubkey : WindowsUtils::RegistryKey::InsertIteratorImpl
  • iValue : WindowsUtils::RegistryKey::Value
  • iWhere : WindowsUtils::Win32Exception
  • kPportAddresses : WindowsUtils::PportAddresses::CountedBody
  • rep : WindowsUtils::PportAddresses
  • subkey : WindowsUtils::RegistryKey::SubkeyIteratorImpl
  • theMaxCount : WindowsUtils::Semaphore
  • theSemaphoreHandle : WindowsUtils::Semaphore
Generated on Tue Sep 30 11:40:36 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Graph Legend

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };

/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };

/* Class not documented with doxygen comments */
class Undocumented { };

/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };

/*! A template class */
template<class T> class Templ { };

/*! Class that is inherited using protected inheritance */
class ProtectedBase { };

/*! Class that is inherited using private inheritance */
class PrivateBase { };

/*! Class that is used by the Inherited class */
class Used { };

/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
                  protected ProtectedBase,
                  private PrivateBase,
                  public Undocumented
                  public Templ<int>
{
  private:
    Used *m_usedClass;
};
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled black box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a grey border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
The arrows have the following meaning:
  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
Generated on Tue Sep 30 11:49:16 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Namespace Member Index

  • dbglevel : WindowsUtils::applog
  • errmsg : WindowsUtils::applog
  • msglevel : WindowsUtils::applog
  • progname : WindowsUtils::applog
Generated on Tue Sep 30 11:49:15 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::_CM_FULL_RESOURCE_DESCRIPTOR Member List

This is the complete list of members for WindowsUtils::_CM_FULL_RESOURCE_DESCRIPTOR, including all inherited members.
BusNumber (defined in WindowsUtils::_CM_FULL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_FULL_RESOURCE_DESCRIPTOR
InterfaceType (defined in WindowsUtils::_CM_FULL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_FULL_RESOURCE_DESCRIPTOR
PartialResourceList (defined in WindowsUtils::_CM_FULL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_FULL_RESOURCE_DESCRIPTOR
Generated on Tue Sep 30 11:40:50 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR Member List

This is the complete list of members for WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR, including all inherited members.
Affinity (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR
BusNumber (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR
Channel (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR
Data (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR
DataSize (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR
DevicePrivate (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR
DeviceSpecificData (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR
Dma (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR
Flags (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR
Generic (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR
Interrupt (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR
Length (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR
Level (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR
Memory (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR
Port (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR
Port (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR
Reserved (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR
Reserved1 (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR
Reserved2 (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR
ShareDisposition (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR
Start (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR
Start (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR
Type (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR
u (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR
Vector (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR) | WindowsUtils::_CM_PARTIAL_RESOURCE_DESCRIPTOR
Generated on Tue Sep 30 11:40:51 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::_CM_PARTIAL_RESOURCE_LIST Member List

This is the complete list of members for WindowsUtils::_CM_PARTIAL_RESOURCE_LIST, including all inherited members.
Count (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_LIST) | WindowsUtils::_CM_PARTIAL_RESOURCE_LIST
PartialDescriptors (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_LIST) | WindowsUtils::_CM_PARTIAL_RESOURCE_LIST
Revision (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_LIST) | WindowsUtils::_CM_PARTIAL_RESOURCE_LIST
Version (defined in WindowsUtils::_CM_PARTIAL_RESOURCE_LIST) | WindowsUtils::_CM_PARTIAL_RESOURCE_LIST
Generated on Tue Sep 30 11:40:55 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: Member List

WindowsUtils::_CM_RESOURCE_LIST Member List

This is the complete list of members for WindowsUtils::_CM_RESOURCE_LIST, including all inherited members.
Count (defined in WindowsUtils::_CM_RESOURCE_LIST) | WindowsUtils::_CM_RESOURCE_LIST
List (defined in WindowsUtils::_CM_RESOURCE_LIST) | WindowsUtils::_CM_RESOURCE_LIST
Generated on Tue Sep 30 11:41:03 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: version.h Source File

version.h

00001 /*
00002    version.h.in - version string for Rulbus DLL.
00003
00004    Copyright (C) 2003 by Universiteit Leiden. All Rights reserved.
00005
00006    This file is part of rulbus-dll: Rulbus Device Library package.
00007
00008    $Revision: $
00009    $Date: $
00010    $Source: $
00011    %Author: M.J. Moene%
00012
00013    Compiler        : Borland-C++ 5.5.1
00014    Operating system: 32-bit Windows
00015    Hardware system : PC
00016 */
00017
00018 #ifndef __VERSION_H
00019 #include "../../version.h"
00020 //#define __VERSION_H
00021
00022 #undef  VERSION_STRING
00023 #undef  VERSION_FILE
00024
00025 #define VERSION_STRING "0.1.0 (development)"
00026 #define VERSION_FILE    0,1,0,0           // pvcam32lv.dll
00027
00028 #if defined(CANIO)                      // CANIO port I/O
00029    #define   VERSION_PORTIO "CanIO"
00030 #elif defined(DriverLINX)               // DriverLINXport I/O
00031    #define   VERSION_PORTIO "DriverLinx"
00032 #else
00033    #define   VERSION_PORTIO "(Unrecognized Port I/O support)"
00034    #error Please specify Port IO selection: CANIO or DriverLINX .
00035 #endif
00036
00037 #endif
00038
00039 /*
00040  * end of file
00041  */
00042
Generated on Tue Sep 30 11:40:32 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: wapplog.h Source File

wapplog.h

00001 /*
00002  * wapplog.h - Windows Application Log.
00003  *
00004  * This file is part of WindowsUtils.
00005  *
00006  * Copyright 2003 (C), Leiden University.
00007  * WindowsUtils is free software, see below.
00008  *
00009  * $Revision: $
00010  * $Date: $
00011  * $Source: $
00012  * %Author: Martin J. Moene %
00013  *
00014  * Compiler        : Borland-C++ 5.5.1, GCC 3.2
00015  * Operating system: 32-bit Windows, Unix
00016  * Hardware system : PC, other
00017  *
00018  * code inspired by the books:
00019  *
00020  * The Unix Programming Environment
00021  * Brian W. Kernighan and Rob Pike.
00022  * Prentice Hall, Inc., 1984.
00023  * ISBN 0-13-937681-X (paperback), 0-13-937699-2 (hardback).
00024  *
00025  * The Practice of Programming.
00026  * Brian W. Kernighan and Rob Pike.
00027  * Addison-Wesley, Reading, Massachusetts, 1999.
00028  * ISBN 0-201-61586-X.
00029  *
00030  * WindowsUtils is free software; you can redistribute it and/or modify
00031  * it under the terms of the GNU General Public License as published by
00032  * the Free Software Foundation; either version 2 of the License, or
00033  * (at your option) any later version.
00034  *
00035  * WindowsUtils is distributed in the hope that it will be useful,
00036  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00037  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00038  * GNU General Public License for more details.
00039  *
00040  * You should have received a copy of the GNU General Public License
00041  * along with mngdriver; if not, write to the Free Software
00042  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00043  */
00044
00045 #ifndef __WAPPLOG_H
00046 #define __WAPPLOG_H
00047
00048 /* *
00049  * namespace: WindowsUtils
00050  */
00051
00052 namespace WindowsUtils {
00053
00061 /*
00062  * DEBUG mode macro:
00063  */
00064
00065 #if defined(DEBUG)                              // debugging information
00066 #   define D(line) line                         // include line
00067 #else
00068 #   define D(line)                              // exclude line
00069 #endif
00070
00076 enum DebugLevel
00077 {
00078    DBG_L0,
00079    DBG_L1,
00080    DBG_L2,
00081    DBG_L3,
00082    DBG_L4,
00083 };
00084
00085 /*
00086  * prototypes:
00087  */
00088
00089 const char *getprogname();
00090 void        setprogname( const char *name );
00091
00092 int         getdbglevel(            );
00093 void        setdbglevel( int  level );
00094
00095 int         getmsglevel(            );
00096 void        setmsglevel( int  level );
00097
00098 const char *error_message();
00099
00100 int         error  ( int status, const char *format ...);
00101 int         debug  ( int level , const char *format ...);
00102 int         message( int level , const char *format ...);
00103
00104 /* @} */
00105
00106 } // namespace WindowsUtils
00107
00108 #endif  // __WAPPLOG_H
00109
00110 /*
00111  * end of file
00112  */
00113
Generated on Tue Sep 30 11:40:32 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: wexception.h Source File

wexception.h

00001 /*
00002  * wexception.h - Windows utility functions.
00003  *
00004  * This file is part of WindowsUtils.
00005  *
00006  * Copyright (C) 2003, Leiden University.
00007  * WindowsUtils is free software, see below.
00008  *
00009  * $Revision: $
00010  * $Date: $
00011  * $Source: $
00012  * %Author: Martin J. Moene %
00013  *
00014  * Compiler        : Borland-C++ 5.5.1
00015  * Operating system: 32-bit Windows
00016  * Hardware system : PC
00017  *
00018  * WindowsUtils is free software; you can redistribute it and/or modify
00019  * it under the terms of the GNU General Public License as published by
00020  * the Free Software Foundation; either version 2 of the License, or
00021  * (at your option) any later version.
00022  *
00023  * WindowsUtils is distributed in the hope that it will be useful,
00024  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00025  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00026  * GNU General Public License for more details.
00027  *
00028  * You should have received a copy of the GNU General Public License
00029  * along with mngdriver; if not, write to the Free Software
00030  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00031  */
00032
00033 #ifndef __WEXCEPTION_H
00034 #define __WEXCEPTION_H
00035
00036 #include <windows.h>
00037 #include <except>       // for class std::logic_error
00038 #include <string>       // for class std::string
00039
00040 /* *
00041  * namespace: WindowsUtils
00042  */
00043
00044 namespace WindowsUtils {
00045
00054 void        noGPErrorBox ();
00055 const char* GetLastErrorMessage( DWORD aError );
00056
00061 class Win32Exception : public std::exception
00062 {
00063 public:
00064    Win32Exception( const char* apWhere, DWORD aError );
00065    Win32Exception( const std::string& aWhere, DWORD aError );
00066
00067    const char* what () const throw();
00068    const char* where() const;
00069    DWORD       error() const;
00070
00071    virtual const char* message() const;
00072    void                messageBox( HWND hWnd = NULL ) const;
00073
00074 private:
00075    std::string iWhere;
00076    DWORD       iError;
00077 };
00078
00081 } // namespace WindowsUtils
00082
00083 #endif // __WEXCEPTION_H
00084
00085 /*
00086  * end of file
00087  */
00088
Generated on Tue Sep 30 11:40:32 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: winutils.h Source File

winutils.h

00001 /*
00002  * winutils.h - Windows version utilities.
00003  *
00004  * This file is part of WindowsUtils.
00005  *
00006  * Copyright 2003 (C), Leiden University.
00007  * WindowsUtils is free software, see below.
00008  *
00009  * $Revision: $
00010  * $Date: $
00011  * $Source: $
00012  * %Author: Martin J. Moene %
00013  *
00014  * Compiler        : Borland-C++ 5.5.1
00015  * Operating system: 32-bit Windows
00016  * Hardware system : PC
00017  *
00018  * WindowsUtils is free software; you can redistribute it and/or modify
00019  * it under the terms of the GNU General Public License as published by
00020  * the Free Software Foundation; either version 2 of the License, or
00021  * (at your option) any later version.
00022  *
00023  * WindowsUtils is distributed in the hope that it will be useful,
00024  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00025  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00026  * GNU General Public License for more details.
00027  *
00028  * You should have received a copy of the GNU General Public License
00029  * along with mngdriver; if not, write to the Free Software
00030  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00031  */
00032
00033 #ifndef __WINUTILS_H
00034 #define __WINUTILS_H
00035
00036 #include "wapplog.h"            // Application logging functions
00037 #include "wexception.h"         // Win32Exception
00038 #include "wregistry.h"          // RegistryKey
00039 #include "wsemaphore.h"         // Semaphore
00040 #include "wshutdown.h"          // shutdown functions
00041 #include "wversion.h"           // version information functions
00042 #include "wpportaddr.h"         // PportAddresses
00043 #include "wrefcount.h"          // for class TReferenceCounted[Resource]<>
00044
00045 #endif // __WINUTILS_H
00046
00047 /*
00048  * end of file
00049  */
00050
Generated on Tue Sep 30 11:40:32 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: wpportaddr.h Source File

wpportaddr.h

00001 /*
00002  * wpportaddr.h - Windows utilities: class to determine available Parallel Port base addresses.
00003  *
00004  * This file is part of WindowsUtils.
00005  *
00006  * Copyright 2003 (C), Leiden University.
00007  * WindowsUtils is free software, see below.
00008  *
00009  * $Revision: $
00010  * $Date: $
00011  * $Source: $
00012  * %Author: Martin J. Moene %
00013  *
00014  * Compiler        : Borland-C++ 5.5.1
00015  * Operating system: 32-bit Windows
00016  * Hardware system : PC
00017  *
00018  * WindowsUtils is free software; you can redistribute it and/or modify
00019  * it under the terms of the GNU General Public License as published by
00020  * the Free Software Foundation; either version 2 of the License, or
00021  * (at your option) any later version.
00022  *
00023  * WindowsUtils is distributed in the hope that it will be useful,
00024  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00025  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00026  * GNU General Public License for more details.
00027  *
00028  * You should have received a copy of the GNU General Public License
00029  * along with mngdriver; if not, write to the Free Software
00030  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00031  */
00032
00033 #ifndef __WPPORTADDR_H
00034 #define __WPPORTADDR_H
00035
00036 #include <vector>               // for std::vector<>
00037 #include "wrefcount.h"          // for class TReferenceCounted<>
00038
00039 /* *
00040  * namespace: WindowsUtils
00041  */
00042
00043 namespace WindowsUtils {
00044
00056 class PportAddresses                                  // Handle
00057 {
00058    class BodyInterface;
00059    class CountedBody;
00060    class Win95Body;
00061    class Win98Body;
00062    class WinMeBody;
00063    class WinNtBody;
00064    class WinXpBody;
00065    class Win2000Body;
00066
00067 public:
00068    typedef long value_type;
00069    typedef std::vector<value_type> PportAddressBuffer;
00070
00071    typedef PportAddressBuffer::iterator        iterator;
00072    typedef PportAddressBuffer::const_iterator  const_iterator;
00073
00074    static const value_type basePCIMin = 0x0D00;
00075    static const value_type basePCIMax = 0xFFF8;
00076    static const value_type basePCIStp = 8;
00077
00085    class BodyInterface                                  // Body
00086    {
00087    public:
00088       virtual bool  isValid( value_type base ) const = 0;
00089
00090       virtual bool  empty  ( ) const = 0;
00091       virtual long  size   ( ) const = 0;
00092
00093       virtual       iterator begin( ) = 0;
00094       virtual       iterator end  ( ) = 0;
00095
00096       virtual const_iterator begin( ) const = 0;
00097       virtual const_iterator end  ( ) const = 0;
00098
00099       virtual long  operator[](int index) const = 0;
00100
00101       virtual const char* platform() const = 0;
00102    };
00103
00104    /*
00105     * class PportAddresses continues...
00106     */
00107
00108 private:
00109    CountedBody *rep;
00110
00111 public:
00112   ~PportAddresses();
00113    PportAddresses();
00114
00115    PportAddresses( const PportAddresses& rhs );
00116
00117    PportAddresses& operator= ( const PportAddresses& rhs );
00118
00119    bool            isValid  ( value_type base ) const;
00120    const char*     platform (           ) const;
00121
00122    iterator        begin    (  );
00123    iterator        end      (  );
00124
00125    const_iterator  begin    (  ) const;
00126    const_iterator  end      (  ) const;
00127
00128    long operator[] ( int index ) const;
00129 };
00130
00135 class PportAddresses::CountedBody: public BodyInterface, public TReferenceCounted<CountedBody>
00136 {
00137 public:
00138    CountedBody();
00139
00140    bool  isValid( value_type base ) const;
00141
00142    bool  empty  ( ) const;
00143    long  size   ( ) const;
00144
00145          iterator begin( );
00146          iterator end  ( );
00147
00148    const_iterator begin( ) const;
00149    const_iterator end  ( ) const;
00150
00151    long  operator[](int index) const;
00152
00153    const char* platform() const;
00154
00155 protected:
00156    ~CountedBody() { ; }
00157
00158    PportAddressBuffer  iPportAddresses;
00159
00160    static value_type kPportAddresses[];
00161 };
00162
00167 class PportAddresses::Win95Body: public PportAddresses::CountedBody
00168 {
00169 public:
00170    Win95Body();
00171    bool        isValid ( value_type base ) const;
00172    const char* platform( ) const { return "Windows 95"; }
00173 };
00174
00181 class PportAddresses::Win98Body: public PportAddresses::Win95Body
00182 {
00183 public:
00184    Win98Body(): Win95Body() { ; }
00185    const char* platform  () const { return "Windows 98"; }
00186 };
00187
00194 class PportAddresses::WinMeBody: public PportAddresses::Win95Body
00195 {
00196 public:
00197    WinMeBody(): Win95Body() { ; }
00198    const char* platform  () const { return "Windows ME"; }
00199 };
00200
00205 class PportAddresses::WinNtBody: public PportAddresses::CountedBody
00206 {
00207 public:
00208    WinNtBody();
00209    bool        isValid ( value_type base ) const;
00210    const char* platform( ) const { return "Windows NT"; }
00211 };
00212
00217 class PportAddresses::Win2000Body: public PportAddresses::CountedBody
00218 {
00219 public:
00220    Win2000Body();
00221    bool        isValid ( value_type base ) const;
00222    const char* platform( ) const { return "Windows 2000"; }
00223 };
00224
00231 class PportAddresses::WinXpBody: public PportAddresses::Win2000Body
00232 {
00233 public:
00234    WinXpBody(): Win2000Body() { ; }
00235    const char* platform() const { return "Windows XP"; }
00236 };
00237
00240 /*************************************************************************
00241 ** class PportAddresses inline implementation
00242 **************************************************************************
00243 */
00244
00249 inline PportAddresses::~PportAddresses()
00250 {
00251    rep->release();
00252 }
00253
00258 inline PportAddresses::PportAddresses( const PportAddresses& rhs ):
00259    rep( rhs.rep->addRef() )
00260 {
00261 }
00262
00267 inline PportAddresses& PportAddresses::operator= ( const PportAddresses& rhs )
00268 {
00269    if ( this != &rhs )
00270    {
00271       CountedBody *newRep = rhs.rep->addRef();
00272       rep->release();
00273       rep = newRep;
00274    }
00275
00276    return *this;
00277 }
00278
00283 inline bool PportAddresses::isValid( value_type base ) const
00284 {
00285    return rep->isValid( base );
00286 }
00287
00292 inline const char* PportAddresses::platform (  ) const
00293 {
00294    return rep->platform();
00295 }
00296
00297
00302 inline PportAddresses::iterator PportAddresses::begin()
00303 {
00304    return rep->begin();
00305 }
00306
00311 inline PportAddresses::iterator PportAddresses::end()
00312 {
00313    return rep->end();
00314 }
00315
00320 inline PportAddresses::const_iterator PportAddresses::begin(  ) const
00321 {
00322    return rep->begin();
00323 }
00324
00329 inline PportAddresses::const_iterator PportAddresses::end() const
00330 {
00331    return rep->end();
00332 }
00333
00338 inline long PportAddresses::operator[] ( int index ) const
00339 {
00340    return (*rep)[index];
00341 }
00342
00343 /*************************************************************************
00344 ** class PportAddresses::CountedBody inline implementation
00345 **************************************************************************
00346 */
00347
00352 inline bool PportAddresses::CountedBody::empty() const
00353 {
00354    return iPportAddresses.empty();
00355 }
00356
00361 inline long PportAddresses::CountedBody::size   ( ) const
00362 {
00363    return iPportAddresses.size();
00364 }
00365
00370 inline PportAddresses::iterator PportAddresses::CountedBody::begin( )
00371 {
00372    return iPportAddresses.begin();
00373 }
00374
00379 inline PportAddresses::iterator PportAddresses::CountedBody::end  ( )
00380 {
00381    return iPportAddresses.end();
00382 }
00383
00388 inline PportAddresses::const_iterator PportAddresses::CountedBody::begin( ) const
00389 {
00390    return iPportAddresses.begin();
00391 }
00392
00397 inline PportAddresses::const_iterator PportAddresses::CountedBody::end  ( ) const
00398 {
00399    return iPportAddresses.end();
00400 }
00401
00406 inline long PportAddresses::CountedBody::operator[](int index) const
00407 {
00408    return iPportAddresses[index];
00409 }
00410
00415 inline const char* PportAddresses::CountedBody::platform() const
00416 {
00417    return "Unknown";
00418 }
00419
00420 } // end namespace WindowsUtils
00421
00422 #endif // __WPPORTADDR_H
00423
00424 /*
00425  * end of file
00426  */
00427
Generated on Tue Sep 30 11:40:33 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: wrefcount.h Source File

wrefcount.h

00001 /*
00002  * wrefcount.h - Windows registry utilities: TReferenceCounted[Resource].
00003  *
00004  * RegistryKey is derived from:
00005  * http://www.codeproject.com/system/cregistrykey.asp
00006  *
00007  * This file is part of WindowsUtils.
00008  *
00009  * Copyright 1998 JetByte Limited.
00010  * Copyright (C) 2003, Leiden University.
00011  * WindowsUtils is free software, see below.
00012  *
00013  * $Revision: $
00014  * $Date: $
00015  * $Source: $
00016  * %Author: Martin J. Moene %
00017  *
00018  * Compiler        : Borland-C++ 5.5.1
00019  * Operating system: 32-bit Windows
00020  * Hardware system : PC
00021  *
00022  * WindowsUtils is free software; you can redistribute it and/or modify
00023  * it under the terms of the GNU General Public License as published by
00024  * the Free Software Foundation; either version 2 of the License, or
00025  * (at your option) any later version.
00026  *
00027  * WindowsUtils is distributed in the hope that it will be useful,
00028  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00029  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00030  * GNU General Public License for more details.
00031  *
00032  * You should have received a copy of the GNU General Public License
00033  * along with mngdriver; if not, write to the Free Software
00034  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00035  */
00036
00038 //
00039 // Copyright 1998 JetByte Limited.
00040 //
00041 // JetByte Limited grants you ("Licensee") a non-exclusive, royalty free,
00042 // licence to use, modify and redistribute this software in source and binary
00043 // code form, provided that i) this copyright notice and licence appear on all
00044 // copies of the software; and ii) Licensee does not utilize the software in a
00045 // manner which is disparaging to JetByte Limited.
00046 //
00047 // This software is provided "AS IS," without a warranty of any kind. ALL
00048 // EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
00049 // ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
00050 // OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. JETBYTE LIMITED AND ITS LICENSORS
00051 // SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF
00052 // USING, MODIFYING OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO
00053 // EVENT WILL JETBYTE LIMITED BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
00054 // OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
00055 // DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING
00056 // OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF JETBYTE LIMITED
00057 // HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
00058 //
00059 // This software is not designed or intended for use in on-line control of
00060 // aircraft, air traffic, aircraft navigation or aircraft communications; or in
00061 // the design, construction, operation or maintenance of any nuclear
00062 // facility. Licensee represents and warrants that it will not use or
00063 // redistribute the Software for such purposes.
00064 //
00066
00067 #ifndef __WREFERENCE_H
00068 #define __WREFERENCE_H
00069
00070 /*
00071  * namespace: WindowsUtils
00072  */
00073
00074 namespace WindowsUtils {
00075
00083 /*
00084  * classes and templates from other files:
00085  */
00086
00087 /*
00088  * classes and templates defined in this file:
00089  */
00090
00091 template <typename B>             class TReferenceCounted;
00092 template <typename B, typename T> class TReferenceCountedResource;
00093
00106 template <typename B>
00107 class TReferenceCounted
00108 {
00109 public:
00110    TReferenceCounted();
00111
00112    virtual B* addRef();
00113    virtual B* release();
00114
00115    long       numrefs();
00116
00117    static B*  copy( B* pRefCounted );
00118
00119 protected:
00120    virtual ~TReferenceCounted() { ; }
00121    long iCount;
00122 };
00123
00141 template <typename B, typename T>
00142 class TReferenceCountedResource : public TReferenceCounted<B>
00143 {
00144 public:
00145    explicit TReferenceCountedResource( T counted );
00146
00147    const    T& getCounted() const;
00148    operator T&() const;
00149    operator T*() const;
00150
00151    B* release();                                // preRelease() resource
00152
00153 protected:
00154    virtual     ~TReferenceCountedResource();
00155    virtual void preRelease() = 0;
00156
00157    T iCounted;
00158
00159 private:
00160    TReferenceCountedResource( const TReferenceCountedResource& rhs );
00161    TReferenceCountedResource& operator=( const TReferenceCountedResource& rhs );
00162 };
00163
00166 /*************************************************************************
00167 ** class TReferenceCounted<T> inline implementation
00168 **************************************************************************
00169 */
00170
00175 template <typename B>
00176 TReferenceCounted<B>::TReferenceCounted(): iCount(1)
00177 {
00178 }
00179
00184 template <typename B>
00185 inline B* TReferenceCounted<B>::addRef()
00186 {
00187    ::InterlockedIncrement( &iCount );
00188
00189    return static_cast<B*>(this);
00190 }
00191
00196 template <typename B>
00197 inline B* TReferenceCounted<B>::release()
00198 {
00199    if ( 0 == ::InterlockedDecrement( &iCount ) )
00200    {
00201       delete this;
00202    };
00203
00204    return 0;
00205 }
00206
00211 template <typename B>
00212 inline long TReferenceCounted<B>::numrefs()
00213 {
00214    return iCount;
00215 }
00216
00221 template <typename B>
00222 inline B* TReferenceCounted<B>::copy( B* pRefCounted )
00223 {
00224    return ( pRefCounted ? pRefCounted->addRef() : 0 );
00225 }
00226
00227 /*************************************************************************
00228 ** class TReferenceCountedResource implementation
00229 **************************************************************************
00230 */
00231
00236 template <typename B, typename T>
00237 inline TReferenceCountedResource<B,T>::TReferenceCountedResource( T aCounted ) :
00238    TReferenceCounted<B>(), iCounted( aCounted )
00239 {
00240 }
00241
00246 template <typename B, typename T>
00247 inline TReferenceCountedResource<B,T>::~TReferenceCountedResource()
00248 {
00249 }
00250
00255 template <typename B, typename T>
00256 inline const T& TReferenceCountedResource<B,T>::getCounted() const
00257 {
00258    return iCounted;
00259 }
00260
00265 template <typename B, typename T>
00266 inline TReferenceCountedResource<B,T>::operator T&() const
00267 {
00268    return iCounted;
00269 }
00270
00275 template <typename B, typename T>
00276 inline TReferenceCountedResource<B,T>::operator T*() const
00277 {
00278    return &iCounted;
00279 }
00280
00286 template <typename B, typename T>
00287 B* TReferenceCountedResource<B,T>::release()
00288 {
00289    if ( 0 == ::InterlockedDecrement( &iCount ) )
00290    {
00291       try
00292       {
00293          preRelease();
00294       }
00295       catch (...)
00296       {
00297          // release musn't throw
00298       }
00299
00300       delete this;
00301    }
00302
00303    return 0;
00304 }
00305
00306 } // end namespace WindowsUtils
00307
00308 #endif // __WREFERENCE_H
00309
00310 /*
00311  * end of file
00312  */
00313
Generated on Tue Sep 30 11:40:33 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: wregistry-crk.h Source File

wregistry-crk.h

00001 /*
00002  * wregistry-crk.h - Windows registry utilities: CCountedRegKey.
00003  *
00004  * RegistryKey is derived from:
00005  * http://www.codeproject.com/system/cregistrykey.asp
00006  *
00007  * This file is part of WindowsUtils.
00008  *
00009  * Copyright 1998 JetByte Limited.
00010  * Copyright (C) 2003, Leiden University.
00011  * WindowsUtils is free software, see below.
00012  *
00013  * $Revision: $
00014  * $Date: $
00015  * $Source: $
00016  * %Author: Martin J. Moene %
00017  *
00018  * Compiler        : Borland-C++ 5.5.1
00019  * Operating system: 32-bit Windows
00020  * Hardware system : PC
00021  *
00022  * WindowsUtils is free software; you can redistribute it and/or modify
00023  * it under the terms of the GNU General Public License as published by
00024  * the Free Software Foundation; either version 2 of the License, or
00025  * (at your option) any later version.
00026  *
00027  * WindowsUtils is distributed in the hope that it will be useful,
00028  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00029  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00030  * GNU General Public License for more details.
00031  *
00032  * You should have received a copy of the GNU General Public License
00033  * along with mngdriver; if not, write to the Free Software
00034  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00035  */
00036
00038 //
00039 // Copyright 1998 JetByte Limited.
00040 //
00041 // JetByte Limited grants you ("Licensee") a non-exclusive, royalty free,
00042 // licence to use, modify and redistribute this software in source and binary
00043 // code form, provided that i) this copyright notice and licence appear on all
00044 // copies of the software; and ii) Licensee does not utilize the software in a
00045 // manner which is disparaging to JetByte Limited.
00046 //
00047 // This software is provided "AS IS," without a warranty of any kind. ALL
00048 // EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
00049 // ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
00050 // OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. JETBYTE LIMITED AND ITS LICENSORS
00051 // SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF
00052 // USING, MODIFYING OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO
00053 // EVENT WILL JETBYTE LIMITED BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
00054 // OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
00055 // DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING
00056 // OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF JETBYTE LIMITED
00057 // HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
00058 //
00059 // This software is not designed or intended for use in on-line control of
00060 // aircraft, air traffic, aircraft navigation or aircraft communications; or in
00061 // the design, construction, operation or maintenance of any nuclear
00062 // facility. Licensee represents and warrants that it will not use or
00063 // redistribute the Software for such purposes.
00064 //
00066
00067 #ifndef __WREGISTRY__CRK_H
00068 #define __WREGISTRY__CRK_H
00069
00070 #include "wrefcount.h"                  // for TReferenceCountedResource
00071
00072 /*
00073  * namespace: WindowsUtils
00074  */
00075
00076 namespace WindowsUtils {
00077
00085 /*
00086  * classes and templates from other files:
00087  */
00088
00089 /*
00090  * classes and templates defined in this file:
00091  */
00092
00093 class CCountedRegKey;
00094
00102 class CCountedRegKey : public TReferenceCountedResource<CCountedRegKey, HKEY>
00103 {
00104 public:
00105    explicit CCountedRegKey( const HKEY hKey );
00106
00107 protected:
00108    ~CCountedRegKey();
00109
00110    virtual void preRelease();
00111
00112 private:
00113    CCountedRegKey( const CCountedRegKey& rhs );
00114    CCountedRegKey& operator= ( const CCountedRegKey& rhs );
00115 };
00116
00119 /*************************************************************************
00120 ** class CCountedRegKey implementation
00121 **************************************************************************
00122 */
00123
00128 inline CCountedRegKey::CCountedRegKey( const HKEY hKey ):
00129    TReferenceCountedResource<CCountedRegKey, HKEY>( hKey )
00130 {
00131 }
00132
00137 inline CCountedRegKey::~CCountedRegKey( )
00138 {
00139 }
00140
00145 inline void CCountedRegKey::preRelease()
00146 {
00147    ::RegCloseKey( iCounted );
00148 }
00149
00150 } // end namespace WindowsUtils
00151
00152 #endif // __WREGISTRY_CRK_H
00153
00154 /*
00155  * end of file
00156  */
00157
Generated on Tue Sep 30 11:40:33 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: wregistry-ddk.h Source File

wregistry-ddk.h

00001 /*
00002  * wregistry-ddk.h - Windows registry utilities: resource list types.
00003  *
00004  * This file is part of WindowsUtils.
00005  *
00006  * from: http://www.codeproject.com/useritems/interrupthook.asp
00007  *
00008  * InterruptHook, Copyright (C) 2003  Alexander M.
00009  * Copyright (C) 2003, Leiden University.
00010  * WindowsUtils is free software, see below.
00011  *
00012  * $Revision: $
00013  * $Date: $
00014  * $Source: $
00015  * %Author: Martin J. Moene %
00016  *
00017  * Compiler        : Borland-C++ 5.5.1
00018  * Operating system: 32-bit Windows
00019  * Hardware system : PC
00020  *
00021  * WindowsUtils is free software; you can redistribute it and/or modify
00022  * it under the terms of the GNU General Public License as published by
00023  * the Free Software Foundation; either version 2 of the License, or
00024  * (at your option) any later version.
00025  *
00026  * WindowsUtils is distributed in the hope that it will be useful,
00027  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00028  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00029  * GNU General Public License for more details.
00030  *
00031  * You should have received a copy of the GNU General Public License
00032  * along with mngdriver; if not, write to the Free Software
00033  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00034  */
00035
00036 /*
00037 InterruptHook
00038 Copyright (C) 2003  Alexander M.
00039
00040 This program is free software; you can redistribute it and/or
00041 modify it under the terms of the GNU General Public License
00042 as published by the Free Software Foundation; either version 2
00043 of the License, or (at your option) any later version.
00044
00045 This program is distributed in the hope that it will be useful,
00046 but WITHOUT ANY WARRANTY; without even the implied warranty of
00047 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00048 GNU General Public License for more details.
00049
00050 You should have received a copy of the GNU General Public License
00051 along with this program; if not, write to the Free Software
00052 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00053 */
00054
00055 #ifndef __WREGISTRY_DDK_H
00056 #define __WREGISTRY_DDK_H
00057
00058 #ifndef _WINDOWS_
00059 #define WIN32_LEAN_AND_MEAN
00060    #include <windows.h>
00061 #undef WIN32_LEAN_AND_MEAN
00062 #endif
00063
00064 /* *
00065  * namespace: WindowsUtils
00066  */
00067
00068 namespace WindowsUtils {
00069
00085 /* Taken from ntddk.h(shorten) */
00086 #define CmResourceTypeNull                0
00087 #define CmResourceTypePort                1
00088 #define CmResourceTypeInterrupt           2
00089 #define CmResourceTypeMemory              3
00090 #define CmResourceTypeDma                 4
00091 #define CmResourceTypeDeviceSpecific      5
00092 #define CmResourceTypeBusNumber           6
00093 #define CmResourceTypeMaximum             7
00094 #define CmResourceTypeAssignedResource    8
00095 #define CmResourceTypeSubAllocateFrom     9
00096 #define CmResourceTypeNonArbitrated     128
00097 #define CmResourceTypeConfigData        128
00098 #define CmResourceTypeDevicePrivate     129
00099 #define CmResourceTypePcCardConfig      130
00100 #define CmResourceTypeMfCardConfig      131
00101
00102
00106 typedef enum _INTERFACE_TYPE {
00107     InterfaceTypeUndefined = -1,
00108     Internal,
00109     Isa,
00110     Eisa,
00111     MicroChannel,
00112     TurboChannel,
00113     PCIBus,
00114     VMEBus,
00115     NuBus,
00116     PCMCIABus,
00117     CBus,
00118     MPIBus,
00119     MPSABus,
00120     ProcessorInternal,
00121     InternalPowerBus,
00122     PNPISABus,
00123     PNPBus,
00124     MaximumInterfaceType
00125 }INTERFACE_TYPE, *PINTERFACE_TYPE;
00126
00131 typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS;
00132
00133 #ifdef __BORLANDC__
00134    #pragma option -a4
00135 #else
00136    #pragma pack(4)
00137 #endif
00138
00143 typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR {
00144     UCHAR Type;
00145     UCHAR ShareDisposition;
00146     USHORT Flags;
00147     union {
00148
00149         struct {
00150             PHYSICAL_ADDRESS Start;
00151             ULONG Length;
00152         } Generic;
00153
00154         struct {
00155             PHYSICAL_ADDRESS Start;
00156             ULONG Length;
00157         } Port;
00158
00159         struct {
00160             ULONG Level;
00161             ULONG Vector;
00162             ULONG Affinity;
00163         } Interrupt;
00164
00165         struct {
00166             PHYSICAL_ADDRESS Start;    // 64 bit physical addresses.
00167             ULONG Length;
00168         } Memory;
00169
00170         struct {
00171             ULONG Channel;
00172             ULONG Port;
00173             ULONG Reserved1;
00174         } Dma;
00175
00176         struct {
00177             ULONG Data[3];
00178         } DevicePrivate;
00179
00180         struct {
00181             ULONG Start;
00182             ULONG Length;
00183             ULONG Reserved;
00184         } BusNumber;
00185
00186         struct {
00187             ULONG DataSize;
00188             ULONG Reserved1;
00189             ULONG Reserved2;
00190         } DeviceSpecificData;
00191     } u;
00192 } CM_PARTIAL_RESOURCE_DESCRIPTOR, *PCM_PARTIAL_RESOURCE_DESCRIPTOR;
00193
00194 #ifdef __BORLANDC__
00195    #pragma option -a
00196 #else
00197    #pragma pack()
00198 #endif
00199
00204 typedef struct _CM_PARTIAL_RESOURCE_LIST {
00205     USHORT Version;
00206     USHORT Revision;
00207     ULONG Count;
00208     CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1];
00209 } CM_PARTIAL_RESOURCE_LIST, *PCM_PARTIAL_RESOURCE_LIST;
00210
00215 typedef struct _CM_FULL_RESOURCE_DESCRIPTOR {
00216     INTERFACE_TYPE InterfaceType;
00217     ULONG BusNumber;
00218     CM_PARTIAL_RESOURCE_LIST PartialResourceList;
00219 } CM_FULL_RESOURCE_DESCRIPTOR, *PCM_FULL_RESOURCE_DESCRIPTOR;
00220
00225 typedef struct _CM_RESOURCE_LIST {
00226     ULONG Count;
00227     CM_FULL_RESOURCE_DESCRIPTOR List[1];
00228 } CM_RESOURCE_LIST, *PCM_RESOURCE_LIST;
00229
00232 } // end namespace WindowsUtils
00233
00234 #endif // __WREGISTRY_DDK_H
00235
00236 /*
00237  * end of file
00238  */
00239
Generated on Tue Sep 30 11:40:33 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: wregistry-rki.h Source File

wregistry-rki.h

00001 /*
00002  * wregistry-rki.h - Windows registry utilities: CRegKeyIterator.
00003  *
00004  * RegistryKey is derived from:
00005  * http://www.codeproject.com/system/cregistrykey.asp
00006  *
00007  * This file is part of WindowsUtils.
00008  *
00009  * Copyright 1998 JetByte Limited.
00010  * Copyright (C) 2003, Leiden University.
00011  * WindowsUtils is free software, see below.
00012  *
00013  * $Revision: $
00014  * $Date: $
00015  * $Source: $
00016  * %Author: Martin J. Moene %
00017  *
00018  * Compiler        : Borland-C++ 5.5.1
00019  * Operating system: 32-bit Windows
00020  * Hardware system : PC
00021  *
00022  * WindowsUtils is free software; you can redistribute it and/or modify
00023  * it under the terms of the GNU General Public License as published by
00024  * the Free Software Foundation; either version 2 of the License, or
00025  * (at your option) any later version.
00026  *
00027  * WindowsUtils is distributed in the hope that it will be useful,
00028  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00029  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00030  * GNU General Public License for more details.
00031  *
00032  * You should have received a copy of the GNU General Public License
00033  * along with mngdriver; if not, write to the Free Software
00034  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00035  */
00036
00038 //
00039 // Copyright 1998 JetByte Limited.
00040 //
00041 // JetByte Limited grants you ("Licensee") a non-exclusive, royalty free,
00042 // licence to use, modify and redistribute this software in source and binary
00043 // code form, provided that i) this copyright notice and licence appear on all
00044 // copies of the software; and ii) Licensee does not utilize the software in a
00045 // manner which is disparaging to JetByte Limited.
00046 //
00047 // This software is provided "AS IS," without a warranty of any kind. ALL
00048 // EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
00049 // ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
00050 // OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. JETBYTE LIMITED AND ITS LICENSORS
00051 // SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF
00052 // USING, MODIFYING OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO
00053 // EVENT WILL JETBYTE LIMITED BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
00054 // OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
00055 // DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING
00056 // OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF JETBYTE LIMITED
00057 // HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
00058 //
00059 // This software is not designed or intended for use in on-line control of
00060 // aircraft, air traffic, aircraft navigation or aircraft communications; or in
00061 // the design, construction, operation or maintenance of any nuclear
00062 // facility. Licensee represents and warrants that it will not use or
00063 // redistribute the Software for such purposes.
00064 //
00066
00067 #ifndef __WREGISTRY__RKI_H
00068 #define __WREGISTRY__RKI_H
00069
00070 //   #include <iostream>  // temp
00071
00072 #include <iterator>                     // for std::iterator<>
00073 #include "wregistry-crk.h"              // for CCountedRegKey
00074
00075 /*
00076  * namespace: WindowsUtils
00077  */
00078
00079 namespace WindowsUtils {
00080
00088 /*
00089  * classes and templates from other files:
00090  */
00091
00092 class RegistryKey;
00093
00094 /*
00095  * classes and templates defined in this file:
00096  */
00097
00098 template <typename B> class TRegKeyIterator;
00099 class CRegKeyIterator;
00100
00105 class CRegKeyIterator
00106 {
00107 public:
00108    virtual ~CRegKeyIterator();
00109
00110 protected:
00111    CRegKeyIterator( CCountedRegKey* apKey );
00112    CRegKeyIterator( const CRegKeyIterator& rhs );
00113
00114    CRegKeyIterator& operator= ( const CRegKeyIterator& rhs );
00115    bool             operator==( const CRegKeyIterator& rhs ) const ;
00116
00117    CCountedRegKey *ipKey;
00118    DWORD           iIndex;
00119 };
00120
00129 template <typename B>
00130 class TRegKeyIterator : public B
00131 {
00132 public:
00133    friend class RegistryKey;    // must be able to construct iterator
00134
00135    TRegKeyIterator<B>& operator++ ();
00136    TRegKeyIterator<B>  operator++ ( int );
00137
00138    bool                operator!= ( const TRegKeyIterator<B>& rhs ) const;
00139    bool                operator== ( const TRegKeyIterator<B>& rhs ) const;
00140
00141 protected:
00142    TRegKeyIterator( CCountedRegKey* apKey );
00143
00144    void advance();
00145 };
00146
00149 /*************************************************************************
00150 ** class CRegKeyIterator implementation
00151 **************************************************************************
00152 */
00153
00158 inline CRegKeyIterator::CRegKeyIterator( CCountedRegKey* apKey ):
00159    ipKey( CCountedRegKey::copy( apKey ) ), iIndex( 0 )
00160 {
00161 //std::cout << "CRegKeyIterator::CRegKeyIterator( CCountedRegKey* apKey )" << std::endl;
00162 }
00163
00168 inline CRegKeyIterator::CRegKeyIterator( const CRegKeyIterator& rhs ):
00169    ipKey( CCountedRegKey::copy( rhs.ipKey ) ), iIndex( rhs.iIndex )
00170 {
00171 //std::cout << "CRegKeyIterator::CRegKeyIterator( const CRegKeyIterator& rhs )" << std::endl;
00172 }
00173
00178 inline CRegKeyIterator::~CRegKeyIterator()
00179 {
00180    if ( ipKey )
00181    {
00182       ipKey->release();
00183       ipKey = 0;
00184    }
00185 }
00186
00191 inline CRegKeyIterator& CRegKeyIterator::operator= ( const CRegKeyIterator& rhs )
00192 {
00193 //std::cout << "CRegKeyIterator::operator=( const CRegKeyIterator& rhs )" << std::endl;
00194    if ( this != &rhs )
00195    {
00196       CCountedRegKey *pNewKey = CCountedRegKey::copy( rhs.ipKey );
00197       ipKey->release();
00198       ipKey = pNewKey;
00199
00200       iIndex = rhs.iIndex;
00201    }
00202
00203    return *this;
00204 }
00205
00210 inline bool CRegKeyIterator::operator==( const CRegKeyIterator& rhs ) const
00211 {
00212    return ipKey == rhs.ipKey && iIndex == rhs.iIndex;
00213 }
00214
00215 /*************************************************************************
00216 ** template class TRegKeyIterator implementation
00217 **************************************************************************
00218 */
00219
00224 template <typename B>
00225 inline TRegKeyIterator<B>::TRegKeyIterator( CCountedRegKey* apKey ): B( apKey )
00226 {
00227    advance();
00228 }
00229
00234 template <typename B>
00235 inline TRegKeyIterator<B>& TRegKeyIterator<B>::operator++ ()
00236 {
00237    advance();
00238    return *this;
00239 }
00240
00245 template <typename B>
00246 inline TRegKeyIterator<B> TRegKeyIterator<B>::operator++ ( int )
00247 {
00248    TRegKeyIterator<B> oldValue(*this);
00249    advance();
00250    return oldValue;
00251 }
00252
00257 template <typename B>
00258 inline bool TRegKeyIterator<B>::operator!= ( const TRegKeyIterator<B>& rhs ) const
00259 {
00260    return !( *this == rhs );
00261 }
00262
00267 template <typename B>
00268 inline bool TRegKeyIterator<B>::operator== ( const TRegKeyIterator<B>& rhs ) const
00269 {
00270    return B::operator==( rhs );
00271 }
00272
00277 template <typename B>
00278 void TRegKeyIterator<B>::advance()
00279 {
00280    if ( !ipKey )
00281       return;
00282
00283    if ( B::getItem() )
00284    {
00285       ++iIndex;
00286    }
00287    else
00288    {
00289       ipKey  = ipKey->release();
00290       iIndex = 0;
00291    }
00292 }
00293
00294 } // end namespace WindowsUtils
00295
00296 #endif // __WREGISTRY__RKI_H
00297
00298 /*
00299  * end of file
00300  */
00301
Generated on Tue Sep 30 11:40:33 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: wregistry.h Source File

wregistry.h

00001 /*
00002  * wregistry.h - Windows registry utilities.
00003  *
00004  * RegistryKey is derived from:
00005  * http://www.codeproject.com/system/cregistrykey.asp
00006  *
00007  * This file is part of WindowsUtils.
00008  *
00009  * Copyright 1998 JetByte Limited.
00010  * Copyright (C) 2003, Leiden University.
00011  * WindowsUtils is free software, see below.
00012  *
00013  * $Revision: $
00014  * $Date: $
00015  * $Source: $
00016  * %Author: Martin J. Moene %
00017  *
00018  * Compiler        : Borland-C++ 5.5.1
00019  * Operating system: 32-bit Windows
00020  * Hardware system : PC
00021  *
00022  * WindowsUtils is free software; you can redistribute it and/or modify
00023  * it under the terms of the GNU General Public License as published by
00024  * the Free Software Foundation; either version 2 of the License, or
00025  * (at your option) any later version.
00026  *
00027  * WindowsUtils is distributed in the hope that it will be useful,
00028  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00029  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00030  * GNU General Public License for more details.
00031  *
00032  * You should have received a copy of the GNU General Public License
00033  * along with mngdriver; if not, write to the Free Software
00034  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00035  */
00036
00038 //
00039 // Copyright 1998 JetByte Limited.
00040 //
00041 // JetByte Limited grants you ("Licensee") a non-exclusive, royalty free,
00042 // licence to use, modify and redistribute this software in source and binary
00043 // code form, provided that i) this copyright notice and licence appear on all
00044 // copies of the software; and ii) Licensee does not utilize the software in a
00045 // manner which is disparaging to JetByte Limited.
00046 //
00047 // This software is provided "AS IS," without a warranty of any kind. ALL
00048 // EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
00049 // ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
00050 // OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. JETBYTE LIMITED AND ITS LICENSORS
00051 // SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF
00052 // USING, MODIFYING OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO
00053 // EVENT WILL JETBYTE LIMITED BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
00054 // OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
00055 // DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING
00056 // OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF JETBYTE LIMITED
00057 // HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
00058 //
00059 // This software is not designed or intended for use in on-line control of
00060 // aircraft, air traffic, aircraft navigation or aircraft communications; or in
00061 // the design, construction, operation or maintenance of any nuclear
00062 // facility. Licensee represents and warrants that it will not use or
00063 // redistribute the Software for such purposes.
00064 //
00066
00067 #ifndef __WREGISTRY__H           // Windows has a winreg.h, __WINREG__H__ !!!
00068 #define __WREGISTRY__H
00069
00070 /*
00071  * included files:
00072  */
00073
00074 //   #include <iostream>               // for std::ostream
00075
00076 #include <windows.h>            // for types and API calls
00077
00078 #include <iosfwd>               // for std::ostream
00079 #include <string>               // for std::string
00080 #include <vector>               // for std::vector
00081 #include <utility>              // for std::pair
00082
00083 #include "wregistry-rki.h"      // for TRegKeyIterator<>
00084 #include "wrefcount.h"          // for TReferenceCounted[Resource]<>
00085 #include "wexception.h"         // for WindowsUtils::Win32Exception
00086
00087 /* *
00088  * namespace: WindowsUtils
00089  */
00090
00091 namespace WindowsUtils {
00092
00099 /*
00100  * classes and templates from other files:
00101  */
00102
00103 /*
00104  * classes and templates defined in this file:
00105  */
00106
00107 class RegistryKey;
00108
00113 class RegistryKey
00114 {
00115 private:
00116    class SubkeyIteratorImpl;
00117    class ValueIteratorImpl;
00118    class InsertIteratorImpl;
00119
00120 public:
00121    class Exception;
00122
00123    class Subkey;
00124    class Value;
00125    class ValueInterface;
00126    class CountedValue;
00127    class IntegralValue;
00128    class BinaryValue;
00129    class StringValue;
00130    class ValueBuffer;
00131
00136    typedef std::vector<BYTE> ByteBuffer;
00137
00142    typedef TRegKeyIterator<SubkeyIteratorImpl> SubkeyIterator;
00143
00148    typedef TRegKeyIterator<ValueIteratorImpl> ValueIterator;
00149
00154    typedef InsertIteratorImpl InsertIterator;
00155
00156    /*
00157     * construction and destruction:
00158     */
00159
00160    explicit RegistryKey(
00161       HKEY hKey );
00162
00163    RegistryKey(
00164       const std::string& aComputerName,
00165       HKEY               ahKey );
00166
00167    RegistryKey(
00168       HKEY               ahKey,
00169       const std::string& aSubkey,
00170       REGSAM             aSamDesired = KEY_READ,
00171       const std::string& aComputerName = "" );
00172
00173    RegistryKey( const RegistryKey& rhs );
00174
00175    ~RegistryKey();
00176
00177    /*
00178     * assignment:
00179     */
00180
00181    RegistryKey& operator= ( const RegistryKey& rhs );
00182    RegistryKey& operator= ( HKEY  ahKey );
00183
00184    RegistryKey& operator= ( const Subkey& rhs );
00185    RegistryKey& operator= ( const Value& rhs );
00186
00187    RegistryKey&   assign  ( const RegistryKey& rhs );
00188    RegistryKey&   assign  ( HKEY  ahKey );
00189
00190    RegistryKey&   insert  ( const Subkey& rhs );
00191    RegistryKey&   insert  ( const Value& rhs );
00192
00193    template <typename OutputIterator>
00194    OutputIterator   copy  ( OutputIterator result, bool deep = false ) const;
00195
00196    template <>
00197    InsertIterator   copy  ( InsertIterator result, bool deep /* = false */ ) const;
00198
00199    InsertIterator   copy  ( RegistryKey& tokey, bool deep = false ) const;
00200
00201    template <typename UnaryOp>
00202    UnaryOp      for_each  ( UnaryOp op, bool deep = false ) const;
00203
00204    /*
00205     * registry API:
00206     */
00207
00208    RegistryKey  connectRegistry(
00209       std::string           aComputerName ) const;
00210
00211    RegistryKey  openKey(
00212       const std::string&    aSubkey,
00213       REGSAM                aSamDesired = KEY_READ ) const;
00214
00215    RegistryKey  createKey(
00216       const std::string&    aSubkey,
00217       const std::string&    aClass = "",
00218       DWORD                 aOptions = REG_OPTION_NON_VOLATILE,
00219       REGSAM                aSamDesired = KEY_ALL_ACCESS,
00220       LPSECURITY_ATTRIBUTES apSecurityAttributes = NULL ) const;
00221
00222    RegistryKey  createOrOpenKey(
00223       const std::string&    aSubkey,
00224       DWORD*                apDisposition = NULL,
00225       const std::string&    aClass = "",
00226       DWORD                 aOptions = REG_OPTION_NON_VOLATILE,
00227       REGSAM                aSamDesired = KEY_ALL_ACCESS,
00228       LPSECURITY_ATTRIBUTES apSecurityAttributes = NULL ) const;
00229
00230    void deleteKey(
00231       const std::string&    aSubkey ) const;
00232
00233    void deleteKeyAndSubkeys(
00234       const std::string&    aSubkey ) const;
00235
00236    bool hasSubkey(
00237       const std::string&    aSubkey,
00238       REGSAM                aSamDesired = KEY_READ ) const;
00239
00240    void loadKey(
00241       std::string           aSubkeyName,
00242       std::string           aFilename ) const;
00243
00244    void unloadKey(
00245       std::string           aSubkeyName ) const;
00246
00247    void saveKey(
00248       std::string           aFilename,
00249       LPSECURITY_ATTRIBUTES aSecurityAttributes = NULL ) const;
00250
00251    void restoreKey(
00252       std::string           aFilename,
00253       DWORD                 aFlags = 0 ) const;
00254
00255    void replaceKey(
00256       std::string           aNewFilename,
00257       std::string           aBupFilename,
00258       std::string           aSubkeyName = "" ) const;
00259
00260    ByteBuffer getKeySecurity(
00261       SECURITY_INFORMATION  aSecurityInformation ) const;
00262
00263    void setKeySecurity(
00264       SECURITY_INFORMATION  aSecurityInformation,
00265       const ByteBuffer&     aSecurityDescriptor ) const;
00266
00267    void notifyChangeKeyValue(
00268       HANDLE ahEvent,
00269       bool                  aAndSubkeys = false,
00270       DWORD                 aNotifyFilter = REG_NOTIFY_CHANGE_LAST_SET ) const;
00271
00272    void notifyChangeKeyValue(
00273       bool                  aAndSubkeys = false,
00274       DWORD                 aNotifyFilter = REG_NOTIFY_CHANGE_LAST_SET ) const;
00275
00276    void      flushKey() const;
00277
00278    operator     HKEY () const;
00279
00280    /*
00281     * subkeys:
00282     */
00283
00284    template <typename UnaryPredicate>
00285    SubkeyIterator find_subkey( UnaryPredicate op, bool deep = false ) const;
00286
00287    SubkeyIterator find_subkey( std::string aSubkeyName, bool deep = false ) const;
00288
00289    SubkeyIterator beginSubkeyIteration() const;
00290    SubkeyIterator endSubkeyIteration  () const;
00291
00292    /*
00293     * values:
00294     */
00295
00296    void          deleteValue( const std::string& aValueName ) const;
00297    void          setValue   ( const Value&       aValue     ) const;
00298
00299    Value         queryValue ( const std::string& aValueName ) const;
00300
00301    template <typename UnaryPredicate>
00302    std::pair<RegistryKey, ValueIterator> find_value( UnaryPredicate op, bool deep = false ) const;
00303
00304    std::pair<RegistryKey, ValueIterator> find_value( std::string aValueName, bool deep = false ) const;
00305
00306    ValueIterator beginValueIteration() const;
00307    ValueIterator endValueIteration  () const;
00308
00309    /*
00310     * insert iterator:
00311     */
00312
00313    InsertIterator beginInsertIteration();
00314
00315 private:
00316    static CCountedRegKey* NewCountedKey( HKEY ahKey, bool abCloseKeyOnFailure = false );
00317
00318    CCountedRegKey* ipKey;
00319 };
00320
00326 class RegistryKey::Exception : public Win32Exception
00327 {
00328 public:
00329    Exception( const std::string& aWhere, LONG aError );
00330 };
00331
00336 class RegistryKey::Subkey
00337 {
00338 public:
00339    friend class SubkeyIteratorImpl;     // needs access to instance variables
00340
00341    Subkey( const std::string& aName = "", const std::string& aClass = "" );
00342
00343    Subkey( const Subkey& rhs );
00344
00345    Subkey& operator= ( const Subkey& rhs );
00346
00347    std::string name () const;
00348    std::string klass() const;
00349
00350    std::string operator *() const;
00351
00352    std::ostream& printOn( std::ostream& strm ) const;
00353
00354 private:
00355    std::string iName;
00356    std::string iClass;
00357 };
00358
00363 class RegistryKey::ValueInterface
00364 {
00365 public:
00366    virtual operator    DWORD      () const = 0;
00367    virtual operator    ByteBuffer () const = 0;
00368    virtual operator    std::string() const = 0;
00369
00370    virtual BYTE        operator[] ( int index ) const = 0;
00371
00372    virtual std::string toString   () const = 0;
00373
00374    virtual std::string name       () const = 0;
00375    virtual DWORD       type       () const = 0;
00376 };
00377
00382 class RegistryKey::Value : public RegistryKey::ValueInterface
00383 {
00384 public:
00385   ~Value();
00386
00387    Value( const std::string& aName, DWORD aWord );
00388    Value( const std::string& aName, const std::string& aString );
00389    Value( const std::string& aName, const ByteBuffer& aBuffer );
00390
00391    Value( DWORD adwType, const std::string& aName, const ByteBuffer& aBuffer );
00392
00393    Value( const Value& rhs );
00394
00395    Value& operator= ( const Value& rhs );
00396
00397    operator      DWORD      () const;
00398    operator      ByteBuffer () const;
00399    operator      std::string() const;
00400
00401    BYTE          operator[] ( int index ) const;
00402
00403    std::string   toString   () const;
00404
00405    std::string   name       () const;
00406    DWORD         type       () const;
00407
00408    std::ostream& printOn( std::ostream& strm ) const;
00409
00410 private:
00411    class CountedValue *iValue;
00412 };
00413
00418 class RegistryKey::CountedValue : public RegistryKey::ValueInterface,
00419                                       public TReferenceCounted<RegistryKey::CountedValue>
00420 {
00421 public:
00422    class Exception;
00423
00424    CountedValue( DWORD adwType, const std::string& aName );
00425
00426    operator    DWORD      () const;
00427    operator    ByteBuffer () const;
00428    operator    std::string() const;
00429
00430    BYTE        operator[] ( int index ) const;
00431
00432    std::string toString   () const = 0;
00433
00434    std::string name       () const;
00435    DWORD       type       () const;
00436
00437 protected:
00438    ~CountedValue() { ; }
00439
00440 private:
00441    DWORD       idwType;
00442    std::string iName;
00443 };
00444
00450 class RegistryKey::CountedValue::Exception : public std::logic_error
00451 {
00452 public:
00453    Exception( const std::string& s );
00454 };
00455
00460 class RegistryKey::IntegralValue : public RegistryKey::CountedValue
00461 {
00462 public:
00463    IntegralValue( DWORD adwType, const std::string& aName, DWORD aWord );
00464    IntegralValue( DWORD adwType, const std::string& aName, const ByteBuffer& aBuffer );
00465
00466    operator DWORD() const;
00467
00468    std::string toString() const;
00469
00470 private:
00471    DWORD idwValue;
00472 };
00473
00478 class RegistryKey::BinaryValue : public RegistryKey::CountedValue
00479 {
00480 public:
00481    BinaryValue( DWORD adwType, const std::string& aName, const ByteBuffer& aBuffer );
00482
00483    operator ByteBuffer() const;
00484
00485    BYTE  operator[] ( int index ) const;
00486
00487    std::string toString() const;
00488
00489 private:
00490    ByteBuffer          iBuffer;
00491    mutable std::string iCache;
00492 };
00493
00498 class RegistryKey::StringValue : public RegistryKey::CountedValue
00499 {
00500 public:
00501    StringValue( DWORD adwType, const std::string& aName, const std::string& aString );
00502    StringValue( DWORD adwType, const std::string& aName, const ByteBuffer& aBuffer  );
00503
00504    std::string toString() const;
00505
00506 private:
00507    std::string iString;
00508 };
00509
00514 class RegistryKey::ValueBuffer
00515 {
00516 public:
00517    ValueBuffer( const Value& rhs );
00518    ByteBuffer  buffer;
00519 };
00520
00525 class RegistryKey::SubkeyIteratorImpl : public CRegKeyIterator,
00526                                         public std::iterator<std::input_iterator_tag, Subkey>
00527 {
00528 public:
00529    RegistryKey openKey( REGSAM aSamDesired = KEY_READ ) const;
00530
00531    std::string name () const;
00532    std::string klass() const;
00533
00534    reference   operator *();
00535    pointer     operator->();
00536
00537 protected:
00538    SubkeyIteratorImpl( CCountedRegKey* apKey );
00539
00540    bool    getItem();
00541    bool    operator== ( const SubkeyIteratorImpl& rhs ) const;
00542
00543 private:
00544    Subkey subkey;
00545 };
00546
00551 class RegistryKey::ValueIteratorImpl : public CRegKeyIterator,
00552                                        public std::iterator<std::input_iterator_tag, Value>
00553 {
00554 public:
00555    std::string  name    () const;
00556    DWORD        type    () const;
00557    std::string  toString() const;
00558
00559    operator  value_type () const;
00560    value_type operator *() const;
00561
00562 //   reference  operator *() ;
00563 //   pointer    operator->() ;
00564
00565 protected:
00566    ValueIteratorImpl( CCountedRegKey* apKey );
00567
00568    bool     getItem();
00569    bool     operator== ( const ValueIteratorImpl& rhs ) const;
00570
00571 private:
00572    std::string         iName;
00573    ByteBuffer          iBuffer;
00574    DWORD               idwType;
00575 };
00576
00581 class RegistryKey::InsertIteratorImpl : public std::iterator<std::output_iterator_tag,void,void,void,void>
00582 {
00583 public:
00584    friend class RegistryKey;            // must be able to construct iterator
00585
00586    InsertIteratorImpl& operator*  ();
00587
00588    InsertIteratorImpl& operator++ (     );
00589    InsertIteratorImpl  operator++ ( int );
00590
00591    InsertIteratorImpl& operator=  ( const Value& rhs );
00592    InsertIteratorImpl& operator=  ( const Subkey& rhs );
00593
00594    RegistryKey openKey() const;
00595
00596 protected:
00597    InsertIteratorImpl( RegistryKey& aKey );
00598
00599 private:
00600    RegistryKey iKey;
00601    Subkey      iSubkey;
00602 };
00603
00606 /*************************************************************************
00607 ** inline convenience functions (before)
00608 **************************************************************************
00609 */
00610
00615 template<>
00616 RegistryKey::InsertIterator inserter( RegistryKey c )
00617 {
00618    return c.beginInsertIteration();
00619 }
00620
00621 /*************************************************************************
00622 ** class RegistryKey inline implementation
00623 **************************************************************************
00624 */
00625
00630 inline RegistryKey& RegistryKey::operator=( const RegistryKey& rhs )
00631 {
00632    return assign( rhs );
00633 }
00634
00639 inline RegistryKey& RegistryKey::operator=( HKEY ahKey )
00640 {
00641    return assign( ahKey );
00642 }
00643
00648 inline RegistryKey& RegistryKey::operator= ( const Subkey& rhs )
00649 {
00650    return insert( rhs );
00651 }
00652
00657 inline RegistryKey& RegistryKey::operator= ( const Value& rhs )
00658 {
00659    return insert( rhs );
00660 }
00661
00666 inline RegistryKey::SubkeyIterator RegistryKey::beginSubkeyIteration() const
00667 {
00668    return SubkeyIterator( ipKey );
00669 }
00670
00675 inline RegistryKey::SubkeyIterator RegistryKey::endSubkeyIteration() const
00676 {
00677    return SubkeyIterator( 0 );
00678 }
00679
00684 inline RegistryKey::ValueIterator RegistryKey::beginValueIteration() const
00685 {
00686    return ValueIterator( ipKey );
00687 }
00688
00693 inline RegistryKey::ValueIterator RegistryKey::endValueIteration() const
00694 {
00695    return ValueIterator( 0 );
00696 }
00697
00702 inline RegistryKey::InsertIterator RegistryKey::beginInsertIteration()
00703 {
00704    return InsertIterator( *this );
00705 }
00706
00722 template <typename OutputIterator>
00723 OutputIterator RegistryKey::copy( OutputIterator result, bool deep /* = false */ ) const
00724 {
00725    /*
00726     * (deep) copy keys:
00727     */
00728
00729    for ( SubkeyIterator pos  = beginSubkeyIteration();
00730                         pos != endSubkeyIteration(); ++pos, ++result )
00731    {
00732       *result = *pos;           // copy (create) subkey
00733
00734       if ( deep )               // copy subkey's contents
00735       {
00736          pos.openKey().copy( result, deep );
00737       }
00738    }
00739
00740    // copy (create) values:
00741
00742    std::copy( beginValueIteration(), endValueIteration(), result );
00743
00744    return result;
00745 }
00746
00762 template <>
00763 RegistryKey::InsertIterator RegistryKey::copy( InsertIterator result, bool deep /* = false */ ) const
00764 {
00765    /*
00766     * (recursively) copy keys:
00767     */
00768
00769    for ( SubkeyIterator pos  = beginSubkeyIteration();
00770                         pos != endSubkeyIteration(); ++pos, ++result )
00771    {
00772       *result = *pos;           // copy (create) subkey
00773
00774       if ( deep )               // copy subkey's contents
00775       {
00776          pos.openKey().copy( inserter( result.openKey() ), deep );
00777       }
00778    }
00779
00780    // copy (create) values:
00781
00782    std::copy( beginValueIteration(), endValueIteration(), result );
00783
00784    return result;
00785 }
00786
00791 inline RegistryKey::InsertIterator RegistryKey::copy( RegistryKey& tokey, bool deep /* = false */ ) const
00792 {
00793    return copy( inserter( tokey ), deep );
00794 }
00795
00811 template <typename UnaryOp>
00812 UnaryOp RegistryKey::for_each( UnaryOp op, bool deep /* = false */ ) const
00813 {
00814    // (recursively) visit this key's subkeys:
00815
00816    for ( SubkeyIterator pos  = beginSubkeyIteration(); pos != endSubkeyIteration(); ++pos )
00817    {
00818       op( *pos );       // visit this subkey
00819
00820       if ( deep )       // visit subkey's contents
00821       {
00822          ++op;
00823          pos.openKey().for_each( op, deep );
00824          --op;
00825       }
00826    }
00827
00828    // visit this key's values:
00829
00830    std::for_each( beginValueIteration(), endValueIteration(), op );
00831
00832    return op;
00833 }
00834
00847 template <typename UnaryPredicate>
00848 RegistryKey::SubkeyIterator RegistryKey::find_subkey( UnaryPredicate op, bool deep /* = false */ ) const
00849 {
00850    for ( SubkeyIterator pos = beginSubkeyIteration(); pos != endSubkeyIteration(); ++pos )
00851    {
00852       if ( op( *pos ) )
00853          return pos;
00854
00855       if ( deep )
00856       {
00857          SubkeyIterator pos2 = pos.openKey().find_subkey( op, deep );
00858
00859          if ( pos2 != endSubkeyIteration() )
00860             return pos2;
00861       }
00862    }
00863
00864    return endSubkeyIteration();
00865 }
00866
00883 template <typename UnaryPredicate>
00884 std::pair<RegistryKey, RegistryKey::ValueIterator> RegistryKey::find_value( UnaryPredicate op, bool deep /* = false */ ) const
00885 {
00886    // visit this key's values:
00887
00888    RegistryKey::ValueIterator pos = std::find_if( beginValueIteration(), endValueIteration(), op );
00889
00890    if ( pos != endValueIteration() )
00891    {
00892       return std::make_pair( *this, pos );
00893    }
00894
00895    if ( deep )
00896    {
00897       // (recursively) visit this key's subkeys:
00898
00899       for ( SubkeyIterator pos = beginSubkeyIteration(); pos != endSubkeyIteration(); ++pos )
00900       {
00901          // visit this subkey
00902
00903          std::pair<RegistryKey, ValueIterator> pair = pos.openKey().find_value( op, deep );
00904
00905          if ( pair.second != endValueIteration() )
00906          {
00907             return pair;
00908          }
00909       }
00910    }
00911
00912    // not found:
00913
00914    return std::make_pair( *this, endValueIteration() );
00915 }
00916
00917 /*************************************************************************
00918 ** class RegistryKey[::CountedValue]::Exception inline implementation
00919 **************************************************************************
00920 */
00921
00926 inline RegistryKey::Exception::Exception( const std::string& aWhere, LONG aError ):
00927    Win32Exception( aWhere, static_cast<DWORD>(aError) )
00928 {
00929 }
00930
00935 inline RegistryKey::CountedValue::Exception::Exception( const std::string& s ):
00936    std::logic_error( s.c_str() )
00937 {
00938 }
00939
00940 /*************************************************************************
00941 ** class RegistryKey::Subkey inline implementation
00942 **************************************************************************
00943 */
00944
00949 inline RegistryKey::Subkey::Subkey( const std::string& aName, const std::string& aClass ) :
00950    iName(aName), iClass(aClass)
00951 {
00952 }
00953
00958 inline RegistryKey::Subkey::Subkey( const Subkey& rhs ) :
00959    iName( rhs.iName ), iClass( rhs.iClass )
00960 {
00961 }
00962
00967 inline RegistryKey::Subkey& RegistryKey::Subkey::operator= ( const Subkey& rhs )
00968 {
00969    if ( this != &rhs )
00970    {
00971       iName  = rhs.iName;
00972       iClass = rhs.iClass;
00973    }
00974
00975    return *this;
00976 }
00977
00982 inline std::string RegistryKey::Subkey::name () const
00983 {
00984    return iName;
00985 }
00986
00991 inline std::string RegistryKey::Subkey::klass() const
00992 {
00993    return iClass;
00994 }
00995
01000 inline std::string RegistryKey::Subkey::operator *() const
01001 {
01002    return name();
01003 }
01004
01009 inline std::ostream& RegistryKey::Subkey::printOn( std::ostream& strm ) const
01010 {
01011    int oldwidth = strm.width( 0 );
01012    strm <<  name() << " (" << klass() << ")";
01013    strm.width( oldwidth );
01014    return strm;
01015 }
01016
01017 /*************************************************************************
01018 ** class RegistryKey::SubkeyIteratorImpl inline implementation
01019 **************************************************************************
01020 */
01021
01026 inline std::string RegistryKey::SubkeyIteratorImpl::name() const
01027 {
01028    return subkey.name();
01029 }
01030
01035 inline std::string RegistryKey::SubkeyIteratorImpl::klass() const
01036 {
01037    return subkey.klass();
01038 }
01039
01044 inline bool RegistryKey::SubkeyIteratorImpl::operator==(const SubkeyIteratorImpl &rhs) const
01045 {
01046    return CRegKeyIterator::operator==( rhs );
01047 }
01048
01053 inline RegistryKey::Subkey& RegistryKey::SubkeyIteratorImpl::operator *()
01054 {
01055    return subkey;
01056 }
01057
01062 inline RegistryKey::Subkey* RegistryKey::SubkeyIteratorImpl::operator->()
01063 {
01064    return &subkey;
01065 }
01066
01067 /*************************************************************************
01068 ** class RegistryKey::ValueIteratorImpl inline implementation
01069 **************************************************************************
01070 */
01071
01076 inline std::string RegistryKey::ValueIteratorImpl::name() const
01077 {
01078    return iName;
01079 }
01080
01085 inline DWORD RegistryKey::ValueIteratorImpl::type() const
01086 {
01087    return idwType;
01088 }
01089
01094 inline bool RegistryKey::ValueIteratorImpl::operator==( const ValueIteratorImpl &rhs ) const
01095 {
01096    return CRegKeyIterator::operator==( rhs );
01097 }
01098
01103 inline RegistryKey::ValueIteratorImpl::operator RegistryKey::Value() const
01104 {
01105    return Value( idwType, iName, iBuffer );
01106 }
01107
01112 inline RegistryKey::Value RegistryKey::ValueIteratorImpl::operator *() const
01113 {
01114    return this->operator Value();
01115 }
01116
01121 /*
01122 inline RegistryKey::Subkey* RegistryKey::SubkeyIteratorImpl::operator->()
01123 {
01124    return &subkey;
01125 }
01126 */
01127
01128 /*************************************************************************
01129 ** class RegistryKey::InsertIteratorImpl inline implementation
01130 **************************************************************************
01131 */
01132
01137 RegistryKey::InsertIteratorImpl& RegistryKey::InsertIteratorImpl::operator*()
01138 {
01139    return *this;
01140 }
01141
01146 RegistryKey::InsertIteratorImpl& RegistryKey::InsertIteratorImpl::operator++()
01147 {
01148    return *this;
01149 }
01150
01155 RegistryKey::InsertIteratorImpl  RegistryKey::InsertIteratorImpl::operator++( int )
01156 {
01157    return *this;
01158 }
01159
01160 /*************************************************************************
01161 ** class RegistryKey::Value inline implementation
01162 **************************************************************************
01163 */
01164
01169 inline RegistryKey::Value::~Value()
01170 {
01171    iValue->release();
01172 }
01173
01178 inline RegistryKey::Value::Value( const Value& rhs ):
01179    iValue( rhs.iValue->addRef() )
01180 {
01181 }
01182
01187 inline std::ostream& RegistryKey::Value::printOn( std::ostream& strm ) const
01188 {
01189    int oldwidth = strm.width( 0 );
01190    strm <<  name() << " = '" << toString() << "'";
01191    strm.width( oldwidth );
01192    return strm;
01193 }
01194
01195 /*************************************************************************
01196 ** inline convenience functions (after)
01197 **************************************************************************
01198 */
01199
01200 /*
01201  * no more
01202  */
01203
01204 } // end namespace WindowsUtils
01205
01206 /*************************************************************************
01207 ** Global namespace inline convenience functions
01208 **************************************************************************
01209 */
01210
01215 inline std::ostream& operator<< ( std::ostream& strm, const WindowsUtils::RegistryKey::Subkey& k )
01216 {
01217    return k.printOn( strm );
01218 }
01219
01224 inline std::ostream& operator<< ( std::ostream& strm, const WindowsUtils::RegistryKey::Value& v )
01225 {
01226    return v.printOn( strm );
01227 }
01228
01229 #endif // __WREGISTRY__H
01230
01231 /*
01232  * end of file
01233  */
01234
Generated on Tue Sep 30 11:40:34 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: wsemaphore.h Source File

wsemaphore.h

00001 /*
00002  * wsemaphore.h - Windows utility functions.
00003  *
00004  * This file is part of WindowsUtils.
00005  *
00006  * Copyright (C) 2003, Leiden University.
00007  * WindowsUtils is free software, see below.
00008  *
00009  * $Revision: $
00010  * $Date: $
00011  * $Source: $
00012  * %Author: Martin J. Moene %
00013  *
00014  * Compiler        : Borland-C++ 5.5.1
00015  * Operating system: 32-bit Windows
00016  * Hardware system : PC
00017  *
00018  * WindowsUtils is free software; you can redistribute it and/or modify
00019  * it under the terms of the GNU General Public License as published by
00020  * the Free Software Foundation; either version 2 of the License, or
00021  * (at your option) any later version.
00022  *
00023  * WindowsUtils is distributed in the hope that it will be useful,
00024  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00025  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00026  * GNU General Public License for more details.
00027  *
00028  * You should have received a copy of the GNU General Public License
00029  * along with mngdriver; if not, write to the Free Software
00030  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00031  */
00032
00052 #ifndef __WSEMAPHORE_H
00053 #define __WSEMAPHORE_H
00054
00055 /*
00056  * Windows utilities.
00057  */
00058
00059 namespace WindowsUtils {
00060
00068 //-----------------------------------------------------------------------------
00069
00077 class Semaphore
00078 {
00079 public:
00120    Semaphore ( const char * const inName = 0
00121              , const unsigned long inInitialCount = 0
00122              , const unsigned long inMaximumCount = 0
00123              );
00124
00133    ~Semaphore ();
00134
00143    Semaphore & post (const unsigned long inPostCount = 1);
00144
00153    Semaphore & wait (const unsigned long inTimeout = 0);
00154
00159    unsigned long maxCount() const { return theMaxCount; }
00160
00161 protected:
00162
00163 private:
00164
00166
00170    Semaphore (const Semaphore & );
00171    Semaphore & operator = (const Semaphore &);
00173
00174    unsigned theSemaphoreHandle;
00175    unsigned long theMaxCount;
00176
00177 }; // end Semaphore class declaration
00178
00181 } // namespace WindowsUtils
00182
00183 #endif // __WSEMAPHORE_H
00184
00185 /*
00186  * end of file
00187  */
00188
00189
Generated on Tue Sep 30 11:40:35 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: wshutdown.h Source File

wshutdown.h

00001 /*
00002  * wshutdown.h - Windows shutdown utilities.
00003  *
00004  * This file is part of WindowsUtils.
00005  *
00006  * Copyright (C) 2003, Leiden University.
00007  * WindowsUtils is free software, see below.
00008  *
00009  * $Revision: $
00010  * $Date: $
00011  * $Source: $
00012  * %Author: Martin J. Moene %
00013  *
00014  * Compiler        : Borland-C++ 5.5.1
00015  * Operating system: 32-bit Windows
00016  * Hardware system : PC
00017  *
00018  * WindowsUtils is free software; you can redistribute it and/or modify
00019  * it under the terms of the GNU General Public License as published by
00020  * the Free Software Foundation; either version 2 of the License, or
00021  * (at your option) any later version.
00022  *
00023  * WindowsUtils is distributed in the hope that it will be useful,
00024  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00025  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00026  * GNU General Public License for more details.
00027  *
00028  * You should have received a copy of the GNU General Public License
00029  * along with mngdriver; if not, write to the Free Software
00030  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00031  */
00032
00033 #ifndef __WSHUTDOWN_H
00034 #define __WSHUTDOWN_H
00035
00036 #include <windows.h>            // for types and EWX_...
00037
00038 /*
00039  * Windows utilities.
00040  */
00041
00042 namespace WindowsUtils {
00043
00051 void   localShutdown    ( UINT inShutdownMode );
00052 void   remoteShutdown   ( bool inReboot, const char *inMachine, const char *inMessage, int inTimeout );
00053 void   abortShutdown    ( const char *inMachine );
00054
00055 inline void reboot   () { localShutdown( EWX_REBOOT );   }
00056 inline void shutdown () { localShutdown( EWX_SHUTDOWN ); }
00057 inline void logoff   () { localShutdown( EWX_LOGOFF );   }
00058 inline void poweroff () { localShutdown( EWX_POWEROFF ); }
00059
00060 void   setWorkingSetSize( int inMinPages, int inMaxPages );
00061
00064 } // namespace WindowsUtils
00065
00066 #endif // __WSHUTDOWN_H
00067
00068 /*
00069  * end of file
00070  */
00071
Generated on Tue Sep 30 11:40:35 2003 for Windows Utilities by doxygen 1.3.4


Windows Utilities: wversion.h Source File

wversion.h

00001 /*
00002  * wversion.h - Windows version utilities.
00003  *
00004  * This file is part of WindowsUtils.
00005  *
00006  * Copyright (C) 2003, Leiden University.
00007  * WindowsUtils is free software, see below.
00008  *
00009  * $Revision: $
00010  * $Date: $
00011  * $Source: $
00012  * %Author: Martin J. Moene %
00013  *
00014  * Compiler        : Borland-C++ 5.5.1
00015  * Operating system: 32-bit Windows
00016  * Hardware system : PC
00017  *
00018  * WindowsUtils is free software; you can redistribute it and/or modify
00019  * it under the terms of the GNU General Public License as published by
00020  * the Free Software Foundation; either version 2 of the License, or
00021  * (at your option) any later version.
00022  *
00023  * WindowsUtils is distributed in the hope that it will be useful,
00024  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00025  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00026  * GNU General Public License for more details.
00027  *
00028  * You should have received a copy of the GNU General Public License
00029  * along with mngdriver; if not, write to the Free Software
00030  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00031  */
00032
00033 #ifndef __WVERSION_H
00034 #define __WVERSION_H
00035
00036 #include <windows.h>    // for DWORD etc.
00037
00038 /* *
00039  * namespace: WindowsUtils
00040  */
00041
00042 namespace WindowsUtils {
00043
00056 enum OSver { None, Win95, Win98, WinME, WinNT3, WinNT4, Win2000, WinXP, WinCE, };
00057
00058 bool  isWinNtPlatform();      // true if running on Windows NT type OS (Windows NT/2000/XP)
00059 bool  isWin95Platform();      // true if running on Windows 95 type OS (Windows 95/98/Me)
00060
00061 OSver  getWindowsVersion();   // return Windows version; see #OSver
00062
00063 inline bool isWin95  () { return Win95   == getWindowsVersion(); }
00064 inline bool isWin98  () { return Win98   == getWindowsVersion(); }
00065 inline bool isWinME  () { return WinME   == getWindowsVersion(); }
00066 inline bool isWinNT3 () { return WinNT3  == getWindowsVersion(); }
00067 inline bool isWinNT4 () { return WinNT4  == getWindowsVersion(); }
00068 inline bool isWin2000() { return Win2000 == getWindowsVersion(); }
00069 inline bool isWinXP  () { return WinXP   == getWindowsVersion(); }
00070
00071 // obtain Windows version information; arguments may be NULL.
00072
00073 void getWindowsVersionInfo( DWORD *pdwPlatformId, DWORD *pdwMajorVersion, DWORD *pdwMinorVersion, DWORD *pdwBuildNumber );
00074
00077 } // namespace WindowsUtils
00078
00079 #endif // __WVERSION_H
00080
00081 /*
00082  * end of file
00083  */
00084
Generated on Tue Sep 30 11:40:35 2003 for Windows Utilities by doxygen 1.3.4