-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Milestone
Description
- .NET Core Version: 5.0.100 and 3.1.404
- Windows version: Windows 10 (18363.1139)
- Does the bug reproduce also in WPF for .NET Framework 4.8?: No
- Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)? No
Problem description:
Calls to comctl32.dll
succeed in .NET Framework 4.8, but fail in .NET 5 and also in .NET Core 3.1 with a System.EntryPointNotFoundException
.
e.g.
[DllImport("comctl32.dll", PreserveSig = false)]
private static extern void TaskDialogIndirect([In] ref TaskDialogConfig pTaskConfig, out int pnButton,
out int pnRadioButton, [MarshalAs(UnmanagedType.Bool)] out bool pfVerificationFlagChecked);
// ...
var config = new TaskDialogConfig
{
pszWindowTitle = "Task dialog title",
pszMainInstruction = "Task dialog main instruction",
dwCommonButtons = TaskDialogCommonButtonFlags.OkButton | TaskDialogCommonButtonFlags.CancelButton,
// ...
};
using (new ComCtlv6ActivationContext(enable: true))
{
TaskDialogIndirect(ref config, out _, out _, out _);
}
Actual behavior:
System.EntryPointNotFoundException: Unable to find an entry point named 'TaskDialogIndirect' in DLL 'comctl32.dll'.
at TaskDialogApi.TaskDialog.TaskDialogIndirect(TaskDialogConfig& pTaskConfig, Int32& pnButton, Int32& pnRadioButton, Boolean& pfVerificationFlagChecked)
Expected behavior:
Display the Task Dialog requested
Minimal repro:
lindexi
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status