NdisFreePacket Macro Causes NDIS Protocol Drivers to Fail in Windows 2000

ID: Q247154


The information in this article applies to:
  • Microsoft Windows 2000 Professional


SYMPTOMS

When you use a computer running Microsoft Windows 2000 Professional Beta 3 to call the NdisAllocatePacket function, the third-party network driver interface specification (NDIS) protocol drivers may not work.


CAUSE

This problem occurs because the NdisFreePacket macro from the Microsoft Windows NT 4.0 Device Driver Kit (DDK) is not compatible with the NdisAllocatePacket function exported by Windows 2000.


RESOLUTION

To work around this behavior, you can use one of two methods:

Build the driver, and then recompile the NDIS protocol driver by using the Windows 2000 (Windows NT 5.0) DDK.

NOTE: The Windows 2000 DDK defines both NdisAllocatePacket and NdisFreePacket as NDIS library exports. The resulting driver appears to work on both Windows NT 4.0 Service Pack 3 and Windows 2000 Beta 3.

OR
Build the driver, using the Windows NT 4.0 DDK with a modified NdisFreePacket definition. The following fragment can be included after the #include for NDIS.H:

#if defined(NdisFreePacket)  
#undef NdisFreePacket    
VOID  NdisFreePacket(     IN PNDIS_PACKET Packet     );    
#endif     
The fragment changes the Windows NT 4.0 MACRO definition for NdisFreePacket and forces use of the NdisFreePacket function exported by the NDIS library. The resulting driver appears to work on both Windows NT 4.0 Service Pack 3 and Windows 2000 Beta 3.


STATUS

Microsoft has confirmed this to be a problem in Microsoft Windows 2000 Professional.

Additional query words: third party custom network

Keywords :
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: December 29, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.