UnmanagedMemoryStream.PositionPointer UnmanagedMemoryStream.PositionPointer UnmanagedMemoryStream.PositionPointer Property

定義

重要

此 API 不符合 CLS 規範。

依據資料流中的目前位置,取得或設定資料流的位元組指標。Gets or sets a byte pointer to a stream based on the current position in the stream.

public:
 property System::Byte* PositionPointer { System::Byte* get(); void set(System::Byte* value); };
[System.CLSCompliant(false)]
[get: System.Security.SecurityCritical]
[set: System.Security.SecurityCritical]
public byte* PositionPointer { get; set; }
member this.PositionPointer : nativeptr<byte> with get, set

屬性值

Byte*

位元組指標。A byte pointer.

例外狀況

目前位置大於資料流容量。The current position is larger than the capacity of the stream.

正在設定的位置不是目前資料流中的有效位置。The position is being set is not a valid position in the current stream.

正在將指標設為低於資料流起始位置的值。The pointer is being set to a lower value than the starting position of the stream.

資料流已初始化,以搭配 SafeBuffer 使用。The stream was initialized for use with a SafeBuffer. PositionPointer 屬性只適用於以 Byte 指標初始化的資料流。The PositionPointer property is valid only for streams that are initialized with a Byte pointer.

備註

若要傳回整個資料流程的指標, 請將Position屬性設定為零, 然後呼叫這個屬性。To return a pointer to the entire stream, set the Position property to zero, and then call this property.

安全性

SecurityPermission
用於呼叫未受管理的程式碼, 例如使用平台叫用或 COM 整合來呼叫機器碼。for calling unmanaged code, such as calling native code with platform invoke or COM integration. 安全性動作: LinkDemandSecurity action: LinkDemand. 相關聯的列舉:UnmanagedCodeAssociated enumeration: UnmanagedCode

SecurityCriticalAttribute
需要完全信任立即呼叫者。requires full trust for the immediate caller. 部分信任或透明的程式碼無法使用這個成員。This member cannot be used by partially trusted or transparent code.

適用於