// 61883.h
typedef struct _CMP_CREATE_PLUG {
IN CMP_PLUG_TYPE PlugType;
IN AV_PCR Pcr;
IN PCMP_NOTIFY_ROUTINE pfnNotify;
IN PVOID Context;
OUT ULONG PlugNum;
OUT HANDLE hPlug;
} CMP_CREATE_PLUG, *PCMP_CREATE_PLUG;
View the official Windows Driver Kit DDI referenceNo description available.
This structure is used to create a plug. The request creates an input or output plug control register (iPCR or oPCR) on the local host. A driver is responsible for deleting all of the plugs it has created before the system unloads the driver.
PlugTypeOn input, the type of plug to create. Can be one of the following:
An output plug, which transmits data from the device to the bus.
An input plug, which receives data sent by the bus to the device.
PcrOn input, an AV_PCR structure that contains values used by the protocol driver to initialize the plug.
pfnNotifyOn input, a pointer to a caller-supplied function to be called by the protocol driver when the plug is created.
ContextOn input, a pointer to an optional caller-supplied context for the function at pfnNotify.
PlugNumOn output, the plug number.
hPlugOn output, the handle of the created plug
The plug number of the newly created plug. If the plug could not be created, PlugNum is zero (0).
A handle to the newly created plug. If the plug could not be created, hPlug is null.
If successful, the IEC-61883 protocol driver sets Irp->IoStatus.Status to STATUS_SUCCESS.
If an incorrect parameter is passed in, the protocol driver sets Irp->IoStatus.Status to STATUS_INVALID_PARAMETER.
If the protocol driver is unable to allocate resources, it sets Irp->IoStatus.Status to STATUS_INSUFFICIENT_RESOURCES.