Knowledge Base

How To Query the NDIS Version at Run Time

Article ID: 195391

Article Last Modified on 2/12/2007


APPLIES TO


This article was previously published under Q195391

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.

MORE INFORMATION

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: kbinfo kbndis KB195391