Skip to content

Release Notes - 3.4.0

Compare
Choose a tag to compare
@dahall dahall released this 14 Mar 21:56
· 921 commits to master since this release

Major Changes to .NET Version support

  • Removed support for .NET 2.0, 3.5, and 4.0, .NET Core 2.0, 2.1, and 3.0 since all are or shortly will be out of support.
  • Added support for .NET 4.8 and 6.0.
  • Removed PackageReference details for .NET 5 and 6 projects with System.Drawing.Common.
  • Moved most TargetFrameworks tags out of project files and into Directory.Build.props for easier maintenance.

Breaking Changes due to dependency reduction

  • Reduced dependencies of almost all assemblies on .NET runtime assemblies not part of core System assemblies, most specifically System.Drawing and System.Windows.Forms. This forced the removal of some overloaded methods and the replacement of leveraged structures and enums with native equivalents.
  • Added Vanara.Windows.Shell.Common which has all the content from Vanara.Windows.Shell that did not have dependencies.
  • Removed dependencies on WinForms and WPF for Gdi32 and User32 assemblies. This forced the removal of extension methods to convert HBITMAP and HICON to System.Windows.Media.Imaging.BitmapSource and all uses of IWin32Window.
  • Extracted all extension methods from Gdi32 and User32 and moved them to Vanara.Windows.Extensions.
  • Moved TEXTMETRIC, LOGPALLETTE, PALLETTEENTRY, and PC from Gdi32 to Shared project to remove dependencies on Ggi32 by other projects (e.g. Ole).
  • Added POINT struct to Vanara.PInvoke, changed all System.Drawing.Point reference to POINT, and optimized RECT and SIZE structures.
  • Added extension assemblies for WinForms, WPF, and WinUI/UWP
  • Converted ShellView items returning PIDLs to return ShellItems

Upgrade notes

  • Replace all instances of System.Drawing.Point in Vanara methods and properties with Vanara.PInvoke.POINT
  • Replace all instances of System.Windows.Forms.Form and Control and IWin32Window with the raw window handle (HWND)
  • If you are missing other items from System.Drawing or System.Windows.Forms look for new values or check the new Vanara.Windows.Extentions assembly.

New Assemblies

  • Added Antimalware assembly (Vanara.PInvoke.AMSI) with supporting wrapper class: Vanara.SystemServices.AntimalwareScan.
  • Vanara.PInvoke.Ime32
  • Vanara.PInvoke.Usp10 (Uniscribe)
  • Vanara.PInvoke.WinHTTP

Additions

  • Added ABN and ABS enums to ShellApi
  • Added HWND.HWND_BROADCAST constant
  • Added NMHDR.LParamAsRef method
  • Added PinnedObject implicit operator to unsafe void*.
  • Added SafeAllocatedMemoryHandleBase.GetBytes() and pulled SafeMemoryHandle.Locked from IMemoryMethods instance
  • Added SafeMoveableHGlobalHandle class and added support to locking memory to all memory classes.
  • Added StringHelper methods supporting encoders
  • Added Vanara.Windows.Shell.Taskbar class to get/set information regarding the system taskbar.
  • Added elements from mstcpip.h to Ws2_32
  • Added extra buffer when setting size from VanaraMarshaler to prevent errors when they're off due to alignment issues
  • Added helper functions to WINDOWPOS to help when using it with LPARAM values.
  • Added indexer to SafeMemString
  • Added missing hook constants from winuser.h
  • Added tcp_keepalive struct to Ws2_32
  • Applied new lang constructs to CLIPFORMAT
  • Extended SafeAllocatedMemoryHandle.ToType extension method to support CharSet
  • Incorporated non-breaking suggestions for Device and DeviceManager in #282
  • Made CorrespondingTypeAttribute.GetAttrForEnum public.
  • Made some optimizing changes to PInvoke.VirtDisk and added VirtualDisk.SetParentPath and SetParentPathWithDepth methods.

Fixes

  • Changed SafeMoveableHGlobalHandle.ctor(IntPtr...) method to not accept size and rather extract it using GlobalSize
  • Correct alignment for WTSINFO and WTSINFOEX. (#279)
  • Corrected APPBARDATA structure layout to address #276
  • Fixed #268
  • Fixed #274 (error in EnumerableEqualityComparer.Equals)
  • Fixed SecPkgContext_IssuerListInfoEx size and added extraction property
  • Fixed WINHTTP_CURRENT_USER_IE_PROXY_CONFIG so it exposed pointers which can be freed.
  • Fixed bug in Win32Error.ThrowLastErrorIf method that would exception if error was success.
  • Fixed bug with VirtDisk.GetStorageDependencyInformation and implemented VirtualDisk.GetStorageDependencyInformation() and VirtualDisk.DangerousGetHandle()
  • Fixed incorrect struct layout for WTSINFO (#278)
  • Fixed minor error handling in EnumFlagIndexer and added Intersect method.
  • Fixed multiple problems with SystemParametersInfo and SPI values (#283). Overload methods now are tested against all SPI values.
  • Fixed small bug in IntPtr.ToStringEnum
  • Lots of work to make using IDataObject and the clipboard more stable and usable. Added Get/Set extension methods for IDataObject. Added attributes to clipboard formats to help reading. Added formatters to process clipboard types. Fixed bugs in ShellDataObject and NativeClipboard.
  • Lower System.ValueTuple version dependency. (#280)
  • Prevented #269 by addeding documentation and removing [Optional] attribute on final param for SHChangeNotify.
  • TYPEFLAGS changed to uint (#267)
  • Updated documentation for all window messages.