Skip to content

Correct DCompositionGetStatistics array-count metadata - #2387

Open
Jevan Saks (jevansaks) with Copilot wants to merge 4 commits into
mainfrom
copilot/fix-dcompositiongetstatistics-parameter-reference
Open

Jevan Saks (jevansaks) with Copilot wants to merge 4 commits into
mainfrom
copilot/fix-dcompositiongetstatistics-parameter-reference

Conversation

Copilot AI commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

DCompositionGetStatistics::targetIds incorrectly uses CountFieldName to reference the targetIdCount parameter.

  • Header: Correct the SAL reference from targetCount to targetIdCount.
  • Metadata: Remove the invalid emitter override, allowing SAL to produce [NativeArrayInfo(CountParamIndex = 2)].
  • Regression coverage: Assert parameter index 2 and absence of CountFieldName.

Copilot AI and others added 2 commits October 26, 2026 04:16
Co-authored-by: jevansaks <20667023+jevansaks@users.noreply.github.com>
Co-authored-by: jevansaks <20667023+jevansaks@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix DCompositionGetStatistics metadata CountFieldName usage Correct DCompositionGetStatistics array-count metadata Oct 26, 2026
Co-authored-by: jevansaks <20667023+jevansaks@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

📋 API Surface Diff

+1 additions / -1 deletions vs main branch (full validation run)

Click to expand API diff
diff --git "a/bin\\baseline.apidump.cs" "b/bin\\current.apidump.cs"
index bc6e749a..652dc7b5 100644
--- "a/bin\\baseline.apidump.cs"
+++ "b/bin\\current.apidump.cs"
@@ -176973,7 +176973,7 @@ public static class Apis
 
 	[DllImport ("dcomp.dll", ExactSpelling = true, PreserveSig = false)]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/dcomp/nf-dcomp-dcompositiongetstatistics")]
-	public unsafe static extern HRESULT DCompositionGetStatistics ([In] ulong frameId, [Out] COMPOSITION_FRAME_STATS* frameStats, [In] uint targetIdCount, [Optional][Out][NativeArrayInfo (CountFieldName = "targetIdCount")] COMPOSITION_TARGET_ID* targetIds, [Optional][Out] uint* actualTargetIdCount);
+	public unsafe static extern HRESULT DCompositionGetStatistics ([In] ulong frameId, [Out] COMPOSITION_FRAME_STATS* frameStats, [In] uint targetIdCount, [Optional][Out][NativeArrayInfo (CountParamIndex = 2)] COMPOSITION_TARGET_ID* targetIds, [Optional][Out] uint* actualTargetIdCount);
 
 	[DllImport ("dcomp.dll", ExactSpelling = true, PreserveSig = false)]
 	public unsafe static extern HRESULT DCompositionGetTargetStatistics ([In] ulong frameId, [In][Const] COMPOSITION_TARGET_ID* targetId, [Out][RetVal] COMPOSITION_TARGET_STATS* targetStats);

This comment is automatically updated on each push.

@jevansaks
Jevan Saks (jevansaks) enabled auto-merge (squash) October 26, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DCompositionGetStatistics metadata uses CountFieldName to refer to a parameter

2 participants