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 kernel32, prefix the name with the module name and a period.
[DllImport("kernel32.dll", SetLastError : true)]
def UpdateProcThreadAttribute(
lpAttributeList as IntPtr,
dwFlags as UInt32,
Attribute as IntPtr,
lpValue as IntPtr,
cbSize as IntPtr,
lpPreviousValue as IntPtr,
lpReturnSize as IntPtr) as bool:
pass
if (!success)
{
throw new Exception("Error adding inheritable handles to process launch");
throw new Exception(string.Format("Error setting [{0}] as the parentPid for the new process", parentProcessId));
}
}
private static void SetInheritableHandles(ref STARTUPINFOEX startupInfoEx, ICollection<IntPtr> inheritableHandles)
{
const int reserved = 0;
var handleArray = inheritableHandles.ToArray();
var pinnedHandleArray = GCHandle.Alloc(handleArray, GCHandleType.Pinned);
IntPtr handles = pinnedHandleArray.AddrOfPinnedObject();
if (!success)
{
throw new Exception("Error adding inheritable handles to process launch");
}
}
Initialize extra attributes for CreateProcess
11/16/2020 1:51:41 PM - -186.136.223.176
Passed in place of STARTUPINFO to extend CreateProcess
1/22/2015 10:29:55 PM - anonymous
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).