Vanara

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

MIT License

Stars
1.7K
Committers
26

Bot releases are visible (Hide)

Vanara - Release Notes - 3.1.3

Published by dahall almost 5 years ago

Additions

  • Added ResourceIdOrHandle to represent a resource string, id or handle union
  • Modified PROPSHEETHEADER to use ResourceId and ResourceIdOrHandle for fields that can be different resource types.
  • Added TokenMandatoryPolicy enum for use by TOKEN_MANDATORY_POLICY
  • Added almost all functions from wintrust.dll
  • Added all functions and interfaces from OleAut32.dll except the specific VARIANT conversions

Fixes

  • Fix to prevent exceptions when both extended and basic limits are set on a job. (#70)
  • XML Comment corrections (bad params, bad refs, bad syntax).
  • BREAKING CHANGE: moved interfaces and VARIANT from oaidl.h into Vanara.PInvoke.OleAut32 from Ole32 as they are actually hosted there. This required some changes to supporting code.
Vanara - Release Notes - 3.1.2

Published by dahall almost 5 years ago

Additions

  • Added SafeAnysizeStruct to help marshal structures with a 1-element field at the end that can be variable size. Adjusted all structs of this type to use this to marshal along with tests and supported classes.
  • BREAKING CHANGE: The above forced the removal of PTOKEN_PRIVILEGES as that functionality is now in a shared marshaling class.
  • Added IMarshalDirective interface as a means for IntPtrConverter.Convert to handle odd marshal behavior
  • Added copy constructor to SafeMemoryHandle and consolidated initialization
  • Added SafeAllocatedMemoryHandle.TakeOwnership method to take control of the allocated memory.
  • Added all codes, enums and many (#67) structures from winioctl.h
  • Added all the typelib interfaces from Shell32.dll
  • All the CSIDL* and SID_S* constants have been added.
  • First pass at adding support for Windows Search to Vanara.Windows.Shell
  • Added IEnumUnknown generics implementation
  • Added a generic IEnumerator implementation

Fixes

  • Fixed unterminated string bug in LSA_UNICODE_STRING.ToString and implicit operator.
  • Fixed parameters in SHCreateShellItemArray
  • Fixed marshal parameter on ICondition::GetSubConditions
  • Updated attributes and some parameters in IShellWindows
  • Fixed condition on IEnumFromCom where TryGet looped forever.
  • Fixed bug and docs for Enumerate method
  • Fixed condition where IEnumIDList is not implemented (#68)
Vanara - Release Notes - 3.1.1

Published by dahall about 5 years ago

Changes

  • Separated out Virtual Storage (Vanara.VirtualDisk) and BITS (Vanara.BITS) wrappers into their own packages for easier consumption.

Additions

  • Added .NET friendly wrappers for Job Objects and I/O Completion Ports with tests.
  • Added Process.StartEx extension method to allow for passing CreateProcess flags.
  • Added IUserHandle reference to all user object handles.
  • Added property to GROUP_AFFINITY to make it easier to get/set the list of affinitized processors.
  • Added support for PROCESS_MEMORY_COUNTERS_EX in GetProcessMemoryInfo
  • Added ObjectSecurity for pre .NET 4.0 builds

Fixes

  • Fixed bug #66 that forces all SafeMemString string representations to Empty when a size not known (like as a return value from a COM object).
Vanara - Release Notes - 3.1.0

Published by dahall about 5 years ago

Additions

  • Support for .NET Core 3.0 in all projects!!
  • All GDI32.dll functions for drawing and device info (missing DDI & printer calls still)
  • Updated all NuGet dependencies.

Fixes

  • EnumExtensions.BitPosition logic
  • SafeAllocatedMemoryHandle.ToString - added offset param from base
Vanara - Release Notes - 3.0.1

Published by dahall about 5 years ago

  • Added KtmW32.dll and Pdh.dll supporting assemblies with 100% of functions implemented.
  • Added new Vanara.Library metapackage that pulls in all Vanara packages.
  • Completed adding functions with unit tests from wininet.dll to Vanara.PInvoke.WinInet.
  • Completed adding functions from vertdll.dll to Vanara.PInvoke.Kernel32.
  • Completed adding functions from ncrypt.dll to Vanara.PInvoke.Cryptography.
  • Completed adding functions from ole32.dll and propsys.dll to Vanara.PInvoke.Ole.
  • Enhanced testing support classes and moved all static file references to single class.
  • Extended error structures with FormatMessage to get their descriptive text.
  • Added IDisposable to ISafeMemoryHandle so it can be used instead of abstract SafeAllocatedMemoryHandle.
  • BREAKING: Moved reflection extension methods that extend object to special namespace Vanara.Extensions.Reflection to Intellisense isn't crowded with them.
Vanara - Release Notes - 3.0.0

Published by dahall about 5 years ago

Too many changes to document them all, but here are the highlights:

  • Rework of memory reading and writing extension methods and core classes to provide more safety and bounds checking.
  • Addition of wer.dll support with Vanara.PInvoke.Wer assembly.
  • Removal of the Vanara.PInvoke.User32.Gdi assembly after combining all its functions into Vanara.PInvoke.User32.
  • Added support for .NET Standard 2.0, .NET Core 2.0 and 2.1 builds to all but Vanara.Windows.Shell and Vanara.Windows.Forms.
  • Complete, that is every single function, unit testing for kernel32.dll, advapi32.dll, authz.dll, schannel.dll, and secur32.dll P/Invoke methods in their respective assemblies. If you need help on using those functions, check the unit tests as I ended up doing a lot of research to get some of them to work.
  • Moved some extension methods to sub namespaces to avoid Intellisense showing you many functions for every object.
  • Added DebuggerDisplay attributes to many of the support objects for easier debugging.
  • Added many extension methods, struct constructors, safe handle classes, and documentation to make coding with P/Invoke more pleasant and less error prone.
Vanara - Release - 2.3.11

Published by dahall over 5 years ago

Additions

  • Added part of WinTrust.dll
  • Added remainder of AdvApi32.dll - now 100% (2.3.10)
  • Added multiple SafeXX functions to support structures that need to release memory
  • Added ACCESS_MASK and converted some parameters and fields from UInt32
  • Added LCID and converted some parameters and fields from UInt32

Fixes

  • Fixed multiple structures (CREDENTIAL, INSTALLSPEC, WAITCHAIN_NODE_INFO, WINTRUST_DATA, KNOWNFOLDER_DEFINITION, and others) so they marshal correctly
  • Fixed FormatMessage implementation for all use cases
  • Fixed SafeNativeArray insert bug
  • Fixed OBJECT_TYPE_LIST constructor bug
  • Fixed SetupOverlappedFunction so it doesn't fail binding the handle if already bound
Vanara - Release Notes - 2.3.9

Published by dahall over 5 years ago

Additions

  • Changed ACCESS_MASK to smart structure (2.3.8)
  • Completed work on Vanara.PInvoke.Security additions (2.3.8)
  • New Vanara.PInvoke.Accessibility to capture Windows Accessibility functions and interfaces
  • New Vanara.PInvoke.SearchApi to capture Windows Search functions and interfaces
  • .NET IStream for COM IStream wrapper
  • IBindCtx__V__ to improve on .NET version of IBindCtx
  • Get/SetField extension methods
  • Schannel.dll support added in Vanara.PInvoke.Security

Fixes

  • Fixed DeviceIOControlAsync (2.3.8) (#47)
  • Fixed and improved SafeNativeArray
  • ByteSizeFormatter fixed
  • Shell.PropertyStore is no longer locking (#49)
  • Debug Api struct alignment fixed (#50)
Vanara - Release Notes - 2.3.7

Published by dahall over 5 years ago

Additions:

  • Completed addition of all functions for IpHlpApi.dll
  • Added WinSock2 functions
  • Added class to handle linked list of native structures in memory (SafeNativeLinkedList)

Fixes:

  • Fixed some IpHlpApi structures and function declarations
  • Fixed bug with SafeMemoryHandle.GetBytes
Vanara - Release Notes - 2.3.6

Published by dahall over 5 years ago

Complete rework of WinCon functions in Vanara.PInvoke.Kernel32.dll -- now fully functional and tested.

Vanara - Release Notes - 2.3.5

Published by dahall over 5 years ago

Additions

  • Cabinet.dll support
  • Backwards port of SafeBuffer, UnmanagedMemoryAccessor and UnmanagedMemoryStream for .NET 2.0 and 3.5
  • Numerous methods and helper methods to Vanara.PInvoke.Security
  • NativeMemoryStream as a safer way to read and write contiguous native memory
  • Vanara.Security.AccountUtils got Run methods to run methods as impersonated user
  • Vanara.Security.Principal.WindowsLoggedInIdentity was introduced to extract pure use of LogonUser as a context
  • Open file and active connection support added to Vanara.Computer

Fixes and Changes

  • Lots of fixes and improvements on Vanara.Core methods to provide memory safety and better usability
  • Enhanced IntPtrConverter
  • Fixed big problem with SafeAllocatedMemoryHandle derivitives where it didn't zero out memory on allocation and overwrote memory on reallocation/resizing
  • Breaking Change: Converted all methods of interfaces in AclUI project to use HRESULT returns instead of PreserveSig attributes to allow for greater control and fewer exceptions in derived implementations
  • Breaking Change: Changed OBJECT_TYPE_LIST to unsafe struct with a Guid* field to prevent memory leaks
  • Breaking Change: Removed some methods from Vanara.Security.AccessControl.AccessControlHelper that would cause memory overrun problems due to incorrect assumption about ACE layout