RoGetBufferMarshaler function (robuffer.h)

Provides a standard IBuffer marshaler to implement the semantics associated with the IBuffer interface when it is marshaled.

Syntax

HRESULT RoGetBufferMarshaler(
  [out] IMarshal **bufferMarshaler
);

Parameters

[out] bufferMarshaler

pointer to Windows Runtime IBuffer marshaler

Return value

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

Provided for Windows Runtime language projections.

Custom IBuffer implementations are expected to be marshaled so that the remote instance eventually copies its contents back to the original instance. The IMarshal implementation provided by this method handles the copy by marshaling the current value of the IBuffer and specifying a platform-provided unmarshal COM class that creates an instance with identical IBuffer contents, length, and capacity.

The IMarshal implementation clones its contents to the original instance when the caller sets the Length property.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 [desktop apps | UWP apps]
Target Platform Windows
Header robuffer.h
DLL Wintypes.dll

See also

IMarshal