Created
January 21, 2021 22:14
-
-
Save medigor/c2a6c8bb66ecdaecd481544be741e9d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#nowarn "9" | |
open System | |
open System.Runtime.CompilerServices | |
open System.Runtime.InteropServices | |
open Microsoft.FSharp.NativeInterop | |
let readGuid(bytes: byte []): Guid = | |
use ptr = fixed bytes | |
ptr | |
|> NativePtr.toVoidPtr | |
|> Unsafe.ReadUnaligned<Guid> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment