Bewerken

Delen via


PcNewInterruptSync function (portcls.h)

The PcNewInterruptSync function creates and initializes an interrupt-synchronization object.

Syntax

PORTCLASSAPI NTSTATUS PcNewInterruptSync(
  [out]          PINTERRUPTSYNC    *OutInterruptSync,
  [in, optional] PUNKNOWN          OuterUnknown,
  [in]           PRESOURCELIST     ResourceList,
  [in]           ULONG             ResourceIndex,
  [in]           INTERRUPTSYNCMODE Mode
);

Parameters

[out] OutInterruptSync

Output pointer for the interrupt-synchronization object created by this function. This parameter points to a caller-allocated pointer variable into which the function outputs a reference to the newly created IInterruptSync object. Specify a valid, non-NULL pointer value for this parameter.

[in, optional] OuterUnknown

Pointer to the IUnknown interface of an object that needs to aggregate the object. Unless aggregation is required, set this parameter to NULL.

[in] ResourceList

Pointer to the IResourceList object that was provided to the miniport driver during initialization. The port driver will examine this resource list but will not modify it.

[in] ResourceIndex

Specifies the index of the interrupt resource in the resource list. If the IResourceList::NumberOfEntriesOfType method returns a count of N for type CmResourceTypeInterrupt, ResourceIndex must be a value in the range 0 to N-1.

[in] Mode

Specifies the way that multiple ISRs are handled. Set this parameter to one of the INTERRUPTSYNCMODE enumeration values. For more information, see the following Remarks section.

Return value

PcNewInterruptSync returns STATUS_SUCCESS if the call was successful. Otherwise, it returns an appropriate error code.

Remarks

The Mode parameter is set to one of the INTERRUPTSYNCMODE enumeration values in the following table.

Value Meaning
InterruptSyncModeNormal Call each ISR in the list until one of them returns STATUS_SUCCESS.
InterruptSyncModeAll Call each ISR in the list exactly once, regardless of the return codes of the various ISRs.
InterruptSyncModeRepeat Traverse the entire ISR list until a trip through the list occurs in which no ISR in the list returns STATUS_SUCCESS.
 

For detailed descriptions of these three modes, see Interrupt Sync Objects.

The OutInterruptSync, OuterUnknown, and ResourceList parameters follow the reference-counting conventions for COM objects.

Requirements

Requirement Value
Minimum supported client Available starting in Windows 2000.
Target Platform Universal
Header portcls.h (include Portcls.h)
Library Portcls.lib
IRQL PASSIVE_LEVEL

See also

IInterruptSync

IResourceList

IResourceList::NumberOfEntriesOfType