InitializeProcThreadAttributeList

C# Signature:

[DllImport("kernel32.dll", SetLastError=true)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool InitializeProcThreadAttributeList(
     IntPtr lpAttributeList,
     int dwAttributeCount,
     int dwFlags,
     ref IntPtr lpSize);

Boo Signature:

[DllImport("kernel32.dll", SetLastError : true)]
def InitializeProcThreadAttributeList(
    lpAttributeList as IntPtr,
    dwAttributeCount as Int32,
    dwFlags as Int32,
    ref lpSize as IntPtr) as bool:
     pass

Sample Code:

...
    if (attributeCount > 0)
    {
        flags = flags | EXTENDED_STARTUPINFO_PRESENT;
        startupInfoEx.lpAttributeList = InitializeProcThreadAttributeList(attributeCount);
    }
    ...

Sample Code:

Última actualización