Поделиться через


NdisIMInitializeDeviceInstance (Compact 2013)

3/26/2014

This function calls an NDIS intermediate driver's MiniportInitialize function to set up the driver's virtual NIC for I/O operations on an underlying NIC driver to which the intermediate driver is bound.

Syntax

NDIS_STATUS NdisIMInitializeDeviceInstance(
  NDIS_HANDLE DriverHandle,
  PNDIS_STRING DeviceInstance
);

Parameters

  • DeviceInstance
    [in] Points to a buffered, caller-initialized counted string, in the system-default character set, naming the registry key in which the driver stores information about its virtual NIC and, possibly, binding-specific information.

Return Value

The following table shows the return values for this function.

Value

Description

NDIS_STATUS_SUCCESS

The intermediate driver's virtual NIC was successfully initialized.

NDIS_STATUS_NOT_ACCEPTED

NdisIMInitializeDeviceInstanceEx failed because the device specified by DriverHandle has already been initialized.

Remarks

An NDIS intermediate driver usually calls NdisIMInitializeDeviceInstance or NdisIMInitializeDeviceInstanceEx from its ProtocolBindAdapter function.

The driver's installation script created the key designated by DeviceInstance in the configuration registry tree.

Before it calls NdisIMInitializeDeviceInstance, ProtocolBindAdapter must make a successful call to NdisOpenAdapter, thereby binding the intermediate driver to the underlying NIC driver. Then, its subsequent call to NdisIMInitializeDeviceInstance allows the driver's MiniportInitialize function to allocate any resources the driver needs to carry out network I/O operations and to initialize the driver's virtual NIC, to which higher-level protocol drivers can bind themselves when the NDIS intermediate driver's initialization is complete.

Requirements

Header

ndis.h

Library

ndis.lib

See Also

Reference

NDIS 5.x Legacy Functions
MiniportInitialize
NdisIMDeInitializeDeviceInstance
NdisIMInitializeDeviceInstanceEx
NdisIMRegisterLayeredMiniport
NdisInitializeString
NdisOpenAdapter