UnrealSkill-VIP
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

[C#] Run Process with CreateProcess Source

Ir para baixo

[C#] Run Process with CreateProcess Source Empty [C#] Run Process with CreateProcess Source

Mensagem por uNreal 11/7/2020, 01:42

Código:
using System;

using System.Windows;

using System.Diagnostics;

using System.Runtime.InteropServices;



public struct PROCESS_INFORMATION

{

    public IntPtr hProcess;

    public IntPtr hThread;

    public uint dwProcessId;

    public uint dwThreadId;

}







public struct STARTUPINFO

{

    public uint cb;

    public string lpReserved;

    public string lpDesktop;

    public string lpTitle;

    public uint dwX;

    public uint dwY;

    public uint dwXSize;

    public uint dwYSize;

    public uint dwXCountChars;

    public uint dwYCountChars;

    public uint dwFillAttribute;

    public uint dwFlags;

    public short wShowWindow;

    public short cbReserved2;

    public IntPtr lpReserved2;

    public IntPtr hStdInput;

    public IntPtr hStdOutput;

    public IntPtr hStdError;

}

public struct SECURITY_ATTRIBUTES

{

    public int length;

    public IntPtr lpSecurityDescriptor;

    public bool bInheritHandle;

}

namespace CreateProcess

{

    public partial class MainWindow : Window

    {

        public MainWindow()

        {

            InitializeComponent();

           

        }



        private void Button_Click(object sender, RoutedEventArgs e)

        {

            STARTUPINFO si = new STARTUPINFO();



            PROCESS_INFORMATION pi = new PROCESS_INFORMATION();

 

            CreateProcess("Requiem.exe", "128.241.93.161 -FromLauncher 0/0 0 0 1 3 0", IntPtr.Zero, IntPtr.Zero, false, 0, IntPtr.Zero, null, ref si, out pi);

        }



        [DllImport("kernel32.dll")]

        static extern bool CreateProcess(string lpApplicationName, string lpCommandLine, IntPtr lpProcessAttributes, IntPtr lpThreadAttributes,

        bool bInheritHandles, uint dwCreationFlags, IntPtr lpEnvironment,

        string lpCurrentDirectory, ref STARTUPINFO lpStartupInfo,out PROCESS_INFORMATION lpProcessInformation);



    }

}
uNreal
uNreal
ADM
ADM


Ir para o topo Ir para baixo

Ir para o topo

- Tópicos semelhantes

 
Permissões neste sub-fórum
Não podes responder a tópicos