- 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>
175 lines
6.3 KiB
C++
175 lines
6.3 KiB
C++
//
|
|
//**************************************************************************
|
|
//
|
|
// BOleSvc.h -- Declares the application-level object for "global" stuff.
|
|
// You should have one service object per Bolero connection.
|
|
//
|
|
// Copyright (c) 1993,94 by Borland International, Inc. All rights reserved
|
|
//
|
|
//**************************************************************************
|
|
|
|
#ifndef _BOLESVC_H
|
|
#define _BOLESVC_H 1
|
|
|
|
#include "BOleComp.h"
|
|
#include "BOleSite.h"
|
|
|
|
extern "C" {
|
|
#include "ole2ui.h" // for OLEUIPASTEENTRY & OLEUI_CCHPATHMAX
|
|
}
|
|
|
|
class _ICLASS BOleDocument;
|
|
class _ICLASS BOleFact;
|
|
|
|
struct BOleFactNode;
|
|
|
|
class _ICLASS BOleService : public BOleComponent,
|
|
public IBService,
|
|
public IOleInPlaceFrame
|
|
{
|
|
|
|
protected:
|
|
|
|
IBApplication * pApp;
|
|
POINTL dragLastPt;
|
|
BOleHelp helpMode;
|
|
BOleFactNode *pFirstFactNode;
|
|
|
|
OLECHAR dynamicScopePath[OLEUI_CCHPATHMAX];
|
|
CLSID dynamicScopeClsid;
|
|
IDataObject *pClipboardData;
|
|
PIBWindow pSubclassedWindow;
|
|
|
|
public:
|
|
|
|
// BOleService methods
|
|
//
|
|
BOleDocument * pActiveDoc;
|
|
BOleSite * pFocusedSite;
|
|
virtual void _IFUNC SetActiveDoc (BOleDocument FAR *pD);
|
|
virtual BOleDocument FAR* _IFUNC GetActiveDoc ();
|
|
void _IFUNC SetHelpMode (BOOL);
|
|
IBApplication *GetApplication () {return pApp;}
|
|
virtual void SetFocusedSite( BOleSite *pSite ){ pFocusedSite = pSite; }
|
|
|
|
static POINT pixPerIn;
|
|
|
|
// Factory accessors
|
|
|
|
HRESULT AddClassFactory(IBClass *pF);
|
|
HRESULT RemoveClassFactory(REFCLSID cid);
|
|
HRESULT RemoveClassFactory(LPCOLESTR szProgId);
|
|
HRESULT FindClassFactory(REFCLSID cid, IBClass **pF);
|
|
HRESULT FindClassFactory(LPCOLESTR szProgId, IBClass **pF);
|
|
|
|
// For clip format negotiation in drag/drop and cut/copy
|
|
//
|
|
LPFORMATETC clipList;
|
|
UINT clipCount;
|
|
BOOL clipOkToLink;
|
|
BOOL clipOkToEmbed;
|
|
|
|
LPFORMATETC dropList;
|
|
UINT dropCount;
|
|
BOOL dropOkToLink;
|
|
BOOL dropOkToEmbed;
|
|
|
|
BOOL fUseDropList;
|
|
|
|
public:
|
|
|
|
BOleService (BOleClassManager *pF, IBUnknownMain * pOuter);
|
|
~BOleService ();
|
|
HGLOBAL _IFUNC GetDataFromDataObject (LPDATAOBJECT, CLIPFORMAT, DVTARGETDEVICE FAR*,
|
|
DWORD, LPSTGMEDIUM);
|
|
virtual void _IFUNC EnterBOleDialog (BOOL fEnter, HHOOK&, HTASK&);
|
|
virtual UINT _IFUNC ExcludeOurselves (LPCLSID FAR*);
|
|
void FlushClipboardData(BOOL bCheck = TRUE);
|
|
BOOL IsOnClipboard(IDataObject *);
|
|
BOOL _IFUNC ShowHelpButton (BOleDialogHelp);
|
|
|
|
public:
|
|
|
|
DEFINE_IUNKNOWN(pObjOuter)
|
|
|
|
// IUnknownMain methods
|
|
//
|
|
virtual HRESULT _IFUNC QueryInterfaceMain(REFIID iid, LPVOID FAR* pif);
|
|
|
|
// IService methods
|
|
//
|
|
virtual HRESULT _IFUNC Init(PIBApplication pApp );
|
|
virtual HRESULT _IFUNC RegisterClass (LPCOLESTR szProgId, IBClassMgr *pCM, BCID regId, BOOL, BOOL);
|
|
virtual HRESULT _IFUNC UnregisterClass (LPCOLESTR);
|
|
virtual void _IFUNC OnResize ();
|
|
virtual void _IFUNC OnActivate (BOOL fActivate);
|
|
virtual HRESULT _IFUNC OnModalDialog (BOOL);
|
|
virtual HRESULT _IFUNC OnSetFocus(BOOL);
|
|
virtual HRESULT _IFUNC TranslateAccel (LPMSG);
|
|
virtual BOleHelp _IFUNC HelpMode (BOleHelp);
|
|
virtual HRESULT _IFUNC CanClose();
|
|
|
|
virtual HRESULT _IFUNC Browse(BOleInitInfo*);
|
|
virtual HRESULT _IFUNC BrowseClipboard (BOleInitInfo FAR*);
|
|
virtual HRESULT _IFUNC Paste (BOleInitInfo FAR*);
|
|
virtual HRESULT _IFUNC Clip (PIBDataProvider, BOOL, BOOL, BOOL);
|
|
virtual HRESULT _IFUNC Drag (PIBDataProvider, BOleDropAction, BOleDropAction FAR*);
|
|
|
|
virtual HMETAFILE _IFUNC GetPasteIcon (LPDATAOBJECT);
|
|
|
|
virtual BOOL _IFUNC PasteHelper (BOleInitInfo FAR*, BOOL);
|
|
virtual BOOL _IFUNC FormatHelper (LPFORMATETC FAR*, UINT FAR*, BOOL&,
|
|
BOOL&, PIBDataProvider);
|
|
void _IFUNC RemoveLinkFromClipList();
|
|
void NotifyClipboardEmptied();
|
|
|
|
virtual LPSTORAGE _IFUNC CreateStorageOnFile (LPCOLESTR, BOOL);
|
|
virtual HRESULT _IFUNC ConvertUI (PIBPart, BOOL, BOleConvertInfo FAR*);
|
|
virtual HRESULT _IFUNC ConvertGuts (PIBPart, BOOL, BOleConvertInfo FAR*);
|
|
virtual BOleMenuEnable _IFUNC EnableEditMenu (BOleMenuEnable, PIBDataConsumer);
|
|
|
|
// Implementation methods
|
|
//
|
|
virtual CLIPFORMAT _IFUNC MatchPriorityClipFormat(LPDATAOBJECT,
|
|
LPOLEUIPASTEENTRY, int);
|
|
virtual void _IFUNC MarkPasteEntries(LPDATAOBJECT,LPOLEUIPASTEENTRY,int);
|
|
virtual void _IFUNC UnloadObjects (REFCLSID);
|
|
|
|
public:
|
|
//
|
|
|
|
// IOleWindow methods, base of IOleInPlaceUIWindow and IOleInPlaceFrame
|
|
//
|
|
HRESULT _IFUNC GetWindow(HWND FAR* lphwnd);
|
|
HRESULT _IFUNC ContextSensitiveHelp(BOOL fEnterMode);
|
|
|
|
// IOleInPlaceUIWindow methods, base of IOleInPlaceFrame
|
|
//
|
|
HRESULT _IFUNC GetBorder(LPRECT lprectBorder);
|
|
HRESULT _IFUNC RequestBorderSpace(LPCRECT lprectWidths);
|
|
HRESULT _IFUNC SetBorderSpace(LPCBORDERWIDTHS lpborderwidths);
|
|
HRESULT _IFUNC SetActiveObject(IOleInPlaceActiveObject* lpActiveObject,
|
|
LPCOLESTR lpszObjName);
|
|
|
|
// IOleInPlaceFrame methods
|
|
//
|
|
HRESULT _IFUNC InsertMenus(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidts);
|
|
HRESULT _IFUNC SetMenu(HMENU hmenuShared, HOLEMENU holemenu, HWND hwndActiveObject);
|
|
HRESULT _IFUNC RemoveMenus(HMENU hmenuShared);
|
|
HRESULT _IFUNC SetStatusText(LPCOLESTR lpszStatusText);
|
|
HRESULT _IFUNC EnableModeless(BOOL fEnable);
|
|
HRESULT _IFUNC TranslateAccelerator(LPMSG lpmsg, WORD wID);
|
|
|
|
};
|
|
|
|
// solves a casting in a ternary issue
|
|
//
|
|
inline IBWindow * getNegotiator(IBApplication *pApp, IBWindow *pContainer)
|
|
{
|
|
return (GetScode(pApp->IsMDI()) == S_OK) ? pApp : pContainer;
|
|
}
|
|
|
|
#endif
|
|
|
|
|