MFC Application's AfxGetModuleState() Changes after Linking Boost Thread Static Library to My DLL
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- build-system, desktop
Research direction
Start by reproducing the MFC application and MFC-based DLL setup described, using the Boost Thread static library with Visual Studio 2010. Inspect AfxGetModuleState() before and after loading the DLL and compare the application and DLL state. Done means identifying and documenting a fix that prevents the host application's module state and global data from changing.
Written by the indexing model from the issue text.
Description
Issue Description:
Background:
I have developed a program that functions as an MFC (Microsoft Foundation Classes) DLL. In this program, I linked the Boost Thread static library to my DLL.
Problem:
Upon loading my DLL into an MFC application, I have noticed an unexpected behavior. The function AfxGetModuleState() within the MFC application undergoes a modification. Specifically, the global app and resource handler data, among other things, seem to transform into data originating from my DLL.
Expected Behavior:
The AfxGetModuleState() function within the MFC application should maintain its standard behavior and not be influenced by the linked Boost Thread static library in my DLL.
Steps to Reproduce:
Create an MFC application.
Link my DLL, which contains the Boost Thread static library, to the application.
Load the DLL within the MFC application.
Observe the change in behavior of AfxGetModuleState() and the unexpected alteration of global data.
Additional Information:
DLL Type: MFC-based
Linked Library: Boost Thread (Static)
MFC Application Type: MFC-based
Environment: Windows
Compiler: vs2010
Boost Library Version: 1.73 and 1.78
Impact:
This issue is causing unexpected behavior in MFC applications when integrating the Boost Thread static library through my MFC DLL. As a result, it is essential to address this issue to ensure the proper functioning of MFC applications using this DLL configuration.
Your assistance is greatly appreciated.
- Dominant language
- C++
- Stars
- 213
- Forks
- 171
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/thread
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
-
Difficulty 3/5 1-2 days Newbie friendliness 64/100
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
flutter-webrtc/flutter-webrtc#2206 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
Component: GLib
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
brave/brave-browser#59300 ·
-
Mute ydb/tests/functional/dstool/test_canonical_requests.py.Test.test_group_take_snapshot in main Openai_reviewed
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
ydb-platform/ydb#53974 · 3 comments ·