Repository navigation
MapWinGIS6 ActiveX Control and Modern Rendering Architecture - #16
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 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
Check type-library and interface keys for registration collisions · New Serialize registration and cleanup with a shared mutex · New Report success only after automated verification completes · New Suppress blocking error dialogs in automated mode · New Use Sysnative for x64 regsvr32 from 32-bit PowerShell · New Clean up partial registration when type-library registration fails · New
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
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Additional source-review finding (not covered by the existing threads): The automated “Automation contract” checks do not actually validate the contract. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
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. |


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.