David Hall
1aba884b1e
Applied global usings and finished nullable work on Shell32
2023-08-04 10:24:49 -06:00
David Hall
54b1923a26
Added nullability to Vanara.Core
2023-02-18 19:31:48 -07:00
David Hall
c34a7113d9
Added IComparable and IEquatable to SafeAllocatedMemoryHandle
2023-02-04 10:01:40 -07:00
David Hall
06c7284269
Changed ISimpleMemoryMethods.Allocs to public
2023-01-04 17:17:26 -07:00
David Hall
8e9280e5aa
Updated XML docs
2023-01-02 10:41:24 -07:00
David Hall
dbaa250ded
Added support for memory classes and interfaces to indicate if they zero memory on initialization to prevent re-zeroing.
2023-01-02 10:31:15 -07:00
dahall
93bdb99f43
Added SafeMemoryHandleEx.AddSubReference
2022-08-29 16:20:24 -06:00
dahall
eeb429ebb6
Added ! operator support to SafeAllocatedMemoryHandle and SafeMemoryHandle.Clone() method
2022-07-20 17:36:27 -06:00
dahall
4ce428215c
Added SafeAllocatedMemoryHandleBase.GetBytes() and pulled SafeMemoryHandle.Locked from IMemoryMethods instance
2022-01-22 15:30:42 -07:00
dahall
5f52aa7820
Added SafeMoveableHGlobalHandle class and added support to locking memory to all memory classes.
2022-01-16 17:22:34 -07:00
dahall
e1cfb9c8ce
Added ISafeMemoryHandle.GetBytes method that was already implemented all implemented classes
2021-01-11 11:19:15 -07:00
dahall
76fc958c10
Abstracted out read-only methods from SafeAllocatedMemoryHandl into SafeAllocatedMemoryHandleBase
2020-12-22 16:26:27 -07:00
dahall
1564c3d702
Made SafeAllocatedMemoryHandle.GetBytes() public
2020-07-22 18:23:37 -06:00
dahall
091352956e
Fixed ( #152 ) bug in base class SafeMemoryHandleExt that caused ToString(int...) to fail if memory size was not specifically set (like in parameter assignment).
2020-07-20 10:44:01 -06:00
dahall
e701d99c1b
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.
2020-07-20 09:48:32 -06:00
dahall
f67c02dc14
Added SafeAllocatedMemoryHandle.AsReadOnlySpan extension method and changed Span methods to use IntPtr extensions.
2020-05-16 08:56:21 -06:00
dahall
ab42b87b0c
Moved SafeAllocatedMemoryHandle.Dump back under DEBUG only build. Added AsSpan and AsBytes methods to SafeAllocatedMemoryHandle for frameworks supporting Span<T>. Added SafeMemoryHandleExt.AsRef<T> method for getting a Span of a structure from the memory.
2020-05-14 17:53:35 -06:00
dahall
a59b4bfba7
Added ISimpleMemoryMethods (subset of IMemoryMethods with just alloc and free) and MemoryMethodsFromSimple<TSimple> which implements most of IMemoryMethods using just the methods from ISimpleMemoryMethods.
2020-04-07 14:34:28 -06:00
David Hall
ce3dc1a0fe
Removed blittable constraint on ToArray and ToEnumerable
2019-11-21 16:33:39 -07:00
David Hall
a94e60820b
Reworked memory manipulation functions in InteropExtensions and IntPtrConverter to use new marshaling directives and to drive consistency of use across libs (i.e. call same method to do same work).
2019-11-19 12:52:44 -07:00
David Hall
9ade2c8bd1
Added copy constructor to SafeMemoryHandle and consolidated initialization
2019-10-31 11:47:04 -06:00
David Hall
bb3435550f
Added SafeAllocatedMemoryHandle.TakeOwnership method to take control of the allocated memory.
2019-10-29 10:44:02 -06:00
David Hall
05bd6d2098
Changed Write method to take structure as 'in' param.
2019-10-17 09:13:45 -06:00
David Hall
740bd61ac5
Added ToString method that includes an offset parameter.
2019-09-27 13:32:19 -06:00
David Hall
1491e32f80
Made ISafeMemoryHandle derive from IDisposable
2019-09-19 12:22:21 -06:00
David Hall
9d4758ed5d
Added Write methods to SafeMemoryHandleExt. Added size checking from InteropExtension methods. Added offset param to ToStructure.
2019-08-21 10:18:07 -06:00
David Hall
c3521b7742
MAJOR BREAKING CHANGEs:
...
1) Obsoleted Vanara.Extensions.InteropExtensions.StructureToPtr for a name change to MarshalToPtr for consistency.
2) Added parameter to all methods reading memory that allows developer to indicate size of allocated memory they read from.
3) Enabled the ability to read/write enum values from memory in all extension methods.
4) Added Write methods for writing to memory
2019-08-17 21:13:57 -06:00
David Hall
683280a945
Updated constructors of all SafeAllocatedMemory derivatives to use SizeT instead of int for the size parameter.
2019-07-27 12:48:33 -06:00
David Hall
42630dd833
BREAKING CHANGE: Changed type of SafeAllocatedMemoryHandle.Size property from int to SizeT so that it more easily converts to different types used in memory size functions.
2019-07-25 19:46:45 -06:00
David Hall
0fef11ebb1
Made SafeMemoryHandle conversion to IntPtr implicit instead of explicit. In practice, I have found this to be a constant conversion need.
2019-07-25 10:48:43 -06:00
David Hall
9c97ccfd14
Fixed bug in GetBytes method
2019-04-24 08:24:18 -06:00
David Hall
34d48333d6
Corrected documentation errors
2019-04-10 11:28:19 -06:00
David Hall
65e1440ec0
Ensured that space in newly allocated memory is zeroed by default. Fixed handling of Size manipulation to zero out bytes added. (bug: it zeroed out everything)
2019-04-08 11:54:24 -06:00
David Hall
dc83d5d0b4
Moved Dump, GetBytes and IntPtr operator to SafeAllocatedMemory base class. Added byte* and SafeBuffer operators to SafeAllocatedMemory.
2019-03-25 17:38:42 -07:00
David Hall
a6bd30dd03
Added FillMemory methods and exposed Zero method as public on SafeAllocatedMemoryHandle
2019-01-25 11:09:07 -05:00
David Hall
627c6d2314
2.0 Checkin - Buildable
2018-10-26 12:24:07 -06:00
David Hall
2524cd22de
Corrected Zero method implementation and use
2018-01-11 14:12:07 -07:00
David Hall
c808717fbf
Added base abstract class SafeAllocatedMemoryHandle for SafeMemoryHandle and GetBytes method to SafeMemoryHandle
2018-01-06 16:36:28 -07:00
David Hall
b44f91b5a1
Initial code push: Core, PInvoke.Shared and PInvoke.TaskSchd
2017-11-27 10:18:01 -07:00