OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
oleutil.h File Reference

Low level OLE Utility class definitions. More...

#include <owl/private/defs.h>
#include <ocf/defs.h>
#include <ocf/except.h>
#include <owl/pointer.h>
#include <owl/string.h>

Go to the source code of this file.

Classes

class  ocf::TOleAutoDll
 
class  ocf::TOleAllocator
 Object to initialize OLE and access memory manager. More...
 
class  ocf::TOleInit
 Simple wrapper of TOleAllocator used exclusively for initializing OLE. More...
 
class  ocf::TClassId
 GUID/IID/CLSID management. More...
 
class  ocf::TBaseClassId
 Base GUID for a components sequence of GUIDs. More...
 
class  ocf::TUnknown
 Standard implementation of a controlling IUnknown for an object, to be inherited with other COM interfaces into an implementation class whose IUnknown implementation delegates to TUnknown::Outer. More...
 

Namespaces

namespace  owl
 Object Windows Library (OWLNext Core)
 
namespace  ocf
 Object Component Framework (COM encapsulation)
 

Macros

#define _ICLASS   _OCFCLASS
 
#define _IFUNC   STDMETHODCALLTYPE
 
#define COMBASES_D(cls, bases)
 
#define COMQRY1BASES(i1)   public i1
 
#define COMQRY2BASES(i1, i2)   public i1, COMQRY1BASES(i2)
 
#define COMQRY3BASES(i1, i2, i3)   public i1, COMQRY2BASES(i2,i3)
 
#define COMQRY4BASES(i1, i2, i3, i4)   public i1, COMQRY3BASES(i2,i3,i4)
 
#define COMQRY5BASES(i1, i2, i3, i4, i5)   public i1, COMQRY4BASES(i2,i3,i4,i5)
 
#define DECLARE_COMBASES1(cls, i1)    COMBASES_D(cls,COMQRY1BASES(i1))
 
#define DECLARE_COMBASES2(cls, i1, i2)    COMBASES_D(cls,COMQRY2BASES(i1,i2))
 
#define DECLARE_COMBASES3(cls, i1, i2, i3)    COMBASES_D(cls,COMQRY3BASES(i1,i2,i3))
 
#define DECLARE_COMBASES4(cls, i1, i2, i3, i4)    COMBASES_D(cls,COMQRY4BASES(i1,i2,i3,i4))
 
#define DECLARE_COMBASES5(cls, i1, i2, i3, i4, i5)    COMBASES_D(cls,COMQRY5BASES(i1,i2,i3,i4,i5))
 
#define TUNKNOWN_STANDARD_IUNKNOWN_METHODS
 
#define IUNKNOWN_FORWARD(cls, outer)
 
#define COMBASES_I(cls, tests)
 
#define COMBASEQUERY(cls)    cls##_QueryInterface(this,iid,pif); if(*pif) return NOERROR;
 
#define COMQRY1TEST(i1)   COMBASEQUERY(i1)
 
#define COMQRY2TEST(i1, i2)   COMBASEQUERY(i1) COMQRY1TEST(i2)
 
#define COMQRY3TEST(i1, i2, i3)   COMBASEQUERY(i1) COMQRY2TEST(i2,i3)
 
#define COMQRY4TEST(i1, i2, i3, i4)   COMBASEQUERY(i1) COMQRY3TEST(i2,i3,i4)
 
#define COMQRY5TEST(i1, i2, i3, i4, i5)   COMBASEQUERY(i1) COMQRY3TEST(i2,i3,i4,i5)
 
#define DEFINE_COMBASES1(cls, i1)    COMBASES_I(cls,COMQRY1TEST(i1))
 
#define DEFINE_COMBASES2(cls, i1, i2)    COMBASES_I(cls,COMQRY2TEST(i1,i2))
 
#define DEFINE_COMBASES3(cls, i1, i2, i3)    COMBASES_I(cls,COMQRY3TEST(i1,i2,i3))
 
