KsCreateAllocator2 function (ks.h)

Creates a handle to an allocator for the given sink connection handle. This function does not complete the IRP or set the status in the IRP.

Supported starting in Windows 8.

Syntax

KSDDKAPI HRESULT KsCreateAllocator2(
  [in]  HANDLE               ConnectionHandle,
  [in]  PKSALLOCATOR_FRAMING AllocatorFraming,
  [out] PHANDLE              AllocatorHandle
);

Parameters

[in] ConnectionHandle

Specifies the handle to the sink connection on which to create the allocator.

[in] AllocatorFraming

A pointer to a KSALLOCATOR_FRAMING structure that specifies framing for the allocator.

[out] AllocatorHandle

Specifies the pointer to a handle to store the allocator handle.

Return value

Returns NOERROR if successful; otherwise, returns an error code.

Remarks

This is a new version of the KsCreateAllocator function and uses the device broker to create the handle to the kernel streaming object. In addition, the Component Object Model (COM) CoInitialize function must be called before this function is called.

Requirements

Requirement Value
Minimum supported client Windows 8
Minimum supported server Windows Server 2012
Target Platform Universal
Header ks.h (include Ks.h)
IRQL PASSIVE_LEVEL

See also

CoInitialize

KSALLOCATOR_FRAMING

KsCreateAllocator