Windows C++ Library
Classes | Typedefs | Functions | Variables
WCL Namespace Reference

The Windows C++ Library namespace. More...

Classes

class  AppConfig
 The facade used for reading and writing application settings. More...
class  AutoCom
 An RAII style class for initialising and uninitialising COM. More...
class  ComException
 The exception type thrown for COM errors. More...
class  ComPtr
 A smart-pointer type for use with COM objects and interfaces. More...
class  ComStr
 An RAII class for managing COM strings, aka a BSTR. More...
class  ConsoleApp
 The base class for Console type applications. More...
class  FolderIterator
 An iterator for enumerating the file and directory names in a filesystem folder. More...
class  IConfigProvider
 The interface for providers that store application settings. More...
class  IFacePtr
 A smart-pointer type for use with COM interfaces. More...
struct  IFaceTraits
 Interface traits used to workaround compilers which do not support the __uuidof() extension. More...
class  IInputStream
 The interface implemented by streams that support reading. More...
class  IniFileCfgProvider
 The config data provider that uses an .ini file for storage. More...
class  IOutputStream
 The interface implemented by streams that support writing. More...
class  IStreamBase
 The base interface for the IInputStream and IOutputStream interfaces. More...
class  RegistryCfgProvider
 The config data provider that uses the Registry for storage. More...
class  RegistryException
 The exception type thrown by the RegKey class. More...
class  RegKey
 The class used to read and write from the loca Registry. More...
class  SeTranslator
 The RAII style class used to install and uninstall the Structured Exception translator function. More...
class  StructuredException
 The type of exception thrown when a Win32 structured exception occurs. More...
class  TraceLogger
 The logger used to write CRT output message to a file. More...
class  TreeView
 The TreeView common control. More...
class  Variant
 A wrapper facade for the VARIANT type. More...
class  VariantVector
 A Wrapper Facade for a 1-dimension SAFEARRAY. More...
class  VerInfoReader
 A reader for the Version Information embeded inside the resources of an .exe or .dll. More...
class  Win32Exception
 The base class for all exception types that are the result of Win32 API calls. More...

Typedefs

typedef Core::SharedPtr
< IConfigProvider
IConfigProviderPtr
 The default IConfigProvider smart-pointer type.
typedef time_t Seconds
 GMT based time_t used internally.
typedef time_t Days
 Count of days.
typedef unsigned __int64 StreamPos
 The position within a stream.
typedef UINT TimerID
 The ID of a timer.
typedef WORD KeyCode
 The virtual code or character code of a key.
typedef DWORD KeyState
 The full state of a virtual key.
typedef uint KeyFlags
 The virtual key flags defined by the MK_* constants.
typedef int ResizeFlags
 The resize flags defined by the SIZE_* constants.
typedef uint ScrollbarFlags
 The scrollbar flags defined by the SB_* constants.
typedef UINT ControlID
 The ID of a child control.
typedef BOOL DlgResult
 The result type of a DLGPROC.

Functions

BSTR * AttachTo (ComStr &bstr)
 Helper function to gain access to the internal member so that it can be passed as an output parameter, without overloading the & operator.
void ReportUnhandledException (const tchar *pszMsg,...)
 Report an unhandled exception.
bool operator== (const FolderIterator &LHS, const FolderIterator &RHS)
 Global equivalence operator for a folder iterator.
bool operator!= (const FolderIterator &LHS, const FolderIterator &RHS)
 Global non-equivalence operator for a folder iterator.
template<typename T >
T ** AttachTo (IFacePtr< T > &ptr)
 Helper function to gain access to the internal member so that it can be passed as an output parameter, without overloading the & operator.
template<typename I >
HRESULT QueryInterface (IUnknown *object, I **iface)
 Query the object for a new interface.
template<typename O , typename I >
HRESULT QueryInterface (IFacePtr< O > &object, IFacePtr< I > &iface)
 Query the object for a new interface.
const wchar_t * BstrToWide (const BSTR bstr)
 Convert a BSTR to a C-style wide character string.
template<>
tstring getValue (const Variant &value)
 Helper function to get the variant value as a tstring.
template<typename T >
getValue (const Variant &value)
 Helper function to get the variant value as a tstring.

Variables

static ConsoleAppg_this = NULL
 The singleton application object.
const Seconds SECS_PER_MIN = 60
const Seconds SECS_PER_HOUR = 60 * 60
const Seconds SECS_PER_DAY = 60 * 60 * 24

Detailed Description

The Windows C++ Library namespace.


Typedef Documentation

typedef Core::SharedPtr<IConfigProvider> WCL::IConfigProviderPtr

The default IConfigProvider smart-pointer type.

typedef time_t WCL::Seconds

GMT based time_t used internally.

typedef time_t WCL::Days

Count of days.

typedef unsigned __int64 WCL::StreamPos

The position within a stream.

typedef UINT WCL::TimerID

The ID of a timer.

typedef WORD WCL::KeyCode

The virtual code or character code of a key.

typedef DWORD WCL::KeyState

The full state of a virtual key.

typedef uint WCL::KeyFlags

The virtual key flags defined by the MK_* constants.

typedef int WCL::ResizeFlags

The resize flags defined by the SIZE_* constants.

typedef uint WCL::ScrollbarFlags

The scrollbar flags defined by the SB_* constants.

typedef UINT WCL::ControlID

The ID of a child control.

typedef BOOL WCL::DlgResult

The result type of a DLGPROC.


Function Documentation

BSTR * WCL::AttachTo ( ComStr &  bstr) [inline]

Helper function to gain access to the internal member so that it can be passed as an output parameter, without overloading the & operator.

The underlying COM string.

void WCL::ReportUnhandledException ( const tchar *  pszMsg,
  ... 
)

Report an unhandled exception.

This is called by all the outer try/catch blocks to report an unexpected exception.

bool WCL::operator== ( const FolderIterator &  LHS,
const FolderIterator &  RHS 
) [inline]

Global equivalence operator for a folder iterator.

bool WCL::operator!= ( const FolderIterator &  LHS,
const FolderIterator &  RHS 
) [inline]

Global non-equivalence operator for a folder iterator.

template<typename T >
T ** WCL::AttachTo ( IFacePtr< T > &  ptr) [inline]

Helper function to gain access to the internal member so that it can be passed as an output parameter, without overloading the & operator.

Allow attachment via an output parameter.

e.g. LoadTypeLib(..., AttachTo(p)).

template<typename I >
HRESULT WCL::QueryInterface ( IUnknown *  object,
I **  iface 
)

Query the object for a new interface.

template<typename O , typename I >
HRESULT WCL::QueryInterface ( IFacePtr< O > &  object,
IFacePtr< I > &  iface 
)

Query the object for a new interface.

const wchar_t* WCL::BstrToWide ( const BSTR  bstr) [inline]

Convert a BSTR to a C-style wide character string.

This functions adjusts for the behaviour where a BSTR can be NULL to represent an empty string.

template<>
uint64 WCL::getValue ( const Variant &  value)

Helper function to get the variant value as a tstring.

template<typename T >
T WCL::getValue ( const Variant &  value)

Helper function to get the variant value as a tstring.


Variable Documentation

ConsoleApp* WCL::g_this = NULL [static]

The singleton application object.

const Seconds WCL::SECS_PER_HOUR = 60 * 60
const Seconds WCL::SECS_PER_DAY = 60 * 60 * 24