WindowsRuntimeBuffer.Create Methode
Definition
Überlädt
Create(Int32) |
Gibt eine leere Windows.Storage.Streams.IBuffer-Schnittstelle zurück, die über die angegebene Maximalkapazität verfügt.Returns an empty Windows.Storage.Streams.IBuffer interface that has the specified maximum capacity. |
Create(Byte[], Int32, Int32, Int32) |
Gibt eine Windows.Storage.Streams.IBuffer-Schnittstelle zurück, die einen angegebenen Bytebereich enthält, der aus einem Bytearray kopiert wurde.Returns a Windows.Storage.Streams.IBuffer interface that contains a specified range of bytes copied from a byte array. Wenn die angegebene Kapazität größer als die Anzahl der kopierten Bytes ist, wird der Rest des Puffers NULL-gefüllt.If the specified capacity is greater than the number of bytes copied, the rest of the buffer is zero-filled. |
Create(Int32)
Wichtig
Diese API ist nicht CLS-kompatibel.
Gibt eine leere Windows.Storage.Streams.IBuffer-Schnittstelle zurück, die über die angegebene Maximalkapazität verfügt.Returns an empty Windows.Storage.Streams.IBuffer interface that has the specified maximum capacity.
public:
static Windows::Storage::Streams::IBuffer ^ Create(int capacity);
[System.CLSCompliant(false)]
public static Windows.Storage.Streams.IBuffer Create (int capacity);
[<System.CLSCompliant(false)>]
static member Create : int -> Windows.Storage.Streams.IBuffer
Public Shared Function Create (capacity As Integer) As IBuffer
Parameter
- capacity
- Int32
Die maximale Anzahl von Bytes, die der Puffer enthalten kann.The maximum number of bytes the buffer can hold.
Gibt zurück
Eine Windows.Storage.Streams.IBuffer-Schnittstelle, die über die angegebene Kapazität und eine Length-Eigenschaft mit dem Wert 0 (null) verfügt.A Windows.Storage.Streams.IBuffer interface that has the specified capacity and a Length property equal to 0 (zero).
- Attribute
Ausnahmen
capacity
ist kleiner als 0 (null).capacity
is less than 0 (zero).
Gilt für:
Create(Byte[], Int32, Int32, Int32)
Wichtig
Diese API ist nicht CLS-kompatibel.
Gibt eine Windows.Storage.Streams.IBuffer-Schnittstelle zurück, die einen angegebenen Bytebereich enthält, der aus einem Bytearray kopiert wurde.Returns a Windows.Storage.Streams.IBuffer interface that contains a specified range of bytes copied from a byte array. Wenn die angegebene Kapazität größer als die Anzahl der kopierten Bytes ist, wird der Rest des Puffers NULL-gefüllt.If the specified capacity is greater than the number of bytes copied, the rest of the buffer is zero-filled.
public:
static Windows::Storage::Streams::IBuffer ^ Create(cli::array <System::Byte> ^ data, int offset, int length, int capacity);
[System.CLSCompliant(false)]
public static Windows.Storage.Streams.IBuffer Create (byte[] data, int offset, int length, int capacity);
[<System.CLSCompliant(false)>]
static member Create : byte[] * int * int * int -> Windows.Storage.Streams.IBuffer
Public Shared Function Create (data As Byte(), offset As Integer, length As Integer, capacity As Integer) As IBuffer
Parameter
- data
- Byte[]
Das Bytearray, aus dem kopiert werden soll.The byte array to copy from.
- offset
- Int32
Der Offset in data
, an dem der Kopiervorgang beginnt.The offset in data
from which copying begins.
- length
- Int32
Die Anzahl der zu kopierenden Bytes.The number of bytes to copy.
- capacity
- Int32
Die maximale Anzahl von Bytes, die der Puffer aufnehmen kann. Wenn dieser Wert größer als length
ist, wird der Rest der Bytes im Puffer mit 0 (null) initialisiert.The maximum number of bytes the buffer can hold; if this is greater than length
, the rest of the bytes in the buffer are initialized to 0 (zero).
Gibt zurück
Eine Windows.Storage.Streams.IBuffer-Schnittstelle, die den angegebenen Bytebereich enthält.A Windows.Storage.Streams.IBuffer interface that contains the specified range of bytes. Wenn capacity
größer als length
ist, wird der Rest des Puffers NULL-gefüllt.If capacity
is greater than length
, the rest of the buffer is zero-filled.
- Attribute
Ausnahmen
capacity
, offset
oder length
ist kleiner als 0 (null).capacity
, offset
, or length
is less than 0 (zero).
data
ist NULL.data
is null.
data
beinhaltet beginnend bei offset
keine length
-Elemente.Starting at offset
, data
does not contain length
elements. Oder: Start bei offset
, data
beinhaltet keine capacity
-Elemente.-or-Starting at offset
, data
does not contain capacity
elements.