Skip to content

Releases: dahall/Vanara

Release Notes - 3.4.13

04 Feb 22:52
Compare
Choose a tag to compare

Additions

  • Added AvRt.dll support in Vanara.PInvoke.Avrt
  • Added tdh.dll methods to Vanara.PInvoke.Security.
  • Finished work on Vanara.PInvoke.CoreAudio
  • #371 Add Create method for types MONITORINFO and MONITORINFOEX
  • Added and modified classes supporting window creation and message pumps
  • Added conversion operator from FileSystemInfo to FILEDESCRIPTOR
  • Added CorrespondingTypeAttribute to WindowLongFlags values
  • Added equality ops to PROC_THREAD_ATTRIBUTE and cleaned file
  • Added GetClassLongFlag enum and updated GetClassLong and SetClassLong parameter
  • Added CallWindowProc and FindWindowEx overloads
  • Added IComparable and IEquatable to SafeAllocatedMemoryHandle
  • Added MessagePump and ExaminedMessagePump as means to process Get/PeekMessage->DispatchMessage loops.
  • Added missing constants to UxTheme
  • Added missing DWM constants
  • Added missing WindowLongFlags values
  • Added Ole32.IDataObjectV for a more complete reference to IDataObject
  • Added Point.x and y properties to match some C++ implementations
  • Added SafeHANDLE.ThrowIfDisposed method to help implement safer calls.
  • Added SafeNativeArray.GetRefAt method to get a reference to an element in the array
  • Added SafeSyncHandle.Wait method wrapping WaitForSingleObject
  • Added some UxTheme method overloads taking enums

