Extracting a VB6 function across a COM boundary moves a selected business operation while preserving or replacing its interface to existing consumers. The difficult boundary combines binary compatibility, transaction ownership, and the operational behavior introduced when calls cross processes.
A function can be small in source while depending on shared state, callbacks, or a caller-controlled transaction. Moving it successfully requires understanding those dependencies before deciding which code belongs on each side.
Choose a complete business operation
Start with a workflow such as calculating and recording an adjustment, rather than selecting a class solely because it has few methods. Identify its inputs, consumers, data changes, permissions, and required consistency.
If several updates must succeed together, splitting them into independent calls can create partial business outcomes. Service-boundary guidance treats consistency as a reason to keep functionality together and to begin with a coarser boundary when uncertainty remains.
The proposed contract should explain what the caller supplies and what the operation owns. Context formerly held in a global variable or established by an earlier call cannot remain an undocumented prerequisite.
Recover the binary contract
Inventory executables, DLLs, OCXs, type libraries, component identifiers, and installation packages. Associate them with actual consumers and record which components run inside the client process.
Interface signatures are part of that contract, but activation and runtime use add evidence that a registration list cannot provide. An object viewer can inspect registered objects; representative execution must establish which ones the business workflow actually activates.
The reference environment should support a reproducible build and clean installation where source and tooling permit it. Without that baseline, a replacement can appear compatible only because the test machine retains an undocumented component.
A process boundary is a candidate mechanism
Windows does not allow a 64-bit process to load a 32-bit DLL, or the reverse. Out-of-process COM can communicate across that architecture boundary using marshaling.
That mechanism can support an incremental arrangement in which a replacement client calls a retained server. It does not establish that a particular component can be wrapped unchanged or that its custom interfaces will marshal correctly.
Test parameter sizes, optional values, callbacks, errors, and cleanup under the intended identities. Remote execution adds version-specific security and network questions beyond architecture compatibility.
Failure can separate execution from observation
Suppose the extracted operation records an adjustment and the server exits before the client receives its result. The client sees failure without knowing whether the business update occurred.
The contract needs a way to establish the outcome or recognize a repeated request. Retrying a call because communication failed is unsafe when the operation can create another adjustment.
Latency and concurrent callers also belong in the extraction test. Code formerly protected by a single client’s execution sequence can face a different operating pattern once several consumers share a service.
Retained dependencies still need owners
Microsoft’s VB6 policy separates the runtime from the unsupported IDE and excludes third-party components from its runtime support commitment. A new interface does not extend those support boundaries.
The resulting deployment therefore needs an inventory of retained binaries, supported hosts, redistribution rights, and operational ownership. These are specific dependencies to verify, not reasons to assume either immediate replacement or indefinite retention.
Acceptance includes existing binary consumers working across install, upgrade, and reversal, together with correct business transactions and recovery. The extraction creates a useful boundary when those properties can be demonstrated and the receiving team can maintain both sides of the contract.