Vanara.Core 3.4.12

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
.NET 6.0 .NET Core 3.1 .NET Standard 2.0 .NET Framework 4.5
dotnet add package Vanara.Core --version 3.4.12
NuGet\Install-Package Vanara.Core -Version 3.4.12
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Vanara.Core" Version="3.4.12" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Vanara.Core --version 3.4.12
#r "nuget: Vanara.Core, 3.4.12"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Vanara.Core as a Cake Addin
#addin nuget:?package=Vanara.Core&version=3.4.12

// Install Vanara.Core as a Cake Tool
#tool nuget:?package=Vanara.Core&version=3.4.12

Vanara

Vanara.Core NuGet Package

Version Build status

This library includes shared methods, structures and constants for use throughout the Vanara assemblies. Think of it as windows.h with some useful extensions. It includes:

  • Extension methods for working with enumerated types (enum), FILETIME, and method and property extractions via reflection
  • Extension and helper methods to marshaling structures arrays and strings
  • SafeHandle based classes for working with memory allocated via CoTaskMem, HGlobal, or Local calls that handles packing and extracting arrays, structures and raw memory
  • Safe pinning of objects in memory
  • Memory stream based on marshaled memory

What is Vanara?

Vanara is a community project that contains various .NET assemblies which have P/Invoke functions, interfaces, enums and structures from Windows libraries. Each assembly is associated with one or a few tightly related libraries.

Issues?

First check if it's already fixed by trying the AppVeyor build. If you're still running into problems, file an issue.

Included in Vanara.Core

Classes Structures Enumerations Interfaces
AlignedMemory BeginEndEventContext BitHelper ByteSizeFormatter ComConnectionPoint ComReleaser ComReleaserFactory ComStream ComTypeExtensions ConstantConversionExtensions CorrespondingTypeAttribute CoTaskMemoryMethods EnumerableEqualityComparer EnumExtensions EventedList FileTimeExtensions Formatter FormatterComposer GenericSafeHandle GenericVirtualReadOnlyDictionary HexDempHelpers HGlobalMemoryMethods History IArrayStructExtensions IArrayStructMarshaler InteropExtensions IntPtrConverter IOExtensions LibHelper ListChangedEventArgs MarshalingStream MemoryMethodsBase NativeMemoryEnumerator NativeMemoryStream PinnedObject ReflectionExtensions ReflectionExtensions RequiresUnreferencedCodeAttribute SafeAllocatedMemoryHandle SafeAllocatedMemoryHandleBase SafeByteArray SafeCoTaskMemHandle SafeCoTaskMemString SafeCoTaskMemStruct SafeGuidPtr SafeHGlobalHandle SafeHGlobalStruct SafeLPSTR SafeLPTSTR SafeLPWSTR SafeMemoryHandle SafeMemoryHandleExt SafeMemoryPool SafeMemString SafeMemStruct SparseArray StringHelper TryGetValueDelegate UntypedNativeMemoryEnumerator VanaraCustomMarshaler VanaraMarshaler VanaraMarshalerAttribute VirtualDictionary VirtualReadOnlyDictionary BOOL BOOLEAN EnumFlagIndexer GuidPtr RefEnumerator SizeT StrPtrAnsi StrPtrAuto StrPtrUni time_t CorrespondingAction FileAttributeConstant FileOpConstant FilePermissionConstant StringListPackMethod IArrayStruct IHistory IMemoryMethods ISafeMemoryHandle ISimpleMemoryMethods IVanaraMarshaler
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48 net481
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (98)

Showing the top 5 NuGet packages that depend on Vanara.Core:

Package Downloads
Vanara.PInvoke.Shared The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Shared methods, structures and constants for use throughout the Vanara.PInvoke assemblies. Includes: * IEnumerable helpers for COM enumerations * Custom marshaler for CoTaskMem pointers * Enhanced error results classes for HRESULT, Win32Error and NTStatus * Standard windows.h macros (e.g. HIWORD, MAKELONG, etc.) * Overlapped method wrapper * Resource ID holder * Shared structures and enums (see release notes)

Vanara.PInvoke.Kernel32 The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

PInvoke API (methods, structures and constants) imported from Windows Kernel32.dll.

Vanara.PInvoke.Cryptography The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

PInvoke API (methods, structures and constants) imported from Windows crypt32.dll, bcrypt.dll, ncrypt.dll, tokenbinding.dll, cryptnet.dll, cryptdlg.dll and cryptui.dll.

Vanara.PInvoke.Security The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

PInvoke API (methods, structures and constants) imported from Windows AdvApi32.dll, Authz.dll and Secur32.dll.

Vanara.PInvoke.Gdi32 The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

PInvoke API (methods, structures and constants) imported from Windows Gdi32.dll

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on Vanara.Core:

