Exemplo n.º 1
0
 public static void debugserver_decode_string(string encodedBuffer, uint encodedLength, out string buffer)
 {
     System.Runtime.InteropServices.ICustomMarshaler bufferMarshaler = NativeStringMarshaler.GetInstance(null);
     System.IntPtr bufferNative = System.IntPtr.Zero;
     DebugServerNativeMethods.debugserver_decode_string(encodedBuffer, encodedLength, out bufferNative);
     buffer = ((string)bufferMarshaler.MarshalNativeToManaged(bufferNative));
     bufferMarshaler.CleanUpNativeData(bufferNative);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Decodes a hex encoded string.
 /// </summary>
 /// <param name="encoded_buffer">
 /// The buffer with a hex encoded string
 /// </param>
 /// <param name="encoded_length">
 /// Length of the encoded buffer
 /// </param>
 /// <param name="buffer">
 /// Decoded string to be freed by the caller
 /// </param>
 public virtual void debugserver_decode_string(string encodedBuffer, uint encodedLength, out string buffer)
 {
     DebugServerNativeMethods.debugserver_decode_string(encodedBuffer, encodedLength, out buffer);
 }