Commit Graph

155 Commits (d1d0ff51ca959a1e0f60c34382260d8d353b5f6a)

Author SHA1 Message Date
David Hall 6fb1d69828 Fixed exceptions being thrown by `BOOL` and `BOOLEAN` when interacting with `int` and ! operator 2022-11-18 07:54:12 -07:00
dahall d5cbaabf5f Removed implicit operators with SafeLPXSTR classes to prevent compiler confusion 2022-09-22 11:09:42 -06:00
dahall d7a7a340f5 Added implicit operators to new types for GuidPtr, and StrPtrXX variants 2022-08-29 16:21:43 -06:00
dahall b1247750f6 Simplified NativeMemoryStream.Write() 2022-08-29 16:21:01 -06:00
dahall 93bdb99f43 Added SafeMemoryHandleEx.AddSubReference 2022-08-29 16:20:24 -06:00
dahall 9dc2de859d Added nullable type handling to IntPtr.Convert 2022-08-29 16:19:37 -06:00
dahall 155609864a Fixed minor build errors 2022-08-05 21:03:44 -06:00
dahall 34bed8cfb4 Cleaned handle classes 2022-07-28 22:19:53 -06:00
dahall 480f5df595 Added string classes via template 2022-07-20 17:40:09 -06:00
dahall eeb429ebb6 Added ! operator support to SafeAllocatedMemoryHandle and SafeMemoryHandle.Clone() method 2022-07-20 17:36:27 -06:00
dahall 2ce6552190 Enhanced SafeMemString with nullable support and the addition of methods, properties and operators to mimic StringBuilder 2022-07-20 17:35:05 -06:00
dahall 0320c6b7b6 Enabled nullable support for string related classes 2022-07-20 17:33:26 -06:00
dahall b0d7174d5a Added SafeMemoryPool class to auto dispose temporary pointers. 2022-07-16 17:43:48 -06:00
dahall ca94a21b15 Added operator overloads to `SizeT` 2022-05-16 13:14:38 -06:00
dahall 3876cce9a0 Added indexer to SafeMemString 2022-03-10 17:43:56 -07:00
dahall 9e69ce32ca Made CorrespondingTypeAttribute.GetAttrForEnum public. 2022-02-22 19:38:50 -07:00
dahall a9ae8df90a Extended SafeAllocatedMemoryHandle.ToType extension method to support CharSet 2022-02-15 16:01:21 -07:00
dahall d29963d39a Added PinnedObject implicit operator to unsafe void*. 2022-02-05 15:14:55 -07:00
dahall 4ce428215c Added SafeAllocatedMemoryHandleBase.GetBytes() and pulled SafeMemoryHandle.Locked from IMemoryMethods instance 2022-01-22 15:30:42 -07:00
dahall 5a511172ea Added extra buffer when setting size from VanaraMarshaler to prevent errors when they're off due to alignment issues 2022-01-22 15:28:48 -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 26bd7d8e04 Added IEquatable support to GuidPtr and StrPtr* structs.
Added char* cast to StrPtrUni and sbyte* cast to StrPtrAnsi.
2021-09-27 15:47:33 -06:00
dahall 231ea34f17 Added IsNullOrEmpty property to StrPtrXX structures. 2021-09-21 16:11:45 -06:00
dahall b864f19066 Added CorrespondingTypeAttribute.EncodingType property to allow for encoding as part of a conversion. 2021-08-17 11:06:35 -06:00
dahall 4694988177 Enhanced ComConnectionPoint 2021-03-28 20:12:48 -06:00
dahall ce5e582d25 Updated ComStream to support IStream implementation 2021-03-28 16:34:49 -06:00
dahall 967389e246 Removed all calls to `Marshal.ReleaseComObject` where there exists a possibility that the interface could have been referenced by another object and changed to nulling the holding variable. See discussion thread #188. 2021-02-01 16:08:43 -07:00
dahall 2b4cfee7e2 Added SafeMemStruct.InitializeSizeField method to initialize an in-memory structure's size field 2021-01-25 12:10:13 -07:00
dahall affe76ff74 Added Append overloaded methods to SafeMemStruct to extend memory and write in bytes, memory or objects and return a pointer to the newly written element. Also added GetFieldAddress method to get the location of a field in the structure's memory. 2021-01-20 16:56:09 -07:00
dahall c5c0833b98 Added binary negate overload to BOOL and BOOLEAN 2021-01-14 11:15:16 -07:00
dahall e1cfb9c8ce Added ISafeMemoryHandle.GetBytes method that was already implemented all implemented classes 2021-01-11 11:19:15 -07:00
dahall bf89a972a2 Added Null field to SafeCoTaskMemStruct<T> and SafeCoTaskMemStruct<T> 2020-12-30 20:47:14 -07:00
dahall 76fc958c10 Abstracted out read-only methods from SafeAllocatedMemoryHandl into SafeAllocatedMemoryHandleBase 2020-12-22 16:26:27 -07:00
dahall f1b7e7c363 Added more detail to error msg in VanaraMarshalerAttribute 2020-12-17 15:42:50 -07:00
dahall 5dd910e41c Added time_t class with conversion support to/from DateTime 2020-11-19 14:47:13 -07:00
dahall 57219c7cc9 Fixed code with new warnings -- no functionality change 2020-11-14 13:36:32 -07:00
dahall ab4f3c5bd2 Removed explicit exception re-throw to prevent warning 2020-11-14 10:11:47 -07:00
dahall 8344b80f2a Moved DECIMAL to Ole 2020-11-11 19:57:15 -07:00
dahall 9a52915d58 Added OLE based DECIMAL struct 2020-11-10 09:44:27 -07:00
dahall 30167bc6ca Fixed bug with CorrespondingTypeAttribute.GetAttrForEnum with default action 2020-10-22 14:31:33 -06:00
dahall a8ef6e11c8 Added NativeMemoryStream.ReadToPtr and WriteFromPtr methods to interact with allocated memory. 2020-09-10 10:13:56 -06:00
NN 80bfe2ce20
Call to closeMethod in GenericSafeHandle. (#161) 2020-08-27 10:25:14 -06:00
dahall c5814672d5 Added protected size and offset values 2020-08-19 20:51:11 -06:00
dahall c88d9feb3c Added LibHelper class with Is64BitProcess and DoesWin32MethodExist methods 2020-08-05 10:36:37 -06: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 b3842a902a Fixed compile warning for unused variable in Convert 2020-07-13 07:56:43 -06:00
NN 9e5e73b27c
Throw the exception with stack (#148) 2020-07-12 07:55:22 -06:00
dahall f0976ae924 Added implicit conversion operator to SafeCoTaskMemStruct and SafeHGlobalStruct from nullable struct. 2020-05-27 22:14:24 -06:00