Skip to content

Releases: dahall/Vanara

Release Notes - 3.2.19

23 Oct 16:21
Compare
Choose a tag to compare

Let's just call this release Friday Fixes. Almost all these are bugs turned up after re-running a bunch of the tests

  • Changed all methods that returned SafeCoTaskMemString to string. After much reading and testing I determined this was redundant with marshaling code in .NET.
  • Fixed bug with CorrespondingTypeAttribute.GetAttrForEnum with default action
  • Fixed bugs in PROPVARIANT get value operations
  • Fixed bug in PropVariantToStringVector overload
  • Added GetPropertyDescriptionList default prop value to get all properties.
  • Made BindContext.EnumObjectParam return empty enumeration if method fails
  • Fixed bug in IndirectResource.ctor
  • Fixed bug in lookup table for WIA_PROPID_TO_NAME
  • Fixed bug in PropVariantToStringVector
  • Fixed a number of bugs with IUri and IUriBuilder

Release Notes - 3.2.18

21 Oct 15:17
Compare
Choose a tag to compare

Additions

  • Added missing constants and macros related to SID size.
  • Added SafePSID.FromToken and PSID.GetDomainSid methods
  • Added SafeDRT_DATA to DRT
  • Added Null fields to SafeHCRYPTHASH, SafeHCRYPTPROV and SafePCCERT_CONTEXT
  • Added missing Crypt32 constants
  • Added CERT_RDN_ATTR and CRYPT_BIT_BLOB
  • Added predefined values to SafeOID
  • Added methods to assist with memory alignment.
  • Added NativeMemoryStream.ReadToPtr and WriteFromPtr methods to interact with allocated memory.
  • Added methods to convert from IN_ADDR to IN6_ADDR
  • Added SIZEOF_SOCKET_ADDRESS_LIST macro.
  • Extended SOCKADDR explicit cast to SOCKADDR_IN6 so that if represented by a v4 IP address, it will convert it to IPV6 before casting.
  • Added LsaOpenPolicy test for remote machine (#169)
  • Added DISPID constants to ShlDisp and updated dependent interfaces
  • Added overload for ConnectToConnectionPoint for optional last param and fixed attributes.
  • Added missing EnumeratorToEnumVariantMarshaler for .NET Core
  • Initial implementation of FirewallApi.dll. Yes, it is in VB instaead of C#. Ony VB support parameterized properties and the underlying COM objects have these. Plus, it was a fun experiment.
  • Added Vanara.Collections.History class
  • Added standard HWND constants as static fields in HWND
  • Added PID constants for property ID values in a PROPERTYKEY
  • Added explicit ReadConsoleA and WriteConsoleA for UTF-8 operations (#171)
  • Added IsUserCetAvailableInEnvironment and SetProcessDynamicEHContinuationTargets functions to Kernel32
  • Added Get*Profile** function overloads to replace StringBuilder with allocated memory for multistring results (#172)
  • Added Vanara.Configuration.InitializationFile wrapper class for all PrivateProfile functions.
  • Added equality operators to PIDL
  • Added shell::: URI handling to ShellUtil.GetShellItemForPath
  • For ShellItem, added TypeConverter for strings, DataObject property, multiple Open method overloads, and ToUri method.

Fixes

  • BREAKING CHANGE: Modified interfaces IOleWindow and IShellBrowser and all derived interfaces so they use PreserveSigAttribute. All these interfaces can be client implemented and needed that capability.
  • BREAKING CHANGE: Fixed return value of TrackPopupMenuEx so command identifiers could be returned.
  • BREAKING CHANGE: Reconfigured PROPSPEC structure so it works on both X86 and X64 and added constructors to help.
  • BREAKING CHANGES: Fixed all the profile functions for ease of use and proper function.
  • Fixed signature on CryptSignAndEncodeCertificate and CryptSignCertificate and added Null field on SafeHCRYPTKEY
  • Fixed field types in CERT_INFO and CERT_PUBLIC_KEY_INFO
  • Addressed #168 by adding protected virtual GetDialogFlags and GetPreVistaDialogFlags methods that return the flags used by SDK functions.
  • Changed SOCKET_ADDRESS_LIST[] references to IntPtr or void**.
  • Fixed condition in HRESULT.FormatMessage that fails when MUI file couldn't be found.
  • Fixed bug in marshaler for LSA_UNICODE_STRING under X64 that caused alignment error and failure on all calls. Thanks @ryannewington for identifying the problem and where to fix it (#169).
  • Fixed attributes on IShellView.GetItemObject
  • Fixed bug in IContextMenu3.HandleMenuMsg2 declaration
  • Fixed bug in IPropertySetStorage::Create definition …
  • Fixed problems with IPropertyStorage::Read/WriteMultiple definitions and provided overload to simplify. Fixed param on Commit method.

Release Notes - 3.2.16

07 Sep 18:28
Compare
Choose a tag to compare

Additions

  • Added DRT and PeerDist libraries
  • Added Vanara.Network.InternetProxyOptions to manage proxy settings for an internet session or for the system.
  • Added new property keys for Recycle Bin (#162)
  • Added missing FOLDERID items (#164)
  • Adding missing enums PER_CONN_AUTODISCOVERY_FLAGS and PER_CONN_FLAGS

Fixes

  • BREAKING CHANGES Changed function of IndirectResource so that it accepts a string and then provides read-only properties of the parts rather than other way around. Too fragile. Also fixed ResourceId property so that it is an Int32 and not a pointer. Wrong impl.
  • Fixed error in ReadOnlyPropertyStore.TryGetValue that only would return true (#163)
  • Fixed bug in ShellFileOperations when supplying multiple files at once causing an endless loop
  • Removed BITS and VirtualDisk project references from SystemServices
  • Renamed WIndows.Forms to Windows.Forms (#165)
  • Corrected FOLDERTYPEID ControlPanelCategory (#166)

Release Notes - 3.2.15

30 Aug 21:37
d1dad31
Compare
Choose a tag to compare

Additions

  • Initial implementation of P2P.dll
  • Added NetworkDeviceConnections to Computer class to manage connection to remote shares and printers. Same functionality as command line 'net use'.

Fixes

  • Fixed NullReferenceException for WindowsIdentity to WindowsImpersonatedIdentity
  • Fixed incorrect parameters being passed to NetDfsSetClientInfo and NetDfsSetInfo
  • Fixed bug in WindowsIdentity.Run extension method causing method to be called twice if identity was null
  • Added parameter attributes and Win32Error.WNetThrowIfFailed extension method and assoc exception
  • For WNetEnumResources helper method, added better error handling, set initial buffer to page size, and fixed bug in loop
  • Fixed #158 with errors with IServiceProvider definition causing faults in ExplorerBrowser
  • Added DangerousGetInterface() method to expose the underlying IExplorerBrowser interface. Use with caution. #159
  • Call to closeMethod in GenericSafeHandle. (#161, #160)

Release Notes - 3.2.14

20 Aug 15:50
Compare
Choose a tag to compare

Additions
Completed initial work on DbgHelp library that also includes ImageHlp.dll functions
Completed initial work for Magnification.dll
Added LoadCursor overload with ResourceId param
Added class StandardCursor with values IDC_xx for LoadCursor
Added CreateWindow "macro".
Added overloads for DialogBox and DialogBoxParam that take ResourceId params instead of strings.
Added LibHelper class with Is64BitProcess and DoesWin32MethodExist methods
Added User32 EnumChildWindows and GetChildWindow methods
Enhanced AttributedControlDesigner to allow for event filtering.
Added ShellFolder.IShellFolder property to expose underlying COM interface
Added IntPtr SendMessage<TEnum, TWP>(HWND hWnd, TEnum msg, TWP wParam, IntPtr lParam = default)

Fixes
BREAKING CHANGE: Corrected GetClientRect to have 'out rect' param rather than by ref.
BREAKING CHANGE: Corrected invalid WindowStyles.WS_SIZEFRAME changing to WS_THICKFRAME
Changed errant IpHlpLib fields from FILETIME to SYSTEMTIME per #154
Added missing WindowStyles values
Changed WIN_CERTIFICATE.bCertificate from IntPtr to byte
Changed RedirectedDesignerPropertyAttribute to RedirectedDesignerItemAttribute so it could be applied to events and methods.
Addressed #155 by adding GetMonitorInfo overload that accepts MONITORINFOEX
Lots of fixes for ShellNamespaceTreeControl (#153). Still not perfect (keyboard movement could be improved), but much better.
Fixed ShellFileOperations throws an exception during the process of moving lnk files (#156)

Release Notes - 3.2.13

27 Jul 17:28
Compare
Choose a tag to compare

Additions

  • Added missing XXPseudoConsole functions from consoleapi.h
  • Added ShellFileOperations.AnyOperationAborted and OwnerWindow properties.
  • Added ShellFileOperationDialog with tests a property ShellFileOperations.CustomProgressDialog to receive an instance of that dialog.
  • Completed work on BindContext which wraps IBindCtx
  • Added support for ShellItemPropertyStore to be created with a PROPERTYKEY filter or an ICreateObject
  • Added missing structures (BCRYPT_OID_LIST, BCRYPT_MULTI_OBJECT_LENGTH_STRUCT, BCRYPT_KEY_LENGTHS_STRUCT) associated with BCrypt.PropertyName
  • Added AssociateStringAttribute to associate a string with a code element.
  • Added IShellFolder.GetUIObjectOf<T> extension method overload to accept IntPtr[]
  • Added ShellItem.InvokeVerb method and test
  • Added more well-known Clipboard format strings to ShellClipboardFormat
  • Extended all MarshalToPtr methods with lock and unlock pointer functions and optional parameters.
  • Made SafeAllocatedMemoryHandle.GetBytes() public
  • Added FILEDESCRIPTOR.nFileSize property to combine high/low fields
  • Added improved registry key closing to registration classes
  • Added Vanara.Windows.Shell.NativeClipboard to expose native clipboard functions that are not routed through COM and DataObject.

Fixes

  • Changed CreatePseudoConsole HANDLE params to HFILE after some research. The function will take HFILE and HPIPE instances.
  • BREAKING CHANGE: Changed return values of all methods in IFileOperationProgressSink to HRESULT since this is a user implemented interface.
  • BREAKING CHANGE: Due to performance, changed IMemoryMethods and ISimpleMemoryMethods to contain method signatures instead of properties of method delegates. Then changed all derived memory classes to new interface definition. I believe most of this only affects internal classes so hopefully not a huge effect on your code.
  • Fixed (#152) bug in base class SafeMemoryHandleExt that caused ToString(int...) to fail if memory size was not specifically set (like in parameter assignment).
  • Fixed ShellNamespaceTreeControl.SelectedItem designer error

Release Notes - 3.2.12

13 Jul 15:06
Compare
Choose a tag to compare

Additions

  • Added ShellFolder.BindToObject and BindToStorage methods
  • Added support for drag/drop to ShellNamespaceTreeControl
  • Add zero copy GetIpNetTable2.

Fixes

  • Corrected #144 by replacing LPStr marshaled string field lpVerb and making it a ResourceId type.
  • Fixed bug in UntypedNativeMemoryEnumerator where enumerated type was not set.
  • Optimized parameter enumerations and fixed bug in ShellFileOperation.UpdateProgress event (#146)
  • For all COM IEnumXX interfaces, fixed the Next method's array parameter so that it references the size on input, not output. This prevents a bug when implementing these interfaces. Thanks to @wangfu91 for finding this and submitting #143.
  • Changed compiler option on IEnumNextworkXX interfaces and array parameter on Next methods along with unit test.
  • Fixed enumeration failures with EnumServiceStatus, EnumServiceStatusEx and EnumDependentServices (#145)

Release Notes - 3.2.11

28 Jun 20:08
Compare
Choose a tag to compare

Additions

  • New Win10 2004 functions
  • String methods to ShellFileOperations
  • KnownFolderIdExt.GetIShellFolder method
  • Missing FILEOP_FLAGS values
  • Missing CoClass values for IShellFolder
  • Vanara.Windows.Shell.RecycleBin class
  • More BHID mappings for ShellItem.GetHandler calls.
  • FileInUseHandler to wrap functionality of IFileIsInUse interface for a single file.

Fixes

  • Methods and structures that reference DNS_QUERY_OPTION

Release Notes - 3.2.10

14 Jun 17:24
Compare
Choose a tag to compare

Additions

  • Added interfaces from comcat.h to Ole32 lib
  • Added all remaining shobjidl_core.h interfaces to Shell32 and SearchApi
  • Added WallpaperManager to Vanara.Windows.Shell to manage wallpapers.

Fixes

  • Fixed bug in COLORREF when setting from a Color.
  • Corrected IShellDispatchX.NameSpace method parameter (#131)

Release Notes - 3.2.9

03 Jun 22:39
Compare
Choose a tag to compare

Additions

  • Added support for Span and ReadOnlySpan
    • Added AsSpan and AsBytes methods to SafeAllocatedMemoryHandle for frameworks supporting Span.
    • Added SafeAllocatedMemoryHandle.AsReadOnlySpan extension method and changed Span methods to use IntPtr extensions.
    • Added SafeMemoryHandleExt.AsRef method for getting a Span of a structure from the memory.
    • Added IntPtr.AsSpan and IntPtr.AsReadOnlySpan extension
  • Added new SafeMemStruct class that wraps a structure into memory with Span support. Added assoc. unit test.
    • Added SafeCoTaskMemStruct and SafeHGlobalStruct derivations of SafeMemStruct
  • Add NO_ERROR constant. (#119)
  • Added DirectWrite, DXGI and WIC references to Vanara.PInvoke.Graphics
  • Added remaining, supported interfaces from shobjidl.h
  • Added DnsGetCacheDataTable w/ unit test (#121)
  • Added IPersistSerializedPropStorage and IPropertyStoreCapabilities COM interfaces
  • Added IPropertyBag2 and supporting elements
  • Added SafeMibEntryBase.TableAsSpan property and SafeMibTableHandle AsReadOnlySpan method (for supported platforms)
  • Added MemoryPropertyStore with stream r/w support representing a property store that lives separate from a ShellItem
  • Added PROPVARIANT_IMMUTABLE as a pure structure that can be used in arrays where the class equivalent breaks marshaling.
  • Added PowerBroadcastType enum and POWERBROADCAST_SETTING struct for WM_POWERBROADCAST messages
  • Added ReadOnlyPropertyStore as the base object wrapping IPropertyStore.
  • Added SafeGuidPtr for instances where GUID is optional.
  • To ShellItemChangeWatcher, added attributes to properties, added Path property tied to Item property for use in designer (#124).
  • Added UNICODE_STRING.ToString() overload
  • Added NtQueryInformationProcess (#123) and supporting constants and structures along with unit test.
  • Added classes to enumerate on pointer elements (NativeMemoryEnumerator and UntypedNativeMemoryEnumerator).
  • Added missing HRESULT Facility enum values

Fixes

  • BREAKING CHANGE: Changed default behavior of ShellItem.Properties so that it is read-only. It was failing for all shell items that didn't have their own properties. To get previous behavior, simply set "shellItem.Properties.ReadOnly = false" before setting properties.
  • BREAKING CHANGE: FIxed UNICODE_STRING so it would work across process boundries (thanks @Enigmatrix) and tested. Now #123 is implemented.
  • BREAKING CHANGE: Changed ShellItemPropertyStore.Descriptions to get a dictionary of PropertyDescription items rather than the PropertyDescriptionList that was already available from ShellItem. Added improved execption when IPropertyStore instance cannot be created due to a shell item with no r/w support.
  • To ShellItemChangeWatcher, fixed bug with PIDLs and memory reads (#124).
  • Fixed bugs in DeviceNotifyCallbackRoutine and PowerSettingRegisterNotification declarations (#122)
  • Fixed crashes on ShellItemChangeWatcher with unrecognized events.
  • Fixed incorrect parameters for file mapping functions and added HSECTION and SafeHSECTION handles.
  • Fixed packing of SHQUERYRBINFO (#127)
  • Moved SafeAllocatedMemoryHandle.Dump back under DEBUG only build.
  • Fixed multiple problems with TrackBarEx in designer and runtime.