let EnableHeapTerminationOnCorruption() =
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && Environment.OSVersion.Version.Major >= 6 && // If OS is Vista or higher
Environment.Version.Major < 3) then // and CLR not 3.0 or higher
let HeapEnableTerminationOnCorruption = 1u : uint32
if not (HeapSetInformation(GetProcessHeap(), HeapEnableTerminationOnCorruption, UIntPtr.Zero, UIntPtr.Zero)) then
raise (System.Security.SecurityException(
"Unable to enable unmanaged process execution option TerminationOnCorruption. " +
"HeapSetInformation() returned FALSE; LastError = 0x" +
GetLastError().ToString("X").PadLeft(8, '0') + "."))
Result
let EnableHeapTerminationOnCorruption () =
if
(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
&& Environment.OSVersion.Version.Major >= 6
&& Environment // If OS is Vista or higher
.Version.Major < 3)
then // and CLR not 3.0 or higher
let HeapEnableTerminationOnCorruption = 1u: uint32
if
not (HeapSetInformation(GetProcessHeap(), HeapEnableTerminationOnCorruption, UIntPtr.Zero, UIntPtr.Zero))
then
raise (
System.Security.SecurityException(
"Unable to enable unmanaged process execution option TerminationOnCorruption. "
+ "HeapSetInformation() returned FALSE; LastError = 0x"
+ GetLastError().ToString("X").PadLeft(8, '0')
+ "."
)
)
Problem description
&& // If OS is Vista or higher is not restored correctly leading to an offset problem.
I'm not sure why the online tool didn't pick up this problem after the first format.
Extra information
[x] The formatted result breaks my code.
[ ] The formatted result gives compiler warnings.
[ ] I or my company would be willing to help fix this.
[ ] I would like a release if this problem is solved.
Options
Fantomas main branch at 6/1/2023
Default Fantomas configuration
Did you know that you can ignore files when formatting by using a .fantomasignore file?PS: It's unlikely that someone else will solve your specific issue, as it's something that you have a personal stake in.
Issue created from fantomas-online
Code
Result
Problem description
&& // If OS is Vista or higher
is not restored correctly leading to an offset problem. I'm not sure why the online tool didn't pick up this problem after the first format.Extra information
Options
Fantomas main branch at 6/1/2023
Default Fantomas configuration
Did you know that you can ignore files when formatting by using a .fantomasignore file? PS: It's unlikely that someone else will solve your specific issue, as it's something that you have a personal stake in.