#define DEFINE_COMBASES4(cls, i1, i2, i3, i4)    COMBASES_I(cls,COMQRY4TEST(i1,i2,i3,i4))
 
#define DEFINE_COMBASES5(cls, i1, i2, i3, i4, i5)    COMBASES_I(cls,COMQRY5TEST(i1,i2,i3,i4,i5))
 
#define DEFINE_QI_BASE(cls, low)
 
#define DEFINE_QI_OLEBASE(cls, low)
 
#define DEFINE_QI_DERIVED(cls, base, low)
 
#define DEFINE_QI_OLEDERIVED(cls, base, low)
 
#define DEFINE_QI_DELEGATE(cls, member)
 
#define DEFINE_QI_DELEGATE_TEST(cls, member)
 
#define DEFINE_QI_MEMBER(name, member)
 
#define DEFINE_QI_MEMBER_TEST(name, member)
 
#define DEFINE_COMBASE_DELEGATE(cls, ifc, member)
 

Typedefs

typedef owl::TSysStr ocf::TBSTR
 BASIC global string encapsulation.
 
typedef TOleInit ocf::TOleStart
 

Functions

void ocf::OcHiMetricToPixel (const SIZEL &sizeHM, SIZEL &sizePix)
 
void ocf::OcPixelToHiMetric (const SIZEL &sizePix, SIZEL &sizeHM)
 
void ocf::CmpGuid12 (IUnknown *This, REFIID req, REFIID ref, void **pif)
 
void ocf::CmpGuidOle (IUnknown *This, REFIID req, void **pif)
 

Detailed Description

Low level OLE Utility class definitions.

Definition in file oleutil.h.

Macro Definition Documentation

◆ _ICLASS

#define _ICLASS   _OCFCLASS

Definition at line 25 of file oleutil.h.

◆ _IFUNC

#define _IFUNC   STDMETHODCALLTYPE

Definition at line 28 of file oleutil.h.

◆ COMBASEQUERY

#define COMBASEQUERY ( cls)     cls##_QueryInterface(this,iid,pif); if(*pif) return NOERROR;

Definition at line 419 of file oleutil.h.

◆ COMBASES_D

#define COMBASES_D ( cls,
bases )
Value:
class cls : public TUnknown, bases { \
protected: \
virtual HRESULT _IFUNC QueryInterface(const GUID & iid, void ** pif); \
virtual unsigned long _IFUNC AddRef(); \
virtual unsigned long _IFUNC Release(); \
virtual HRESULT QueryObject(const GUID & iid, void ** pif); \
HRESULT QueryBases(const GUID & iid, void ** pif) \
{return cls::QueryObject(iid, pif);} \
};
#define _IFUNC
Definition oleutil.h:28

Definition at line 367 of file oleutil.h.

◆ COMBASES_I

#define COMBASES_I ( cls,
tests )
Value:
HRESULT cls::QueryObject(const GUID & iid, void ** pif) \
#define IUNKNOWN_FORWARD(cls, outer)
Definition oleutil.h:408

Definition at line 414 of file oleutil.h.

◆ COMQRY1BASES

#define COMQRY1BASES ( i1)    public i1

Definition at line 378 of file oleutil.h.

◆ COMQRY1TEST

#define COMQRY1TEST ( i1)    COMBASEQUERY(i1)

Definition at line 422 of file oleutil.h.

◆ COMQRY2BASES

#define COMQRY2BASES ( i1,
i2 )   public i1, COMQRY1BASES(i2)

Definition at line 379 of file oleutil.h.

◆ COMQRY2TEST

#define COMQRY2TEST ( i1,
i2 )   COMBASEQUERY(i1) COMQRY1TEST(i2)

Definition at line 423 of file oleutil.h.

◆ COMQRY3BASES

#define COMQRY3BASES ( i1,
i2,
i3 )   public i1, COMQRY2BASES(i2,i3)

