NativeInterop.NativePtr 模块 (F#)

包含对本机指针的操作。使用这些运算符可能导致生成不可验证的代码。

命名空间/模块路径: Microsoft.FSharp.NativeInterop

程序集:FSharp.Core(在 FSharp.Core.dll 中)

module NativePtr

说明

添加 : nativeptr<'T> -> int -> nativeptr<'T>

通过将偏移量添加到给定的输入指针,返回一个类型化本机指针。

get : nativeptr<'T> -> int -> 'T

通过对给定的输入指针增加偏移量的计算,取消其类型化本机指针的引用。

ofNativeInt : nativeint -> nativeptr<'T>

返回给定计算机地址的类型化本机指针。

read : nativeptr<'T> -> 'T

取消对给定类型化本机指针的引用。

set : nativeptr<'T> -> int -> 'T -> unit

将值分配到内存位置,该内存位置是通过将偏移量添加到给定的输入指针来计算的类型化本机指针进行引用的。

stackalloc : int -> nativeptr<'T>

在堆栈上分配内存区域。

toNativeInt : nativeptr<'T> -> nativeint

返回给定本机指针的计算机地址。

write : nativeptr<'T> -> 'T -> unit

将 分配到给定类型化本机指针所引用的内存位置。

平台

Windows 8,Windows 7,Windows server 2012中,Windows server 2008 R2

版本信息

F#核心库版本

支持:2.0,4.0,可移植

请参见

参考

Microsoft.FSharp.NativeInterop 命名空间 (F#)