Fix AmiBroker plugin loading: Use Static MFC and disable ASLR/NX flags#6
Open
Pramodnm wants to merge 6 commits into
Open
Fix AmiBroker plugin loading: Use Static MFC and disable ASLR/NX flags#6Pramodnm wants to merge 6 commits into
Pramodnm wants to merge 6 commits into
Conversation
added 3 commits
July 12, 2026 02:27
- Changed Win32 Release and Debug configurations from Dynamic MFC to Static MFC to eliminate external mfc140.dll dependency - Added /DYNAMICBASE:NO and /NXCOMPAT:NO linker flags to produce DLL with DllCharacteristics 0x0, matching working QP2.dll pattern - Resolves issue where AmiBroker 32-bit failed to load plugin with misleading '64-bit error' when mfc140.dll was missing - DLL now self-contained with only standard Windows system DLLs as imports - File size increased to ~2MB due to embedded MFC, but eliminates runtime dependency complications on end-user machines
There was a problem hiding this comment.
Review completed against the latest diff
Not reviewed (too large): Plugin.cpp (~4,372 lines) - if these are generated or fixture files, add them to ignored paths to exclude them from future reviews.
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
Re-trigger cubic
added 3 commits
July 12, 2026 02:37
…ymbols - Remove framework.h: Never included by any source file - Remove pch.h: Precompiled headers disabled (NotUsing) so unused - Remove PrecompiledHeaderFile references: Only reference deleted pch.h - Remove OPENALGO_EXPORTS: Preprocessor define never referenced in code Keep RandomizedBaseAddress=false and DataExecutionPrevention=false in Win32 configs: These are necessary for AmiBroker 32-bit legacy loader compatibility. The host loader (AmiBroker.exe, 32-bit) requires DllCharacteristics=0x0 to load the plugin correctly. This is a documented host-loader workaround inherent to the AmiBroker plugin API design.
Adds inline documentation clarifying that RandomizedBaseAddress=false and DataExecutionPrevention=false are necessary for AmiBroker 32-bit loader compatibility (requires DllCharacteristics=0x0). Warns against re-enabling without testing on target AmiBroker instance. This directly addresses bot review concern by making the host-loader workaround rationale immediately visible to future maintainers in the project file.
Author
|
Fixes #1 - This PR implements the fix for the AmiBroker 32-bit plugin loading issue by using static MFC and disabling ASLR/NX flags. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by cubic
Fixes AmiBroker 32-bit plugin loading by statically linking MFC and disabling ASLR/DEP on Win32. The DLL is self-contained, matches
QP2.dll, and loads withoutmfc140.dll.Bug Fixes
mfc140.dll./DYNAMICBASE:NO,/NXCOMPAT:NO); DllCharacteristics now0x0to matchQP2.dll, with the workaround documented inOpenAlgoPlugin.vcxprojto prevent regressions.LIBRARY "OpenAlgo"in.def; revertedPlugin.cppto upstream.framework.h,pch.h), precompiled-header refs, and unusedOPENALGO_EXPORTSdefine.Migration
OpenAlgo32.dll; update packaging and references if you usedOpenAlgo.dll.OpenAlgo32.dll.Written for commit ddb9257. Summary will update on new commits.