Crash in File Explorer context menu

Barry Lee 0 Reputation points
2023-07-19T02:07:47.6066667+00:00

Hi

I wrote a ATL dll to implement Windows shell extension for context menu in File Explorer. It will show a MFC dialog with CEdit control if the command is invoked.
And the issue is dialog/explorer will stop response when I input any char in the CEdit. There are some finding after investigation...

  1. This issue occurs only if the CEdit WITHOUT password style.
    If the CEdit has password style, it will show '*' when I input something and everything will be fine.
  2. This issue NOT occurs in Win10 and previous OS
  3. This issue occurs in Win11 22H2 Traditional Chinese OS.
  4. This issue NOT occurs in Win11 22H2 English OS.
    Due to 3 & 4, I think there may be something wrong in Win11 22H2 Traditional Chinese OS...

https://www.dropbox.com/scl/fi/foe32bqv8zdgitf1vb2b2/ATLDll.zip?dl=0&rlkey=3k4ymubztkkdrqs3tx0exj2fv

Above link is a simple ATL dll project to verify the issue.
There are 2 CEdit controls both created with password style in the dialog.
The second CEdit will remove password style by SetPasswordChar(0) when the input text length > 2.
It can input anything in 1st CEdit, and dialog/explorer will stop response when the 2nd CEdit remove password style.

Could anyone help to fix this issue? thanks!contextmenu

dialog

Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 44,766 Reputation points
    2023-07-19T12:18:37.3733333+00:00

    Hello Barry,

    Thank you for your question and for reaching out with your question today.

    The issue you are experiencing with the CEdit control in your ATL DLL when running on Windows 11 22H2 Traditional Chinese OS seems to be a compatibility problem or a bug in the operating system. Since the issue does not occur in other versions of Windows or in the English version of Windows 11 22H2, it is likely specific to that particular combination.

    As a language model AI, I don't have access to external resources such as the files you linked, but I can suggest some general steps to try to mitigate the issue:

    1. Check Windows Updates: Ensure that the Windows 11 22H2 Traditional Chinese OS is fully up to date with the latest updates and patches. Microsoft often releases updates to address compatibility issues and bug fixes.
    2. Verify Language Settings: Double-check that the language settings for both the OS and your ATL DLL project are consistent and properly set to Traditional Chinese.
    3. Contact Microsoft Support: If the issue persists and it seems to be specific to the OS version and language combination, you may want to contact Microsoft Support for further assistance. They can help investigate the issue and provide guidance on any known issues or workarounds.
    4. Try Different Versions: If possible, test your ATL DLL project on different versions of Windows 11 and in different languages to see if the issue is consistently reproducible or if it is limited to specific configurations.
    5. Debug and Logging: Implement thorough logging and debug statements in your ATL DLL to identify any potential error messages or unexpected behavior. This can help pinpoint the exact point where the problem occurs.
    6. Review Windows API Calls: Review the Windows API calls and usage of the CEdit control in your ATL DLL project. Ensure that all calls are correctly handled and follow best practices for working with controls in a Windows shell extension.
    7. Use WinDbg: If you are familiar with debugging tools like WinDbg, you can use it to analyze the issue further. It can help you inspect the program state and gather more information on the problem.

    Please keep in mind that debugging compatibility issues and system-specific behaviors can be challenging, and the steps provided here are general suggestions. It is always best to have a deep understanding of the code and the underlying system architecture or seek assistance from experts familiar with Windows development and troubleshooting.

    I used AI provided by ChatGPT to formulate part of this response. I have verified that the information is accurate before sharing it with you.

    If the reply was helpful, please don’t forget to upvote or accept as answer.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.