Skip to content

Releases: dahall/Vanara

Release Notes - 4.2.1

09 Sep 23:18

Choose a tag to compare

Additions

  • Added Vanara.PInvoke.WindowsDriverFramework (partial implementation) and Vanara.PInvoke.Hid (full impl) (#548)
  • Added enumerability to BitField

Fixes

  • Fixed bug in FindPackagesByPackageFamily (#552)
  • Added required RpcStringMarshaler.GetInstance method (#553)
  • Resolve #555 and #556
  • Fixed a lot of problems with parameters in Shell32\ShlDisp.cs per #557

Release Notes - 4.2.0

25 Aug 16:27

Choose a tag to compare

Major changes

  • Migrated solution to Central Package Management
  • Added Vanara.PInvoke.TelephonyApi (TAPI) assembly with all 3.x interfaces
  • Many additions, changes, and a few BREAKING CHANGES to Kernel32 as I did a full review after many years.

Additions

  • Added bindlink.h to Kernel32
  • Added ComConnectionPoint functionality to retrive the cookie for each supported IID.
  • Added functions for hit lists to BitHelper
  • Added generator that looks for MarshaledAlternativeAttribute and creates conversion code to process between original simple structure and new Marshaled structure
  • Added GuidToStringMarshaler, an ICustomMarshaler to convert an object with a Guid value or a Guid string representation to a formatted string value.
  • Added INVALID_HANDLE_VALUE fields to base handles
  • Added missing MRU list and Flat scrollbar functions and types
  • Added missing WinCrypt structures, updated IntPtr fields with stronger typed StructPointer and ArrayPointer types, added missing error constants.
  • Added ModalDialog class to handle resource based dialogs
  • Added multiple SendDlgItemMessage overloads (like SendMessage)
  • Added ReadFile overloads
  • Added SafeHANDLE null equality handler (false) and made ReleaseOwnership virtual
  • Added some annotation attributes that will eventually feed generators: AddAsMember, Ignore, and SizeDef
  • Added spuihelp.h methods and other minor fixes to SpeechApi
  • Added support to VanaraMarshaler for Marshaled structures
  • Added UnionHelper static class that has methods to make processing overlapping values easier without using ExplicitLayout
  • Added Win32Error.GetExceptionForLastError
  • Adds the two flags that were introduced after Windows 10 1709 but are still missing from Vanara’s CF_UPDATE_FLAGS enum.
  • Add ed CF_UPDATE_FLAG_ALWAYS_FULL & CF_UPDATE_FLAG_ALLOW_PARTIAL to CF_UPDATE_FLAGS (#540)

Changes and Fixes

  • BREAKING CHANGE: Changed SafeAllocatedMemoryHandle.CopyTo(SafeAllocatedMemoryHandle h, SizeT l) and removed second param to prevent ambigous calls. Moved DangerousSetSize to SafeAllocateMemoryHandleBase. Added param check to CopyTo(SizeT start, SizeT length, ISafeMemoryHandleBase dest, SizeT destOffset = default) to prevent buffer overreads and fixed dest checks.
  • BREAKING CHANGES: Fixed MemoryApi MapUserPhysicalPagesScatter and GetMemoryErrorHandlingCapabilities parameters
  • Changed all handles to derive from SafeHANDLE instead of SafeHandle and derivatives to get extra functionality and work better with new analyzer. Hopefully not a breaking change.
  • Changed SafeEventHandle parameters to HEVENT for broader use.
  • Created NUnit TestWhenElevated attribute to mark methods that shouldn't fail if run when not elevated.
  • Exposed HINSTANCE of ModalDialog
  • Extracted ISafeMemoryHandleBase from SafeAllocatedMemoryHandleBase and made ISafeMemoryHandle derive from it.
  • Fixed bug how ModalDialog returned from WM_COMMAND
  • Fixed bug in Library nuspec file
  • Fixed bug in NativeMemoryStream.Read(byte[]) not handling null correctly.
  • Fixed Clipboard.AnsiToUnicode after changes to MultibyteToWideChar function
  • Fixed incomplete parameter declarations in CldApi.CfUpdatePlaceholder (#546)
  • Fixed layout issues with Ole32.DVTARGETDEVICE (#550)
  • Fixed layout of OPEN_VIRTUAL_DISK_PARAMETERS (#541)
  • Fixed problem wtih WlanApi.DOT11_SSID not handling UTF-8 strings (#545)
  • Fixed problems with GETTEXTEX fields
  • Minor changes, but unresolved problems, with CSharpRunner under .NET 8
  • More work on SpeechApi adding in alternative Marshaled structures and overloads
  • Updated AdvApi32.EVENT_TRACE_PROPERTIES with ctors
  • Updated NuGet packages for solution

Release Notes - 4.1.6

20 Jun 15:03

Choose a tag to compare

Flubbed the push of 4.1.5 so had to roll to 4.1.6 to make NuGet.org work again. Sorry. :(

Release Notes - 4.1.5

20 Jun 12:55

Choose a tag to compare

Additions

  • Added SpeechApi assembly and extra elements needed in UrlMon
  • Added ID2D1RenderTarget.CreateSolidColorBrush accepting a Color param.

Fixes

  • Fixed bugs with ID2D1GeometrySink.AddLines and AddBeziers declarations
  • Fixed bug in ID2D1RenderTarget.CreateGradientStopCollection
  • Fixed parameters in IWICBitmapFrameEncode.Initialize and IWICComponentFactory.CreateEncoder
  • Updated pen functions to use better enum values
  • Updated ID2D1Geometry method params for optionality
  • Added D2D_MATRIX_3X2_F.Invert() and IsInvertible
  • Added more System.Drawing.Color overloaded methods to D2D1
  • Made D3D_SIZE_F implicit conversion from SIZE
  • Fixed buggy GetSize and GetPixelFormat methods in various interfaces by making return value an out param and adding overloads
  • Removed directory deletion from VssApi project due to failures
  • Added and fixed undocumented D3D12 structures

Release Notes - 4.1.4

07 Jun 15:07

Choose a tag to compare

Breaking Changes

  • Changed ID2D1RenderTarget.EndDraw to return HRESULT and added more overloaded extension methods.Fixed mult op, added ctor and Skew to D2D_MATRIX_3X2_F
  • Breaking change: Fixed missing enum params in scrollbar functions
  • Breaking change: Changed type of CLAIM_SECURITY_ATTRIBUTE_V1.Name from string to StrPtrUni to work more easily with unmanaged memory which is required by the rest of the structure.Moved memory references from SafeMemoryHandleExt to parent SafeAllocatedMemoryHandle for broader use.Fixed bug in PSID_IDENTIFIER_AUTHORITY.ctor(IntPtr)

Fixes

  • Minor attribute updates to IClassFactory.CreateInstance
  • Fixed argument for StringHelper.Write so that it doesn't break existing code.
  • Implemented suggest fix for WindowBase.Create event #534
  • Fixed bugs in SizeT conversions
  • Fixed bug in ResourceId.id setter not handling 0.
  • Fixed bug in ImageListExtension.ToImageList
  • Updates to ShellContextMenu and bug fix #536
  • Change ShellItem.InvokeVerb to use ShellExecuteEx instead of IContextMenu.InvokeCommand for better compatibilityMore work on ShellContextMenu
  • Fixed CLAIM_SECURITY_ATTRIBUTE_V1 test to work with new change
  • Adjusted PSID.ToString(string) to get common name with fewer privileges
  • Fixed param type in NCrypt.NCryptSignHash
  • Fixed misspelling in WpdParameterAttributeForm value
  • Fixed problem with ID2D1RenderTarget.GetSize and GetPixelSize methods throwing memroy errors with return types.

Additions

  • Added support for .NETStandard 2.1 and fixed bug #532
  • Added first release of complex generic marshaler for structures
  • Added ICreateSafeMemoryHandle to allow for interface creation of a safe memory handle and implemented in Core, Kernel32, and Cryptography assemblies.
  • Added StringHelper methods to handle encoded strings
  • Added IntPtr.ToStringEnum extension method handling encoded strings
  • Added StringHelper.Write method with encoder
  • Added AdvApi32 RegRenameKey method #535
  • Added Encoding variants to IntPtr.Convert extensions
  • Updated memory handles to use factory and handle disposable subrefrences
  • Added extension IntPtr.ToStringEnum with encoding
  • Added IntPtr.GetNulledArrayLength and fixed IntPtr.ToStringEnum for concattenated stringsCommits on May 21, 2025
  • Added size constants to CMINVOKECOMMANDINFOEX
  • Added SDDL string constants
  • Updated AdvApi32 structures in WinNT with new *Pointer values
  • Added lots of missing constants to PortableDeviceApi
  • Made IPortableDeviceServiceManager.GetDeviceServices param nullable
  • Added support for accelerators with MessagePump and VisualWindow
  • Added more D2d1 helpers
  • Enhanced D3DCOLORVALUE with more conversions and constructors
  • Added D2D_MATRIX_3X2_F.Rotation
  • Added DirectX error values from winerror.h

Release Notes - 4.1.3

24 Apr 18:46

Choose a tag to compare

Kind of an accidental release, so very few changes:

  • Enhanced SafeMemoryPool so that all entries can be named.
  • Added many extension methods for Type, most useful for marshaling.
  • Fixed bug #530 [in declaration of IPropertyStoreFactory.GetPropertyStore
  • Added Array.MarshalToPtr extension method

Release Notes - 4.1.2

16 Apr 20:19

Choose a tag to compare

Additions

  • Added Vanara.PInvoke.Dcomp for DirectComposition
  • Added explicit converter operators to IntPtr for all static XXPointer structs
  • Added IHandle.IsInvalid and adjusted all implementers
  • Added equality support to LUID
  • Added Win32Error.ThrowLastErrorIfNull that handles null class values
  • Updated base handle equality
  • Added new FwpUClnt elements (#525)
  • Added simplified System.Index and System.Range structs for .NET 4.8 and .NET Std 2.0
  • Added Vanara.BitField struct to simplify bit fields in structures and updated bit fields in Shared and Kernel32 as additional tests.

Breaking changes

  • Many changes in User32 to make WindowClass and WindowBase wrappers work. There are some breaking changes with removed and added procedures to both wrappers.
  • Made all IUnknown out parameters nullable to handle output when result is a failure
  • Obsoleted AnySizeStructFieldArray
  • Added Win32.ThrowLastErrorIfInvalidHandle to handle IHandle implementers
  • Removed IDCompositionAnimation from UIAnimation now that Dcomp is done.
  • Removed X86 and X64 Platform specs

Fixes

  • Adjustments to all assemblies after adding code generator for all methods that can retrieve a casted IUnknown pointer
  • Fixes to some autohandle conversions
  • Updated IntPtr references in ActiveDS and DirectoryServices to Pointer structures
  • Fixed readonly declarations on ResourceId
  • Fixed some nullable parameters
  • Fixed bug in SYSTEM_LOGICAL_PROCESSOR_INFORMATION definition (#524)
  • Applying unfunctional and unincluded IUnkMethodGenerator so that build occurs for other commits
  • Added unit test for WinTrust and fixed some errors in WinTrust
  • A number of fixes and extensions added to BCrypt and NCrypt, most notably with any methods using NCryptBufferDesc.
  • Added missing BCrypt and NCrypt algorithm tags
  • Extended OverlappedAsyncBase.EndOverlappedFunction to allow for the wait state to have a timeout. (#528)

Release Notes - 4.1.1

07 Mar 15:07

Choose a tag to compare

Fixed critical bug with default creation of SafeHANDLE derived classes.

Release Notes - 4.1.0

06 Mar 21:33

Choose a tag to compare

Major Changes (hopefully not breaking)

  • Added .NET 9.0 support and removed .NET 4.5 support
  • Moved Vanara.PInvoke.VssApi to .NET 8.0 LTS from 6.0
  • Moved Unit Tests to .NET 8.0
  • Auto-generated handles now implemented for all projects.

Fixes and Additions

  • Moved IHandle into Handles folder
  • Added true and false operators to handle-type classes
  • Added attributes for code generation of handles
  • Added missing constants to D3D11
  • Fixed ID3D11SwapChain.Present method and added IDXGIKeyedMutex to DXGI
  • Fix issue with plibNewPosition not set properly (#510)
  • Added missing WM_xx messages for Per Monitor v2 (#511)
  • Added ability (not on by default) for ComStream to leave the underlying stream open after disposal. Also, optimized the Dispose pattern and removed destructor.
  • Added undocumented ListView messages (#515)
  • Added Kernel32.WIN32_STREAM_ID_HEADER as work-around to challenges with BackupRead (#516)
  • Fixed major bug in SafeMemoryHandleExt.ToString that caused exception when passing allowed len param as -1 (#517)
  • Corrected package and assembly name of Vanara.WindowsUpdate from Vanara.PInvoke.WindowsUpdate
  • Added ReadBackup overload that does the work of pulling each stream out of a file with test.

Release Notes - 4.0.5

08 Feb 21:16

Choose a tag to compare

Big Changes

  • Separated DirectX (Graphics) project into individual assemblies and added most functions, interfaces, and constants for DirectX assemblies.
  • Renamed Graphics packages to DirectX and it includes all DirectX projects.
  • Swapped AppVeyor for GitHub Actions and MyGet.
  • Lots of changes to move to latest NUnit testing version

Breaking Changes

  • BREAKING CHANGE: Renamed misspelled static extension class HexDempHelpers to HexDumpHelpers
  • POTENTIAL BREAKING CHANGE: Changed ISafeMemoryHandle.AddSubReference and all derived classes to use SafeAllocatedMemoryHandle rather then the interface for more generality. Also, changed many int and uint parameters to SizeT.
  • More bug fixes and usability for ActiveDS. BREAKING CHANGE: type change of ADS_SEARCH_COLUMN.pADsValues to object?[].
  • BREAKING CHANGE: Pulled generics out of IADsContainerObject
  • Hopefully not a breaking change for everyone, but modified MAKELONG, MAKELONG64, and MAKELPARAM macro implementations to use IConvertible.

Other additions and fixes

  • Added StrPtrUni from char* operator
  • Added ArrayPointer to IntPtr operator
  • Added marshaling logic to ADS_ATTR_INFO and ADS_SEARCH_COLUMN. Completed definition of ADSVALUE.
  • Fixed definitions of IDirectoryObject and IDirectorySearch and added extension methods for each.
  • Added SYSTEMTIME.CheckBounds to validate entries before converting.
  • Added SizeT conversions from ushort and short.
  • Changed many int and uint parameters to SizeT for interop functions (ToArray, ToStruct, etc.)
  • Lots of work on DirectoryServices:
    • Added marshaling to many structures for more intutive use
    • Fixed bugs and added extension methods for IDirectorySearch and IDirectoryObject
    • Improved usability of ADSVALUE
    • Added container support to wrappers where missing
    • Fixed XML docs
  • Added CorrespondingTypeAttribute values to ADS_SEARCHPREF
  • Fixed bug in ADS_SEARCHPREF_INFO.ctor and ADSTYPE.SetValue not handling values for ADSTYPE_PROV_SPECIFIC
  • Added DirectoryObject and DirectorySearch and updated Container interface.
  • Fixed bug in ADsSchemaPropertySyntax casting from IADs
  • Fixed alignment error in User32.POINTER_TYPE_INFO (#489)
  • Added Kernel32.GetFileInformationByName method and supporting structures
  • Added Kernel32.TlsGetValue2 method
  • Removed driver and DX headers from Gdi32. They will never be implemented.
  • Added Shell32.IServiceProvider.QueryService extension
  • Fixed Shell32.IShellWindows interface methods and added extension method for FindWindowSW. Part of #469 response.
  • Added Vanara.PInvoke.UIAnimation assembly and test
  • Added float and generic Matrix classes to Core.
  • Added COM object logic to IntPtrConverter
  • Added COLORREF.ctor that sets all values
  • Moved LUID from Security (AdvApi32) to Shared
  • Added SafeAllocatedMemoryHandleBase.GetContentHashCode to get a fast hash of all allocated bytes.
  • More FunctionHelper.IidGetObj helpers
  • Fixed documentation for PROPVARIANT reference values (#497)
  • Partial but fully working implementation of NtQueryInformationFile with test and extension method. (#498)
  • Added a few undocumented HRESULT codes (#490)
  • Fixed #488 that ShellFolder.EnumerateChildIds might throw NullReferenceException if failed to enum the objects (#499)
  • Minor updates to WUApi, but #496 persists. Possible non-bug and operation of Windows Update when empty collection provided.
  • Fixed bug #496 though don't know why it throws exception.
  • Fixed #502 and added some optimations to NativeMemoryStream
  • Update FwpTypes.cs (FWP_DATA_TYPE.FWP_SINGLE_DATA_TYPE_MAX) (#503)
  • Fixed bug with enum and method around ID3D12Device.CheckFeatureSupport and fixed memory for D3DX12SerializeVersionedRootSignature
  • Proposed fix for #504
  • Optimized IntPtr.CopyTo extension using System.Buffer
  • Added SafeAllocatedMemoryHandleBase.CopyTo methods to copy memory segments to pointers and other SafeAllocatedMemoryHandleBase instances
  • Fixed bug in MsgExtensions.GetParam method
  • Fixed bug in IUnknownPointer
  • Added User32.NCCALCSIZE_PARAMS
  • Added macro implementations from windowsx.h into appropriate projects.
  • Some compatibility fixes with new MAKELONG64 impl
  • Fixed bug in MOUSEWHEEL
  • Augmented ShellDataObject to confirm equivalent streams (#505)
  • Added SizeFieldNameAttribute and helper methods to specify the size of array and string pointers.