[PR #19073] OutputDebugString Added #31699

Open
opened 2026-01-31 09:48:58 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/19073

State: closed
Merged: No


Summary of the Pull Request

OutputDebugString is added in init.cpp

References and Relevant Issues

In the file Since, DllMain returns TRUE unconditionally and ignores the reason, initialization failures may go undetected.

Detailed Description of the Pull Request / Additional comments

Added logging or conditionally handle reason for checking all the possible Reason and minimizing the risk of failures.

Validation Steps Performed

This switch block doesn't validate input values explicitly, but it validates program execution flow by tracking which DllMain event occurs.

Validation Goal || How This Code Helps

Confirm DLL is loaded correctly | "DLL loaded (PROCESS_ATTACH)" is logged
Confirm DLL is unloaded correctly | "DLL unloaded (PROCESS_DETACH)" is logged
Debug thread-level loading/unloading | Thread attach/detach messages will appear
Validate lifecycle flow of DLL | You see the exact sequence of OS interactions

PR Checklist

  • Closes #xxx
  • Tests added/passed
  • Documentation updated
    • If checked, please file a pull request on our docs repo and link it here: #xxx
  • Schema updated (if necessary)
**Original Pull Request:** https://github.com/microsoft/terminal/pull/19073 **State:** closed **Merged:** No --- ## Summary of the Pull Request OutputDebugString is added in init.cpp ## References and Relevant Issues In the file Since, DllMain returns TRUE unconditionally and ignores the reason, initialization failures may go undetected. ## Detailed Description of the Pull Request / Additional comments Added logging or conditionally handle reason for checking all the possible Reason and minimizing the risk of failures. ## Validation Steps Performed This switch block doesn't validate input values explicitly, but it validates program execution flow by tracking which DllMain event occurs. Validation Goal || How This Code Helps Confirm DLL is loaded correctly | "DLL loaded (PROCESS_ATTACH)" is logged Confirm DLL is unloaded correctly | "DLL unloaded (PROCESS_DETACH)" is logged Debug thread-level loading/unloading | Thread attach/detach messages will appear Validate lifecycle flow of DLL | You see the exact sequence of OS interactions ## PR Checklist - [x] Closes #xxx - [x] Tests added/passed - [x] Documentation updated - If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx - [x] Schema updated (if necessary)
claunia added the pull-request label 2026-01-31 09:48:58 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#31699