Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than misc, prefix the name with the module name and a period.
[StructLayout(LayoutKind.Sequential)]
public struct PROCESS_INFORMATION
{
public int hProcess;
public int hThread;
public int dwProcessId;
public int dwThreadId;
}
[StructLayout(LayoutKind.Sequential)]
public struct STARTUPINFO
{
public int cb;
public string lpReserved;
public string lpDesktop;
public string lpTitle;
public int dwX;
public int dwY;
public int dwXSize;
public int dwYSize;
public int dwXCountChars;
public int dwYCountChars;
public int dwFillAttribute;
public int dwFlags;
public short wShowWindow;
public short cbReserved2;
public int lpReserved2;
public int hStdInput;
public int hStdOutput;
public int hStdError;
}
[DllImport("kernel32.dll")]
static extern bool GetExitCodeProcess(IntPtr hProcess, out uint lpExitCode);
private static int STARTF_USESHOWWINDOW = 0x00000001;
private static int STARTF_FORCEONFEEDBACK = 0x00000040;
private static uint NORMAL_PRIORITY_CLASS = 0x00000020;
private static short SW_SHOW = 5;
[STAThread]
static void Main(string[] args)
{
PROCESS_INFORMATION pi = new PROCESS_INFORMATION();
STARTUPINFO si = new STARTUPINFO();
//Optional Startup Information.
si.cb = Marshal.SizeOf(si.GetType());
//Specially useful when Launching Apps from a non-interactive Service.
si.lpDesktop = @"WinSta0\Default";
si.dwFlags = STARTF_USESHOWWINDOW | STARTF_FORCEONFEEDBACK;
si.wShowWindow = SW_SHOW;
CreateProcess(null,
@"C:\WINDOWS\notepad.exe",
IntPtr.Zero,
IntPtr.Zero,
true,
NORMAL_PRIORITY_CLASS,
IntPtr.Zero,
null,
ref si,
out pi);
//Not necessary if you dont want to wait on the process to exit.
Process p = Process.GetProcessById(pi.dwProcessId);
//Wait for the process to exit.
p.WaitForExit();
uint exitCode;
GetExitCodeProcess(new IntPtr(pi.hProcess),out exitCode);
Console.WriteLine("Exit Code: {0}",exitCode.ToString());
}
}
}
Destroys the specified window.
12/20/2022 9:07:18 PM - ksgfk-176.122.161.184
The mechanism provided by the CLR that enables managed code to call static DLL exports.k