Skip to content
This repository was archived by the owner on Jul 26, 2023. It is now read-only.

Commit 7f5107d

Browse files
committed
Fix DwmGetWindowAttribute method signature
The native type for the pvAttribute parameter is PVOID but we were using out as well as �oid* so we were effectively using double-pointers. Fixes #527
1 parent d0340a5 commit 7f5107d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/DwmApi/DwmApi.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public static extern HResult DwmGetColorizationColor(
8787
/// <param name="cbAttribute">The size of the <see cref="DWMWINDOWATTRIBUTE"/> value being retrieved. The size is dependent on the type of the <paramref name="pvAttribute"/> parameter.</param>
8888
/// <returns>If this function succeeds, it returns <see cref="HResult.Code.S_OK"/>. Otherwise, it returns an <see cref="HResult"/> error code.</returns>
8989
[DllImport(nameof(DwmApi))]
90-
public static unsafe extern HResult DwmGetWindowAttribute(IntPtr hwnd, DWMWINDOWATTRIBUTE dwAttribute, out void* pvAttribute, int cbAttribute);
90+
public static unsafe extern HResult DwmGetWindowAttribute(IntPtr hwnd, DWMWINDOWATTRIBUTE dwAttribute, void* pvAttribute, int cbAttribute);
9191

9292
/// <summary>
9393
/// Extends the window frame into the client area.

src/DwmApi/PublicAPI.Shipped.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ PInvoke.DwmApi.DwmEnableCompositionFlags.DWM_EC_DISABLECOMPOSITION = 0 -> PInvok
3636
PInvoke.DwmApi.DwmEnableCompositionFlags.DWM_EC_ENABLECOMPOSITION = 1 -> PInvoke.DwmApi.DwmEnableCompositionFlags
3737
static PInvoke.DwmApi.DwmEnableBlurBehindWindow(System.IntPtr hWnd, PInvoke.DwmApi.DWM_BLURBEHIND pBlurBehind) -> PInvoke.HResult
3838
static PInvoke.DwmApi.DwmEnableBlurBehindWindow(System.IntPtr hWnd, System.IntPtr pBlurBehind) -> PInvoke.HResult
39-
static PInvoke.DwmApi.DwmGetWindowAttribute(System.IntPtr hwnd, PInvoke.DwmApi.DWMWINDOWATTRIBUTE dwAttribute, out System.IntPtr pvAttribute, int cbAttribute) -> PInvoke.HResult
39+
static PInvoke.DwmApi.DwmGetWindowAttribute(System.IntPtr hwnd, PInvoke.DwmApi.DWMWINDOWATTRIBUTE dwAttribute, System.IntPtr pvAttribute, int cbAttribute) -> PInvoke.HResult
4040
static extern PInvoke.DwmApi.DwmDefWindowProc(System.IntPtr hwnd, uint msg, System.IntPtr wParam, System.IntPtr lParam, out System.IntPtr plResult) -> bool
4141
static extern PInvoke.DwmApi.DwmEnableBlurBehindWindow(System.IntPtr hWnd, PInvoke.DwmApi.DWM_BLURBEHIND* pBlurBehind) -> PInvoke.HResult
4242
static extern PInvoke.DwmApi.DwmEnableComposition(PInvoke.DwmApi.DwmEnableCompositionFlags uCompositionAction) -> PInvoke.HResult
4343
static extern PInvoke.DwmApi.DwmFlush() -> PInvoke.HResult
4444
static extern PInvoke.DwmApi.DwmGetColorizationColor(out uint pcrColorization, out bool pfOpaqueBlend) -> PInvoke.HResult
45-
static extern PInvoke.DwmApi.DwmGetWindowAttribute(System.IntPtr hwnd, PInvoke.DwmApi.DWMWINDOWATTRIBUTE dwAttribute, out void* pvAttribute, int cbAttribute) -> PInvoke.HResult
45+
static extern PInvoke.DwmApi.DwmGetWindowAttribute(System.IntPtr hwnd, PInvoke.DwmApi.DWMWINDOWATTRIBUTE dwAttribute, void* pvAttribute, int cbAttribute) -> PInvoke.HResult
4646
static extern PInvoke.DwmApi.DwmExtendFrameIntoClientArea(System.IntPtr hWnd, PInvoke.UxTheme.MARGINS margins) -> PInvoke.HResult

0 commit comments

Comments
 (0)