Bewerken

Delen via


NdisIMCancelInitializeDeviceInstance function (ndis.h)

The NdisIMCancelInitializeDeviceInstance function cancels a preceding call to the NdisIMInitializeDeviceInstanceEx function.

Syntax

NDIS_STATUS NdisIMCancelInitializeDeviceInstance(
  [in] NDIS_HANDLE  DriverHandle,
  [in] PNDIS_STRING DeviceInstance
);

Parameters

[in] DriverHandle

The miniport driver handle that the NdisMRegisterMiniportDriver function returned at the NdisMiniportDriverHandle parameter.

[in] DeviceInstance

A pointer to an NDIS_STRING type that describes a caller-initialized counted string in the system-default character set. The string contains the name of the registry key in which the driver stores information about a virtual miniport and, possibly, binding-specific information. For Microsoft Windows 2000 and later drivers, this string contains Unicode characters. That is, for Windows 2000 and later, NDIS defines the NDIS_STRING type as a UNICODE_STRING type.

Return value

NdisIMCancelInitializeDeviceInstance returns NDIS_STATUS_SUCCESS if it canceled the preceding call to NdisIMInitializeDeviceInstanceEx. Otherwise, it returns NDIS_STATUS_FAILURE if there is no way to stop the initialization operation for the virtual miniport.

Remarks

An intermediate driver calls the NdisIMInitializeDeviceInstanceEx function to initiate the initialization operation for a virtual miniports.Before NDIS calls the driver's MiniportInitializeEx function, the driver can call NdisIMCancelInitializeDeviceInstance to cancel the initialization operation. For example, if an underlying driver that the intermediate driver requires for normal operation is removed, the intermediate driver can cancel the initialization for any virtual miniports that are associated with the removed driver.

Requirements

Requirement Value
Minimum supported client Supported for NDIS 6.0 and NDIS 5.1 drivers (see NdisIMCancelInitializeDeviceInstance (NDIS 5.1)) in Windows Vista. Supported for NDIS 5.1 drivers (see NdisIMCancelInitializeDeviceInstance (NDIS 5.1)) in Windows XP.
Target Platform Desktop
Header ndis.h (include Ndis.h)
Library Ndis.lib
IRQL PASSIVE_LEVEL
DDI compliance rules Irql_IM_Function(ndis)

See also

MiniportInitializeEx

NdisIMInitializeDeviceInstanceEx

NdisMRegisterMiniportDriver

UNICODE_STRING