Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Update PowerShell telemetry to respect the diagnostics and feedback setting on Windows #27328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
e8993e3
6d13e51
6c6f0bd
59868a1
efc450e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -179,9 +179,12 @@ public static bool IsStaSupported | |
| { | ||
| int result = Interop.Windows.CoInitializeEx(IntPtr.Zero, Interop.Windows.COINIT_APARTMENTTHREADED); | ||
|
|
||
| // If 0 is returned the thread has been initialized for the first time | ||
| // as an STA and thus supported and needs to be uninitialized. | ||
| if (result > 0) | ||
| // Per COM documentation: Each successful call to CoInitializeEx (including S_FALSE) | ||
| // must be balanced by a corresponding call to CoUninitialize. | ||
| // - S_OK (0) means we initialized for the first time. | ||
| // - S_FALSE (1) means already initialized, but still increments the reference count. | ||
| // Both require CoUninitialize to decrement the reference count. | ||
| if (result >= 0) | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This fix is not related to the feature. I found it when reading the code. The requirement for balancing the call of
|
||
| { | ||
| Interop.Windows.CoUninitialize(); | ||
| } | ||
|
|
||

Uh oh!
There was an error while loading. Please reload this page.