Repository navigation
Automatically marshal COM outputs as WinRT - #1771
Merged
Jevan Saks (jevansaks) merged 12 commits intoSep 1, 2026
Merged
Conversation
Co-authored-by: Copilot <[email protected]> Copilot-Session: b24622c7-c9d6-44f0-9a20-85aac5ff11d6
Co-authored-by: Copilot <[email protected]> Copilot-Session: b24622c7-c9d6-44f0-9a20-85aac5ff11d6
Member
Author
|
The first hardware run exposed a test-only environment dependency: SIGDN_NORMALDISPLAY returned win on Windows Server (extensions hidden) instead of win.ini. Commit d26630d now asserts the stable SIGDN_FILESYSPATH; the focused test passes in Release on .NET 9 and .NET 10. |
Co-authored-by: Copilot <[email protected]> Copilot-Session: b24622c7-c9d6-44f0-9a20-85aac5ff11d6
Co-authored-by: Copilot <[email protected]> Copilot-Session: b24622c7-c9d6-44f0-9a20-85aac5ff11d6
Co-authored-by: Copilot <[email protected]> Copilot-Session: b24622c7-c9d6-44f0-9a20-85aac5ff11d6
Co-authored-by: Copilot <[email protected]> Copilot-Session: b24622c7-c9d6-44f0-9a20-85aac5ff11d6
Co-authored-by: Copilot <[email protected]> Copilot-Session: b24622c7-c9d6-44f0-9a20-85aac5ff11d6
Co-authored-by: Copilot <[email protected]> Copilot-Session: b24622c7-c9d6-44f0-9a20-85aac5ff11d6
Co-authored-by: Copilot <[email protected]> Copilot-Session: b24622c7-c9d6-44f0-9a20-85aac5ff11d6
Jevan Saks (jevansaks)
marked this pull request as ready for review
August 5, 2026 06:15
Co-authored-by: Copilot <[email protected]> Copilot-Session: b24622c7-c9d6-44f0-9a20-85aac5ff11d6
Co-authored-by: Copilot <[email protected]> Copilot-Session: b24622c7-c9d6-44f0-9a20-85aac5ff11d6
Jevan Saks (jevansaks)
marked this pull request as draft
August 8, 2026 00:46
Jevan Saks (jevansaks)
marked this pull request as ready for review
August 11, 2026 16:22
Sergio Pedri (Sergio0694)
approved these changes
Sep 1, 2026
Sergio Pedri (Sergio0694)
left a comment
Member
There was a problem hiding this comment.
LGTM, seems very convenient!
Co-authored-by: Copilot <[email protected]> Copilot-Session: 3c541bf2-2b33-4212-8c2f-cb19a7af6728
Jevan Saks (jevansaks)
enabled auto-merge (squash)
September 1, 2026 22:44
Sergio Pedri (Sergio0694)
approved these changes
Sep 1, 2026
Jevan Saks (jevansaks)
deleted the
user/jevansa/com-out-ptr-marshalling-policy
branch
September 1, 2026 23:27
This was referenced Sep 3, 2026
This was referenced Nov 10, 2026
Open
Merged
Jesse Stricker (jessestricker)
pushed a commit
to jessestricker/windows-theme-switcher
that referenced
this pull request
Nov 14, 2026
Updated [Microsoft.Windows.CsWin32](https://github.com/microsoft/CsWin32) from 0.3.330 to 0.3.371. <details> <summary>Release notes</summary> _Sourced from [Microsoft.Windows.CsWin32's releases](https://github.com/microsoft/CsWin32/releases)._ ## 0.3.371 ## Changes: * #1878: Initialize out SafeHandles before publishing them * #1875: Fix PInvoke017 for span-based string copies in using scopes This list of changes was [auto generated](https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=15977588&view=logs). ## 0.3.369 ## Changes: * #1870: Fix cross-assembly COM projections and shared helpers * #1871: Upload consumer-tested NuGet packages from PR builds This list of changes was [auto generated](https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=15944789&view=logs). ## 0.3.367 ## Changes: * #1864: Fix OverflowException for sign-extended handles in SafeHandle conversions This list of changes was [auto generated](https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=15771099&view=logs). ## 0.3.366 ## Changes: * #1860: Update Win32 metadata to 71.0.37-preview * #1859: Generate SafeHandle owners for cleanup functions that return BOOLEAN * #1844: Generate SafeHandle for RAIIFree-annotated parameters, and make getting the Value from a SafeHandle easier (but still safe) This list of changes was [auto generated](https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=15738141&view=logs). ## 0.3.363 ## Changes: * #1846: Support TypeDefinition handles for struct-typed constants in nesting and extension blocks * #1851: Switch builds to the VSEng-MicroBuildVSStable pool * #1850: Fix build-task LibraryImport generation with extensionReceiver * #1825: extensionReceiver with CsWin32RunAsBuildTask=true emits unsupported LibraryImport partials This list of changes was [auto generated](https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=15677307&view=logs). ## 0.3.360 ## Changes: * #1849: Fix custom marshaller namespaces for root metadata types * #1848: Flat-namespace native typedef marshallers emit invalid C# in build-task mode * #1828: Fix XML documentation with colliding Win32 ABI types This list of changes was [auto generated](https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=15621650&view=logs). ## 0.3.358 ## Changes: * #1843: Use published Win32 metadata for interior-pointer tests * #1840: Keep buffers containing interior pointers as native pointers * #1820: Exclude Foundation.Metadata from direct API generation This list of changes was [auto generated](https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=15604398&view=logs). ## 0.3.355 ## Changes: * #1838: Update Win32 metadata to 71.0.28-preview This list of changes was [auto generated](https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=15590335&view=logs). ## 0.3.347 ## Changes: * #1821: Honor configured visibility for IVTable This list of changes was [auto generated](https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=15574118&view=logs). ## 0.3.346 ## Changes: * #1831: Generate safe COM output pointer ABI * #1835: Add `CsWin32PlatformTarget` to generate arch-specific APIs in AnyCPU projects * #1807: Update dependency Xunit.Combinatorial to 2.1.41 * #1817: Update dependency Microsoft.NET.Test.Sdk to 18.10.1 - autoclosed * #1814: Update nbgv and nerdbank.gitversioning updates to 3.10.94 * #1815: Update dependency powershell to v7.6.6 * #1811: Update dependency dotnet-coverage to v18.11.2 * #1816: Update Dockerfile and global.json updates * #1823: Update dependency ubuntu to v26 * #1808: Update actions/deploy-pages action to v5.0.1 <details><summary><b>See More</b></summary> * #1824: Update .NET SDK to 10.0.401 This list of changes was [auto generated](https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=15556629&view=logs).</details> ## 0.3.335 ## Changes: * #1822: Fix IInspectable-derived COM interface layout * #1813: Fix GitHub release service connection This list of changes was [auto generated](https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=15400584&view=logs). ## 0.3.333 ### Feature Improvements - **Smarter COM marshalling ([#1771](microsoft/CsWin32#1771 CsWin32 now automatically marshals recognized COM outputs as WinRT objects when appropriate. - **Simpler IID/PPV calls ([#1720](microsoft/CsWin32#1720 IID and `void**` parameter pairs now produce generic `<T>` overloads. Before: ```csharp shellItem.BindToHandler(pbc, in bhid, typeof(IStream).GUID, out object result); IStream stream = (IStream)result; ``` After: ```csharp shellItem.BindToHandler<IStream>(pbc, in bhid, out IStream stream); ``` CsWin32 supplies the IID and returns the strongly typed interface directly. ## Changes: ### Fixes: * #1745: Invalid Code Generated for CsWin32.UI.Accessibility methods/interfaces/Delegates With `"allowMarshaling": true` * #1739: NullReferenceException from passing null as CallbackParam for MiniDumpWriteDump ### Others: * #1812: Make generator path quoting test cross-platform * #1810: Preserve coclass generic type fields for AOT * #1809: Quote generator tool path in command line * #1771: Automatically marshal COM outputs as WinRT * #1789: Update dotnet monorepo to 5.9.0 * #1797: Update dependency nerdbank.dotnetrepotools to v1.5.42 <details><summary><b>See More</b></summary> * #1803: Update dependency CSharpIsNullAnalyzer to 0.2.19 - autoclosed * #1801: Update dependency Microsoft.Windows.SDK.CPP to 10.0.28000.2705 * #1800: Update dependency Microsoft.Windows.SDK.BuildTools to 10.0.28000.2705 * #1788: Update dependency Microsoft.NET.Test.Sdk to 18.9.0 * #1787: Update dependency powershell to v7.6.5 * #1782: Update Dockerfile and global.json updates * #1786: Qualify special string typedefs (PCWSTR) to Windows.Win32.Foundation for non-Win32 metadata * #1784: Update dependency NuGet.Protocol to 7.9.0 * #1781: Null-terminate PCSTR friendly overload strings * #1775: Generated string-friendly overloads for PCSTR parameters do not append a null terminator ... (truncated) Commits viewable in [compare view](https://github.com/microsoft/CsWin32/commits/v0.3.371). </details> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This was referenced Nov 15, 2026
deps: Bump Microsoft.Windows.CsWin32 from 0.3.321 to 0.3.371
tahazarif10/local-ai-desktop-copilot#43
Open
This was referenced Nov 22, 2026
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
IID/void**outputs through C#/WinRT when the returned identity implementsIInspectable, with COM fallback onE_NOINTERFACE.comInterop.autoWinRTMarshallingopt-out.ComWrappers.TryGetComInstanceand classic COM RCW identity throughMarshal.GetIUnknownForObject.[GeneratedComClass]CCWs and C#/WinRT marshalling for ordinary managed CCWs.docs/design.Validation
Design: #1770
Generated with Copilot CLI, model: GPT-5.6 Sol.