Fixes

  • BREAKING CHANGE: Removed inaccurate tdh.h values from AdvApi32 class and put them in Tdh
  • More BREAKING CHANGES to NativeClipboard. (Sorry!) All atomic methods to set data have been removed due to inconsistencies and design challenges. New model forces all setting and getting to be done through IDataObject and it's methods and extensions. See documentation for class for example. Addresses #355.
  • Fixed and extended implicit operators for RECT and PRECT
  • Fixed bug in NativeClipboard.Clear
  • Fixed bug in NativeClipboard.SetText where only one value was getting set. (#355)
  • Fixed bug in User32.SetWindowLong
  • Fixed bug with CreateClassInfoEx
  • Fixed bug with WindowLongFlags additions
  • Fixed INVALID_FILE_ATTRIBUTES value and type (#369)
  • Fixed packing on WINHTTP_CONNECTION_INFO (#368)
  • Hopeful fix for #373
  • Lots of work on WindowBase, VisibleWindow, WindowClass and MessagePump
  • Moved IWindowCore to MessagePump.cs
  • Reverted User32.BasicMessageWindow to previous, simpler implementation
  • Significant expansion to User32.WindowClass wrapper around WNDCLASSEX
  • Updates to synchapi method params and extension of SafeEventHandle

Release Notes - 3.4.12

15 Jan 22:56
Compare
Choose a tag to compare

Additions

  • Added Vanara.PInvoke.DavClnt which takes methods out of NetApi32. Set those methods to Obsolete.
  • Added Vanara.PInvoke.PhotoAcquire assembly with interfaces for Photo Acquisition.
  • Updated NuGet package dependencies
  • Add implicit op from SafeHANDLE to HANDLE
  • Add MouseActivateCode as WM_MOUSEACTIVE response (#358)
  • Added tag to Directory.Build.props
  • Added ability for IDataObject.GetData to retrieve an HGLOBAL as an IStream
  • Added ability to pick character set in IDataObject.GetData method
  • Added CHANGEFILTERSTRUCT.Default field
  • Added Clipboard functions that wrap Unicode to Ansi and back conversions
  • Added DS_xx dialog box styles to User32 as DialogBoxStyles enum (#359)
  • Added enum overloads for PeekMessage and PostMessage
  • Added implicit op for SystemColorIndex to HBRUSH
  • Added locking to SafeMemoryHandle.ToType extension method
  • Added Missing Disk Management Control Codes #345
  • Added mssing Pack = 1 to TASKDIALOG_BUTTON (#351)
  • Added NativeClipboard.GetFileNameMap, GetShellItemArray, IsFormatAvailable(string) and SetShellItems methods (#353)
  • Added Null field to all GDI handles
  • Added OBM_ constants
  • Added SafeMoveableHGlobal.CallLocked method
  • Added SetWindowAttributes in DwmApi from Windows 11. (#363)
  • Added Shell32.SHCreateDataObject overload to simplify use and prevent unintentional bugs using PIDL class.
  • Added support for memory classes and interfaces to indicate if they zero memory on initialization to prevent re-zeroing.
  • Added Type.GetConstants extension method
  • Added WideCharToMultiByte and MultiByteToWideChar overloads taking byte arrays.

Fixes

  • BREAKING CHANGE: Changed parameters of Ole32.IStreamV.Seek and CopyTo methods to use out parameters. Cost of throwing away value was determined to be zero.
  • BREAKING CHANGE: Made NativeClipboard a static class and removed dependencies on User32.
  • Changed ASCII encoder to UTF8 encoder in string helper classes for broader character support.
  • Changed NativeClipboard.SetShellItems functionality and added overlaod.
  • Changed return value of User32.GetMessage to int so value of -1 can be returned. Fixes #360.
  • Changed VSS_MGMT_OBJECT_PROP to struct for marshaling
  • Fixed #357 (set moniker on IFileSystemImage2.BootImageOptionsArray)
  • Fixed alignment of SET_VIRTUAL_DISK_INFO (#356)
  • Fixed bug in IEnumString.Enum extension method
  • Fixed bug in InteropExtensions.Write(IEnumerable...) method that wiped out existing values if an offset was provided.
  • Fixed bug in ShellLink.ShowState that was carried over from old code. (#349)
  • Fixed definition problem with IDataTransferManagerInterop.GetForWindow (#354)
  • Fixed exceptions being thrown by BOOL and BOOLEAN when interacting with int and ! operator
  • Fixed layout of TOUCHPREDICTIONPARAMETERS (#347)
  • Fixed NativeClipboard GetText and SetText methods. Also changed ctor so that if no HWND is passed, it uses the Desktop's window handle. Fixes #355.
  • Fixed optional param problem with DateTime APIs in Kernel32.
  • Fixed unbounded recursion in SafeLPSTR, SafeLPTSTR and SafeLPWSTR implicit cast operators from string by inverting the types.
  • Fixes access violation when calling TaskDialogIndirect
  • Got the VssApi projects to build
  • Removed dependencies on all x64 preprocessor indications and just made all structures work for both 32 and 64-bit (#346)
  • Removed platforms from solution leaving only AnyCPU
  • Tons of fixes and updates to IDataObject and Clipboard methods and wrapper classes.
  • Updated NUnit package version for tests
  • Updated SafeMoveableHGlobalHandle class and added tests.

Release Notes - 3.4.11

15 Nov 16:27
37d2a55
Compare
Choose a tag to compare

Additions

  • Added Vanara.PInvoke.WebSocket assembly
  • Added Vanara.PInvoke.WscApi project for Windows Security Center functions.
  • Added IPPROTO_IPV6 socket options
  • Added Microsoft-specific winsock constructs to Ws2_32
  • Added QOS2 overloads
  • Added ShellFileOperations ctor taking an IFileOperation rather than creating one every time. (#336)
  • Added overloads with more precise params to WinSock2 functions
  • Added supporting macros as properties to IP_PATTERN

Fixes

  • Added definition for CoGetObject that supports BIND_OPTS_V derivatives (#338)
  • Add [Flags] attribute to a couple of enums which require it (#342)
  • Add high resolution flag for waitable timer initialisation (#343)
  • Changed BIND_OPTS2.locale field to LCID type
  • Fix POINTER_INPUT_TYPE missing initial value (#340)
  • Fixed NullReferenceException caused by unsuccessful CredRead call (#344)
  • Fixed problems with SendMessage overloads not passing parameters (#333)
  • Overloadded SetWaitableTimer and SetWaitableTimerEx to accept a long value for the lpDueTime param.

Release Notes - 3.4.10

25 Oct 18:22
Compare
Choose a tag to compare

Additions

  • Added Vanara.PInvoke.QoS project with QWave and QoS traffic support.
  • Added DebuggerDisplayAttribute to IndirectString
  • Added SHLoadIndirectString stub to IndirectString to avoid referencing full library.
  • Added TestHelper.IsElevated property
  • Added WindowsFirewall and supporting classes to Vanara.SystemServices.
  • Added explicit conversion from WSRESULT to Win32Error
  • Added indexer to SafeElementArray
  • Added new functions introducted in Win11
  • Added nullable support to IndirectResource and IndirectString
  • Added overload to WinSpool.DeviceCapabilities to support NULL pDevNode param (#331)
  • Adding NMTBCUSTOMDRAW struct (#328)
  • Added DistributedRoutingTable and supporting classes
  • Cleaned ResourceId and added equality operators
  • Exposed static fields in SafeElementArray

Fixes

  • Changed SafeDRT_DATA to inherit from SafeElementArray for direct access to bytes.
  • Corrected build warnings related to RequiresUnreferencedCodeAttribute
  • Fixed SetPointSize LOGFONT passed by value with a ref (#332)
  • Fixed TBBUTTONINFO.fsStyle set failure #326
  • Fixed packing issue with TBBUTTONINFO (#327)
  • Fixed problem with IndirectResource and nullable string values
  • Moved classes IndirectResource and IndirectString to Vanara.PInvoke.Shared library since they capture a pattern across Win32.

Release Notes - 3.4.9

03 Oct 20:02
Compare
Choose a tag to compare

Additions

  • Added BackgroundCopyJobCollection indexer for a job's display name.
  • Added more WinSock2 struct conversion methods
  • Added SafeHDRT smart handle.
  • Added AF_UNSPEC handler for implicit conversion from SOCKADDR to SOCKADDR_IN (#321)

Fixes

  • Fixed Kernel32.MapViewOfFileEx parameter #316
  • Fixed bug in SafeAnysizeStructBase that couldn't process string arrays. Root cause of #315.
  • Refactored BackgroundCopyJob events so that use the system resources more efficiently and don't allocate resources until subscribed. This doesn't fix #314, but does provide accurate exceptions to the dev when subscribing.
  • Fixed #318 and added simple test for HttpApi
  • Fixed problem with VirtualDisk async methods not showing progress correctly (#317). Due to threading issue.
  • Removed implicit operators with SafeLPXSTR classes to prevent compiler confusion
  • BREAKING CHANGE: Fixed marshaling problem with HTTP_DATA_CHUNK (#320)
  • Forcefully dispose WindowsIdentity as suggested by @OwnageIsMagic
  • Updated BackgroundCopyJob to force all errors related to event subscription due to permissions into the event add process and (BREAKING CHANGE) removed calls to Complete and Cancel within Dispose method to prevent unintended consquences.
  • Work on Command Line Notification per #314
  • Fixed problem with SendMessage overload that used a ref struct as final param (#322)
  • Fixed problem with definition of SYMBOL_INFO not working when passed by ref (#324)

Release Notes - 3.4.8

16 Sep 21:06
Compare
Choose a tag to compare

Additions

  • Added WTSApi32 missing constants and correlated types
  • Added Computer.Sessions property and supporting classes to discover active sessions.
  • Added missing enums to Dhcp project
  • Added new Vanara.Net assembly with support for DNS services and DHCP clients.

Fixes

  • Fixed BackgroundCopyJob.CustomHeaders (#310)
  • Fixed BackgroundCopyManager.Version code based on suggestion from @OwnageIsMagic (#311)
  • Fixed #312 by implementing BackgroundCopyFileCollection.CopyTo and Contains
  • Added helper properties and fixed parameters in DnsApi

Release Notes - 3.4.7

03 Sep 16:29
Compare
Choose a tag to compare

Additions

  • Added Vanara.PInvoke.DOSvc assembly and tests for Delivery Optimization
  • Added Vanara.PInvoke.FwpUClnt assembly and tests
  • Added Vanara.PInvoke.MsRdc for the Remote Differential Compression (RDC) API
  • Added Vanara.PInvoke.NdfApi assembly
  • Added nullable type handling to IntPtr.Convert
  • Added SafeMemoryHandleEx.AddSubReference
  • Simplified NativeMemoryStream.Write()
  • Added implicit operators to new types for GuidPtr, and StrPtrXX variants
  • Added SafeNativeArrayBase.GetPointers method

Fixes

  • Fixed bug in IN_ADDR(byte[]) ctor.
  • Updated optional params for CoSetProxyBlanket

Release Notes - 3.4.6

07 Aug 00:47
Compare
Choose a tag to compare

Additions

  • Added Vanara.PInvoke.HttpApi assembly
  • Added Vanara.PInvoke.ClfsW32 project for Common Log File access.
  • Added Vanara.PInvoke.WinSCard assembly
  • Added ReadFile and WriteFile overloads for NativeOverlap
  • In WinINet, added InternetReadFile overload and InternetCookieHistory and INTERNET_ASYNC_RESULT structures
  • Enabled nullable support for string related classes
  • Enhanced SafeMemString with nullable support and the addition of methods, properties and operators to mimic StringBuilder
  • Added ! operator support to SafeAllocatedMemoryHandle and SafeMemoryHandle.Clone() method
  • Added string classes via template
  • Added ! operator to SafeHANDLE and cleaned Handles.cs
  • Refactored base handle structures into templates
  • Added support for BITS peer caching
  • Added BackgroundCopyJob.AutoCompleteOnSuccess that will call Complete() for the user after the Completed event.
  • Added helper ctos to DNS_ADDR_ARRAY, DNS_QUERY_REQUEST, DNS_QUERY_RESULT and IP4_ARRAY. Added DNS_QUERY_REQUEST3 and DnsQueryEx overloads for it.
  • Added properties for SOCKADDR_IN6 and IN6_ADDR to determine address types.
  • Added missing file attributes to FileFlagsAndAttributes and added FileShare enum with FILE_SHARE_* values.

Fixes

  • Removed Pack=4 from TRUSTEE struct per #307. It breaks on 64-bit builds. Default is sufficient for both 32 and 64-bit.
  • Changed OBJECTS_AND_SID.pSid to PSID type and cleaned AccCtrl.cs
  • Fixed entrypoint #308

Release Notes - 3.4.5

17 Jul 01:41
Compare
Choose a tag to compare

Additions

  • Added CERT_INFO_CHOICE and changed CERT_STRONG_SIGN_PARA to use it
  • Added missing items from mswsock.h, wintrust.h, ws2ipdef.h and softpub.h
  • Added SignOID with missing szOID values from wincrypt.h
  • Added an enumeration for CommDlgExtendedError return values (#303)
  • Added CMSG_SIGNER_INFO
  • Added conversion operators to SOCKADDR_STORAGE with SOCKADDR_INET
  • Added CryptCATAdminAddCatalog overload to simplify use.
  • Added missing constants to WSAEVENT
  • Added SafeMemoryPool class to auto dispose temporary pointers.
  • Added setsockopt generic overload
  • Added simplified overloads for WSAStringToAddress and WSAAddressToString
  • Added SOCKADDR_IN6 to SOCKADDR conversion
  • Added SOCKADDR_INET operator to SOCKADDR
  • Added WSAIoctl<TIn, TOut> generic overload
  • Derived WSAEVENT from ISyncHandle
  • WinInet: Added missing HTTP_QUERY and HTTP_STATUS values
  • Added overloads for HttpQueryInfo that don't require lpdwIndex param

Fixes

  • BREAKING CHANGES TO WSA functions in Ws2_32: Changed return values of most functions to WSRESULT instead of incorrect Win32Error or int
  • BREAKING CHANGE: Removed winsock errors from Win32Error (incorrect fit).
  • Separated WSA code into multiple files and added error handling functions.
  • Fixed bug #304 in ChangeServiceConfig parameter lpDependencies
  • Fixed bug in DeviceIoControl<TIn, TOut>
  • Fixed bug in Uri_PROPERTY commit
  • Fixed incorrectly hidden IP_ADAPTER_ADDRESSES.Ipv6IfIndex value
  • Fixed IP_ADDR_STRING to use IP_ADDRESS_STRING fields
  • Fixed overloads for HttpQueryInfo
  • Fixed size problems with IP_ADAPTER INFO and IP_ADDR_STRING
  • Fixed string handling bug in InternetSetOption
  • Moved IPPROTO to ws2def.cs from Winsock2.cs, added WSACHSGHDR and associate macros.
  • Rearranged order of fields in Uri_PROPERTY enum for better visibility

Release Notes - 3.4.4

05 Jul 16:33
Compare
Choose a tag to compare

Additions

  • Added IErrorProvider as equatable for HRESULT
  • Added overload for ResetEvent and SetEvent with HEVENT param.
  • Added RequiresUnreferencedCodeAttribute for frameworks other than NET50 and greater.
  • Added overloads for LsaAddAccountRights and LsaRemoveAccountRights and optimized marshaling code

Fixes

  • Fixed WIN32_FIND_STREAM_DATA to expose cStreamName
  • Fixed bug in EnumFileStreams
  • Fixed ambiguous references in docs
  • Fixed trimming error for type converters
  • Fixed bug in StringHelper.GetByteCount