Download Latest Version Release Notes - 5.0.1 source code.tar.gz (17.1 MB)
Email in envelope

Get an email when there's a new version of Vanara

Home / v5.0.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-01-12 7.5 kB
Release Notes - 5.0.0 source code.tar.gz 2026-01-12 17.6 MB
Release Notes - 5.0.0 source code.zip 2026-01-12 19.0 MB
Totals: 3 Items   36.6 MB 0

Major release due to magnitude of changes introduced with full generation. Generation of simpler methods and consolidation of methods into safe handles added for primary assemblies. More to come.

Generator

  • Complete rewrite of code generator to merge existing and new SizeDef and Ignore attributes
  • Lots of updates based on new generated code. Mostly cosmetic, removing duplicate functions that are now generated, adjusting attributes to get the correct generation, and fixing a few bugs along the way.
  • Added generator support of methods that ask for a known interface and its GUID to automatically grab the grid.
  • Fixed and finished adding LPArray generator
  • Generator that adds simplified methods as overloads or as members of supporting handles

Additions

  • Added SHCreateDefaultContextMenuEx overloads and improve DEFCONTEXTMENU
  • Added ShellItemArray.FromPaths for creating from file paths
  • Added DisposingList to Vanara.Core for managed disposal of list elements
  • Added DynamicallyAccessedMembersAttribute for backward compatibility
  • Added FMTID values and moved PROPERTYKEY constants to using those instead of individual definitionFixed bug in SAFEARRAY.VarType property
  • Added Guid* operator to SafeGuidPtr
  • Added InteropExtensions.UnsafeAddrOfPinnedSpanElement method
  • Added OleThreadState class to handle thread-safe calling of OleInitializeCleaned and optimized POINT struct
  • Added OleThreadState handling to ShellContextMenu, added Invoke<T> method, optimized codeChanged ctors for CMINVOKECOMMANDINFOEX
  • Added SafeMemStruct.GetStringAtOffset method
  • Added Shell32.PIDL IsFolder and IsRoot properties
  • Added StringSyntaxAttribute for pre-NET7
  • Added StructPointer support for putting and geting "in" struct values
  • Added ability to export and import wallpaper settings for WallpaperManagerCommits
  • Added default ctor to SafeAnysizeStructMarshaler to prevent errors
  • Added enhanced interface for errors, IErrorProvider2 and used to genercize FunctionHelper.CallMethodWithTypedBufUpdated MarshalAs LPArray attributes with direction attribute and size param valueAdded more SizeParamIndex values
  • Added function and property to SafeBITMAPINFO to get header by ref.
  • Added implicit conversion of HCFFILE and SafeHCFFILE to HFILE for appropriate use by many CldApi functions (#563)Commits on Oct 14, 2025
  • Added memory handle support for Span in ctor and implicit operator
  • Added more attributes to IShellFolder methods
  • Added more buffer error codes
  • Added unit tests for ShellItemChangeWatcher.
  • Introduced a readonly FOURCC struct in Vanara.PInvoke to represent four-character codes used in multimedia formats. Provides constructors for uint, string, and char inputs, implicit conversions, string validation, and a string representation method. Designed for interop compatibility with sequential layout.Added code generation to Gdi32 assembly
  • Updated WLAN enums

Breaking Changes

  • Update IShellItem.BindToHandler signature and docs
  • Hid ShellItem.Dispose() to favor new Dispose(bool) methodUpdated shell unit tests to cover and exercise changes
  • Removed Vanara.PInvoke.SizeFieldName and updated helper method to use SafeDefAttribute instead. Too much overlapping functionality, limited use, and additional work for generator.Updated methods that have called FunctionHelper.IUnkObj to use MarshalAs attribute so generator can see themReplaced SizeFieldName attributes with SizeDef
  • Changed shell object wrappers to better handle disposing of COM objects using Dispose pattern and hard releasing of interface. Added Dispose(bool) method and finalizers.Updated lots of unit tests to work better, work correctly, or use more recent data.Commits on Dec 10, 2025

Fixes

  • Changed IPropertyDescription.FormatForDisplay to expose HRESULT return valueChanged impl of SHGetPropertyStoreFromIDList to use generated overload
  • Clarified ambiguous calls in ShlObj and improved structures with ctors and attributesChanged IContextMenu.GetCommandString declaration and fixed extension
  • Cleaned up PROPERTYKEY
  • Converted NativeClipboard to use OleThreadState
  • Enhance Shell32.BHID enum with additional CorrespondingType mappings
  • Fix ListViewNotification enum to start with correct LVN_FIRST value [#571]
  • Fix msbuild commands in cibuild.yml
  • Fixed Marshal.SizeOf expressions
  • Fixed bug in IEnumerable<T>.MarshalObjectsToPtr
  • Fixed bug in LoadString overload (#570)
  • Fixed bug in NCryptBufferDesc marshaling
  • Fixed bug in SafePACL when adding ACEs to empty ACL
  • Fixed bug in ShellDataTable.PopulateTableAsync that was failing a lookup
  • Fixed bug in WNetEnumResources
  • Fixed bug in update to FunctionHelper's known buffer errors
  • Fixed bug with User32.RAWHID field and added accessor methods
  • Fixed bugs in GetKnownFolderFromGuid and GetKnownFolderFromPath
  • Fixed disposal pattern for ShellFileOperations
  • Fixed enumerators that don't capture native memory [#569]
  • Fixed errant attributes exposed by generator
  • Fixed fields in PERF_DATA_HEADER per [#561]
  • Fixed incorrect definition of IExtractImage.GetLocation
  • Fixed initialization bug in MIB_IFROW
  • Fixed marshaling of WLAN_CONNECTION_NOTIFICATION_DATA [#566]
  • Fixed new bug in FindPackagesByPackageFamily (#558)
  • Fixed problems with initializing Clipboard functions and added supporting comparers and retrieversClipboard now throws an error if trying to be used in an MTA
  • Improve ShellLibrary init and disposal, clarify docs
  • Lots of changes to PIDL: Added ctor, Desktop property, GetRelativeTo and FIndCommonParent methodsChanged ctors for MENUITEMINFO
  • Made LsaRetrievePrivateData usable via overload
  • Made MoveFileEx and MoveFileWithProgress nullable (#568)
  • Major changes and fixes for ShellContextMenu with improved resource management, async support, and more robust menu handling.Refactored ShellItem to use a DisposingList for tracking and disposing of all IDisposable resources. Updated the Dispose pattern to prevent double disposal and ensure proper cleanup. Refactored key properties (ContextMenu, PIDL, Properties, PropertyDescriptions) to use AddDisposable for resource tracking. Changed GetToolTip to avoid leaking COM objects. Enhanced BindToHandler to follow COM conventions and improved XML documentation throughout.Override Dispose and Init to manage IShellFolder and categories lifetimes properly. Add a cached ContextMenu property returning a ShellContextMenu instance. Adjust GetInstance visibility for internal use.Implement IDisposable in ShellFolderCategorizer
  • More fixes adding finalizer to shell object wrappers
  • Move HWINSTA and HDESK from Shared to User32
  • Moved HANDLE and HANDLEConverter from autogen in Vanara.PInvoke.Shared to Vanara.CoreAdjusted Kernel32, User32, and Net assemblies to work with generator
  • Optimized and fixed ShellItemPropertyUpdates
  • Rearchitected PropertyStore and ShellItemPropertyStore to avoid disposal conflicts of held interfaces. Cleaned code.Fixed bug in PropertyDescription.FormatForDisplay
  • Refactor Shell32 helpers, add SHCreateItemHandlerFromParsingName
  • Removed ability in .NET 8 and later to automatically marshal binary serialized values supporting ISerialize due to security concerns. Still works in other builds.Enhanced test support classes
  • lpNewFileName may be null when used with MOVEFILE_DELAY_UNTIL_REBOOT.

Full Changelog: https://github.com/dahall/Vanara/compare/v4.2.1...v5.0.0

Source: README.md, updated 2026-01-12