Path: news.mitre.org!blanket.mitre.org!agate!logbridge.uoregon.edu!newsfeed.internetmci.com!205.138.237.1!news.abhiweb.net!news-admin From: "Hemant Jain" Newsgroups: comp.os.ms-windows.programmer.nt.kernel-mode Subject: NDIS Intermediate Driver - IMSAMP Sample Date: Tue, 9 Dec 1997 16:26:30 -0800 Organization: Internet Devices Inc. Lines: 24 Message-ID: <66kmsp$9kg@santaclara.abhiweb.net> NNTP-Posting-Host: idi-fk-gw.abhiweb.com X-Newsreader: Microsoft Outlook Express 4.71.1712.3 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 As per the NTDDK documentation: 1. An intermediate driver must set the NDIS_ATTRIBUTE_INTERMEDIATE_DRIVER flag when it calls NdisMSetAttributesEx in its MiniportInitialize function. NDIS identifies that a driver is an intermediate type only through the presence of this flag and takes special steps to ensure that deferred actions, such as passing internally-queued send packets on to the intermediate driver, occur without deadlocks. 2. The ProtocolReceiveComplete function of an NDIS intermediate driver cannot simply forward completion indications to still higher-level protocols. Such an attempt can cause a deadlock. Instead, such a driver must call NdisIMSwitchToMiniport to forward the indication from the appropriate context. If NdisIMSwitchToMiniport returns FALSE, the driver must call NdisIMQueueMiniportCallback and forward the indication from a protocol-supplied MiniportCallback function. The IMSAMP sample does not set the intermediate attribute. Does it mean IMSAMP is technically not an intermediate driver? Also in its ProtocolReceiveComplete Handler, it does not switch to miniport. Can somebody explain this? Hemant