Skip to content

Latest commit

 

History

History
94 lines (64 loc) · 3.42 KB

nf-ks-kscreatepin.md

File metadata and controls

94 lines (64 loc) · 3.42 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NF:ks.KsCreatePin
KsCreatePin function (ks.h)
The KsCreatePin function passes a connection request to a device, creating a pin instance. This function can only be called at PASSIVE_LEVEL for kernel-mode clients.
stream\kscreatepin.htm
stream
04/23/2018
KsCreatePin function
KsCreatePin, KsCreatePin function [Streaming Media Devices], ks/KsCreatePin, ksfunc_f49fab36-1309-4eec-addb-4eba94583692.xml, stream.kscreatepin
ks.h
Ks.h
Universal
Ks.lib
Windows
KsCreatePin
ks/KsCreatePin
APIRef
kbSyntax
DllExport
ks.lib
ks.dll
ksuser.dll
KsCreatePin

KsCreatePin function

-description

The KsCreatePin function passes a connection request to a device, creating a pin instance. This function can only be called at PASSIVE_LEVEL for kernel-mode clients.

-parameters

-param FilterHandle [in]

Specifies the handle of the filter initiating the create request and where the connection will occur.

-param 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.

-param 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.

-param 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

The KsCreatePin function returns STATUS_SUCCESS if the connection was successful, or it returns an error if the connection failed. Additionally, this Win32 error code (from Winerror.h) can be returned:

-remarks

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, KsCreatePin creates a pin the caller can use to send requests to the streaming driver specified in Connect->FilterHandle. Connect->PinId determines the pin type of the pin to be created.

-see-also

IRP_MJ_CREATE

KSDATAFORMAT

KSPIN_CONNECT