IDispatch::GetTypeInfo across processes sends the library by value (as
the layer saves libraries) and which of its types; the receiver loads a
copy. Monikers go by value as OleSaveToStream writes them: IOleObject's
SetMoniker and GetMoniker, IOleClientSite::GetMoniker and
IAdviseSink::OnRename. IOleObject::EnumAdvise and
IDataObject::EnumDAdvise come back as copies of the connections, their
sinks as interfaces.
autotest asks its local server for an object's type information;
srvtest, natively, holds a server's object directly and checks its
advise connections, its data's, and its moniker, which the server gets
from the container's site.
Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRw4kkFHrrHRhkcuLw
- RFX_Long and CDBVariant read 32-bit SQL integers into a 64-bit long.
- WSAAsyncSelect: a thread polls the sockets and posts their events,
re-enabled by recv, send, accept and connect as on Windows; accepted
sockets take the listener's events.
- A toolbar notifies the parent it was created with, as comctl32 does.
- OLE controls in dialog templates: template strings are read as 16-bit
units (_AfxTemplateString), also for property page fonts.
- LoadLibrary runs a library's DllMain; GetModuleHandle forgets freed
libraries; COM loads InprocServer32 libraries and
CoFreeUnusedLibraries unloads them; MFC regular DLLs get afx.h's
DllMain on Linux and macOS too.
- Stubs are weak, so a test's mock ODBC driver replaces them.
- WINPORT_MESSAGEBOX=window shows message boxes even headless.
- The native tests build a test's regular DLL as a shared library and
add splittest, docktest, dbtest, rvtest, socktest, occtest and dlltest.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRw4kkFHrrHRhkcuLw
Signed-off-by: Claude <noreply@anthropic.com>
Visual C++ 6 code names a handler plainly (ON_COMMAND(ID_X, OnX)), later
code with a member pointer (ON_COMMAND(ID_X, &CMyView::OnX)), and no
standard C++ expression takes both. clang-retro's compiler has
__starts_with_ampersand, which tells the two apart in the preprocessor:
with it, the message map macros call a plain name directly and a member
pointer through ->*, and _AFX_PMF does the same for the dispatch, event
sink and DHTML maps, so code of either age builds unchanged and with
nothing to define. Elsewhere the maps behave as before.
docktest and autotest name some handlers with member pointers where
the compiler has the builtin.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUqfQ3sTcDCMdNCGGs
CCmdTarget now has the COM side MFC gives it: reference counting,
interface maps (BEGIN_INTERFACE_PART, METHOD_PROLOGUE), aggregation,
and an IDispatch driven by the class's dispatch map after
EnableAutomation. Each dispatch map entry calls its member function
through a template made from the function's type, so no assembly is
needed and the code is portable.
COleObjectFactory (DECLARE_OLECREATE, IMPLEMENT_OLECREATE) registers
class objects, writes the registry entries, supports licensing and
aggregation, and AfxOleLockApp/AfxOleUnlockApp close a program started
with /Automation when its last object goes. CWinApp::Run no longer
quits without a main window in such a program.
Also fixes CString::AllocSysString, which was never compiled because
its header guard check used the wrong name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUqfQ3sTcDCMdNCGGs