Skip to content

MapWinGIS6 ActiveX Control and Modern Rendering Architecture - #16

Merged
pmeems merged 4 commits into
developmentfrom
phase-3a-dotnet10-activex-test-host
Oct 25, 2026
Merged

pmeems merged 4 commits into
developmentfrom
phase-3a-dotnet10-activex-test-host

Conversation

@pmeems

@pmeems pmeems commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Adds a .NET 10 WinForms host for manual and automated testing of the real MapWinGIS ActiveX control through AxHost. Its embedded application manifest declares the OCX class and type library, allowing registration-free activation without registry changes or a generated interop assembly.

The launcher verifies the matching binaries and runtime files, then starts the host. Automated mode verifies activation, automation access, resize, visible repaint, disposal, and recreation, and writes JSON results. The independent native activation script retains its temporary registration-based test.

Validated: Debug x64 solution build; 135 native tests (133 passed, 2 skipped); 10/10 C# host checks with unchanged registry state; managed Win32/x86 build and manifest verification. Requires a Windows desktop session; the control currently paints only its background, and native x86 hosting remains Phase 7.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Registration safety gaps and automated-run failure handling can modify unrelated COM state, hang unattended runs, or report incomplete checks as successful.

6 open issues
What changed in this PR

Adds a .NET 10 WinForms host for exercising the existing MapWinGIS ActiveX control through AxHost, without adding COM APIs or generated wrappers.

Changes:

  • Adds manual hosting and automated lifecycle, automation, resize, and visible repaint checks with JSON reporting.
  • Adds a launcher for temporary per-user OCX registration and cleanup.
  • Integrates the host into the solution and documents build requirements and usage.

Builds and Windows integration tests were not run during this review.

File Description
samples/​CSharp/​ActiveXTestHost/​Run-ActiveXTestHost.ps1 Manages registration, host execution, and cleanup.
samples/​CSharp/​ActiveXTestHost/​Program.cs Parses options and starts the WinForms host.
samples/​CSharp/​ActiveXTestHost/​MainForm.cs Implements manual controls, automated checks, and reporting.
samples/​CSharp/​ActiveXTestHost/​ActiveXTestHost.csproj Configures .NET 10 and matching native architectures.
samples/​CSharp/​ActiveXTestHost/​ActiveXHostControl.cs Hosts the existing control directly through AxHost.
README.md Adds the SDK requirement and restore command.
MapWinGIS6.slnx Includes the managed host project.
docs/​TESTING.md Documents integration checks and reported validation.
docs/​BUILDING.md Documents host prerequisites and launcher usage.
AGENTS.md Adds restore to the build instructions.
.github/​workflows/​build.yml Enables restore during solution builds.
.github/​copilot-instructions.md Updates the documented build command.

Review effort: Balanced

pmeems and others added 2 commits October 25, 2026 22:41
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

pmeems commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Additional source-review finding (not covered by the existing threads): The automated “Automation contract” checks do not actually validate the contract. ReadCoreInitialized() returns the CoreInitialized value, but both check actions merely assign it to a local variable and update the status text. If the control activates successfully while CoreInitialized is false, the test is still recorded as passed and the process can exit with code 0. Please assert that the value is true (and throw a descriptive exception otherwise) in both the initial and recreated-control checks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pmeems

pmeems commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Resolved in 4ef556c: both the initial and recreated automation-contract checks now throw a descriptive error if CoreInitialized is false. The Debug x64 solution build passed.

@pmeems
pmeems merged commit ec0ba15 into development Oct 25, 2026
1 check passed
@pmeems
pmeems deleted the phase-3a-dotnet10-activex-test-host branch October 25, 2026 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants