Microsoft KB Archive/195391

{|
 * width="100%"|

HOWTO: Query the NDIS Version at Run Time

 * }

Q195391

-

The information in this article applies to:


 * Microsoft Win32 Device Driver Kit (DDK) for Windows NT, versions 3.51, 4.0

-

SUMMARY
This article explains how drivers using NDIS (miniports, protocols) can query the current NDIS version at run time. This is particularly useful when you need to make changes to legacy drivers to adapt to later versions of NDIS.

Sample Code
  NDIS_STRING VersionStr = NDIS_STRING_CONST("NdisVersion"); PNDIS_CONFIGURATION_PARAMETER ReturnedValue;

NdisReadConfiguration(&Status,                        &ReturnedValue,                         ConfigHandle,                         &VersionStr,                         NdisParameterInteger); if (Status == NDIS_STATUS) {          //            // The returned value has the NDIS version of the form // 0xMMMMmmmm, where MMMM is major version and mmmm is minor // version so 0x00050000 is 5.0 //           Version = ReturnedValue->ParameterData.IntegerData; } Keywords : kbDDK kbNDIS kbOSWinNT400

Issue type : kbinfo

Technology : kbAudDeveloper kbWinDDKSearch kbWin32sSearch kbWin32DDKSearch kbWin32DDKNT351 kbWin32DDKNT400 kbWin32DDKNTSearch