Repository Stars
zhupingqi/RuiJi.Net
crawler framework, distributed crawler extractor
zqhong/RyzenTuner
A tool that supports adjusting the power limit of Ryzen mobile processors and the QoS level and priority of Windows processes
Version Downloads Last updated
3.4.12 13,089 1/15/2023
3.4.11 35,015 11/15/2022
3.4.10 26,266 10/25/2022
3.4.9 23,469 10/3/2022
3.4.8 20,050 9/16/2022
3.4.7 20,203 9/3/2022
3.4.6 27,918 8/7/2022
3.4.5 20,955 7/17/2022
3.4.4 15,663 7/5/2022
3.4.3 27,216 6/14/2022
3.4.2 23,244 5/13/2022
3.4.1 18,181 5/5/2022
3.4.0 28,102 3/14/2022
3.3.15 52,152 12/27/2021
3.3.14 25,876 10/26/2021
3.3.13 22,544 9/30/2021
3.3.12 19,048 8/30/2021
3.3.11 23,609 7/22/2021
3.3.10 17,655 6/4/2021
3.3.9 11,653 5/7/2021
3.3.8 15,549 4/7/2021
3.3.7 11,856 3/24/2021
3.3.6 8,771 3/19/2021
3.3.5 11,132 3/1/2021
3.3.4 9,335 2/11/2021
3.3.3 15,727 2/3/2021
3.3.2 8,489 1/21/2021
3.3.1 10,711 1/20/2021
3.3.0 12,956 11/20/2020
3.2.21 7,376 11/13/2020
3.2.20 10,118 11/8/2020
3.2.19 14,197 10/23/2020
3.2.18 6,910 10/21/2020
3.2.17 17,117 9/20/2020
3.2.16 7,378 9/7/2020
3.2.15 6,935 8/30/2020
3.2.14 6,775 8/20/2020
3.2.13 7,485 7/27/2020
3.2.12 6,977 7/13/2020
3.2.11 7,828 6/28/2020
3.2.10 8,980 6/14/2020
3.2.9 7,669 6/3/2020
3.2.7 10,354 5/4/2020
3.2.6 6,936 4/21/2020
3.2.5 6,546 4/15/2020
3.2.4 6,617 4/12/2020
3.2.3 9,293 4/1/2020
3.2.2 6,045 3/24/2020
3.2.1 6,828 3/17/2020
3.2.0 6,579 2/27/2020
3.1.9 6,715 1/17/2020
3.1.8 6,199 1/13/2020
3.1.7 6,149 1/6/2020
3.1.6 6,084 12/12/2019
3.1.5 6,052 11/26/2019
3.1.4 5,643 11/25/2019
3.1.3 6,203 11/8/2019
3.1.2 5,698 11/4/2019
3.1.1 7,229 10/17/2019
3.1.0 5,495 10/3/2019
3.0.1 5,398 9/20/2019
3.0.0 6,521 8/27/2019
2.3.11 5,436 6/9/2019
2.3.10 3,822 6/5/2019
2.3.9 3,822 5/26/2019
2.3.8 3,881 5/13/2019
2.3.7 4,157 4/24/2019
2.3.6 4,815 4/17/2019
2.3.5 3,697 4/10/2019
2.3.4 3,727 3/9/2019
2.3.3 3,422 3/8/2019
2.3.2 3,404 2/28/2019
2.3.1 3,476 2/25/2019
2.3.0 3,347 2/22/2019
2.2.1 3,391 2/12/2019
2.2.0 3,331 2/1/2019
2.1.2 6,935 1/14/2019
2.1.0 4,384 12/15/2018
2.0.1 3,494 12/7/2018
2.0.0 3,826 11/28/2018
1.1.0 4,295 9/10/2018
1.0.18 3,429 8/10/2018
1.0.17 3,296 7/30/2018
1.0.16 3,780 6/29/2018
1.0.15 3,301 6/27/2018
1.0.14 3,324 6/8/2018
1.0.13 3,185 6/6/2018
1.0.12 3,497 4/5/2018
1.0.11 3,303 4/4/2018
1.0.10 3,193 3/27/2018
1.0.8 6,193 2/7/2018
1.0.7 3,200 1/27/2018
1.0.6 3,274 1/8/2018
1.0.5 3,179 12/28/2017
1.0.4 3,181 12/15/2017
1.0.3 2,750 12/8/2017
1.0.2 2,682 11/30/2017
1.0.1 2,760 11/28/2017
1.0.0 927 3/3/2017

Currently implements:

Classes
AlignedMemory<T>, BeginEndEventContext, BitHelper, ByteSizeFormatter, ComConnectionPoint, ComReleaser<T>, ComReleaserFactory, ComStream, ComTypeExtensions, ConstantConversionExtensions, CorrespondingTypeAttribute, CoTaskMemoryMethods, EnumerableEqualityComparer<T>, EnumExtensions, EventedList<T>, FileTimeExtensions, Formatter, FormatterComposer, GenericSafeHandle, GenericVirtualReadOnlyDictionary<T>, HexDempHelpers, HGlobalMemoryMethods, History<T>, IArrayStructExtensions, IArrayStructMarshaler<T>, InteropExtensions, IntPtrConverter, IOExtensions, LibHelper, ListChangedEventArgs<T>, MarshalingStream, MemoryMethodsBase, NativeMemoryEnumerator<T>, NativeMemoryStream, PinnedObject, ReflectionExtensions, ReflectionExtensions, RequiresUnreferencedCodeAttribute, SafeAllocatedMemoryHandle, SafeAllocatedMemoryHandleBase, SafeByteArray, SafeCoTaskMemHandle, SafeCoTaskMemString, SafeCoTaskMemStruct<T>, SafeGuidPtr, SafeHGlobalHandle, SafeHGlobalStruct<T>, SafeLPSTR, SafeLPTSTR, SafeLPWSTR, SafeMemoryHandle<T>, SafeMemoryHandleExt<T>, SafeMemoryPool<T>, SafeMemString<T>, SafeMemStruct<T>, SparseArray<T>, StringHelper, TryGetValueDelegate, UntypedNativeMemoryEnumerator, VanaraCustomMarshaler<T>, VanaraMarshaler, VanaraMarshalerAttribute, VirtualDictionary<T>, VirtualReadOnlyDictionary<T>

Structures
BOOL, BOOLEAN, EnumFlagIndexer<T>, GuidPtr, RefEnumerator<T>, SizeT, StrPtrAnsi, StrPtrAuto, StrPtrUni, time_t

Enumerations
CorrespondingAction, FileAttributeConstant, FileOpConstant, FilePermissionConstant, StringListPackMethod