Vanara Versions Save

A set of .NET libraries for Windows implementing PInvoke calls to many native Windows APIs with supporting wrappers.

v3.4.10

1 year ago

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.

v3.4.9

1 year ago

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)

v3.4.8

1 year ago

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

v3.4.7

1 year ago

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

v3.4.6

1 year ago

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

v3.4.5

1 year ago

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

v3.4.4

1 year ago

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

v3.4.3

1 year ago

Additions

  • Added operator overloads to SizeT
  • Added app management and storage provider interfaces to Shell32
  • Adding DbgPrint and DbgPrintEx to Wdm (#299)
  • Added provider constants to AdvApi32.WinCrypt (PInvoke.Security) and fixed CryptEnumProviders, CryptEnumProviderTypes, and CryptExportKey (#300)
  • Added ICategoryProvider::CreateCategory overload
  • Added Shell.ShellFolderCategorizer class and accessor from ShellFolder to get the "group by" categories associated with a folder.
  • Pushed MRUManager base class to Windows.Shell.Common
  • Added more helper functions for working with StringBuffer related methods.
  • Added BindCtx support for WIN32_FIND_DATA "simple parsing" and optional object parameters.
  • Added IStream load and save methods to Shell32.PIDL

Fixes

  • In Pinvoke.Crypt32, fixed PFN_CRYPT_ENUM_KEYID_PROP, BlobType, CryptEnumKeyIdentifierProperties, and PUBLICKEYSTRUC (#300)
  • Fixed IPersistFolder3::InitializeEx syntax (#301)
  • Fixed parameters of functions in INamespaceWalk

v3.4.2

2 years ago

Additions

  • Updated build targets to include package readme files and CI build values for AppVeyor and GitHub.
  • Added IOleLink and supporting enums
  • Added ARRAYDESC and PARAMDESCEX structures to Ole
  • Added logging interfaces from txlogpub.h to PInvoke.Ole
  • Added interfaces from imagetranscode.h and inputpanelconfiguration to PInvoke.Shell

Fixes

  • Fixed incorrect CorrespondingAction on User32.SPI.SPI_SETTHREADLOCALINPUTSETTINGS (#298)
  • Fixed VirtualDisk.Attach(string[]...), duplicated it in VirtualDisk.AttachAsync, and removed VirtualDisk.Attach(string...), VirtualDisk.VolumeGuidPath and VirtualDisk.VolumeMountPoint in leiu of their multi-mountpoint alternatives (#284)
  • Fixed marshaling attributes for STGOPTIONS and COSERVERINFO

v3.4.1

2 years ago

Additions

  • Added Vanara.Management assembly with helpers for System.Management.
  • Added Vanara.PInvoke.SensorsApi
  • VirtualDisk: Added support for mounting specific path or drive when attaching, added properties for mount information, CreateAsync, AttachAsync, VHD set, snapshot and mirror methods.
  • VirtDisk: Added CREATE_VIRTUAL_DISK_PARAMETERS.ctor, RAW_SCSI_VIRTUAL_DISK_PARAMETERS.ctor and enhanced OPEN_VIRTUAL_DISK_PARAMETERS.ctor for platform adherance and new constants from SDK.

Fixes

  • Moved RGBQUAD from Gdi32 to Shared.
  • Fixed recursive bug in WinNTExtensions.IsValidSecurityDescriptor
  • Fixed bug with DRIVE_LAYOUT_INFORMATION_EX
  • Improved error handling in DeviceIoControl<TOut>
  • Fixed conditional binding to Registry in Vanara.PInvoke.Shared
  • Updates to hopefully fix PInvoke.Shared load problems
  • #284 - added functionality to address multiple mount points to VirtualDisk
  • SPCorrespondingTypeAttribute refactor (#288)
  • Rearranged file placement of elements from NtDll as part of exploring #289
  • Fixed flags in MONITORINFOEX (#293)
  • Fixed bug #294 -- problem with SYMBOL_INFO and SymEnumSymbols not showing Name field correctly. Had to change PSYM_ENUMERATESYMBOLS_CALLBACK (breaking change). Added new SymEnumSymbolsEx overload to do the hard work.
  • Reworked all structures in IpHlpApi assembly to ensure size compatibility. (#296)
  • Fixed #297 - Incorrect value for Ws2_32.IN6_ADDR.Loopback