Files
TeslaRel410/BORLAND/BC45/SOURCE/OCF/BOCOLE/BOLEDATA.H
T
CydandClaude Fable 5 63312e07f9 source410: literal 4.10 source reconstruction + BC++ 4.52 fleet toolchain archived
- BORLAND/: Borland C++ 4.52 (chosen over 4.5 by byte-match: CODE/RP/CW32.LIB
  is identical to 4.52's install lib). BCC32/TLINK32/TLIB/MAKE run natively on
  Win11; CODE/BT/OPT.MAK is the shipped BTL4OPT.EXE's exact flag recipe
  (extender = Borland PowerPack DPMI32, not Phar Lap TNT).
- restoration/source410/: the literal 1995-form reconstruction of the missing
  BT game source (never mixed into CODE/). Round 1-3 state:
  * 6 of 10 surviving original TUs COMPILE CLEAN under the period toolchain
    (BTMSSN, BTCNSL, BTSCNRL, BTTEAM, BTL4MODE, BTL4ARND) - first builds
    since 1996.
  * BT_L4/BTL4APP.CPP pilot reconstruction: 12/12 functions, Fail() lands on
    its binary-recorded line 400 exactly.
  * BT/BTCNSL.HPP: console wire IDs recovered from the binary's ctors
    (Killed=9, Damaged=10, ScoreUpdate=13, DeathWithoutHonor=15 [T1];
    TeamScore=12 flagged [T4]).
  * MUNGA/: 8 engine-header backfills back-dated from the BT412 WinTesla tree
    (VDATA numbering decomp-verified; AUDREND's OpenAL-era virtual removed -
    the period compiler is the drift detector).
  * Tooling: backdate.py (WinTesla->1995 header transform), compile410.sh
    (per-TU verification sweep under authentic OPT.MAK flags).
  * README: corrected roadmap - MECH.HPP is the capstone grown with the mech
    TU reconstructions; BTREG.CPP green = the header-family milestone.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 07:33:26 -05:00

147 lines
4.3 KiB
C++

//
//**************************************************************************
//
// BOleData.h -- Declares a data cache object which is used for delayed
// rendering.
//
// Copyright (c) 1993,94 by Borland International, Inc. All rights reserved
//
//**************************************************************************
#ifndef _BOLEDATA_H
#define _BOLEDATA_H 1
#include "BOle.h"
#include "BOleComp.h"
// This is where the cached data actually lives.
//
typedef struct FAR tagBOleDataItem {
struct FAR tagBOleDataItem FAR *pNext;
FORMATETC fmtEtc;
STGMEDIUM tymed;
} BOleDataItem;
// BOleData -- Provides a data cache object for use when copying from
// an embedding.
//
//
//
//
class _ICLASS BOleData : public BOleComponent,
public IDataObject
{
public:
BOleData (BOleClassManager *, PIBUnknownMain);
~BOleData ();
// IUnknown Methods
//
DEFINE_IUNKNOWN (pObjOuter);
HRESULT _IFUNC QueryInterfaceMain (REFIID iid, LPVOID FAR* pif);
protected:
BOleDataItem FAR *pFirstItem;
BOleDataItem FAR *pLastItem;
void FreeItems();
friend class _ICLASS BOleEnumFormatEtc;
// IDataObject methods
//
virtual HRESULT _IFUNC GetData (LPFORMATETC, LPSTGMEDIUM);
virtual HRESULT _IFUNC GetDataHere (LPFORMATETC, LPSTGMEDIUM);
virtual HRESULT _IFUNC QueryGetData (LPFORMATETC);
virtual HRESULT _IFUNC GetCanonicalFormatEtc (LPFORMATETC, LPFORMATETC);
virtual HRESULT _IFUNC SetData (LPFORMATETC, STGMEDIUM FAR *, BOOL);
virtual HRESULT _IFUNC EnumFormatEtc (DWORD, LPENUMFORMATETC FAR*);
virtual HRESULT _IFUNC DAdvise (FORMATETC FAR*, DWORD, LPADVISESINK, DWORD FAR*);
virtual HRESULT _IFUNC DUnadvise (DWORD);
virtual HRESULT _IFUNC EnumDAdvise (LPENUMSTATDATA FAR*);
};
// BOleEnumFormatEtc -- Provides a "cursor" on the list of formats
// offered by BOleData
//
class _ICLASS BOleEnumFormatEtc : public IEnumFORMATETC
{
public:
BOleEnumFormatEtc( BOleData *Data );
// IUnknown methods
//
HRESULT _IFUNC QueryInterface(REFIID iid, void FAR* FAR* pif);
ULONG _IFUNC AddRef();
ULONG _IFUNC Release();
// IEnumFORMATETC methods
//
HRESULT _IFUNC Next (ULONG celt, FORMATETC FAR * rgelt,
ULONG FAR* pceltFetched);
HRESULT _IFUNC Skip (ULONG celt);
HRESULT _IFUNC Reset ();
HRESULT _IFUNC Clone (IEnumFORMATETC FAR* FAR* ppenum);
// Private methods
//
void Resync();
BOleDataItem FAR *pCurItem;
BOleDataItem FAR *pFirstItem;
BOleDataItem FAR *pLastItem;
BOleData *pData;
LONG nRef;
};
// BOleShadowData -- The execution of EmptyClipboard() causes OLE2 to call
// CoDisconnectObject on the data object which has been
// posted to the clipboard.
//
// The consequence is that if we post the original objects
// (as opposed to clones of them), OLE2 might FORCE the
// refcount of such objects to zero on our behalf.
//
// To solve this we post a small shadow object which
// delegates IDataObject to the real object, but implements
// IUnknown here (stopping CoDisconnectObject from
// decrementing the real object until it goes to zero).
//
class _ICLASS BOleShadowData : public BOleComponent, public IDataObject
{
public:
BOleShadowData (BOleClassManager *pCM, LPDATAOBJECT pDeleg);
virtual ~BOleShadowData();
LPDATAOBJECT GetRealData() {return pDelegate;}
DEFINE_IUNKNOWN(pObjOuter);
// IDataObject
//
virtual HRESULT _IFUNC GetData (LPFORMATETC, LPSTGMEDIUM);
virtual HRESULT _IFUNC GetDataHere (LPFORMATETC, LPSTGMEDIUM);
virtual HRESULT _IFUNC QueryGetData (LPFORMATETC);
virtual HRESULT _IFUNC GetCanonicalFormatEtc (LPFORMATETC, LPFORMATETC);
virtual HRESULT _IFUNC SetData (LPFORMATETC, STGMEDIUM FAR *, BOOL);
virtual HRESULT _IFUNC EnumFormatEtc (DWORD, LPENUMFORMATETC FAR*);
virtual HRESULT _IFUNC DAdvise (FORMATETC FAR*, DWORD, LPADVISESINK, DWORD FAR*);
virtual HRESULT _IFUNC DUnadvise (DWORD);
virtual HRESULT _IFUNC EnumDAdvise (LPENUMSTATDATA FAR*);
// IUnknown
//
virtual HRESULT _IFUNC QueryInterfaceMain(REFIID iid, void FAR* FAR* pif);
protected:
LPDATAOBJECT pDelegate;
};
#endif