diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-01-08 15:12:45 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-01-08 15:12:45 +0200 |
| commit | 65e6368cbe7eeddd02bbd43ae5159ab4b762165f (patch) | |
| tree | f137a7a2cbcacab1ee3533b5f41c1c388ad32d4f /Software/Visual_Studio/Tango.PMR/NativePMR.cs | |
| parent | e2bf9f578c3ed53d869744f94b020048ca806c6e (diff) | |
| download | Tango-65e6368cbe7eeddd02bbd43ae5159ab4b762165f.tar.gz Tango-65e6368cbe7eeddd02bbd43ae5159ab4b762165f.zip | |
Fixed color conversion memory leak by dynamically loading the library. (LoadLibrary, FreeLibrary)
Diffstat (limited to 'Software/Visual_Studio/Tango.PMR/NativePMR.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.PMR/NativePMR.cs | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Software/Visual_Studio/Tango.PMR/NativePMR.cs b/Software/Visual_Studio/Tango.PMR/NativePMR.cs index 14e740656..5666fbeb0 100644 --- a/Software/Visual_Studio/Tango.PMR/NativePMR.cs +++ b/Software/Visual_Studio/Tango.PMR/NativePMR.cs @@ -10,6 +10,16 @@ using System.Runtime.ExceptionServices; namespace Tango.PMR { /// <summary> + /// Represents a standard C++ protobuf method delegate. + /// </summary> + /// <param name="requestArray">The request array.</param> + /// <param name="requestArraySize">Size of the request array.</param> + /// <param name="resultArray">The result array.</param> + /// <returns>The size of the result array.</returns> + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int NativeMethodDelegate(IntPtr requestArray, int requestArraySize, ref IntPtr resultArray); + + /// <summary> /// Represents a PMR wrapper for invoking native protobuf supported methods. /// </summary> /// <typeparam name="Request">The type of the Request.</typeparam> @@ -28,15 +38,6 @@ namespace Tango.PMR } /// <summary> - /// Represents a standard C++ protobuf method delegate. - /// </summary> - /// <param name="requestArray">The request array.</param> - /// <param name="requestArraySize">Size of the request array.</param> - /// <param name="resultArray">The result array.</param> - /// <returns>The size of the result array.</returns> - public delegate int NativeMethodDelegate(IntPtr requestArray, int requestArraySize, ref IntPtr resultArray); - - /// <summary> /// Invokes the native method with the specified request. /// </summary> /// <param name="request">The request.</param> |
