Passes a connection request to a device, creating a pin instance.
Supported starting in Windows 8.
KSDDKAPI HRESULT WINAPI KsCreatePin2( _In_ HANDLE FilterHandle, _In_ PKSPIN_CONNECT Connect, _In_ ACCESS_MASK DesiredAccess, _Out_ PHANDLE ConnectionHandle );
- FilterHandle [in]
Specifies the handle of the filter initiating the create request and where the connection will occur.
- Connect [in]
Pointer to a KSPIN_CONNECT structure that contains parameters for the requested connection. This should be followed in memory by a KSDATAFORMAT data structure, describing the data format requested for the connection.
- DesiredAccess [in]
Specifies the access desired to the pin. This is typically GENERIC_READ or GENERIC_WRITE. For data flowing into the pin this value should be set to GENERIC_WRITE, and for data flowing out of the pin this should be set to GENERIC_READ regardless of the communication method.
- ConnectionHandle [out]
Specifies the connection handle passed. The routine fills this in with a handle to the file object of the created connection. This value can then be used to disconnect with the CloseHandle function.
Returns NOERROR if successful; otherwise, returns an error code.
This is a new version of the KsCreatePin 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.
The routine sends an IRP_MJ_CREATE request to the driver. The driver accepts the request only if the interface, medium, and data format are compatible.
If Connect->PinToHandle is NULL, KsCreatePin2 creates a pin that the caller can use to send requests to the streaming driver specified in Connect->FilterHandle. Connect->PinId determines the type of pin to be created.
Minimum supported client
Minimum supported server
|Windows Server 2012|