Definition at line 380 of file oleutil.h.

◆ COMQRY3TEST

#define COMQRY3TEST ( i1,
i2,
i3 )   COMBASEQUERY(i1) COMQRY2TEST(i2,i3)

Definition at line 424 of file oleutil.h.

◆ COMQRY4BASES

#define COMQRY4BASES ( i1,
i2,
i3,
i4 )   public i1, COMQRY3BASES(i2,i3,i4)

Definition at line 381 of file oleutil.h.

◆ COMQRY4TEST

#define COMQRY4TEST ( i1,
i2,
i3,
i4 )   COMBASEQUERY(i1) COMQRY3TEST(i2,i3,i4)

Definition at line 425 of file oleutil.h.

◆ COMQRY5BASES

#define COMQRY5BASES ( i1,
i2,
i3,
i4,
i5 )   public i1, COMQRY4BASES(i2,i3,i4,i5)

Definition at line 382 of file oleutil.h.

◆ COMQRY5TEST

#define COMQRY5TEST ( i1,
i2,
i3,
i4,
i5 )   COMBASEQUERY(i1) COMQRY3TEST(i2,i3,i4,i5)

Definition at line 426 of file oleutil.h.

◆ DECLARE_COMBASES1

#define DECLARE_COMBASES1 ( cls,
i1 )    COMBASES_D(cls,COMQRY1BASES(i1))

Definition at line 384 of file oleutil.h.

◆ DECLARE_COMBASES2

#define DECLARE_COMBASES2 ( cls,
i1,
i2 )    COMBASES_D(cls,COMQRY2BASES(i1,i2))

Definition at line 386 of file oleutil.h.

◆ DECLARE_COMBASES3

#define DECLARE_COMBASES3 ( cls,
i1,
i2,
i3 )    COMBASES_D(cls,COMQRY3BASES(i1,i2,i3))

Definition at line 388 of file oleutil.h.

◆ DECLARE_COMBASES4

#define DECLARE_COMBASES4 ( cls,
i1,
i2,
i3,
i4 )    COMBASES_D(cls,COMQRY4BASES(i1,i2,i3,i4))

Definition at line 390 of file oleutil.h.

◆ DECLARE_COMBASES5

#define DECLARE_COMBASES5 ( cls,
i1,
i2,
i3,
i4,
i5 )    COMBASES_D(cls,COMQRY5BASES(i1,i2,i3,i4,i5))

Definition at line 392 of file oleutil.h.

◆ DEFINE_COMBASE_DELEGATE

#define DEFINE_COMBASE_DELEGATE ( cls,
ifc,
member )
Value:
struct _ICLASS cls { \
cls() : member(0) {} \
};
#define _ICLASS
Definition oleutil.h:25

Definition at line 473 of file oleutil.h.

◆ DEFINE_COMBASES1

#define DEFINE_COMBASES1 ( cls,
i1 )    COMBASES_I(cls,COMQRY1TEST(i1))

Definition at line 428 of file oleutil.h.

◆ DEFINE_COMBASES2

#define DEFINE_COMBASES2 ( cls,
i1,
i2 )    COMBASES_I(cls,COMQRY2TEST(i1,i2))

Definition at line 430 of file oleutil.h.

◆ DEFINE_COMBASES3

#define DEFINE_COMBASES3 ( cls,
i1,
i2,
i3 )    COMBASES_I(cls,COMQRY3TEST(i1,i2,i3))

Definition at line 432 of file oleutil.h.

◆ DEFINE_COMBASES4

#define DEFINE_COMBASES4 ( cls,
i1,
i2,
i3,
i4 )    COMBASES_I(cls,COMQRY4TEST(i1,i2,i3,i4))

Definition at line 434 of file oleutil.h.

◆ DEFINE_COMBASES5

