Skip to content

Releases: dahall/Vanara

Release Notes - 4.0.4

14 Sep 14:16
Compare
Choose a tag to compare

New Assemblies

  • Vanara.PInvoke.ElsCore
  • Vanara.PInvoke.SpellCheckingAPI
  • Vanara.PInvoke.ActiveDS
  • Vanara.DirectoryServices

Additions

  • Added ADS errors to HRESULT values
  • Added AnySIzeStructFieldArray for cases when using in-memory structures with ANYSIZE arrays as the final field.
  • Added BCRYPT_DH_PARAMETERS_MAGIC const, BCRYPT_DH_PARAMETER_HEADER struct, and handle converters to BCRYPT_HANDLE
  • Added BCRYPT_XX_HANDLE conversions to BCRYPT_HANDLE
  • Added IEnumVARIANT.Enum extension method
  • Added MakeAbsoluteSD method with non-typed params.
  • Added NCryptBufferDesc ctor for arrays of NCryptBuffer
  • Added SafeAllocatedMemoryHandleBase.Equals overload that compares to IntPtr, byte[], and object.
  • Added StructPointer class to use in place of T* in structures.
  • Added VariantClear overload for ref VARANT param
  • Added backup stream structure and enums
  • Added missing ComCtl32.ImageList_XXX methods #481
  • Added missing messages, constants and enums related to the Touch API.
  • Added some helper methods and class to SpellCheckerApi
  • Added some helpers for structure fields that are pointers to arrays.
  • Added unsafe methods and structs to work with BITMAPINFO

