Пример #1
0
        public static DebugServerError debugserver_client_set_argv(DebugServerClientHandle client, int argc, System.Collections.ObjectModel.ReadOnlyCollection <string> argv, out string response)
        {
            System.Runtime.InteropServices.ICustomMarshaler responseMarshaler = NativeStringMarshaler.GetInstance(null);
            System.IntPtr responseNative = System.IntPtr.Zero;
            System.Runtime.InteropServices.ICustomMarshaler argvMarshaler = NativeStringArrayMarshaler.GetInstance(null);
            System.IntPtr    argvNative  = argvMarshaler.MarshalManagedToNative(argv);
            DebugServerError returnValue = DebugServerNativeMethods.debugserver_client_set_argv(client, argc, argvNative, out responseNative);

            response = ((string)responseMarshaler.MarshalNativeToManaged(responseNative));
            responseMarshaler.CleanUpNativeData(responseNative);
            return(returnValue);
        }
Пример #2
0
 /// <summary>
 /// Sets the argv which launches an app.
 /// </summary>
 /// <param name="client">
 /// The debugserver client
 /// </param>
 /// <param name="argc">
 /// Number of arguments
 /// </param>
 /// <param name="argv">
 /// Array starting with the executable to be run followed by it's arguments
 /// </param>
 /// <param name="response">
 /// Response received for the command (can be NULL to ignore)
 /// </param>
 /// <returns>
 /// DEBUGSERVER_E_SUCCESS on success,
 /// DEBUGSERVER_E_INVALID_ARG when client is NULL
 /// </returns>
 public virtual DebugServerError debugserver_client_set_argv(DebugServerClientHandle client, int argc, System.Collections.ObjectModel.ReadOnlyCollection <string> argv, out string response)
 {
     return(DebugServerNativeMethods.debugserver_client_set_argv(client, argc, argv, out response));
 }