#define DEFINE_COMBASES5 ( cls,
i1,
i2,
i3,
i4,
i5 )    COMBASES_I(cls,COMQRY5TEST(i1,i2,i3,i4,i5))

Definition at line 436 of file oleutil.h.

◆ DEFINE_QI_BASE

#define DEFINE_QI_BASE ( cls,
low )
Value:
inline void cls##_QueryInterface(cls* obj, REFIID iid, void * * pif) \
{if (iid.Data1==low) CmpGuid12(obj, iid, IID_##cls, pif);}

Definition at line 439 of file oleutil.h.

◆ DEFINE_QI_DELEGATE

#define DEFINE_QI_DELEGATE ( cls,
member )
Value:
inline void cls##_QueryInterface(cls* obj, REFIID iid, void * * pif) \
{obj->member->QueryInterface(iid, pif);}

Definition at line 457 of file oleutil.h.

◆ DEFINE_QI_DELEGATE_TEST

#define DEFINE_QI_DELEGATE_TEST ( cls,
member )
Value:
inline void cls##_QueryInterface(cls* obj, REFIID iid, void * * pif) \
{if (obj->member) obj->member->QueryInterface(iid, pif);}

Definition at line 461 of file oleutil.h.

◆ DEFINE_QI_DERIVED

#define DEFINE_QI_DERIVED ( cls,
base,
low )
Value:
inline void cls##_QueryInterface(cls* obj, REFIID iid, void * * pif) \
{if (iid.Data1==low) CmpGuid12(obj, iid, IID_##cls, pif); \
else base##_QueryInterface(obj, iid, pif);}

Definition at line 447 of file oleutil.h.

◆ DEFINE_QI_MEMBER

#define DEFINE_QI_MEMBER ( name,
member )
Value:
void name##_QueryInterface(void *, REFIID iid, void * * pif) \
{member->QueryInterface(iid, pif);}

Definition at line 465 of file oleutil.h.

◆ DEFINE_QI_MEMBER_TEST

#define DEFINE_QI_MEMBER_TEST ( name,
member )
Value:
void name##_QueryInterface(void *, REFIID iid, void * * pif) \
{if (member) member->QueryInterface(iid, pif);}

Definition at line 469 of file oleutil.h.

◆ DEFINE_QI_OLEBASE

#define DEFINE_QI_OLEBASE ( cls,
low )
Value:
inline void cls##_QueryInterface(cls* obj, REFIID iid, void * * pif) \
{if (iid.Data1==low) CmpGuidOle(obj, iid, pif);}

Definition at line 443 of file oleutil.h.

◆ DEFINE_QI_OLEDERIVED

#define DEFINE_QI_OLEDERIVED ( cls,
base,
low )
Value:
inline void cls##_QueryInterface(cls* obj, REFIID iid, void * * pif) \
{if (iid.Data1==low) CmpGuidOle(obj, iid, pif); \
else base##_QueryInterface(obj, iid, pif);}

Definition at line 452 of file oleutil.h.

◆ IUNKNOWN_FORWARD

#define IUNKNOWN_FORWARD ( cls,
outer )
Value:
HRESULT _IFUNC cls::QueryInterface(const GUID & iid, void * * pif)\
{ return outer->QueryInterface(iid, pif); } \
owl::ulong _IFUNC cls::AddRef() { return outer->AddRef(); } \
owl::ulong _IFUNC cls::Release() { return outer->Release(); }

Definition at line 408 of file oleutil.h.

◆ TUNKNOWN_STANDARD_IUNKNOWN_METHODS

#define TUNKNOWN_STANDARD_IUNKNOWN_METHODS
Value:
owl::ulong _IFUNC AddRef() {return GetOuter()->AddRef();} \
owl::ulong _IFUNC Release() {return GetOuter()->Release();} \
HRESULT _IFUNC QueryInterface(const GUID& iid, void** iface) \
{return GetOuter()->QueryInterface(iid, iface);}

Definition at line 398 of file oleutil.h.