29 void*
blk =
Mem->Alloc(size);
91 Text =
new TCHAR[38+1];
93 _T(
"{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}"),
94 Guid.Data1, Guid.Data2, Guid.Data3,
95 Guid.Data4[0], Guid.Data4[1], Guid.Data4[2], Guid.Data4[3],
96 Guid.Data4[4], Guid.Data4[5], Guid.Data4[6], Guid.Data4[7]);
159 if(Offset >= MaxAlloc)
171 if (
offset >= (
unsigned long)Offset &&
172 ((
long*)&
guid)[1] == ((
long*)&
Guid)[1] &&
173 ((
long*)&
guid)[2] == ((
long*)&
Guid)[2] &&
174 ((
long*)&
guid)[3] == ((
long*)&
Guid)[3] )
192 if ( ((
long *)&
req)[1] == ((
long *)&
ref)[1] &&
193 ((
long *)&
req)[2] == ((
long *)&
ref)[2] &&
194 ((
long *)&
req)[3] == ((
long *)&
ref)[3] ) {
206 if ( ((
long*)&
req)[1] == 0x00000000L &&
207 ((
long*)&
req)[2] == 0x000000C0L &&
208 ((
long*)&
req)[3] == 0x46000000L ) {
247 ((IUnknown&)
inner).AddRef();
266 <<
", RefCnt:" << I.RefCnt);
270 <<
", RefCnt:" << I.RefCnt);
288TUnknown::TUnknownI::QueryInterface(
const GUID &
iid,
void * *
pif)
291 if (
iid.Data1 == 0) {
308TUnknown::TUnknownI::AddRef()
311 "AddRef on " <<
_OBJ_FULLTYPENAME(&Host()) <<
' ' << (
void*)&Host() <<
" to " << (RefCnt+1));
319TUnknown::TUnknownI::Release()
322 "Release on " <<
_OBJ_FULLTYPENAME(&Host()) <<
' ' << (
void*)&Host() <<
" to " << (RefCnt-1));
326 Inner->ThisUnknown().Release();
342 return Outer->Release();
348TUnknown::TUnknownI::~TUnknownI()
360static int logPixX = 0;
361static int logPixY = 0;
366GetScreenMetrics(
int& logPixX,
int& logPixY)
380 if (!logPixX || !logPixY)
381 GetScreenMetrics(logPixX, logPixY);
393 if (!logPixX || !logPixY)
394 GetScreenMetrics(logPixX, logPixY);
#define WARNX(group, condition, level, message)
#define PRECONDITION(condition)
#define TRACEX(group, level, message)
#define DIAG_DEFINE_GROUP_INIT(f, g, e, l)
int GetOffset(const GUID &guid)
TClassId operator[](int offset)
TBaseClassId(owl::TRegList ®Info, int maxAlloc=256)
GUID/IID/CLSID management.
TClassId()
Default constructor - Derived class must set GUID.
void * Alloc(unsigned long size)
Standard implementation of a controlling IUnknown for an object, to be inherited with other COM inter...
unsigned long GetRefCount()
virtual HRESULT QueryObject(const GUID &iid, void **pif)
QueryObject used when TUnknown is in constructor/destructor.
IUnknown & Aggregate(TUnknown &inner)
A registration parameter table, composed of a list of TRegItems.
#define _OBJ_FULLTYPENAME(obj)
Include for OC, gets common headers when precompiled headers are enabled.
Reliable platform independent header for common memory and string functions.
Object Component Framework (COM encapsulation)
void OcHiMetricToPixel(const SIZEL &sizeHM, SIZEL &sizePix)
void CmpGuidOle(IUnknown *This, REFIID req, void **pif)
void CmpGuid12(IUnknown *This, REFIID req, REFIID ref, void **pif)
void OcPixelToHiMetric(const SIZEL &sizePix, SIZEL &sizeHM)
Object Windows Library (OWLNext Core)
ObjectComponents BOcOle engine linking & embedding interfaces.
#define MAP_LOGHIM_TO_PIX(hiMetric, pixelsPerInch)
#define MAP_PIX_TO_LOGHIM(pixel, pixelsPerInch)
ObjectComponents fundamental definitions.
#define HR_CLASS_CLASSNOTAVAILABLE
#define OLECALL(func, msg)
Low level OLE Utility class definitions.
Definition of class TString, a flexible universal string envelope class.