- 
                Notifications
    You must be signed in to change notification settings 
- Fork 114
Closed
Labels
blockedThis issue cannot be fixed without first a change to a dependencyThis issue cannot be fixed without first a change to a dependencyenhancementNew feature or requestNew feature or request
Description
Standard output handles should rarely be closed. Here's Raymond Chen's explanation. Thus, the proper way to use GetStdHandle is by combining it with DangerousAddRef:
var handle = PInvoke.GetStdHandle(STD_HANDLE_TYPE.STD_OUTPUT_HANDLE);
bool ignore=default;
handle.DangerousAddRef(ref ignore);This could be simplified if GetStdHandle wouldn't return a CloseHandleSafeHandle.
Metadata
Metadata
Assignees
Labels
blockedThis issue cannot be fixed without first a change to a dependencyThis issue cannot be fixed without first a change to a dependencyenhancementNew feature or requestNew feature or request