Beispiel #1
0
        private static void SetInheritable(SafeHandle handle)
        {
            bool ret = ProcessUtilities.SetHandleInformation(handle, ProcessUtilities.HANDLE_FLAG_INHERIT, ProcessUtilities.HANDLE_FLAG_INHERIT);

            if (!ret)
            {
                throw new NativeWin32Exception(Marshal.GetLastWin32Error(), "SetHandleInformation");
            }
        }