Fixes/Changes

  • Breaking change: Updated ComDlg32.OPENFILENAME structure so that all LPCTSTR values are string?.
  • Changed SafePACL and SafePACE size specifiers so they alway align to DWORD boundaries rather than forcing correct input and throwing exceptions.
  • Extended SafeAllocatedMemoryBase.Equals to check more than handle and CompareTo to check handle equality first.
  • Extended VARIANT.ToObject to better support arrays.
  • Fixed bug in SafePSECURITY_DESCRIPTOR.MakeAbsolute, added MakePackedAbsolute to create a single allocated block with all parts of an absolute SD, and MakeSelfRelatative to round things out.
  • Fixed bug with new SafeHandle.Equals code
  • Fixed small bug in NCryptBufferDesc assignment of pBuffers not setting values correctly when null.
  • Set hresult of exceptionForHR with supplied message (#479)
  • Updated XML docs for IPortableDeviceXX methods per #483
  • Updated memory classes CreateFromStringList methods to support nullable strings.

Full Changelog: v4.0.3...v4.0.4

Release Notes - 4.0.3

05 Aug 02:38
Compare
Choose a tag to compare

Additions

  • Added ACE_TYPE with full set of enums for AceType value in AdvApi32.ACE_HEADER and all associated structures. Added IAccessControlEntry interface to identify all ACE structures. Fixed SafePACL.Size and added SafePACL.Clone.
  • Added AdvApi32.AddAce overload with simplified params
  • Added EnumExtensions.ToEnum(byte[]) method to convert a byte array to an enum.
  • Added IDisposable back to AmsiStream
  • Added IEqualityComparer for PACE values
  • Added IObjectAccessControlEntry to identify object ACEs. Many enhancements to SafePACL to treat as IList and handle smarter ACE inserts.
  • Added PACE.GetAceStruct extension to get correct structure from pointer to an ACE. Updated other extension methods to use AsRef rather than ToStructure for efficiency.
  • Added SafeMemoryHandle.DangerousOverrideSize to let programs set the size, usually after default ctor is used as out param.
  • Added SequenceCompare extension method similar to SequenceEqual in Linq
  • Added ShellFolder.EnumerateChildIds to get PIDLs from folder
  • Added ShellLibrary internal ctor with IShellLibrary param
  • Added VisibleWindow.Children and AddChild operations and fixed Run methods to not be ambiguous and to only call CreateWindow when needed.
  • Added WlanGetNetworkBssList for issue #470
  • Added ability to read DLGTEMPLATE(EX) streams
  • Added additional Kernel32.ReadFile overload
  • Added constructors to AdvApi32.EXPLICIT_ACCESS
  • Added equality ops to SafePACL
  • Added implementation for SecurityInfoImpl for ISecurityInformation2 but it crashes, so kept code but commented out interface inheritance.
  • Added missing PowrProf.GUID_ENERGY_SAVER_STATUS value
  • Added missing SI_OBJECT_INFO_Flags values. Changed parameter types in ISecurityInformation from IntPtr to GuidPtr for better type safety and updated parameter names to match those in the MIDL definitions. Changed BOOL values to BOOLEAN in EFFPERM_RESULT_LIST and SECURITY_OBJECT. Changed to PSID field in SID_INFO.
  • Added type hints to AMSI_ATTRIBUTE

Fixes

  • Adjust VisibleWindow test to use new Run signature
  • Adjusted SafeMemoryHandle.Size setter so that it only fills in zeros if AllocZeros is true.
  • BREAKING CHANGE: Made IShellLibrary.LoadLibraryFromItem and LoadLibraryFromKnownFolder return HRESULT to avoid exceptions when using those functions to test IShellLibrary
  • Changed User32.EnumChildWindows overload to return IReadOnlyList instead of IList
  • FIxed first param of ISecurityObjectTypeInfo.GetInheritSource
  • Fixed alignment bug in DLGITEMTEMPLATEEX serialization
  • Fixed bug in AdvApi32.ConvertStringSecurityDescriptorToSecurityDescriptor override
  • Fixed bug in PACL.CompareTo(PACL)
  • Fixed bug introduced by removal of DEVICE_NOTIFY
  • Fixed bugs in SensorsApi interface definitions and added a few extension methods
  • Fixed bugs in User32.GetDialogBaseUnits and MapDialogRect definitions
  • Fixed definition of Shell32.SHFILEOPSTRUCT (#471)
  • Fixed many nullability errors in SensorsApi interfaces
  • Fixed structure bug in FwpUClnt.FWP_VALUE0 that caused #475 and added a GetValue method to easier extract the value.
  • Hopefully not a breaking change, but SafeMemoryHandle.Write overloads now return the number of bytes written.
  • In AdvApi32, added comparison and equality functions for PACE and PACL, improved accuracy of PACE.GetMask, PACE.GetSid methods, added PACE.IsAlarmAce and PACL.Revision extension methods.
  • Lots of fixes and enhancements to User32 Dialog box methods and structures.
  • Revamped AnsiStream implementation to handle streams rather than allocated memory.
  • Updated Kernel32.LocalMemoryMethods with locking methods and logic for using non-lockable memory in alloc.
  • Updated SafePSECURITY_DESCRIPTOR string ctor to be more efficient
  • Updated ShellItem.Open so that it doesn't throw exceptions and is a little more efficient. Should help #474
  • Updated User32.SIZES structure with ctor and conversion operators.
  • Updated declaration of ISecurityInformation2 and added SID_INFO_LIST struct to AclUI

Full Changelog: v4.0.2...v4.0.3

Release Notes - 4.0.2

24 Jun 19:40
Compare
Choose a tag to compare

Breaking Changes

  • Exposed HRESULT in IShellItem.Compare as failing to will throw an exception when the items don't match.
  • Changed field type Kernel32.ACTCTX.lpResourceName to ResourceId from string to enable proper handling of resource identifiers.
  • Guid.KnownFolderId() and Environment.SpecialFolder.KnownFolderId were changed to return null when value is not found rather than throwing an exception.
  • Simplified Shell32.KNOWNFOLDER_DEFINITION to use strings instead of StrPtrUni field types. After testing, it appears that .NET does release the memory during the conversion process to System.String.
  • Changed TVGETITEMPARTRECTINFO to a struct and removed hidden memory allocation.

Additions

  • Added FunctionHelper.IidGetObj method to help extract interfaces from COM methods
  • Added HANDLEConverter class and added to common handles
  • Added IEmptyVolumeCache and supporting code
  • Added MsgParam attribute to all Property Sheet messages and notifications.
  • Added PROPERTYKEY.ctor(string) and CoerceToCanonicalValue
  • Added PSCreateMemoryPropertyStore overload to simplify
  • Added SHGetImageList overload
  • Added SHGetPropertyStoreFromParsingName overload to simplify getting interface
  • Added Shell32.SHSaveLibraryInFolderPath
  • Added ShellUtil. GetSize, GetWidth, and LoadImageFromImageFactory overloads
  • Added TreeView_ message macros. HTREEITEM constants, and (BREAKING CHANGE). Also cleaned and modernized code for TreeView.
  • Added Windows.Shell.ShellIconExtractor as a threaded way to get all icons for a folder or list of items.
  • Added a number of missing IShellLibrary macros.
  • Added additional enums and extension methods for IGlobalOptions.
  • Added advanced ctor for CMINVOKECOMMANDINFOEX
  • Added implicit conversion from IntPtr to BOOL
  • Added manifest to ComCtl32 to include v6 of the library and updated ComCtl32v6Context to use updated ACTCTX types
  • Added missing constants and macros from Prsht.h
  • Added missing message filters MSGF_COMMCTRL...
  • Added nullable param to IDataObjectV.EnumFormatEtc
  • Added optional attribute to fields of IFileSaveDialog.ApplyProperties
  • Added unit test for SearchApi, but couldn't get it to work per #447. Any help??

Fixes

  • Add Pack stmt to Shell32.SHQUERYRBINFO to make compatible with 32 or 64-bit.
  • Changed IPropertyStore.SetValue extension so value is coerced to correct type before setting.
  • Changed MSG structure so mimics SDK with POINT field rather than each value separate. Should stay backwards compatible.
  • Changed from path to PIDL as base for PropertyStore lookup (faster)
  • Corrected problem with test code for DoSvc (#465).
  • Enhanced FunctionHelper.IidGetObj
  • Exposed ReadOnlyPropertyStore and PropertyStore as public non-abstract classes with constructors to get properties directly for a file system item. Adjusted properties and methods from ShellItemPropertyStore to lower-level classes.
  • Fixed #467 where IErrorHandler types threw error on ToString method after 4.0.1.
  • Fixed IDODownload.SetProperty extension to handle null values and fixed documentation.
  • Fixed bug affecting HRESULT.ToString in StaticFieldHasValue.TryGetFieldName
  • Fixed bug in IShellLibrary.GetFolderType and added extension methods to convert those Guids to FOLDERTYPEID enum value.
  • Fixed bug in ShellContextMenu.InvokeCommand where it wouldn't run if QueryContextMenu had not been called (#468). Thanks to @shuxb711 for the workaround.
  • Fixed parameters in INamespaceWalkCB (Shell32) to use PIDL rather than IntPtr
  • Made Vanara.Extensions.InteropExtensions.QueryInterface an extension method for object.
  • Minor code optimizations for DnsApi
  • More work on PropertyStore to remove blocking of file. Caused consolidation of ReadOnlyPropertyStore into PropertyStore. Locking seems to be fixed.
  • Updated ShellItem wrapper with changes to IShellItem.Compare
  • Updated nullability of ShlwApi IUnknown_xx method parameters

Full changelog
nullableenabled@{v4.0.1}...master

Release Notes - 4.0.1

30 Apr 18:46
Compare
Choose a tag to compare

What's Changed

  • Added Vanara.PInvoke.ODBC32 package and supporting unit test
  • Added Vanara.PInvoke.OleDB with part of OleDB SDK. Missing about half of the interfaces still.
  • Fixed Shell32.STRRET under 64-bit (#453) and added Free function to release memory rather than having string methods unalloc.
  • Fixed false-positive with StrPtrAuto.IsNullOrEmpty (#455)
  • Added SafeAllocatedMemoryHandleBase.HandleChanged event and overrode SetHandle
  • Fixed marshalling for pszVerb in Shell32.IFolderView2.InvokeVerbOnSelection() #456
  • As alternative to #454 PR changing PROCESS_BASIC_INFORMATION with breaking field names and types, added properties to align with docs for GetProcessInformation
  • Added null handlers to SafeHANDLE equality methods. (#459)
  • Added backwards compatible StackTraceHiddenAttribute for pre-NET 6.0
  • Added ErrorHelper class to help retrieve messages from error codes that accepts alternate methods to FormatMessage. Moved FormatMessage method here from HRESULT. Converted error types to use new and hid stack mentions of ThrowIfError and related methods.
  • Added IConvertible to error base type in FieldValueHash
  • Fixed failure in CorrespondingTypeAttribute.GetCorrespondingTypes introduced in 4.0.0 that excluded null values. (#460) Updated failures due to correction of CorrespondingTypeAttribute.
  • Fixed windows platform warnings in FirewallApi missed since it's VB

Full Changelog: https://github.com/dahall/Vanara/compare/nullableenabled@%7Bv4.0.0%7D...nullableenabled

Release Notes - 4.0.0

29 Mar 17:51
Compare
Choose a tag to compare
  • Nullable notation added to every project
  • Lots of breaking changes from that nullability as I adjusted code based on new constraints
    • I'm still deciding on if I will try to backport fixes applied to the 4.0 branch to master or fold them together. Your feedback is appreciated.
  • Use of global using statements
  • Addition of .NET 7.0 and 8.0
  • Finally fixing and releasing VssApi
  • Fixed #392, #439, #441, #442, #443, #445, #448, #450

Full Changelog: v3.4.17...v4.0.0

Release Notes - 4.0.0 Beta

20 Nov 14:57
Compare
Choose a tag to compare
Pre-release
  • Nullable notation added to every project
  • Lots of breaking changes from that nullability as I adjusted code based on new constraints
  • Use of global using statements
  • Addition of .NET 7.0
  • Updates and additions to unit tests

This will stay in beta status for about two months while I collect feedback and fix problems. I hope you'll try it and give me a hand finding the errors and inconsistencies.

Release Notes - 3.4.17

18 Oct 04:16
Compare
Choose a tag to compare

Updates

  • Updated CryptUI.CRYPTUI_WIZ_DIGITAL_SIGN_BLOB_INFO and CRYPTUI_WIZ_DIGITAL_SIGN_CERT_PVK_INFO and CRYPTUI_WIZ_DIGITAL_SIGN_CONTEXT with better ctors and enums.
  • Updated Kernel32 with functions and structures to handle resource message tables.
  • Added ShellItemImages.GetImage (non-async) method and changed ShellItem.GetImage to use it.
  • Added NtDll.RtlGetVersion per #421

Fixes

  • Fixed incorrect AllocZeros value in HGlobalMemoryMethods
  • IpHlpApi struct fixes
  • Fixed bug in RECT type converter when serialized
  • Fixed bug in HRESULT type converter and added ability to add values and libs to error message cache
  • Fixed bug in SOCKET_ADDRESS.GetSOCKADDR that prevented 16 bit entries from translating
  • Fixed DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY enum #423
  • Changed visibility of MESSAGE_RESOURCE_ENTRY.GetText to internal
  • Fixed ResourceFile with updates to Kernel32
  • Fixes #427 - Bad impl of Kernel32.FILE_ID_128.Identifier
  • Fixed #428 (bad return value for User32.MB_GetString)
  • Fixed bug in SafeNativeArray.GetPointers

Release Notes - 3.4.16

07 Aug 18:41
Compare
Choose a tag to compare

Additions

  • Updated NuGet packages
  • Update WinSCard.cs with nullable support and UIntPtr

Fixes

  • Fixed SCardListReaders overloads (#402)
  • Fixed STORAGE_PROPERTY_ID enum values (#403)
  • Fixed SCardTransmit parameters (#404)
  • Applied suggested fix for IP_ADDRESS_PREFIX (#405)
  • Added missing enums to DOT11_PHY_TYPE #408
  • Fix IEnumSTATPROPSETSTG attributes (causing InvalidCastException) (#411)
  • Fix PROPVARIANT at 64-bit, Clearing string Vectors + UT (#413 and #416)
  • Added null checks to ShellItemImages.GetImageAsync to prevent #414
  • Added constants to DPI_AWARENESS_CONTEXT per #417
  • Addressed multi-thread issues with StaticFieldValueHash (#419)

Release Notes - 3.4.15

19 May 13:33
Compare
Choose a tag to compare
  • Fixed bug with SetWindowSubclass, SUBCLASSPROC, and RemoveWindowSubclass (#393)
  • Fixed IDataObject.SetData extension to get CF_HDROP right with Unicode and changed DROPFILES.DangerousGetFileList to static function taking a DROPFILES pointer.
  • Fixed formatting
  • Fixed definition of WINDOWPLACEMENT (#394)
  • Fixed generic GetThemeColor (#395)
  • Fixed incorrect values in User32.WINEVENT (#398)
  • Added coclass for IApplicationDocumentLists #399
  • Added overload for Shell32.SHAddToRecentDocs and supporting structures #401
  • Removed ICOMEnum from IEnumObjects (it doesn't follow Next method pattern) and added an extension method for IEnumObjects.Enumerate that will enumerate the interfaces exposed by IEnumObject. Fixes #400

Release Notes - 3.4.14

15 Apr 18:33
Compare
Choose a tag to compare

Additions

  • Added SP_DRVINFO_DETAIL_DATA_MGD which will take memory tied to SP_DRVINFO_DETAIL_DATA and extract the correct values. (#374)
  • Added SetupDiEnumDriverInfo overload to enumerate values (#374)
  • Added CorrespondingTypeAttribute values to GetClassLongFlag enum

Fixes

  • Changed parameters of SetupDiGetDriverInfoDetail to use an IntPtr and a new overload to extract the results to SP_DRVINFO_DETAIL_DATA_MGD.
  • Fixed stack overflow in POINT.X and POINT.Y (#375)
  • Fixed LOGPALETTE structure and associated functions
  • Added unit test and corrected return values in Lz32
  • Changed default flag for ShellItemPropertyStore to GPS_BESTEFFORT to prevent exceptions. #378
  • Fixed the DsFreeSpnArray function signature, as it was corrupting the native heap. (#382)
  • Added (#383) support for MessageBoxTimeout, an undocumented function.
  • Add two undocumented API in ntdll (#386)
  • Fixed IN6_ADDR.ToString and words property capturing and giving incorrect values (#388)