Release Notes - 3.3.1
This is a massive release with tons of additions, fixes and, unfortunately, breaking changes. I try to avoid them, but when stuff breaks and requires fixing, well, code has to change. PLEASE check your dependencies and assumptions with listed changes.
New Assemblies
- Vanara.PInvoke.ComDlg32
- Vanara.PInvoke.IScsiDsc
- Vanara.PInvoke.Msi
- Vanara.PInvoke.NewDev
- Vanara.PInvoke.OleDlg
- Vanara.PInvoke.Rpc
- Vanara.PInvoke.SHCore (#193)
- Vanara.PInvoke.SetupAPI
- Vanara.PInvoke.WTSApi32
- Vanara.PInvoke.WsmSvc (#194)
BREAKING CHANGES
- Changed AppendMenu param from UIntPtr to IntPtr for easier conversion from HMENU and int command ids. Change MENUINFO.dwMenuData to IntPtr for easier conversions.
- Moved IObjectWithSite from Shell32 to Ole32
- Moved RPC enums from Ole32 to Rpc assembly and static class.
- Revamped SendMessage overloads to reduce accidential use of wrong overload. Most uses still work except passing a class in as lParam.
- Changed IDropTarget methods to use MouseButtonState param value instead of uint. Fixed dependencies.
- Changed ThrowLastErrorIfInvalid to a generic method to return the same type as the delegate
- Changed all IContextMenu variants to have PreserveSig model for implementation
- Changed allocated string fields in ComDlg32 to StrPtrAuto rather than String.
- Cleaned and extended Vanara.Security to support
ActiveDirectoryExtension
on all platforms - Enhanced ShellContextMenu further to support non-WinForms platforms better. (#178)
- Extended IntPtr.Write(object value...) method to handle almost all cases of object types (arrays, lists, etc.)
- Extended and improved object GetValue(this REG_VALUE_TYPE value) method
- Made serious changes to IOleCommandTarget. It was very broken (#188). Added other missing stuff from docobj.h.
- Moved DEVICE_SCALE_FACTOR from Shell32 to Shared
- Moved HOTKEYF from ComCtrl32 to User32 to align with WM_GETHOTKEY location
- Moved IOleCommand declaration to Ole Ole32 from Shell32
- Moved MouseButtonState from User32 to Shared assembly and up to PInvoke namespace. Fixed dependencies.
- Moved OLE types CY, DECIMAL and DATE up to Shared assembly.
- Moved PDCAP enum from PowrProf to Shared and added a few other enums and structure to Shared.Wdm.cs from that header file.
Fixes
- Fixed structures that could not load due to marshal attribute bugs
- Derived
ShellContextMenu
fromIDisposable
so that it correctly disposes the underlyingIContextMenu
instance. #178 - Fix misspelled path of file Winternl.cs (#187)
- Fixed Int32/UInt32 mismatch on OFN
- Fixed ShellContextMenu build error due to change to AppendMenu
- Fixed alignment issue with
MIB_UDPROW_OWNER_MODULE
(#189) - Fixed bug in GetObject overloads
- Fixed bug in LookupAccountSid2 where assigned return values incorrectly.
- Fixed declaration of IEnumAssocHandlers.Next
- Fixed methods in Shell32 (SHGetFolderLocation, SHGetFolderPath, SHGetFolderPathAndSubDir) that should use CSIDL enum but didn't. Fixed dependencies.
- Fixed packing directive on
MIB_UDP6ROW_OWNER_MODULE
andMIB_UDPROW_OWNER_MODULE
per issue #189 - Removed Security.PermissionSetAttribute from all classes, properties and methods. It is now marked Obsolete.
- Removed exception on index == 0 from IndirectResource ctor
- Removed incorrect FlagsAttribute from WindowMessage enum and removed duplicate, unused WM_HSHELL values
- Updated Windows.Shell project to support forms
Additions
- Abstracted out read-only methods from SafeAllocatedMemoryHandle into SafeAllocatedMemoryHandleBase
- Added BITMAPINFO.FromHBITMAP method and default static values for BITMAPINFO and DIBSECTION
- Added BROADCAST_QUERY_DENY return value.
- Added BasicMessageWindow class as a simple alternative to NativeWindow and MessageWindow
- Added BindToHandler overloads accepting BHID enum values
- Added CW_USEDEFAULT constant and fixed return value of CreateWindow function
- Added CorrespondingTypeAttribute to power GUID values when they support a secondary value
- Added CorrespondingTypeAttributes to all BHID enum values
- Added GDI extension methods for HBITMAP - IsBottomUpDIB, IsDIB and simplified ToBitmap
- Added GetVolumePathNamesForVolumeName overload
- Added HWND.HWND_MESSAGE value
- Added IArrayStruct interface to identify two-field structures where the first field is an UInt32 and the second is a pointer to an array of structures along with supporting marshaler and extension method.
- Added IArrayStruct inheritance for DRT_DATA
- Added IDC_ cursor resource id constants
- Added IDI_* values for static icons and overloaded LoadIcon function to accept a ResourceId param.
- Added ISafeMemoryHandle.GetBytes method that was already implemented all implemented classes
- Added LsaQueryCAPs overload taking a pointer for the first param
- Added MADCAP functions to Vanara.PInvoke.Dhcp
- Added Null field to SafeCoTaskMemStruct and SafeCoTaskMemStruct
- Added PlatformTarget value as pre-processor constant for all projects.
- Added ResourceId.IsIntResource property
- Added SafeHBITMAP.ToBitmap method
- Added ShellDataObject constructor taking a list of ShellItems which adds them via CFSTR_SHELLIDLIST
- Added ShellItem.Verbs to get a list of active verbs
- Added ShellItemImages and associated tests to pull images for a shell item from a variety of different interfaces. For some items, the image appears upside down without an DIB indication.
- Added StructHelper.InitWithSize to simplify the many structures that have to be initialized with their size.
- Added VOLUME_DISK_EXTENTS
- Added Vanara.Collections.ICOMEnum interface to indicate COM interfaces that support the Enum/Reset pattern. Useful for simplifying getting IEnumerable runs from them. Added ICOMEnum interface to all appropriate COM interfaces.
- Added Vanara.Diagnostics.DeviceManager and supporting classes to manage devices and device classes on local or remote machines.
- Added
LookupAccountSidLocal
per #184 comment. - Added
PropertyDescriptionList.GetValuesForShellItem
method to retrieve list of properties from a shell item. Useful for tooltips and like items retrieved fromShellAssociation
. - Added
ShellItem.ContextMenu
andImages
properties, enhancedGetHandler
method to check for correct interfaces, changedInvokeVerb
to useShellContextMenu
- Added abstract
SystemEventHandler
which provides a smart message window that will automatically spin up a thread, if needed, for the message pump. Converted ShellItemChangeWatcher from using NativeWindow to using SystemEventHandler to support console use - Added access to handlers for ShellAssociation #181
- Added binary negate overload to BOOL and BOOLEAN
- Added check for empty icon file in LoadImageFromExtractImage
- Added constants for static controls (msgs, notifications and styles)
- Added constructor for MSG struct
- Added conversion methods from HBITMAP to Bitmap and BitmapSource
- Added conversion methods from HICON to HBITMAP and BitmapSource.
- Added explicit conversion from SOCKADDR_STORAGE to SOCKADDR_IN and SOCKADDR_IN6
- Added missing ASSOCSTR values (#180)
- Added new SendMessage overload for WM_GETTEXT use case (#191).
- Added over 100 new COM interfaces to Ole32
- Added owner-draw structures and enum to User32.
- Added param attributes for CreateWindow(Ex) and CREATESTRUCT structure
- Based on Windows error in LookupAccountSid, I've added LookupAccountSid2 based on LsaLookupSid2.
- To
Shell32.ShellUtil
, added SHIL to pixel conversions and wrapper methods to handle getting images and icons from shell items and folders. - Finished work on PowerManager event additions for all power events. (#190)