A
afatdog
int retValue;
string Application = Environment.GetEnvironmentVariable("windir") +
@"\Notepad.exe";
string CommandLine = @" c:\boot.ini";
Doghole.MKernel32.PROCESS_INFORMATION pInfo = new
Doghole.MKernel32.PROCESS_INFORMATION();
Doghole.MKernel32.STARTUPINFO sInfo = new
Doghole.MKernel32.STARTUPINFO();
Doghole.MKernel32.SECURITY_ATTRIBUTES pSec = new
Doghole.MKernel32.SECURITY_ATTRIBUTES();
Doghole.MKernel32.SECURITY_ATTRIBUTES tSec = new
Doghole.MKernel32.SECURITY_ATTRIBUTES();
pSec.nLength = Marshal.SizeOf(pSec);
tSec.nLength = Marshal.SizeOf(tSec);
//Open Notepad
retValue = Doghole.MKernel32.CreateProcess(Application,CommandLine,
ref pSec,ref tSec,false,Doghole.MWinBase.NORMAL_PRIORITY_CLASS,
null,null,ref sInfo,out pInfo); // <- error here
Error message:
Additional information: Can not marshal parameter #10: The type definition
of this type has no layout information.
string Application = Environment.GetEnvironmentVariable("windir") +
@"\Notepad.exe";
string CommandLine = @" c:\boot.ini";
Doghole.MKernel32.PROCESS_INFORMATION pInfo = new
Doghole.MKernel32.PROCESS_INFORMATION();
Doghole.MKernel32.STARTUPINFO sInfo = new
Doghole.MKernel32.STARTUPINFO();
Doghole.MKernel32.SECURITY_ATTRIBUTES pSec = new
Doghole.MKernel32.SECURITY_ATTRIBUTES();
Doghole.MKernel32.SECURITY_ATTRIBUTES tSec = new
Doghole.MKernel32.SECURITY_ATTRIBUTES();
pSec.nLength = Marshal.SizeOf(pSec);
tSec.nLength = Marshal.SizeOf(tSec);
//Open Notepad
retValue = Doghole.MKernel32.CreateProcess(Application,CommandLine,
ref pSec,ref tSec,false,Doghole.MWinBase.NORMAL_PRIORITY_CLASS,
null,null,ref sInfo,out pInfo); // <- error here
Error message:
Additional information: Can not marshal parameter #10: The type definition
of this type has no layout information.