From 4fe53616ecc40b914ba756bf8581c8a2b29dcf3b Mon Sep 17 00:00:00 2001 From: Scover Date: Fri, 9 Dec 2022 16:06:26 +0100 Subject: [PATCH] Added mssing Pack = 1 to TASKDIALOG_BUTTON (#351) Fixes access violation when calling TaskDialogIndirect --- PInvoke/ComCtl32/CommCtrl.TaskDialog.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PInvoke/ComCtl32/CommCtrl.TaskDialog.cs b/PInvoke/ComCtl32/CommCtrl.TaskDialog.cs index 4dd27d0b..3978876f 100644 --- a/PInvoke/ComCtl32/CommCtrl.TaskDialog.cs +++ b/PInvoke/ComCtl32/CommCtrl.TaskDialog.cs @@ -945,7 +945,7 @@ namespace Vanara.PInvoke /// uses this structure. /// [PInvokeData("Commctrl.h", MSDNShortId = "bb787475")] - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode, Pack = 1)] public struct TASKDIALOG_BUTTON { /// Indicates the value to be returned when this button is selected. @@ -1243,4 +1243,4 @@ namespace Vanara.PInvoke } } } -} \ No newline at end of file +}