NdisFreePacket Macro Causes NDIS Protocol Drivers to Fail in Windows 2000 (247154)



The information in this article applies to:

  • Microsoft Windows 2000 Professional

This article was previously published under Q247154

SYMPTOMS

When you use a computer running Microsoft Windows 2000 Professional 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 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.

STATUS

Microsoft has confirmed that this is a problem in Microsoft Windows 2000 Professional.

Modification Type:MajorLast Reviewed:10/3/2003
Keywords:kbbug kbpending KB247154